Compare commits
412 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35a9036f79 | ||
|
|
eee934cf23 | ||
|
|
6b95edbe3b | ||
|
|
414821f5d0 | ||
|
|
ddfb03b581 | ||
|
|
6dcccc6a51 | ||
|
|
d65e5ccfd3 | ||
|
|
5af750b469 | ||
|
|
98970a597c | ||
|
|
fad774f2f2 | ||
|
|
ac47a2e425 | ||
|
|
9276e95d51 | ||
|
|
ea89fb5810 | ||
|
|
4e55f7186c | ||
|
|
6499fc29a0 | ||
|
|
45ae68bfbf | ||
|
|
b77d7a10aa | ||
|
|
d1a4e7cb33 | ||
|
|
07e0eb4e50 | ||
|
|
510cbd2d34 | ||
|
|
b8bbf10f90 | ||
|
|
c8abd803bd | ||
|
|
aadce9e220 | ||
|
|
4876d12898 | ||
|
|
06a2ec3d7d | ||
|
|
7e7c476736 | ||
|
|
bcab9ee2c5 | ||
|
|
be8bb4fcfd | ||
|
|
9f410a1a5a | ||
|
|
b31dda1348 | ||
|
|
11ab7e4442 | ||
|
|
88efbadf17 | ||
|
|
259243008c | ||
|
|
5f54356876 | ||
|
|
a7695170a6 | ||
|
|
e947ba6b57 | ||
|
|
d8fab78967 | ||
|
|
292483eb7b | ||
|
|
b4012b80cc | ||
|
|
fca30a3d59 | ||
|
|
9289c0f0b5 | ||
|
|
2f64dfedf1 | ||
|
|
f99f9d39cc | ||
|
|
6224dc636a | ||
|
|
6587b2967f | ||
|
|
ef5a40d954 | ||
|
|
457d223696 | ||
|
|
9d6e8a6424 | ||
|
|
12f0498af8 | ||
|
|
477b3f1b73 | ||
|
|
2dcb81e566 | ||
|
|
8aab04c0cf | ||
|
|
ed230de38d | ||
|
|
e2246e0d21 | ||
|
|
5ffa9d08f4 | ||
|
|
1f981893f6 | ||
|
|
04fec4a442 | ||
|
|
17ac16eddf | ||
|
|
801b59944e | ||
|
|
671e95bdf2 | ||
|
|
c051517a1a | ||
|
|
9f399387a5 | ||
|
|
6040024110 | ||
|
|
0642379858 | ||
|
|
5730bf7722 | ||
|
|
3ed39c8396 | ||
|
|
b229065fc5 | ||
|
|
ad54537443 | ||
|
|
302c70bfe2 | ||
|
|
8ca709604a | ||
|
|
a2a4465df4 | ||
|
|
50201a5457 | ||
|
|
22a1366b2a | ||
|
|
53be102a16 | ||
|
|
e88424ed9f | ||
|
|
c79abd9d64 | ||
|
|
606f69b01e | ||
|
|
c7e0e80181 | ||
|
|
0e7a4ab3f3 | ||
|
|
4319a9f787 | ||
|
|
26dd64fa5b | ||
|
|
38847373cd | ||
|
|
3bdda96fb1 | ||
|
|
ae0c2a5867 | ||
|
|
4f9dbd6011 | ||
|
|
982f95e893 | ||
|
|
a1897149c8 | ||
|
|
7178561280 | ||
|
|
ca444af7d1 | ||
|
|
aa2e0eadfa | ||
|
|
28ab4e1bc5 | ||
|
|
465634a16e | ||
|
|
3196947857 | ||
|
|
992b27fcf9 | ||
|
|
84f6b0ab53 | ||
|
|
8f2856f8ec | ||
|
|
54d88eec7e | ||
|
|
08bea72000 | ||
|
|
1286d85054 | ||
|
|
514c6d9825 | ||
|
|
322e1404ef | ||
|
|
7834f353f1 | ||
|
|
47536645a2 | ||
|
|
bec0875556 | ||
|
|
4b8ccfbf34 | ||
|
|
26a536bc9b | ||
|
|
635f9c1bc5 | ||
|
|
47fddf1899 | ||
|
|
7b1a2fa908 | ||
|
|
1eada6a5e8 | ||
|
|
f1152cd6b7 | ||
|
|
55c3b73f35 | ||
|
|
1eda16d186 | ||
|
|
b2fbefb6d3 | ||
|
|
11743afbf0 | ||
|
|
d40ee36348 | ||
|
|
c24e0d3888 | ||
|
|
360940f68e | ||
|
|
4ce5ba6a75 | ||
|
|
197bd0c864 | ||
|
|
ba06bac1b9 | ||
|
|
9dc6d8e130 | ||
|
|
afe042de46 | ||
|
|
358fb72baf | ||
|
|
98d6a3b53e | ||
|
|
9ebe708741 | ||
|
|
ba56474f15 | ||
|
|
ec642788d3 | ||
|
|
adf98b53f5 | ||
|
|
ae1b695fc5 | ||
|
|
6c099c4ad0 | ||
|
|
96c737eae4 | ||
|
|
32cf4ac3e2 | ||
|
|
eba867a3bb | ||
|
|
2769428405 | ||
|
|
9b44e9e1fb | ||
|
|
19b4e08c3b | ||
|
|
faa18ab8e1 | ||
|
|
e5231a81bc | ||
|
|
cf1aab8c23 | ||
|
|
9c7968d924 | ||
|
|
e8569f7054 | ||
|
|
89affb1984 | ||
|
|
c9efe22844 | ||
|
|
46ea507182 | ||
|
|
1a39e72b14 | ||
|
|
7638ed11d6 | ||
|
|
f2b5531eb0 | ||
|
|
537f6baa09 | ||
|
|
4e905cdf71 | ||
|
|
abfc2c5d31 | ||
|
|
1feb046645 | ||
|
|
ec2310e08e | ||
|
|
d020e5e860 | ||
|
|
84749d5241 | ||
|
|
3e4635d710 | ||
|
|
acaa21d231 | ||
|
|
fa5c9c45d0 | ||
|
|
26cbcbf872 | ||
|
|
d0dcb835ba | ||
|
|
3127c9f616 | ||
|
|
c90cb03fbd | ||
|
|
ebd174d4c8 | ||
|
|
7d1a9c554b | ||
|
|
9557f8dbf5 | ||
|
|
a5cd973156 | ||
|
|
87828515a1 | ||
|
|
0eccfe8ba4 | ||
|
|
af84293c3e | ||
|
|
a8283824a5 | ||
|
|
0066b09405 | ||
|
|
e78fb84953 | ||
|
|
b83e5fff64 | ||
|
|
2ccc78023c | ||
|
|
09eb0b2c8f | ||
|
|
173434ef34 | ||
|
|
3f82c525ad | ||
|
|
a53ead6c64 | ||
|
|
c1da419d01 | ||
|
|
b5b50ace5e | ||
|
|
8650977918 | ||
|
|
1a1590c299 | ||
|
|
3d930b1a3d | ||
|
|
83fa48323f | ||
|
|
e0d56f1ed5 | ||
|
|
f84a650849 | ||
|
|
954b2d9d34 | ||
|
|
59fde3a317 | ||
|
|
577aafb683 | ||
|
|
e628e21879 | ||
|
|
d27c8f09d1 | ||
|
|
7f2a66df88 | ||
|
|
18c983d77a | ||
|
|
1cce122622 | ||
|
|
46b81f5c46 | ||
|
|
d1c4cc89bf | ||
|
|
4ae64b23c6 | ||
|
|
710b1db6be | ||
|
|
070f643a01 | ||
|
|
78d66dc68a | ||
|
|
203dfe249b | ||
|
|
cbd3c43176 | ||
|
|
537d8321e4 | ||
|
|
62004eab56 | ||
|
|
ab9e2b101e | ||
|
|
f02f19652e | ||
|
|
35c6d61a04 | ||
|
|
c14154e5f7 | ||
|
|
40cb28287f | ||
|
|
e1f9e44e51 | ||
|
|
212389980e | ||
|
|
a249dea217 | ||
|
|
1a54e2263b | ||
|
|
fd09beaf48 | ||
|
|
8bd4f66bec | ||
|
|
3871a35de6 | ||
|
|
44543c979a | ||
|
|
49cd46df1d | ||
|
|
237aae9eec | ||
|
|
89cf4a5e76 | ||
|
|
2fa2c855f2 | ||
|
|
52fbf64eec | ||
|
|
721f0f359e | ||
|
|
6aac59bdc8 | ||
|
|
f26047804b | ||
|
|
1a16aee6e9 | ||
|
|
9755831584 | ||
|
|
0ab57fe356 | ||
|
|
df5938a821 | ||
|
|
62c6a80d64 | ||
|
|
2184c8743c | ||
|
|
bea0ea7bcd | ||
|
|
871266bf35 | ||
|
|
1e09e7c612 | ||
|
|
0b530ae67a | ||
|
|
be696b1501 | ||
|
|
95f9c44339 | ||
|
|
61b3991143 | ||
|
|
c00e29fec6 | ||
|
|
1b54e07371 | ||
|
|
1fb7e3ab54 | ||
|
|
cc0bcbbb93 | ||
|
|
b85bec1de3 | ||
|
|
66007a8390 | ||
|
|
bec35edec4 | ||
|
|
3dfe8f889d | ||
|
|
a14555314d | ||
|
|
771058da05 | ||
|
|
d16d595c29 | ||
|
|
7931fe1f42 | ||
|
|
09eec682aa | ||
|
|
1fdd720955 | ||
|
|
c65bdf2341 | ||
|
|
a093c1537d | ||
|
|
e411ab2bcd | ||
|
|
7f3bd620f6 | ||
|
|
dcc1ad5f35 | ||
|
|
2e3c10b008 | ||
|
|
78aeba4117 | ||
|
|
756c8e4d20 | ||
|
|
65f2bcf950 | ||
|
|
2f61d959b9 | ||
|
|
108ff76413 | ||
|
|
8ef559c04f | ||
|
|
08dbe5fea9 | ||
|
|
66d62c9354 | ||
|
|
697239b508 | ||
|
|
ae249b840f | ||
|
|
4d5cfb1571 | ||
|
|
217de501cb | ||
|
|
87269bbd72 | ||
|
|
01cf2615bf | ||
|
|
fd9a91f45c | ||
|
|
778a10c415 | ||
|
|
fdcaa80650 | ||
|
|
1d58701dd8 | ||
|
|
428c9dd71b | ||
|
|
df212e0a35 | ||
|
|
74dfdb660c | ||
|
|
29dd06a99f | ||
|
|
3d5319eb1f | ||
|
|
40cb4f2dc6 | ||
|
|
7bef56ced4 | ||
|
|
797c81e365 | ||
|
|
0f3edeb89b | ||
|
|
d8bf13dd19 | ||
|
|
98a5fb72fe | ||
|
|
67b60efd94 | ||
|
|
a3cbf4a8a9 | ||
|
|
4701227564 | ||
|
|
0bbdee4c2b | ||
|
|
eef391f6b6 | ||
|
|
78355174e8 | ||
|
|
be682e8504 | ||
|
|
a2baf37cd9 | ||
|
|
f4d5e352cc | ||
|
|
ce8b851be2 | ||
|
|
9d9b880f59 | ||
|
|
69c1fe8027 | ||
|
|
1a498b0b76 | ||
|
|
2a6e42a79c | ||
|
|
91975c5bfe | ||
|
|
594adf5366 | ||
|
|
5719f43551 | ||
|
|
4e98e17c4f | ||
|
|
25a49624c7 | ||
|
|
7cb1a20dc6 | ||
|
|
e9de0f4784 | ||
|
|
d333c16347 | ||
|
|
5b416eaf52 | ||
|
|
a2970ca4ad | ||
|
|
83f0b47323 | ||
|
|
6ca869e293 | ||
|
|
35213727c4 | ||
|
|
7b7d7bc068 | ||
|
|
21947837c3 | ||
|
|
fab0890997 | ||
|
|
e103d9b11b | ||
|
|
fcb25e1842 | ||
|
|
503ac7e11b | ||
|
|
ee1b64414d | ||
|
|
7015fd1e5c | ||
|
|
9ce8d083b3 | ||
|
|
a5fa3725e6 | ||
|
|
bd40e67c63 | ||
|
|
a2444b453d | ||
|
|
37c9bd3f87 | ||
|
|
5dcc1cb13c | ||
|
|
e22d74febb | ||
|
|
7f19f72c0d | ||
|
|
fa34f89901 | ||
|
|
f4be860867 | ||
|
|
11f4a2cbb4 | ||
|
|
e98c95c45e | ||
|
|
9654b99992 | ||
|
|
d5a7522d20 | ||
|
|
60f2d48f01 | ||
|
|
abb30fcc79 | ||
|
|
d70c8e0b60 | ||
|
|
b846248064 | ||
|
|
d6c26f8546 | ||
|
|
a4136f4719 | ||
|
|
9d380e5654 | ||
|
|
0653a2b0bf | ||
|
|
aa26dcb094 | ||
|
|
7dfb897b69 | ||
|
|
7c6657e11e | ||
|
|
40997f2e68 | ||
|
|
124a7b7c63 | ||
|
|
f8a2da7a63 | ||
|
|
ef32d2d88f | ||
|
|
1edab5fa4f | ||
|
|
b3c175bb5e | ||
|
|
c6396ddfb8 | ||
|
|
d1ad7c126c | ||
|
|
a6c2f978da | ||
|
|
d089b3b5d1 | ||
|
|
7267467a2d | ||
|
|
ec3c134e4a | ||
|
|
87049bf86c | ||
|
|
ebcbdcd779 | ||
|
|
d93b9751d5 | ||
|
|
fae1ad6669 | ||
|
|
464aecfec9 | ||
|
|
eeb2e69044 | ||
|
|
0b45aea1d0 | ||
|
|
93279b884a | ||
|
|
05c6cecc14 | ||
|
|
ffa9f85cf2 | ||
|
|
47fb8e2093 | ||
|
|
199c9bf615 | ||
|
|
fd765c6ba4 | ||
|
|
0aa194eea7 | ||
|
|
6cbe93c245 | ||
|
|
38fdb87c79 | ||
|
|
8d17d142a8 | ||
|
|
3c2a7f2394 | ||
|
|
966daac040 | ||
|
|
60d1422b26 | ||
|
|
f0e87d2226 | ||
|
|
20c30dc587 | ||
|
|
0657e3a1f1 | ||
|
|
ca1ab188fe | ||
|
|
9f1bfb0d06 | ||
|
|
6e28b9f835 | ||
|
|
9e2c151e9f | ||
|
|
c8ec0825d3 | ||
|
|
c082b68b23 | ||
|
|
babb2766bd | ||
|
|
b983191c6d | ||
|
|
30887d74fc | ||
|
|
f828c7a3ec | ||
|
|
2a99aa7814 | ||
|
|
9f6aade092 | ||
|
|
e01730857c | ||
|
|
514a3efa5c | ||
|
|
476a4efa46 | ||
|
|
21bb5ea2ed | ||
|
|
d9af6516bb | ||
|
|
48452558bd | ||
|
|
04d1160856 | ||
|
|
31cd2f60f2 | ||
|
|
2adae1e39e | ||
|
|
4674ba0dd8 | ||
|
|
fd2c540cd5 | ||
|
|
32af26d7a1 | ||
|
|
b9a9094b46 | ||
|
|
e580869d4f | ||
|
|
28027b9a78 | ||
|
|
852dfc6287 | ||
|
|
c0449d2bf1 | ||
|
|
1f75e7d378 |
@@ -8,8 +8,8 @@ RUN apt-get install --no-install-recommends -y build-essential file nano && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG TARGETARCH
|
||||
RUN wget https://dl.google.com/go/go1.19.2.linux-${TARGETARCH}.tar.gz && \
|
||||
tar -xvf go1.19.2.linux-${TARGETARCH}.tar.gz && \
|
||||
RUN wget https://dl.google.com/go/go1.19.6.linux-${TARGETARCH}.tar.gz && \
|
||||
tar -xvf go1.19.6.linux-${TARGETARCH}.tar.gz && \
|
||||
mv go /usr/local
|
||||
|
||||
RUN GOROOT=/usr/local/go /usr/local/go/bin/go install golang.org/x/tools/gopls@latest 2>&1
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
declare PLUGIN_NAME="$1"
|
||||
install-go-devtools() {
|
||||
go install github.com/go-delve/delve/cmd/dlv@latest
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
}
|
||||
|
||||
install-go-mods() {
|
||||
local plugin_root="/root/go/src/github.com/dokku/dokku/plugins"
|
||||
|
||||
export GO111MODULE=off
|
||||
@@ -22,4 +26,17 @@ main() {
|
||||
popd >/dev/null || true
|
||||
}
|
||||
|
||||
setup-ci() {
|
||||
local dokku_root="/root/go/src/github.com/dokku/dokku"
|
||||
pushd "$plugin_root" >/dev/null || true
|
||||
make ci-dependencies setup-deploy-tests
|
||||
popd >/dev/null || true
|
||||
}
|
||||
|
||||
main() {
|
||||
install-go-mods
|
||||
install-go-devtools
|
||||
setup-ci
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -19,7 +19,7 @@
|
||||
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
|
||||
],
|
||||
"overrideCommand": false,
|
||||
"postCreateCommand": "download-go-mod && make setup-deploy-tests",
|
||||
"postCreateCommand": "setup-dev-env",
|
||||
"runArgs": ["--init"],
|
||||
"workspaceFolder": "/root/go/src/github.com/dokku/dokku",
|
||||
"workspaceMount": "type=bind,source=${localWorkspaceFolder},target=/root/go/src/github.com/dokku/dokku,consistency=cached"
|
||||
|
||||
85
.github/dependabot.yml
vendored
85
.github/dependabot.yml
vendored
@@ -1,61 +1,90 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: pip
|
||||
directory: "/docs/_build"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/ruby"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/multi"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/checks-root"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/config"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-dokku-scale"
|
||||
directory: "/tests/apps/dockerfile-app-json-formations"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-noexpose"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile-bad"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/gitsubmodules"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tests/apps/gogrpc"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
ignore:
|
||||
- dependency-name: google.golang.org/grpc
|
||||
versions:
|
||||
@@ -65,123 +94,173 @@ updates:
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: maven
|
||||
directory: "/tests/apps/java"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-worker"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noappjson"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noprocfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: composer
|
||||
directory: "/tests/apps/php"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: pip
|
||||
directory: "/tests/apps/python-flask"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/.websocket.disabled"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: /""
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-noexpose"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-procfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-entrypoint"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-procfile-bad"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/go-fail-predeploy"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/zombies-dockerfile-no-tini"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-release"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/dockerfile-dokku-scale"
|
||||
directory: "/tests/apps/dockerfile-app-json-formations"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/gogrpc"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/zombies-dockerfile-tini"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/tests/apps/go-fail-postdeploy"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/docs/_build"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
- package-ecosystem: "docker"
|
||||
directory: "/.devcontainer"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- "type: dependencies"
|
||||
|
||||
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
@@ -10,14 +10,19 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
timeout-minutes: 45
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@@ -37,7 +42,7 @@ jobs:
|
||||
run: |
|
||||
json=$(python .github/commands/matrix)
|
||||
echo $json
|
||||
echo "::set-output name=matrix::$(echo "$json")"
|
||||
echo "matrix=$json" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -48,7 +53,7 @@ jobs:
|
||||
unit-tests:
|
||||
name: unit.${{ matrix.index }}
|
||||
needs: build
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{fromJson(needs.build.outputs.matrix)}}
|
||||
@@ -57,9 +62,10 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
@@ -87,7 +93,7 @@ jobs:
|
||||
docker-deploy-tests:
|
||||
name: docker
|
||||
needs: build
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -95,9 +101,10 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
@@ -112,7 +119,7 @@ jobs:
|
||||
go-tests:
|
||||
name: go.${{ matrix.index }}
|
||||
needs: build
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -124,9 +131,10 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v1
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
- name: ci-setup
|
||||
run: ./.github/commands/ci-setup
|
||||
@@ -152,20 +160,20 @@ jobs:
|
||||
publish-test-results:
|
||||
name: publish-test-results
|
||||
needs: unit-tests
|
||||
runs-on: ubuntu-18.04
|
||||
runs-on: ubuntu-20.04
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
steps:
|
||||
- name: download test-results
|
||||
uses: actions/download-artifact@v2
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
path: test-results
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
junit_files: test-results/**/*.xml
|
||||
comment_mode: "off"
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
29
.github/workflows/lint.yml
vendored
29
.github/workflows/lint.yml
vendored
@@ -18,8 +18,8 @@ jobs:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
- name: Run hadolint
|
||||
uses: hadolint/hadolint-action@4b5806eb9c6bee4954fc0e0cc3ad6175fc9782c1
|
||||
# v1.6.0 => d7b38582334d9ac11c12021c16f21d63015fa250
|
||||
uses: hadolint/hadolint-action@54c9adbab1582c2ef04b2016b760714a4bfde3cf
|
||||
# v3.0.0 => 4b5806eb9c6bee4954fc0e0cc3ad6175fc9782c1
|
||||
|
||||
markdown-lint:
|
||||
name: markdown-lint
|
||||
@@ -34,6 +34,23 @@ jobs:
|
||||
config: '.github/linters/.markdown-lint.yml'
|
||||
args: './README.md'
|
||||
|
||||
packer:
|
||||
name: packer
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup packer
|
||||
uses: hashicorp/setup-packer@main
|
||||
with:
|
||||
version: latest
|
||||
- name: Run packer init
|
||||
run: "make image/init/digitalocean"
|
||||
- name: Run `packer validate`
|
||||
env:
|
||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
run: "make image/validate/digitalocean"
|
||||
|
||||
shellcheck:
|
||||
name: shellcheck
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -41,7 +58,7 @@ jobs:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
- name: Run shellcheck
|
||||
uses: ludeeus/action-shellcheck@94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
||||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
|
||||
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
||||
env:
|
||||
# keep in sync with tests/shellcheck-exclude
|
||||
@@ -54,8 +71,8 @@ jobs:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v3
|
||||
- name: Run shfmt
|
||||
uses: luizm/action-sh-checker@edd0e45ecff35b05f162052b50df50976c1b74fc
|
||||
# v0.3.0 => 7f44869033b40ee4ffe7dc76c87a1bc66e3d025a
|
||||
uses: luizm/action-sh-checker@76ab0b22e1f194e4a582edc7969df6485c4e9246
|
||||
# v0.5.0 => edd0e45ecff35b05f162052b50df50976c1b74fc
|
||||
env:
|
||||
SHFMT_OPTS: -l -bn -ci -i 2 -d
|
||||
with:
|
||||
@@ -69,6 +86,6 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Run yamllint
|
||||
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
|
||||
# v3.0.4 => ed2b6e911569708ed121c14b87d513860a7e36a7
|
||||
# v3.1.1 => 2576378a8e339169678f9939646ee3ee325e845c
|
||||
with:
|
||||
config_file: '.github/linters/.yamllint.yml'
|
||||
|
||||
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@@ -57,11 +57,14 @@ jobs:
|
||||
git config --global user.email no-reply@dokku.com
|
||||
|
||||
- name: build package
|
||||
env:
|
||||
RELEASE_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
RELEASE_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
run: contrib/release-dokku ${{ github.event.inputs.release_type }}
|
||||
|
||||
- name: output version
|
||||
id: version
|
||||
run: echo "::set-output name=version::$(cat build/next-version)"
|
||||
run: echo "version=$(cat build/next-version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v3
|
||||
@@ -69,6 +72,40 @@ jobs:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
build-digitalocean:
|
||||
name: build-digitalocean
|
||||
runs-on: ubuntu-20.04
|
||||
needs: release
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup packer
|
||||
uses: hashicorp/setup-packer@main
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Run packer init
|
||||
run: "make image/init/digitalocean"
|
||||
|
||||
- name: Run `packer validate`
|
||||
env:
|
||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
PKR_VAR_dokku_version: ${{ needs.release.outputs.version }}
|
||||
run: "make image/validate/digitalocean"
|
||||
|
||||
- name: Bump Digitalocean Image
|
||||
env:
|
||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||
PKR_VAR_dokku_version: ${{ needs.release.outputs.version }}
|
||||
run: "make image/build/digitalocean"
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: digitalocean-manifest.json
|
||||
path: digitalocean-manifest.json
|
||||
|
||||
bump-azure:
|
||||
name: bump-azure
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
@@ -57,6 +57,7 @@ RUN \
|
||||
&& ln -sf /mnt/dokku/home/dokku /home/dokku \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/services /var/lib/dokku/services \
|
||||
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
|
||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||
|
||||
518
HISTORY.md
518
HISTORY.md
File diff suppressed because it is too large
Load Diff
@@ -74,7 +74,7 @@ Support us with a monthly donation and help us continue our activities. [[Become
|
||||
|
||||
A fresh VM running any of the following operating systems:
|
||||
|
||||
- Ubuntu 18.04 / 20.04 / 22.04 x64 - Any currently supported release
|
||||
- Ubuntu 20.04 / 22.04 x64 - Any currently supported release
|
||||
- Debian 10+ x64
|
||||
- Arch Linux x64 *(experimental)*
|
||||
|
||||
@@ -86,8 +86,8 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.29.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.29.2 bash bootstrap.sh
|
||||
wget https://dokku.com/install/v0.30.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||
|
||||
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -1,7 +1,7 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-18.04"
|
||||
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-20.04"
|
||||
BOX_CPUS = ENV["BOX_CPUS"] || "1"
|
||||
BOX_MEMORY = ENV["BOX_MEMORY"] || "1024"
|
||||
DOKKU_DOMAIN = ENV["DOKKU_DOMAIN"] || "dokku.me"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
# A script to bootstrap dokku.
|
||||
# It expects to be run on Ubuntu 18.04/20.04 via 'sudo`
|
||||
# It expects to be run on Ubuntu 20.04/22.04 via 'sudo`
|
||||
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
|
||||
# It checks out the dokku source code from GitHub into ~/dokku and then runs 'make install' from dokku source.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
GO_ARGS ?=
|
||||
GO_PLUGIN_MAKE_TARGET ?= build
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.19.2
|
||||
BUILD_IMAGE := golang:1.19.6
|
||||
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install ca-certificates curl gcc git build-essential wget ruby-dev lintian rpm help2man man-db sudo
|
||||
RUN curl -sL -o /usr/local/share/ca-certificates/GlobalSignRootCA_R3.crt https://raw.githubusercontent.com/rubygems/rubygems/master/lib/rubygems/ssl_certs/rubygems.org/GlobalSignRootCA_R3.pem
|
||||
RUN update-ca-certificates
|
||||
RUN command -v fpm || gem install fpm
|
||||
|
||||
@@ -2,9 +2,6 @@ FROM dokku/build-base:0.0.1 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
|
||||
|
||||
@@ -61,9 +61,13 @@ fn-dokku-host() {
|
||||
echo "$DOKKU_HOST"
|
||||
}
|
||||
|
||||
fn-get-remote() {
|
||||
git config dokku.remote 2>/dev/null || echo "dokku"
|
||||
}
|
||||
|
||||
main() {
|
||||
declare CMD="$1" APP_ARG="$2"
|
||||
local APP="" DOKKU_GIT_REMOTE="dokku" DOKKU_REMOTE_HOST=""
|
||||
local APP="" DOKKU_GIT_REMOTE="$(fn-get-remote)" DOKKU_REMOTE_HOST=""
|
||||
local cmd_set=false next_index=1 skip=false args=("$@")
|
||||
|
||||
for arg in "$@"; do
|
||||
@@ -100,7 +104,7 @@ main() {
|
||||
done
|
||||
|
||||
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
|
||||
if [[ -z "$DOKKU_REMOTE_HOST" ]]; then
|
||||
if [[ -z "$DOKKU_REMOTE_HOST" ]] && [[ "$CMD" != remote ]] && [[ "$CMD" != remote:* ]]; then
|
||||
fn-client-help-msg
|
||||
fi
|
||||
|
||||
@@ -143,6 +147,40 @@ main() {
|
||||
apps:destroy)
|
||||
fn-is-git-repo && fn-has-dokku-remote && git remote remove "$DOKKU_GIT_REMOTE"
|
||||
;;
|
||||
remote)
|
||||
echo "$DOKKU_GIT_REMOTE"
|
||||
exit 0
|
||||
;;
|
||||
remote:add)
|
||||
shift 1
|
||||
git remote add "$@"
|
||||
exit "$?"
|
||||
;;
|
||||
remote:list)
|
||||
git remote
|
||||
exit "$?"
|
||||
;;
|
||||
remote:set)
|
||||
shift 1
|
||||
git config dokku.remote "$@"
|
||||
exit "$?"
|
||||
;;
|
||||
remote:remove)
|
||||
shift 1
|
||||
git remote remove "$@"
|
||||
local exit_code="$?"
|
||||
if [[ "$(git config dokku.remote)" == "$1" ]]; then
|
||||
git config --unset dokku.remote
|
||||
fi
|
||||
exit "$exit_code"
|
||||
;;
|
||||
remote:unset)
|
||||
if [[ -n "$(git config dokku.remote)" ]]; then
|
||||
git config --unset dokku.remote
|
||||
exit "$?"
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ " apps certs help ls nginx shell storage trace version " == *" $CMD "* ]] && unset APP
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
# You may add here your
|
||||
# server {
|
||||
# ...
|
||||
# }
|
||||
# statements for each of your virtual hosts to this file
|
||||
|
||||
##
|
||||
# You should look at the following URL's in order to grasp a solid understanding
|
||||
# of Nginx configuration files in order to fully unleash the power of Nginx.
|
||||
# http://wiki.nginx.org/Pitfalls
|
||||
# http://wiki.nginx.org/QuickStart
|
||||
# http://wiki.nginx.org/Configuration
|
||||
#
|
||||
# Generally, you will want to move this file somewhere, and start with a clean
|
||||
# file but keep this around for reference. Or just disable in sites-enabled.
|
||||
#
|
||||
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
|
||||
##
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server ipv6only=on;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php index.html index.htm;
|
||||
|
||||
# Make site accessible from http://localhost/
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
# First attempt to serve request as file, then
|
||||
# as directory, then fall back to displaying a 404.
|
||||
try_files $uri $uri/ =404;
|
||||
# Uncomment to enable naxsi on this location
|
||||
# include /etc/nginx/naxsi.rules
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
||||
#
|
||||
#server {
|
||||
# listen 8000;
|
||||
# listen somename:8080;
|
||||
# server_name somename alias another.alias;
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
#
|
||||
# location / {
|
||||
# try_files $uri $uri/ =404;
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443;
|
||||
# server_name localhost;
|
||||
#
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
#
|
||||
# ssl on;
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
#
|
||||
# ssl_session_timeout 5m;
|
||||
#
|
||||
# ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
|
||||
# ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES";
|
||||
# ssl_prefer_server_ciphers on;
|
||||
#
|
||||
# location / {
|
||||
# try_files $uri $uri/ =404;
|
||||
# }
|
||||
#}
|
||||
21
contrib/images/digitalocean/files/etc/update-motd.d/99-one-click
Executable file
21
contrib/images/digitalocean/files/etc/update-motd.d/99-one-click
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configured as part of the DigitalOcean 1-Click Image build process
|
||||
|
||||
myip=$(hostname -I | awk '{print$1}')
|
||||
cat <<EOF
|
||||
********************************************************************************
|
||||
|
||||
Welcome to DigitalOcean's 1-Click Dokku Droplet.
|
||||
To keep this Droplet secure, the UFW firewall is enabled.
|
||||
All ports are BLOCKED except 22 (SSH), 80 (HTTP), 443 (HTTPS).
|
||||
|
||||
In a web browser, you can view:
|
||||
* The Dokku One-Click Quickstart guide: https://do.co/dokku1804#start
|
||||
|
||||
For help and more information, visit https://do.co/dokku1804
|
||||
|
||||
********************************************************************************
|
||||
To delete this message of the day: rm -rf $(readlink -f ${0})
|
||||
To remove the default web landing page: rm -rf /etc/nginx/sites-available/digitalocean
|
||||
EOF
|
||||
25
contrib/images/digitalocean/files/var/lib/cloud/scripts/per-once/001_setup
Executable file
25
contrib/images/digitalocean/files/var/lib/cloud/scripts/per-once/001_setup
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash -x
|
||||
set +e
|
||||
exec > >(tee /var/log/one_click_setup.log) 2>&1
|
||||
|
||||
ufw --force enable
|
||||
printf "dokku dokku/hostname string %s" hostname | debconf-set-selections
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export LANG=C
|
||||
export LC_ALL=C
|
||||
|
||||
# Install Dokku....
|
||||
for count in {1..30}; do
|
||||
dpkg -i /var/lib/digitalocean/debs/*deb || /bin/true
|
||||
apt-get -f install || /bin/true
|
||||
|
||||
version=$(dpkg-query --showformat='${Version}' -W dokku)
|
||||
if [[ -n "$version" ]]; then
|
||||
ran=0
|
||||
exit 0
|
||||
else
|
||||
count=$((count + 1))
|
||||
fi
|
||||
sleep 5
|
||||
done
|
||||
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
exec > >(tee /var/log/one_click_setup.log) 2>&1
|
||||
|
||||
# Remove the force command
|
||||
sed -e '/Match user root/d' \
|
||||
-e '/.*ForceCommand.*droplet.*/d' \
|
||||
-i /etc/ssh/sshd_config
|
||||
|
||||
systemctl restart ssh
|
||||
169
contrib/images/digitalocean/files/var/www/html/index.html
Normal file
169
contrib/images/digitalocean/files/var/www/html/index.html
Normal file
@@ -0,0 +1,169 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<style>
|
||||
body {
|
||||
font-family: ProximaNova;
|
||||
font-size: 15px;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.button {
|
||||
border-radius: 3px;
|
||||
background-color: #0069ff;
|
||||
color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 48px;
|
||||
justify-content: center;
|
||||
text-decoration: none;
|
||||
width: 148px;
|
||||
}
|
||||
|
||||
.content {
|
||||
align-items: center;
|
||||
border: solid 2px #f1f1f1;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 32px auto;
|
||||
padding: 32px;
|
||||
text-align: center;
|
||||
width: 960px;
|
||||
;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
color: #99999999;
|
||||
font-size: 13px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.description {
|
||||
color: #676767;
|
||||
}
|
||||
|
||||
.empty-access {
|
||||
height: 220px;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
|
||||
.header {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 30px;
|
||||
color: #999999;
|
||||
width: 30px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-family: ProximaNova;
|
||||
font-size: 21px;
|
||||
font-weight: 600;
|
||||
color: #444444;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<svg class="logo" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30" enable-background="new 0 0 30 30"
|
||||
xml:space="preserve">
|
||||
<g id="XMLID_17_">
|
||||
<g id="XMLID_18_">
|
||||
<g>
|
||||
<g id="XMLID_225_">
|
||||
<g id="XMLID_233_">
|
||||
<path id="XMLID_234_" fill="#0080FF"
|
||||
d="M15,30v-5.8c6.2,0,10.9-6.1,8.6-12.6c-0.9-2.4-2.8-4.3-5.2-5.2
|
||||
C11.9,4.1,5.8,8.8,5.8,15l0,0L0,15C0,5.2,9.5-2.5,19.8,0.7c4.5,1.4,8.1,5,9.5,9.5C32.5,20.5,24.8,30,15,30z" />
|
||||
</g>
|
||||
<polygon id="XMLID_232_" fill="#0080FF" points="15,24.2 9.2,24.2 9.2,18.4 9.2,18.4 15,18.4 15,18.4" />
|
||||
<polygon id="XMLID_228_" fill="#0080FF" points="9.2,28.7 4.8,28.7 4.8,28.7 4.8,24.2 9.2,24.2" />
|
||||
<polygon id="XMLID_226_" fill="#0080FF" points="4.8,24.2 1,24.2 1,24.2 1,20.5 1,20.5 4.8,20.5 4.8,20.5" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="copyright">© 2023 DigitalOcean, LLC. All rights reserved.</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<svg width="89" height="62" viewBox="0 0 89 62" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M78.4046 17.1912C84.738 21.1608 86.2188 20.7419 87.6794 19.9955C88.5202 19.5664 88.8496 18.5392 88.4243 17.6985C86.4622 13.818 78.212 0.118992 59.5364 0.118992C43.8588 0.118992 34.4377 13.3435 31.5684 18.0766C31.0067 19.0027 31.4447 20.2158 32.4755 20.5543C34.1357 21.0995 35.9508 21.216 39.8333 18.8625C52.5306 11.8038 78.4046 17.1912 78.4046 17.1912Z"
|
||||
fill="#F15B55" />
|
||||
<mask id="mask0_55_415" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="31" y="0" width="58" height="21">
|
||||
<path
|
||||
d="M78.4212 17.0723C84.7546 21.0418 86.2354 20.6229 87.696 19.8766C88.5368 19.4474 88.8662 18.4202 88.4409 17.5795C86.4788 13.699 78.2286 3.8147e-06 59.553 3.8147e-06C43.8754 3.8147e-06 34.4543 13.2245 31.585 17.9576C31.0233 18.8837 31.4613 20.0969 32.4921 20.4353C34.1523 20.9805 35.9674 21.097 39.8499 18.7436C52.5472 11.6848 78.4212 17.0723 78.4212 17.0723Z"
|
||||
fill="#F15B55" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_55_415)">
|
||||
<path d="M43.7907 2.62413C49.4945 9.99967 33.5952 13.8544 45.8049 22.3539" stroke="#FF9580" stroke-width="1.5"
|
||||
stroke-miterlimit="10" />
|
||||
<path d="M56.7977 -1.62458C62.8837 6.0383 46.832 8.92189 53.8305 19.6981" stroke="#FF9580" stroke-width="1.5"
|
||||
stroke-miterlimit="10" />
|
||||
<path d="M72.3168 -0.867853C76.7291 7.02473 58.5477 8.73199 64.5571 18.3322" stroke="#FF9580" stroke-width="1.5"
|
||||
stroke-miterlimit="10" />
|
||||
<path d="M84.2603 7.02465C84.2603 15.1449 71.708 10.5128 72.3169 19.6982" stroke="#FF9580" stroke-width="1.5"
|
||||
stroke-miterlimit="10" />
|
||||
</g>
|
||||
<g opacity="0.399994">
|
||||
<g opacity="0.399994">
|
||||
<path opacity="0.399994"
|
||||
d="M31.3365 18.747C31.2415 19.5146 31.6815 20.2937 32.4751 20.5544C34.1353 21.0993 35.9508 21.2158 39.8333 18.8623C52.5302 11.8039 78.4042 17.1914 78.4042 17.1914C84.7377 21.1606 86.2184 20.7416 87.6795 19.9957C88.3903 19.6328 88.7337 18.8419 88.5657 18.0976C78.1555 10.8635 54.5866 3.8145 31.3365 18.747Z"
|
||||
fill="black" />
|
||||
</g>
|
||||
</g>
|
||||
<path
|
||||
d="M67.274 14.8087H56.4204C44.6233 14.8087 38.4193 18.2775 33.8378 24.2005L29.4542 29.8671L27.7038 32.1805C26.3653 33.9491 24.2728 34.9885 22.0517 34.9885C18.6867 34.9885 15.8194 32.6685 15.0623 29.48C15.0512 29.433 15.0385 29.359 15.025 29.2679C14.9103 28.4884 15.5203 27.7899 16.3099 27.7899H18.4798C22.2049 27.7899 25.2246 24.7776 25.2246 21.0614V20.5325C25.2246 19.8467 24.667 19.2904 23.979 19.2904H17.6005C15.0492 19.2904 13.2669 20.6106 12.6674 22.0612C12.0676 20.6106 10.2853 19.2904 7.73397 19.2904H1.35542C0.667492 19.2904 0.109863 19.8467 0.109863 20.5325V21.0614C0.109863 24.7776 3.12951 27.7899 6.85471 27.7899H9.05492C9.75186 27.7899 10.3443 28.2988 10.4476 28.9867L10.6905 30.604C13.3361 48.2223 28.5057 61.2576 46.3638 61.2576H47.2697H59.4081C71.7445 61.2576 82.2727 52.3616 84.302 40.2227L85.8397 31.0254C87.259 22.5369 81.2902 14.8087 67.274 14.8087Z"
|
||||
fill="#07CBCF" />
|
||||
<path
|
||||
d="M81.4705 48.3116C79.3404 48.386 77.5986 49.0698 75.2239 51.4388C72.2001 54.4552 67.1794 57.8702 59.4197 57.8702H45.0417C39.2224 57.8702 35.1162 53.5434 35.1162 53.5434C35.1162 53.5434 31.7479 53.7154 24.4261 49.5603C12.4254 41.9906 11.9501 29.2979 11.7788 27.7043C11.6076 26.1106 10.7517 25.2568 9.04025 25.2568H6.70074C2.34293 25.2568 1.16088 23.1183 0.893741 19.3792C0.434853 19.5628 0.110352 20.0095 0.110352 20.5327V21.0612C0.110352 24.7773 3.13 27.7897 6.85479 27.7897H9.055C9.75235 27.7897 10.3448 28.2986 10.4481 28.9864L10.6906 30.6038C13.3362 48.2221 28.5062 61.2573 46.3643 61.2573H47.2698H59.4086C68.7888 61.2573 77.1226 56.113 81.4705 48.3116Z"
|
||||
fill="#05B7BF" />
|
||||
<path
|
||||
d="M15.0249 29.2677C14.9102 28.4883 15.5203 27.7898 16.3098 27.7898H18.4797C22.2049 27.7898 25.2246 24.7774 25.2246 21.0617V20.5328C25.2246 20.0092 24.8997 19.5624 24.4404 19.3793V19.3797C24.1728 23.1184 22.9908 25.2569 18.633 25.2569H16.8376C14.4411 25.2569 14.7549 27.9512 15.0249 29.2677Z"
|
||||
fill="#05B7BF" />
|
||||
<path
|
||||
d="M24.4257 49.5606C27.1262 52.1789 25.7188 53.2412 21.2307 53.2412H14.3327C13.2428 53.2412 12.697 54.5557 13.4677 55.3245L14.322 56.1767C16.9737 58.8224 20.5707 60.3085 24.3213 60.3085H24.9584C32.4133 60.3085 37.929 52.8239 37.929 52.8239L24.4257 49.5606Z"
|
||||
fill="#07CBCF" />
|
||||
<path
|
||||
d="M35.1162 53.544C32.9984 55.5574 29.4485 58.1536 25.2235 58.1536H24.6339C21.1631 58.1536 17.8345 56.7783 15.3807 54.33L14.59 53.5415C14.497 53.4488 14.4257 53.3474 14.3728 53.2411H14.3327C13.2428 53.2411 12.697 54.5556 13.4677 55.3244L14.322 56.1766C16.9741 58.8223 20.5711 60.3085 24.3213 60.3085H24.9584C29.8025 60.3085 33.8281 57.1482 36.0533 54.9349L36.3528 54.6312L35.1162 53.544Z"
|
||||
fill="#05B7BF" />
|
||||
<mask id="mask1_55_415" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="15" width="86" height="47">
|
||||
<path
|
||||
d="M67.1641 15.1884H56.3106C44.5134 15.1884 38.3094 18.6572 33.7279 24.5802L29.3443 30.2468L27.594 32.5602C26.2554 34.3288 24.163 35.3682 21.9419 35.3682C18.5768 35.3682 15.7096 33.0482 14.9524 29.8597C14.9413 29.8127 14.9286 29.7387 14.9151 29.6476C14.8004 28.8681 15.4105 28.1696 16.2 28.1696H18.3699C22.0951 28.1696 25.1147 25.1573 25.1147 21.4411V20.9122C25.1147 20.2264 24.5571 19.6701 23.8692 19.6701H17.4906C14.9393 19.6701 13.157 20.9903 12.5576 22.4409C11.9577 20.9903 10.1755 19.6701 7.62411 19.6701H1.24555C0.557629 19.6701 0 20.2264 0 20.9122V21.4411C0 25.1573 3.01965 28.1696 6.74484 28.1696H8.94506C9.64199 28.1696 10.2344 28.6785 10.3377 29.3664L10.5807 30.9837C13.2262 48.602 28.3958 61.6373 46.2539 61.6373H47.1598H59.2983C71.6346 61.6373 82.1628 52.7413 84.1922 40.6024L85.7299 31.4051C87.1491 22.9166 81.1803 15.1884 67.1641 15.1884Z"
|
||||
fill="#07CBCF" />
|
||||
</mask>
|
||||
<g mask="url(#mask1_55_415)">
|
||||
<path
|
||||
d="M48.2573 43.0378C50.1929 48.5818 55.4426 52.9185 61.7015 52.9185C72.2568 52.9185 71.2993 45.7048 82.7326 45.7048H84.3526"
|
||||
stroke="#00576C" stroke-width="1.46" stroke-miterlimit="10" stroke-linecap="round" />
|
||||
<path d="M50.1195 43.0151H46.9814" stroke="#00576C" stroke-width="1.46" stroke-miterlimit="10"
|
||||
stroke-linecap="round" />
|
||||
<path
|
||||
d="M65.353 42.7305C65.353 41.096 64.0247 39.7709 62.3862 39.7709C60.7478 39.7709 59.4194 41.096 59.4194 42.7305"
|
||||
stroke="#00576C" stroke-width="1.46" stroke-miterlimit="10" stroke-linecap="round" />
|
||||
</g>
|
||||
<path
|
||||
d="M77.4491 19.774C80.7847 21.9824 82.0434 23.4419 85.095 23.7701C82.9402 18.5919 77.0788 14.8087 67.2741 14.8087H56.4206C45.0819 14.8087 38.9111 18.0148 34.3804 23.5229C37.2443 23.5229 40.3812 21.1661 43.0628 19.698C46.182 17.9907 50.3669 16.3586 59.4197 16.3586C68.4725 16.3586 73.2651 17.004 77.4491 19.774Z"
|
||||
fill="#05B7BF" />
|
||||
</svg>
|
||||
|
||||
<h1 class="title">Please log into your Droplet with SSH to configure the Dokku installation.</h1>
|
||||
<p class="description">See the Dokku 1-Click Quickstart guide for detailed assistance.</p>
|
||||
<a class="button" href="https://do.co/dokku1804#start">Quickstart Guide</a>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
47
contrib/images/digitalocean/in_parts/011-docker
Executable file
47
contrib/images/digitalocean/in_parts/011-docker
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
pkgs=(apt-transport-https
|
||||
ca-certificates
|
||||
curl
|
||||
jq
|
||||
linux-image-extra-virtual
|
||||
software-properties-common
|
||||
)
|
||||
|
||||
echo '--> Updating apt repositories'
|
||||
apt-get -qqy update
|
||||
|
||||
echo '--> Updating all packages'
|
||||
apt-get -qqy -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' full-upgrade
|
||||
|
||||
echo "--> Installing basic dependencies: ${pkgs[*]}"
|
||||
apt-get -qqy install "${pkgs[@]}"
|
||||
|
||||
echo '--> Setting up docker apt repository'
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||
|
||||
cat >/etc/apt/sources.list.d/docker.list <<EOM
|
||||
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -c -s) stable
|
||||
EOM
|
||||
|
||||
echo '--> Installing docker-ce'
|
||||
apt-get -y update
|
||||
apt-get -y install docker-ce docker-compose-plugin
|
||||
|
||||
echo '--> Enabling docker-ce'
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
|
||||
echo '--> Enabling docker live-restore'
|
||||
if [[ ! -f /etc/docker/daemon.json ]]; then
|
||||
echo "{}" >/etc/docker/daemon.json
|
||||
fi
|
||||
|
||||
config="$(jq '. + {"live-restore": true}' /etc/docker/daemon.json)"
|
||||
echo "$config" >/etc/docker/daemon.json
|
||||
systemctl reload docker
|
||||
docker info | grep -i live
|
||||
10
contrib/images/digitalocean/in_parts/011-ssh-message
Executable file
10
contrib/images/digitalocean/in_parts/011-ssh-message
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Prevent login until after setup is complete'
|
||||
# Be a bit of a dork about login in
|
||||
cat >>/etc/ssh/sshd_config <<EOM
|
||||
Match User root
|
||||
ForceCommand echo "Please wait while we get your droplet ready..."
|
||||
EOM
|
||||
66
contrib/images/digitalocean/in_parts/012-dokku-packages
Executable file
66
contrib/images/digitalocean/in_parts/012-dokku-packages
Executable file
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
pkgs=(apache2-utils
|
||||
bash-completion
|
||||
locales
|
||||
git
|
||||
cpio
|
||||
curl
|
||||
man-db
|
||||
|
||||
netcat
|
||||
net-tools
|
||||
|
||||
software-properties-common
|
||||
parallel
|
||||
python3-software-properties
|
||||
rsync
|
||||
rsyslog
|
||||
dos2unix
|
||||
jq
|
||||
unzip
|
||||
|
||||
nginx
|
||||
dnsutils
|
||||
cgroupfs-mount
|
||||
cgroup-lite
|
||||
sudo
|
||||
python3
|
||||
debconf
|
||||
)
|
||||
|
||||
dokku_pkgs=(docker-image-labeler
|
||||
gliderlabs-sigil
|
||||
lambda-builder
|
||||
netrc
|
||||
plugn
|
||||
procfile-util
|
||||
sshcommand
|
||||
)
|
||||
|
||||
echo '--> Install core dependencies for dokku'
|
||||
apt-get -y install "${pkgs[@]}"
|
||||
|
||||
echo '--> Setting up dokku apt repository'
|
||||
curl -fsSL https://packagecloud.io/dokku/dokku/gpgkey -o /etc/apt/keyrings/dokku.asc
|
||||
|
||||
cat >/etc/apt/sources.list.d/dokku.list <<EOM
|
||||
deb [arch=amd64 signed-by=/etc/apt/keyrings/dokku.asc] https://packagecloud.io/dokku/dokku/ubuntu/ bionic main
|
||||
EOM
|
||||
|
||||
echo '--> Install dependencies for dokku from new repository'
|
||||
apt-get -y clean
|
||||
apt-get -y update
|
||||
apt-get -y install "${dokku_pkgs[@]}"
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
|
||||
echo '--> Pre-cache dokku bits that are must run on boot'
|
||||
apt-get -y clean
|
||||
apt-get -y install --download-only "dokku=${DOKKU_VERSION}" dokku-event-listener herokuish
|
||||
|
||||
mkdir -p /var/lib/digitalocean/debs
|
||||
cp -au /var/cache/apt/archives/*deb /var/lib/digitalocean/debs
|
||||
9
contrib/images/digitalocean/in_parts/012-grub-opts
Executable file
9
contrib/images/digitalocean/in_parts/012-grub-opts
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Update grub boot loader'
|
||||
sed -e 's|GRUB_CMDLINE_LINUX="|GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1|g' \
|
||||
-i /etc/default/grub
|
||||
|
||||
update-grub
|
||||
7
contrib/images/digitalocean/in_parts/014-docker-dns
Executable file
7
contrib/images/digitalocean/in_parts/014-docker-dns
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Enable Google DNS for Docker'
|
||||
sed -e 's|#DOCKER_OPTS|DOCKER_OPTS|g' \
|
||||
-i /etc/default/docker
|
||||
12
contrib/images/digitalocean/in_parts/014-ufw-rules
Executable file
12
contrib/images/digitalocean/in_parts/014-ufw-rules
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Enable and configure UFW'
|
||||
sed -e 's|DEFAULT_FORWARD_POLICY=.*|DEFAULT_FORWARD_POLICY="ACCEPT"|g' \
|
||||
-i /etc/default/ufw
|
||||
|
||||
ufw limit ssh
|
||||
ufw allow 'Nginx Full'
|
||||
|
||||
ufw --force enable
|
||||
21
contrib/images/digitalocean/in_parts/099-application_tag
Executable file
21
contrib/images/digitalocean/in_parts/099-application_tag
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Write the application info'
|
||||
application_version="$DOKKU_VERSION"
|
||||
build_date="$(date -I)"
|
||||
distro_arch="$(uname -m)"
|
||||
distro_codename="$(lsb_release -sc)"
|
||||
distro_release="$(lsb_release -sr)"
|
||||
distro="$(lsb_release -si)"
|
||||
|
||||
cat >/var/lib/digitalocean/application.info <<EOM
|
||||
appiication_name="Dokku"
|
||||
build_date="${build_date}"
|
||||
distro="${distro}"
|
||||
distro_release="${distro_release}"
|
||||
distro_codename="${distro_codename}"
|
||||
distro_arch="${distro_arch}"
|
||||
application_version="${application_version}"
|
||||
EOM
|
||||
52
contrib/images/digitalocean/in_parts/099-cleanup
Executable file
52
contrib/images/digitalocean/in_parts/099-cleanup
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
set -o errexit
|
||||
|
||||
echo '--> Cleaning up tmp dir'
|
||||
# Ensure /tmp exists and has the proper permissions before
|
||||
# checking for security updates
|
||||
# https://github.com/digitalocean/marketplace-partners/issues/94
|
||||
if [[ ! -d /tmp ]]; then
|
||||
mkdir /tmp
|
||||
fi
|
||||
chmod 1777 /tmp
|
||||
rm -rf /tmp/* /var/tmp/*
|
||||
|
||||
echo '--> Cleaning up apt'
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get -y update
|
||||
apt-get -o Dpkg::Options::="--force-confold" upgrade -q -y --force-yes
|
||||
apt-get -y autoremove
|
||||
apt-get -y autoclean
|
||||
apt-get -y purge droplet-agent
|
||||
|
||||
echo '--> Clearing history'
|
||||
history -c
|
||||
cat /dev/null >/root/.bash_history
|
||||
unset HISTFILE
|
||||
|
||||
echo '--> Clearing log files'
|
||||
find /var/log -mtime -1 -type f -exec truncate -s 0 {} \;
|
||||
rm -rf /var/log/*.gz /var/log/*.[0-9] /var/log/*-????????
|
||||
cat /dev/null >/var/log/lastlog
|
||||
cat /dev/null >/var/log/wtmp
|
||||
rm -rf /var/lib/cloud/instances/*
|
||||
rm -rf /tmp/* /var/tmp/*
|
||||
|
||||
echo '--> Removing keys'
|
||||
rm -f /root/.ssh/authorized_keys /etc/ssh/*key*
|
||||
touch /etc/ssh/revoked_keys
|
||||
chmod 600 /etc/ssh/revoked_keys
|
||||
|
||||
echo '--> DO Directory contents'
|
||||
ls -lah /opt/digitalocean || true
|
||||
|
||||
echo '--> Securely erase the unused portion of the filesystem'
|
||||
printf "\n\033[0;32mWriting zeros to the remaining disk space to securely
|
||||
erase the unused portion of the file system.
|
||||
Depending on your disk size this may take several minutes.
|
||||
The secure erase will complete successfully when you see:\033[0m
|
||||
dd: writing to '/zerofile': No space left on device\n
|
||||
Beginning secure erase now\n"
|
||||
|
||||
dd if=/dev/zero of=/zerofile bs=4096 || rm /zerofile
|
||||
636
contrib/images/digitalocean/in_parts/100-image-check
Executable file
636
contrib/images/digitalocean/in_parts/100-image-check
Executable file
@@ -0,0 +1,636 @@
|
||||
#!/bin/bash
|
||||
|
||||
# DigitalOcean Marketplace Image Validation Tool
|
||||
# © 2021-2022 DigitalOcean LLC.
|
||||
# This code is licensed under Apache 2.0 license (see LICENSE.md for details)
|
||||
|
||||
VERSION="v. 1.8.1"
|
||||
RUNDATE=$(date)
|
||||
|
||||
# Script should be run with SUDO
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "[Error] - This script must be run with sudo or as the root user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
STATUS=0
|
||||
PASS=0
|
||||
WARN=0
|
||||
FAIL=0
|
||||
|
||||
# $1 == command to check for
|
||||
# returns: 0 == true, 1 == false
|
||||
cmdExists() {
|
||||
if command -v "$1" >/dev/null 2>&1; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function getDistro {
|
||||
if [ -f /etc/os-release ]; then
|
||||
# freedesktop.org and systemd
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/os-release
|
||||
OS=$NAME
|
||||
VER=$VERSION_ID
|
||||
elif type lsb_release >/dev/null 2>&1; then
|
||||
# linuxbase.org
|
||||
OS=$(lsb_release -si)
|
||||
VER=$(lsb_release -sr)
|
||||
elif [ -f /etc/lsb-release ]; then
|
||||
# For some versions of Debian/Ubuntu without lsb_release command
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/lsb-release
|
||||
OS=$DISTRIB_ID
|
||||
VER=$DISTRIB_RELEASE
|
||||
elif [ -f /etc/debian_version ]; then
|
||||
# Older Debian/Ubuntu/etc.
|
||||
OS=Debian
|
||||
VER=$(cat /etc/debian_version)
|
||||
elif [ -f /etc/SuSe-release ]; then
|
||||
# Older SuSE/etc.
|
||||
:
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
# Older Red Hat, CentOS, etc.
|
||||
VER=$(cut -d" " -f3 </etc/redhat-release | cut -d "." -f1)
|
||||
d=$(cut -d" " -f1 </etc/redhat-release | cut -d "." -f1)
|
||||
if [[ $d == "CentOS" ]]; then
|
||||
OS="CentOS Linux"
|
||||
fi
|
||||
else
|
||||
# Fall back to uname, e.g. "Linux <version>", also works for BSD, etc.
|
||||
OS=$(uname -s)
|
||||
VER=$(uname -r)
|
||||
fi
|
||||
}
|
||||
function loadPasswords {
|
||||
SHADOW=$(cat /etc/shadow)
|
||||
}
|
||||
|
||||
function checkAgent {
|
||||
# Check for the presence of the DO directory in the filesystem
|
||||
if [ -d /opt/digitalocean ]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m DigitalOcean directory detected.\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
if [[ $OS == "CentOS Linux" ]] || [[ $OS == "CentOS Stream" ]] || [[ $OS == "Rocky Linux" ]] || [[ $OS == "AlmaLinux" ]]; then
|
||||
echo "To uninstall the agent: 'sudo yum remove droplet-agent'"
|
||||
echo "To remove the DO directory: 'find /opt/digitalocean/ -type d -empty -delete'"
|
||||
elif [[ $OS == "Ubuntu" ]] || [[ $OS == "Debian" ]]; then
|
||||
echo "To uninstall the agent and remove the DO directory: 'sudo apt-get purge droplet-agent'"
|
||||
fi
|
||||
else
|
||||
echo -en "\e[32m[PASS]\e[0m DigitalOcean Monitoring agent was not found\n"
|
||||
((PASS++))
|
||||
fi
|
||||
}
|
||||
|
||||
function checkLogs {
|
||||
cp_ignore="/var/log/cpanel-install.log"
|
||||
echo -en "\nChecking for log files in /var/log\n\n"
|
||||
# Check if there are log archives or log files that have not been recently cleared.
|
||||
for f in /var/log/*-????????; do
|
||||
[[ -e $f ]] || break
|
||||
if [ "${f}" != "${cp_ignore}" ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m Log archive ${f} found; Contents:\n"
|
||||
cat "${f}"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
for f in /var/log/*.[0-9]; do
|
||||
[[ -e $f ]] || break
|
||||
echo -en "\e[93m[WARN]\e[0m Log archive ${f} found; Contents:\n"
|
||||
cat "${f}"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
done
|
||||
for f in /var/log/*.log; do
|
||||
[[ -e $f ]] || break
|
||||
if [[ "${f}" = '/var/log/lfd.log' && "$(grep -E -v '/var/log/messages has been reset| Watching /var/log/messages' "${f}" | wc -c)" -gt 50 ]]; then
|
||||
if [ "${f}" != "${cp_ignore}" ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m un-cleared log file, ${f} found; Contents:\n"
|
||||
cat "${f}"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
elif [[ "${f}" != '/var/log/lfd.log' && "$(wc -c <"${f}")" -gt 50 ]]; then
|
||||
if [ "${f}" != "${cp_ignore}" ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m un-cleared log file, ${f} found; Contents:\n"
|
||||
cat "${f}"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
function checkTMP {
|
||||
# Check the /tmp directory to ensure it is empty. Warn on any files found.
|
||||
if [[ -n "$(ls -A /tmp)" ]]; then
|
||||
echo -en "\e[93m[WARN]\e[0m /tmp directory is not empty; Contents\n"
|
||||
ls -A /tmp
|
||||
((WARN++))
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo -en "\e[32m[PASS]\e[0m /tmp directory is empty\n"
|
||||
return 0
|
||||
}
|
||||
function checkRoot {
|
||||
user="root"
|
||||
uhome="/root"
|
||||
for usr in $SHADOW; do
|
||||
IFS=':' read -r -a u <<<"$usr"
|
||||
if [[ "${u[0]}" == "${user}" ]]; then
|
||||
if [[ ${u[1]} == "!" ]] || [[ ${u[1]} == "!!" ]] || [[ ${u[1]} == "*" ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m User ${user} has no password set.\n"
|
||||
((PASS++))
|
||||
else
|
||||
echo -en "\e[41m[FAIL]\e[0m User ${user} has a password set on their account.\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -d ${uhome}/ ]; then
|
||||
if [ -d ${uhome}/.ssh/ ]; then
|
||||
if ls ${uhome}/.ssh/* >/dev/null 2>&1; then
|
||||
for key in "${uhome}"/.ssh/*; do
|
||||
if [ "${key}" == "${uhome}/.ssh/authorized_keys" ]; then
|
||||
|
||||
if [ "$(wc -c <"${key}")" -gt 50 ]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m User \e[1m${user}\e[0m has a populated authorized_keys file in \e[93m${key}\e[0m\n"
|
||||
akey=$(cat "${key}")
|
||||
echo "File Contents:"
|
||||
echo "$akey"
|
||||
echo "--------------"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
elif [ "${key}" == "${uhome}/.ssh/id_rsa" ]; then
|
||||
if [ "$(wc -c <"${key}")" -gt 0 ]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m User \e[1m${user}\e[0m has a private key file in \e[93m${key}\e[0m\n"
|
||||
akey=$(cat "${key}")
|
||||
echo "File Contents:"
|
||||
echo "$akey"
|
||||
echo "--------------"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
else
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has empty private key file in \e[93m${key}\e[0m\n"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
elif [ "${key}" != "${uhome}/.ssh/known_hosts" ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has a file in their .ssh directory at \e[93m${key}\e[0m\n"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if [ "$(wc -c <"${key}")" -gt 50 ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has a populated known_hosts file in \e[93m${key}\e[0m\n"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m has no SSH keys present\n"
|
||||
fi
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m does not have an .ssh directory\n"
|
||||
fi
|
||||
if [ -f /root/.bash_history ]; then
|
||||
|
||||
BH_S=$(wc -c </root/.bash_history)
|
||||
|
||||
if [[ $BH_S -lt 200 ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m ${user}'s Bash History appears to have been cleared\n"
|
||||
((PASS++))
|
||||
else
|
||||
echo -en "\e[41m[FAIL]\e[0m ${user}'s Bash History should be cleared to prevent sensitive information from leaking\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
|
||||
return 1
|
||||
else
|
||||
echo -en "\e[32m[PASS]\e[0m The Root User's Bash History is not present\n"
|
||||
((PASS++))
|
||||
fi
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m does not have a directory in /home\n"
|
||||
fi
|
||||
echo -en "\n\n"
|
||||
return 1
|
||||
}
|
||||
|
||||
function checkUsers {
|
||||
# Check each user-created account
|
||||
awk -F: '$3 >= 1000 && $1 != "nobody" {print $1}' </etc/passwd | while IFS= read -r user; do
|
||||
# Skip some other non-user system accounts
|
||||
if [[ $user == "centos" ]]; then
|
||||
:
|
||||
elif [[ $user == "nfsnobody" ]]; then
|
||||
:
|
||||
else
|
||||
echo -en "\nChecking user: ${user}...\n"
|
||||
for usr in $SHADOW; do
|
||||
IFS=':' read -r -a u <<<"$usr"
|
||||
if [[ "${u[0]}" == "${user}" ]]; then
|
||||
if [[ ${u[1]} == "!" ]] || [[ ${u[1]} == "!!" ]] || [[ ${u[1]} == "*" ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m User ${user} has no password set.\n"
|
||||
# shellcheck disable=SC2030
|
||||
((PASS++))
|
||||
else
|
||||
echo -en "\e[41m[FAIL]\e[0m User ${user} has a password set on their account. Only system users are allowed on the image.\n"
|
||||
# shellcheck disable=SC2030
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
fi
|
||||
done
|
||||
#echo "User Found: ${user}"
|
||||
uhome="/home/${user}"
|
||||
if [ -d "${uhome}/" ]; then
|
||||
if [ -d "${uhome}/.ssh/" ]; then
|
||||
if ls "${uhome}/.ssh/*" >/dev/null 2>&1; then
|
||||
for key in "${uhome}"/.ssh/*; do
|
||||
if [ "${key}" == "${uhome}/.ssh/authorized_keys" ]; then
|
||||
if [ "$(wc -c <"${key}")" -gt 50 ]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m User \e[1m${user}\e[0m has a populated authorized_keys file in \e[93m${key}\e[0m\n"
|
||||
akey=$(cat "${key}")
|
||||
echo "File Contents:"
|
||||
echo "$akey"
|
||||
echo "--------------"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
elif [ "${key}" == "${uhome}/.ssh/id_rsa" ]; then
|
||||
if [ "$(wc -c <"${key}")" -gt 0 ]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m User \e[1m${user}\e[0m has a private key file in \e[93m${key}\e[0m\n"
|
||||
akey=$(cat "${key}")
|
||||
echo "File Contents:"
|
||||
echo "$akey"
|
||||
echo "--------------"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
else
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has empty private key file in \e[93m${key}\e[0m\n"
|
||||
# shellcheck disable=SC2030
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
elif [ "${key}" != "${uhome}/.ssh/known_hosts" ]; then
|
||||
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has a file in their .ssh directory named \e[93m${key}\e[0m\n"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
|
||||
else
|
||||
if [ "$(wc -c <"${key}")" -gt 50 ]; then
|
||||
echo -en "\e[93m[WARN]\e[0m User \e[1m${user}\e[0m has a known_hosts file in \e[93m${key}\e[0m\n"
|
||||
((WARN++))
|
||||
if [[ $STATUS != 2 ]]; then
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
done
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m has no SSH keys present\n"
|
||||
fi
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m does not have an .ssh directory\n"
|
||||
fi
|
||||
else
|
||||
echo -en "\e[32m[ OK ]\e[0m User \e[1m${user}\e[0m does not have a directory in /home\n"
|
||||
fi
|
||||
|
||||
# Check for an uncleared .bash_history for this user
|
||||
if [ -f "${uhome}/.bash_history" ]; then
|
||||
BH_S=$(wc -c <"${uhome}/.bash_history")
|
||||
|
||||
if [[ $BH_S -lt 200 ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m ${user}'s Bash History appears to have been cleared\n"
|
||||
((PASS++))
|
||||
else
|
||||
echo -en "\e[41m[FAIL]\e[0m ${user}'s Bash History should be cleared to prevent sensitive information from leaking\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
|
||||
fi
|
||||
echo -en "\n\n"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
function checkFirewall {
|
||||
|
||||
if [[ $OS == "Ubuntu" ]]; then
|
||||
fw="ufw"
|
||||
ufwa=$(ufw status | head -1 | sed -e "s/^Status:\ //")
|
||||
if [[ $ufwa == "active" ]]; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
# shellcheck disable=SC2031
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
# shellcheck disable=SC2031
|
||||
((WARN++))
|
||||
fi
|
||||
elif [[ $OS == "CentOS Linux" ]] || [[ $OS == "CentOS Stream" ]] || [[ $OS == "Rocky Linux" ]] || [[ $OS == "AlmaLinux" ]]; then
|
||||
if [ -f /usr/lib/systemd/system/csf.service ]; then
|
||||
fw="csf"
|
||||
if [[ $(systemctl status $fw >/dev/null 2>&1) ]]; then
|
||||
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
elif cmdExists "firewall-cmd"; then
|
||||
if [[ $(systemctl is-active firewalld >/dev/null 2>&1 && echo 1 || echo 0) ]]; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
else
|
||||
fw="firewalld"
|
||||
if [[ $(systemctl is-active firewalld >/dev/null 2>&1 && echo 1 || echo 0) ]]; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
fi
|
||||
elif [[ "$OS" =~ Debian.* ]]; then
|
||||
# user could be using a number of different services for managing their firewall
|
||||
# we will check some of the most common
|
||||
if cmdExists 'ufw'; then
|
||||
fw="ufw"
|
||||
ufwa=$(ufw status | head -1 | sed -e "s/^Status:\ //")
|
||||
if [[ $ufwa == "active" ]]; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
elif cmdExists "firewall-cmd"; then
|
||||
fw="firewalld"
|
||||
if [[ $(systemctl is-active --quiet $fw) ]]; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
else
|
||||
# user could be using vanilla iptables, check if kernel module is loaded
|
||||
fw="iptables"
|
||||
if lsmod | grep -q '^ip_tables' 2>/dev/null; then
|
||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||
((PASS++))
|
||||
else
|
||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||
((WARN++))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
}
|
||||
function checkUpdates {
|
||||
if [[ $OS == "Ubuntu" ]] || [[ "$OS" =~ Debian.* ]]; then
|
||||
# Ensure /tmp exists and has the proper permissions before
|
||||
# checking for security updates
|
||||
# https://github.com/digitalocean/marketplace-partners/issues/94
|
||||
if [[ ! -d /tmp ]]; then
|
||||
mkdir /tmp
|
||||
fi
|
||||
chmod 1777 /tmp
|
||||
|
||||
echo -en "\nUpdating apt package database to check for security updates, this may take a minute...\n\n"
|
||||
apt-get -y update >/dev/null
|
||||
|
||||
uc=$(apt-get --just-print upgrade | grep -i "security" -c)
|
||||
if [[ $uc -gt 0 ]]; then
|
||||
update_count=$((uc / 2))
|
||||
else
|
||||
update_count=0
|
||||
fi
|
||||
|
||||
if [[ $update_count -gt 0 ]]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m There are ${update_count} security updates available for this image that have not been installed.\n"
|
||||
echo -en
|
||||
echo -en "Here is a list of the security updates that are not installed:\n"
|
||||
sleep 2
|
||||
apt-get --just-print upgrade | grep -i security | awk '{print $2}' | awk '!seen[$0]++'
|
||||
echo -en
|
||||
# shellcheck disable=SC2031
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
else
|
||||
echo -en "\e[32m[PASS]\e[0m There are no pending security updates for this image.\n\n"
|
||||
((PASS++))
|
||||
fi
|
||||
elif [[ $OS == "CentOS Linux" ]] || [[ $OS == "CentOS Stream" ]] || [[ $OS == "Rocky Linux" ]] || [[ $OS == "AlmaLinux" ]]; then
|
||||
echo -en "\nChecking for available security updates, this may take a minute...\n\n"
|
||||
|
||||
update_count=$(yum check-update --security --quiet | wc -l)
|
||||
if [[ $update_count -gt 0 ]]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m There are ${update_count} security updates available for this image that have not been installed.\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
else
|
||||
echo -en "\e[32m[PASS]\e[0m There are no pending security updates for this image.\n"
|
||||
((PASS++))
|
||||
fi
|
||||
else
|
||||
echo "Error encountered"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
function checkCloudInit {
|
||||
|
||||
if hash cloud-init 2>/dev/null; then
|
||||
CI="\e[32m[PASS]\e[0m Cloud-init is installed.\n"
|
||||
((PASS++))
|
||||
else
|
||||
CI="\e[41m[FAIL]\e[0m No valid verison of cloud-init was found.\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
clear
|
||||
echo "DigitalOcean Marketplace Image Validation Tool ${VERSION}"
|
||||
echo "Executed on: ${RUNDATE}"
|
||||
echo "Checking local system for Marketplace compatibility..."
|
||||
|
||||
getDistro
|
||||
|
||||
echo -en "\n\e[1mDistribution:\e[0m ${OS}\n"
|
||||
echo -en "\e[1mVersion:\e[0m ${VER}\n\n"
|
||||
|
||||
ost=0
|
||||
osv=0
|
||||
|
||||
if [[ $OS == "Ubuntu" ]]; then
|
||||
ost=1
|
||||
if [[ $VER == "22.10" ]] || [[ $VER == "22.04" ]] || [[ $VER == "20.04" ]] || [[ $VER == "18.04" ]] || [[ $VER == "16.04" ]]; then
|
||||
osv=1
|
||||
fi
|
||||
|
||||
elif [[ "$OS" =~ Debian.* ]]; then
|
||||
ost=1
|
||||
case "$VER" in
|
||||
9)
|
||||
osv=1
|
||||
;;
|
||||
10)
|
||||
osv=1
|
||||
;;
|
||||
11)
|
||||
osv=1
|
||||
;;
|
||||
*)
|
||||
osv=2
|
||||
;;
|
||||
esac
|
||||
|
||||
elif [[ $OS == "CentOS Linux" ]]; then
|
||||
ost=1
|
||||
if [[ $VER == "8" ]]; then
|
||||
osv=1
|
||||
elif [[ $VER == "7" ]]; then
|
||||
osv=1
|
||||
elif [[ $VER == "6" ]]; then
|
||||
osv=1
|
||||
else
|
||||
osv=2
|
||||
fi
|
||||
elif [[ $OS == "CentOS Stream" ]]; then
|
||||
ost=1
|
||||
if [[ $VER == "8" ]]; then
|
||||
osv=1
|
||||
else
|
||||
osv=2
|
||||
fi
|
||||
elif [[ $OS == "Rocky Linux" ]]; then
|
||||
ost=1
|
||||
if [[ $VER =~ 8\. ]]; then
|
||||
osv=1
|
||||
else
|
||||
osv=2
|
||||
fi
|
||||
elif [[ $OS == "AlmaLinux" ]]; then
|
||||
ost=1
|
||||
if [[ "$VERSION" =~ 8.* ]] || [[ "$VERSION" =~ 9.* ]]; then
|
||||
osv=1
|
||||
else
|
||||
osv=2
|
||||
fi
|
||||
else
|
||||
ost=0
|
||||
fi
|
||||
|
||||
if [[ $ost == 1 ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m Supported Operating System Detected: ${OS}\n"
|
||||
((PASS++))
|
||||
else
|
||||
echo -en "\e[41m[FAIL]\e[0m ${OS} is not a supported Operating System\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
fi
|
||||
|
||||
if [[ $osv == 1 ]]; then
|
||||
echo -en "\e[32m[PASS]\e[0m Supported Release Detected: ${VER}\n"
|
||||
((PASS++))
|
||||
elif [[ $ost == 1 ]]; then
|
||||
echo -en "\e[41m[FAIL]\e[0m ${OS} ${VER} is not a supported Operating System Version\n"
|
||||
((FAIL++))
|
||||
STATUS=2
|
||||
else
|
||||
echo "Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
checkCloudInit
|
||||
|
||||
echo -en "${CI}"
|
||||
|
||||
checkFirewall
|
||||
|
||||
echo -en "${FW_VER}"
|
||||
|
||||
checkUpdates
|
||||
|
||||
loadPasswords
|
||||
|
||||
checkLogs
|
||||
|
||||
echo -en "\n\nChecking all user-created accounts...\n"
|
||||
checkUsers
|
||||
|
||||
echo -en "\n\nChecking the root account...\n"
|
||||
checkRoot
|
||||
|
||||
echo -en "\n\nChecking the /tmp directory...\n"
|
||||
checkTMP
|
||||
|
||||
checkAgent
|
||||
|
||||
# Summary
|
||||
echo -en "\n\n---------------------------------------------------------------------------------------------------\n"
|
||||
|
||||
if [[ $STATUS == 0 ]]; then
|
||||
echo -en "Scan Complete.\n\e[32mAll Tests Passed!\e[0m\n"
|
||||
elif [[ $STATUS == 1 ]]; then
|
||||
echo -en "Scan Complete. \n\e[93mSome non-critical tests failed. Please review these items.\e[0m\e[0m\n"
|
||||
else
|
||||
echo -en "Scan Complete. \n\e[41mOne or more tests failed. Please review these items and re-test.\e[0m\n"
|
||||
fi
|
||||
echo "---------------------------------------------------------------------------------------------------"
|
||||
echo -en "\e[1m${PASS} Tests PASSED\e[0m\n"
|
||||
echo -en "\e[1m${WARN} WARNINGS\e[0m\n"
|
||||
echo -en "\e[1m${FAIL} Tests FAILED\e[0m\n"
|
||||
echo -en "---------------------------------------------------------------------------------------------------\n"
|
||||
|
||||
if [[ $STATUS == 0 ]]; then
|
||||
echo -en "We did not detect any issues with this image. Please be sure to manually ensure that all software installed on the base system is functional, secure and properly configured (or facilities for configuration on first-boot have been created).\n\n"
|
||||
exit 0
|
||||
elif [[ $STATUS == 1 ]]; then
|
||||
echo -en "Please review all [WARN] items above and ensure they are intended or resolved. If you do not have a specific requirement, we recommend resolving these items before image submission\n\n"
|
||||
exit 0
|
||||
else
|
||||
echo -en "Some critical tests failed. These items must be resolved and this scan re-run before you submit your image to the DigitalOcean Marketplace.\n\n"
|
||||
exit 1
|
||||
fi
|
||||
70
contrib/images/digitalocean/packer.pkr.hcl
Normal file
70
contrib/images/digitalocean/packer.pkr.hcl
Normal file
@@ -0,0 +1,70 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
digitalocean = {
|
||||
version = ">= 1.0.4"
|
||||
source = "github.com/digitalocean/digitalocean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
variable "dokku_version" {
|
||||
type = string
|
||||
}
|
||||
|
||||
source "digitalocean" "ubuntu" {
|
||||
image = "ubuntu-22-04-x64"
|
||||
region = "nyc1"
|
||||
size = "s-1vcpu-512mb-10gb"
|
||||
ssh_username = "root"
|
||||
snapshot_name = "dokku-${var.dokku_version}-snapshot-{{timestamp}}"
|
||||
}
|
||||
|
||||
build {
|
||||
name = "dokku"
|
||||
sources = [
|
||||
"source.digitalocean.ubuntu"
|
||||
]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"echo '--> Waiting until cloud-init is complete'",
|
||||
"/usr/bin/cloud-init status --wait",
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "${path.root}/files/etc/"
|
||||
destination = "/etc/"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
source = "${path.root}/files/var/"
|
||||
destination = "/var/"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = [
|
||||
"DOKKU_VERSION=${var.dokku_version}",
|
||||
"DEBIAN_FRONTEND=noninteractive",
|
||||
"LC_ALL=C",
|
||||
"LANG=en_US.UTF-8",
|
||||
"LC_CTYPE=en_US.UTF-8",
|
||||
]
|
||||
|
||||
scripts = [
|
||||
"${path.root}/in_parts/011-docker",
|
||||
"${path.root}/in_parts/011-ssh-message",
|
||||
"${path.root}/in_parts/012-dokku-packages",
|
||||
"${path.root}/in_parts/012-grub-opts",
|
||||
"${path.root}/in_parts/014-docker-dns",
|
||||
"${path.root}/in_parts/014-ufw-rules",
|
||||
"${path.root}/in_parts/099-application_tag",
|
||||
"${path.root}/in_parts/099-cleanup",
|
||||
"${path.root}/in_parts/100-image-check",
|
||||
]
|
||||
}
|
||||
|
||||
post-processor "manifest" {
|
||||
output = "digitalocean-manifest.json"
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"builders": [
|
||||
{
|
||||
"type": "digitalocean",
|
||||
"region": "nyc3",
|
||||
"image": "ubuntu-14-04-x64"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "file",
|
||||
"source": "deb.mk",
|
||||
"destination": "/tmp/Makefile"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"echo '--> Waiting 30 seconds for core services to be available'",
|
||||
"sleep 30",
|
||||
|
||||
"echo '--> Updating apt repositories'",
|
||||
"sudo apt-get update -qq >/dev/null",
|
||||
|
||||
"echo '--> Installing make requirement'",
|
||||
"sudo apt-get -qq -y --no-install-recommends install build-essential",
|
||||
|
||||
"cd /tmp && make install-from-deb",
|
||||
"rm /root/.ssh/authorized_keys"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -249,7 +249,7 @@ fn-repo-update-history-and-commit() {
|
||||
declare desc="Updates the history file and commits the changes"
|
||||
declare CURRENT_VERSION="$1" NEXT_VERSION="$2"
|
||||
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
|
||||
local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BC_BREAK HISTORY_REFACTOR HISTORY_BUG HISTORY_OTHER HISTORY_TESTS ISSUE_FILE
|
||||
local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_BUG HISTORY_DEPENDENCY HISTORY_DEPRECATION HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BC_BREAK HISTORY_REFACTOR HISTORY_REMOVAL HISTORY_OTHER HISTORY_TESTS ISSUE_FILE
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
|
||||
@@ -258,7 +258,17 @@ fn-repo-update-history-and-commit() {
|
||||
for PULL_REQUEST_ID in $(fn-repo-merged-requests "$CURRENT_VERSION"); do
|
||||
ISSUE_FILE="/tmp/github-data/${PULL_REQUEST_ID}.json"
|
||||
if [[ ! -f "$ISSUE_FILE" ]]; then
|
||||
curl -sS "https://api.github.com/repos/dokku/dokku/issues/${PULL_REQUEST_ID}" >"$ISSUE_FILE"
|
||||
while true; do
|
||||
if OUTPUT=$(curl -u "$RELEASE_GITHUB_USERNAME:$RELEASE_GITHUB_API_TOKEN" --fail -sS "https://api.github.com/repos/dokku/dokku/issues/${PULL_REQUEST_ID}" 2>&1); then
|
||||
echo "$OUTPUT" >"$ISSUE_FILE"
|
||||
break
|
||||
fi
|
||||
|
||||
log-error "Error while fetching info for pull/$PULL_REQUEST_ID, sleeping for 5 seconds"
|
||||
log-error "$OUTPUT"
|
||||
sleep 5
|
||||
log-info " Retrying pull/$PULL_REQUEST_ID"
|
||||
done
|
||||
fi
|
||||
|
||||
TITLE="$(jq -r '.title' "$ISSUE_FILE")"
|
||||
@@ -266,16 +276,24 @@ fn-repo-update-history-and-commit() {
|
||||
TYPE="$(jq -r '.labels[] | select( .name | contains("type") ) | .name' "$ISSUE_FILE" | cut -d' ' -f2)"
|
||||
CHANGELOG_TEXT="- #${PULL_REQUEST_ID}: @${AUTHOR} ${TITLE}"
|
||||
|
||||
if [[ "$TYPE" == "bc-break" ]]; then
|
||||
if [[ "$TYPE" == "release" ]]; then
|
||||
continue
|
||||
elif [[ "$TYPE" == "bc-break" ]]; then
|
||||
HISTORY_BC_BREAK="${HISTORY_BC_BREAK}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "bug" ]]; then
|
||||
HISTORY_BUG="${HISTORY_BUG}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "dependencies" ]]; then
|
||||
HISTORY_DEPENDENCY="${HISTORY_DEPENDENCY}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "deprecation" ]]; then
|
||||
HISTORY_DEPRECATION="${HISTORY_DEPRECATION}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "documentation" ]]; then
|
||||
HISTORY_DOCUMENTATION="${HISTORY_DOCUMENTATION}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "enhancement" ]]; then
|
||||
HISTORY_ENHANCEMENT="${HISTORY_ENHANCEMENT}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "refactor" ]]; then
|
||||
HISTORY_REFACTOR="${HISTORY_REFACTOR}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "removal" ]]; then
|
||||
HISTORY_REMOVAL="${HISTORY_REMOVAL}"$'\n'"$CHANGELOG_TEXT"
|
||||
elif [[ "$TYPE" == "tests" ]]; then
|
||||
HISTORY_TESTS="${HISTORY_TESTS}"$'\n'"$CHANGELOG_TEXT"
|
||||
else
|
||||
@@ -287,7 +305,7 @@ fn-repo-update-history-and-commit() {
|
||||
HISTORY="${HISTORY}"$'\n\n'"## ${NEXT_VERSION}"
|
||||
HISTORY="${HISTORY}"$'\n\n'"Install/update via the bootstrap script:"
|
||||
HISTORY="${HISTORY}"$'\n\n'"\`\`\`shell"
|
||||
HISTORY="${HISTORY}"$'\n'"wget https://raw.githubusercontent.com/dokku/dokku/v${NEXT_VERSION}/bootstrap.sh"
|
||||
HISTORY="${HISTORY}"$'\n'"wget https://dokku.com/install/v${NEXT_VERSION}/bootstrap.sh"
|
||||
HISTORY="${HISTORY}"$'\n'"sudo DOKKU_TAG=v${NEXT_VERSION} bash bootstrap.sh"
|
||||
HISTORY="${HISTORY}"$'\n'"\`\`\`"
|
||||
|
||||
@@ -310,6 +328,16 @@ fn-repo-update-history-and-commit() {
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_ENHANCEMENT"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_REMOVAL" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Removals"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_REMOVAL"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_DEPRECATION" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Deprecations"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_DEPRECATION"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_REFACTOR" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Refactors"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_REFACTOR"
|
||||
@@ -325,6 +353,11 @@ fn-repo-update-history-and-commit() {
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_TESTS"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_DEPENDENCY" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Dependencies"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_DEPENDENCY"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_OTHER" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Other"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_OTHER"
|
||||
|
||||
2
deb.mk
2
deb.mk
@@ -20,7 +20,7 @@ install-from-deb:
|
||||
|
||||
@echo "--> Installing dokku"
|
||||
wget -qO- https://packagecloud.io/dokku/dokku/gpgkey | sudo tee /etc/apt/trusted.gpg.d/dokku.asc
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "bionic") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "focal") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku
|
||||
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -1,5 +1,5 @@
|
||||
Package: dokku
|
||||
Version: 0.29.2
|
||||
Version: 0.30.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
3
debian/postinst
vendored
3
debian/postinst
vendored
@@ -126,8 +126,7 @@ dpkg-handling() {
|
||||
case "$1" in
|
||||
abort-upgrade | abort-remove | abort-deconfigure) ;;
|
||||
|
||||
\
|
||||
configure)
|
||||
configure)
|
||||
mandb
|
||||
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
|
||||
if [[ -f /sbin/modprobe ]]; then
|
||||
|
||||
6
debian/preinst
vendored
6
debian/preinst
vendored
@@ -22,11 +22,9 @@ case "$1" in
|
||||
|
||||
upgrade) ;;
|
||||
|
||||
\
|
||||
abort-upgrade) ;;
|
||||
abort-upgrade) ;;
|
||||
|
||||
\
|
||||
*)
|
||||
*)
|
||||
echo "preinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
|
||||
@@ -3,15 +3,20 @@ set -eo pipefail
|
||||
|
||||
log-info() {
|
||||
declare desc="Log info formatter"
|
||||
echo " $*" 1>&2
|
||||
echo " $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
declare desc="Log fail formatter"
|
||||
echo "! $*" 1>&2
|
||||
echo " ! $*" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
log-warn() {
|
||||
declare desc="Log fail formatter"
|
||||
echo " ! $*" 1>&2
|
||||
}
|
||||
|
||||
support-userns() {
|
||||
chown 0:0 /usr/bin/sudo
|
||||
chmod 4755 /usr/bin/sudo
|
||||
@@ -31,23 +36,32 @@ main() {
|
||||
mkdir -p /mnt/dokku
|
||||
fi
|
||||
|
||||
directories=("/etc/ssh" "/home/dokku" "/var/lib/dokku/config" "/var/lib/dokku/data")
|
||||
directories=("/etc/ssh" "/home/dokku" "/var/lib/dokku/config" "/var/lib/dokku/data" "/var/lib/dokku/services")
|
||||
for dir in "${directories[@]}"; do
|
||||
if [[ ! -e "$dir" ]]; then
|
||||
log-info "Copying ${dir} skel into place"
|
||||
mkdir -p "/mnt/dokku${dir}"
|
||||
rsync -a "/skel${dir}/" "${dir}/" || log-fail "Unable to copy ${dir} skel into place"
|
||||
if [[ -d "/skel${dir}" ]]; then
|
||||
rsync -a "/skel${dir}/" "${dir}/" || log-fail "Unable to copy ${dir} skel into place"
|
||||
fi
|
||||
fi
|
||||
|
||||
# chown mount directories to "dokku:dokku"
|
||||
if [[ "$dir" != "/etc/ssh" ]]; then
|
||||
if [[ "$dir" == "/var/lib/dokku/services" ]]; then
|
||||
chown dokku:dokku /var/lib/dokku/services
|
||||
elif [[ "$dir" != "/etc/ssh" ]]; then
|
||||
find "$dir" -print0 | xargs -0 chown -h dokku:dokku
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -f /mnt/dokku/plugin-list ]]; then
|
||||
while read line; do
|
||||
dokku plugin:install "$(echo "$line" | awk '{print $2}')" "$(echo "$line" | cut -d':' -f1)"
|
||||
local plugin_name="$(echo "$line" | awk '{print $2}')"
|
||||
if dokku plugin:installed "$plugin_name"; then
|
||||
log-warn "Skipping already installed plugin: $plugin_name"
|
||||
else
|
||||
dokku plugin:install "$plugin_name" "$(echo "$line" | cut -d':' -f1)"
|
||||
fi
|
||||
done </mnt/dokku/plugin-list
|
||||
fi
|
||||
|
||||
|
||||
2
docs/_build/Dockerfile
vendored
2
docs/_build/Dockerfile
vendored
@@ -1,4 +1,4 @@
|
||||
FROM python:3.11.1-alpine
|
||||
FROM python:3.11.2-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
4
docs/_build/app-nginx.conf.sigil
vendored
4
docs/_build/app-nginx.conf.sigil
vendored
@@ -19,10 +19,6 @@ http {
|
||||
port_in_redirect off;
|
||||
|
||||
include /app/www/nginx.conf.d/*.conf;
|
||||
location ^~ /nginx.conf.d/ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
26
docs/_build/requirements.txt
vendored
26
docs/_build/requirements.txt
vendored
@@ -1,23 +1,23 @@
|
||||
beautifulsoup4==4.11.1
|
||||
beautifulsoup4==4.12.0
|
||||
click==8.1.3
|
||||
ghp-import==2.1.0
|
||||
importlib-metadata==4.12.0
|
||||
importlib-metadata==6.1.0
|
||||
Jinja2==3.1.2
|
||||
Markdown==3.3.7
|
||||
MarkupSafe==2.1.1
|
||||
Markdown>=3.2.1,<3.5
|
||||
MarkupSafe==2.1.2
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.3.1
|
||||
mkdocs==1.4.2
|
||||
mkdocs-exclude==1.0.2
|
||||
mkdocs-material==8.4.2
|
||||
mkdocs-material-extensions==1.0.3
|
||||
packaging==21.3
|
||||
Pygments==2.13.0
|
||||
pymdown-extensions==9.5
|
||||
mkdocs-material==9.1.3
|
||||
mkdocs-material-extensions==1.1.1
|
||||
packaging==23.0
|
||||
Pygments==2.14.0
|
||||
pymdown-extensions==9.10
|
||||
pyparsing==3.0.9
|
||||
python-dateutil==2.8.2
|
||||
PyYAML==6.0
|
||||
pyyaml_env_tag==0.1
|
||||
six==1.16.0
|
||||
soupsieve==2.3.2.post1
|
||||
watchdog==2.1.9
|
||||
zipp==3.8.1
|
||||
soupsieve==2.4
|
||||
watchdog==3.0.0
|
||||
zipp==3.15.0
|
||||
|
||||
@@ -33,7 +33,6 @@ dokku events
|
||||
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildpack( pythonapp )
|
||||
Jul 3 16:10:02 dokku.me dokku[128095]: INVOKED: docker-args-run( rubyapp )
|
||||
Jul 3 16:10:02 dokku.me dokku[128114]: INVOKED: docker-args-run( nhl )
|
||||
Jul 3 16:10:03 dokku.me dokku[128136]: INVOKED: post-release-buildpack( pythonapp )
|
||||
Jul 3 16:10:03 dokku.me dokku[128195]: INVOKED: pre-deploy( pythonapp )
|
||||
Jul 3 16:10:23 dokku.me dokku[129253]: INVOKED: docker-args-deploy( pythonapp )
|
||||
Jul 3 16:10:24 dokku.me dokku[129451]: INVOKED: check-deploy( pythonapp 6274ced0d4be11af4490cd18abaf77cdd593f025133f403d984e80d86a39acec web 5000 10.0.16.80 )
|
||||
@@ -68,8 +67,6 @@ post-build-dockerfile
|
||||
post-delete
|
||||
post-deploy
|
||||
post-domains-update
|
||||
post-release-buildpack
|
||||
post-release-dockerfile
|
||||
pre-build-buildpack
|
||||
pre-build-dockerfile
|
||||
pre-delete
|
||||
|
||||
@@ -6,7 +6,7 @@ The preferred method to mount external containers to a Dokku managed container,
|
||||
|
||||
```
|
||||
storage:ensure-directory [--chown option] <directory> # Creates a persistent storage directory in the recommended storage path
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:list <app> [--format text|json] # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
@@ -21,6 +21,36 @@ The storage plugin supports the following mount points:
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing persistent storage
|
||||
|
||||
Persistent storage bind mounts are specified on a per-app basis, and can be listed with the `storage:list` command:
|
||||
|
||||
```shell
|
||||
dokku storage:list node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> node-js-app volume bind-mounts:
|
||||
/var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
```
|
||||
|
||||
The output format can also be set to `json` for programmatic access:
|
||||
|
||||
|
||||
```shell
|
||||
dokku storage:list node-js-app --format json
|
||||
```
|
||||
|
||||
```
|
||||
[
|
||||
{
|
||||
"host_path": "/var/lib/dokku/data/storage/node-js-app",
|
||||
"container_path": "/app/storage",
|
||||
"volume_options": ""
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Creating storage directories
|
||||
|
||||
> New as of 0.25.5
|
||||
@@ -28,11 +58,11 @@ The storage plugin supports the following mount points:
|
||||
A storage directory can be created with the `storage:ensure-directory` command. This command will create a subdirectory in the recommended `/var/lib/dokku/data/storage` path - created during Dokku installation - and prepare it for use with an app.
|
||||
|
||||
```shell
|
||||
dokku storage:ensure-directory lollipop
|
||||
dokku storage:ensure-directory node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Ensuring /var/lib/dokku/data/storage/lollipop exists
|
||||
-----> Ensuring /var/lib/dokku/data/storage/node-js-app exists
|
||||
Setting directory ownership to 32767:32767
|
||||
Directory ready for mounting
|
||||
```
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.29.2 enabled dokku core standard plugin
|
||||
20_events 0.29.2 enabled dokku core events logging plugin
|
||||
app-json 0.29.2 enabled dokku core app-json plugin
|
||||
apps 0.29.2 enabled dokku core apps plugin
|
||||
build-env 0.29.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.29.2 enabled dokku core buildpacks plugin
|
||||
certs 0.29.2 enabled dokku core certificate management plugin
|
||||
checks 0.29.2 enabled dokku core checks plugin
|
||||
common 0.29.2 enabled dokku core common plugin
|
||||
config 0.29.2 enabled dokku core config plugin
|
||||
docker-options 0.29.2 enabled dokku core docker-options plugin
|
||||
domains 0.29.2 enabled dokku core domains plugin
|
||||
enter 0.29.2 enabled dokku core enter plugin
|
||||
git 0.29.2 enabled dokku core git plugin
|
||||
logs 0.29.2 enabled dokku core logs plugin
|
||||
network 0.29.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.29.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.29.2 enabled dokku core plugin plugin
|
||||
proxy 0.29.2 enabled dokku core proxy plugin
|
||||
ps 0.29.2 enabled dokku core ps plugin
|
||||
repo 0.29.2 enabled dokku core repo plugin
|
||||
resource 0.29.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.29.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.29.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.29.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.29.2 enabled dokku core storage plugin
|
||||
tags 0.29.2 enabled dokku core tags plugin
|
||||
tar 0.29.2 enabled dokku core tar plugin
|
||||
trace 0.29.2 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.30.2 enabled dokku core standard plugin
|
||||
20_events 0.30.2 enabled dokku core events logging plugin
|
||||
app-json 0.30.2 enabled dokku core app-json plugin
|
||||
apps 0.30.2 enabled dokku core apps plugin
|
||||
build-env 0.30.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.30.2 enabled dokku core buildpacks plugin
|
||||
certs 0.30.2 enabled dokku core certificate management plugin
|
||||
checks 0.30.2 enabled dokku core checks plugin
|
||||
common 0.30.2 enabled dokku core common plugin
|
||||
config 0.30.2 enabled dokku core config plugin
|
||||
docker-options 0.30.2 enabled dokku core docker-options plugin
|
||||
domains 0.30.2 enabled dokku core domains plugin
|
||||
enter 0.30.2 enabled dokku core enter plugin
|
||||
git 0.30.2 enabled dokku core git plugin
|
||||
logs 0.30.2 enabled dokku core logs plugin
|
||||
network 0.30.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.30.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.30.2 enabled dokku core plugin plugin
|
||||
proxy 0.30.2 enabled dokku core proxy plugin
|
||||
ps 0.30.2 enabled dokku core ps plugin
|
||||
repo 0.30.2 enabled dokku core repo plugin
|
||||
resource 0.30.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.30.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.30.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.30.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.30.2 enabled dokku core storage plugin
|
||||
tags 0.30.2 enabled dokku core tags plugin
|
||||
tar 0.30.2 enabled dokku core tar plugin
|
||||
trace 0.30.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
@@ -78,6 +78,8 @@ dokku plugin:installed postgres
|
||||
|
||||
### Installing a plugin
|
||||
|
||||
> Note: Plugins installed in this method within a [docker-based installation](/docs/getting-started/install/docker.md) of Dokku do not persist across installs. Please see the [plugin installation section](/docs/getting-started/install/docker.md#plugin-installation) of the docker-based installation docs for further details.
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
The most common usage is to install a plugin from a url. This url may be any of the following:
|
||||
|
||||
@@ -19,7 +19,7 @@ Ubuntu 18.04 is now a deprecated installation target. The operating system will
|
||||
|
||||
## Additions
|
||||
|
||||
New in 0.28.0 are the Caddy and Traefik plugins. As community plugins wrapping these proxies exist, users should:
|
||||
New in 0.28.0 are the Caddy, Haproxy and Traefik plugins. As community plugins wrapping these proxies exist, users should:
|
||||
|
||||
- Recommended: Uninstall the community plugin in question and switch all config to the new plugins.
|
||||
- Upgrade the community plugin to a version that does not use the `proxy:set` value of `caddy` or `traefik`.
|
||||
- Upgrade the community plugin to a version that does not use the `proxy:set` value of `caddy`, `haproxy` or `traefik`.
|
||||
|
||||
41
docs/appendices/0.30.0-migration-guide.md
Normal file
41
docs/appendices/0.30.0-migration-guide.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# 0.30.0 Migration Guide
|
||||
|
||||
> **Important**: Due to the removal of `DOKKU_SCALE` support, users with a version older than 0.25.x are heavily encouraged to upgrade to 0.29.x prior to 0.30.x. Not doing so will result in all app containers stopping on rebuild due to having no scale settings.
|
||||
|
||||
## Deprecations
|
||||
|
||||
- Support for Ubuntu 18.04 has been deprecated. Please upgrade your host OS in advance of the [End Of Life in April 2023](https://wiki.ubuntu.com/BionicBeaver/ReleaseNotes).
|
||||
|
||||
## Changes
|
||||
|
||||
- The `app.json` file is now extracted from the source code instead of the built image. For deploys via `git:from-image`, the file is extracted from the built image.
|
||||
|
||||
## Removals
|
||||
|
||||
- Support for [SPDY](https://en.wikipedia.org/wiki/SPDY) has been removed. No major browser supports it as of 2021. Custom `nginx.conf.sigil` templates referencing spdy-related variables will continue to build until the 1.0.0 release.
|
||||
- Support for the `DOKKU_SCALE` file - deprecated in 0.25.0 - has been removed in favor of the `formations` key in the `app.json` file. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on how to use the `formation` key of the `app.json` file.
|
||||
- The deprecated `--detach` global flag for `dokku run` was removed. Please see the [one-off tasks documentation](/docs/processes/one-off-tasks.md#running-a-detached-container) for more information on running detached containers.
|
||||
- The following deprecated trigger have been removed in favor of the `post-release-builder` trigger. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
|
||||
- `post-release-buildpack`
|
||||
- `post-release-dockerfile`
|
||||
- `post-release-pack`
|
||||
- The ability to call `logs:failed` without specifying an app or `--all` flag has been removed. This was deprecated in 0.22.0. Please see the [logs:failed](/docs/deployment/logs.md#failed-deploy-logs).
|
||||
- The following app shell functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `app/functions` file will fail going forward.
|
||||
- `apps#apps_create()` is removed in favor of `plugn trigger app-create`.
|
||||
- `apps#apps_destroy()` is removed in favor of `plugn trigger app-destroy`.
|
||||
- `apps#apps_exists()` is removed in favor of `plugn trigger app-exists`.
|
||||
- `apps#apps_maybe_create()` is removed in favor of `plugn trigger app-maybe-create`.
|
||||
- The following common shell functions have been removed:
|
||||
- `common#is_container_running()` (deprecated since 0.12.6) is removed in favor of `common#is_container_status()`.
|
||||
- `common#is_app_running()` (deprecated since 0.22.0) is removed in favor of `ps#fn-ps-is-app-running()`.
|
||||
- The global `--rm-container` and `--rm` flags - deprecated since 0.25.0 - have been removed.
|
||||
- The following git shell functions have been removed:
|
||||
- `git#use_git_worktree()` (deprecated since 0.23.7) has been removed. There is no alternative as the function has been made internal.
|
||||
- `git#git_deploy_branch()`(deprecated since 0.21.0) has been removed in favor of `plugn trigger git-deploy-branch`.
|
||||
- The following nginx commands - deprecated since 0.20.0 - have been removed:
|
||||
- `nginx:show-conf` has been removed in favor of `nginx:show-config`.
|
||||
- `nginx:validate` has been removed in favor of `nginx:validate-config`.
|
||||
- `nginx:build-config` - deprecated since 0.21.0 - has been removed in favor of `proxy:build-config`.
|
||||
- The following proxy functions - deprecated since 0.20.0 - have been removed in favor of their plugin trigger equivalents. Sourcing the `proxy/functions` file will fail going forward.
|
||||
- `proxy#is_app_proxy_enabled()` is removed in favor of `plugn trigger proxy-is-enabled`.
|
||||
- `proxy#get_app_proxy_type()` is removed in favor of `plugn trigger proxy-type`.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.29.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"0.26.8",
|
||||
"0.27.10",
|
||||
"0.28.4",
|
||||
"0.29.2"
|
||||
"0.29.4",
|
||||
"0.30.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -61,6 +61,12 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [flink][] | 0.3.26+ |
|
||||
| [Edgedb](https://github.com/IgnisDa/dokku-edgedb) | [ignisda][] | 0.27.0+ |
|
||||
|
||||
#### NewSQL
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------- | ----------- | ------------- |
|
||||
| [Surrealdb](https://github.com/IgnisDa/dokku-surrealdb) | [ignisda][] | 0.27.0+ |
|
||||
|
||||
#### Caching
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
|
||||
@@ -92,7 +92,6 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
| `DOKKU_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Deprecated: Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> | Deprecated: Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
|
||||
@@ -125,8 +125,8 @@ As an alternative, the Dokku project offers an optional letsencrypt plugin that
|
||||
# plugin installation requires root, hence the user change
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
|
||||
|
||||
# configure the plugin
|
||||
dokku config:set --global DOKKU_LETSENCRYPT_EMAIL=your-email@your.domain.com
|
||||
# set global email for letsencrypt
|
||||
dokku letsencrypt:set --global email your-email@your.domain.com
|
||||
|
||||
# set a custom domain that you own for your application
|
||||
dokku domains:set ruby-getting-started ruby-getting-started.your.domain.com
|
||||
|
||||
@@ -121,7 +121,7 @@ dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
||||
Once set, the Dockerfile usage would be as follows:
|
||||
|
||||
```Dockerfile
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
@@ -133,7 +133,7 @@ RUN echo $NODE_ENV
|
||||
You may also set the argument as an environment variable
|
||||
|
||||
```Dockerfile
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
@@ -210,7 +210,7 @@ worker: bin/run-worker.sh
|
||||
And `Dockerfile`:
|
||||
|
||||
```Dockerfile
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
CMD ["bin/run-dev.sh"]
|
||||
|
||||
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
```
|
||||
logs <app> [-h|--help] [-t|--tail] [-n|--num num] [-q|--quiet] [-p|--ps process] # Display recent log output
|
||||
logs:failed [--all|<app>] # Shows the last failed deploy logs
|
||||
logs:failed --all|<app> # Shows the last failed deploy logs
|
||||
logs:report [<app>] [<flag>] # Displays a logs report for one or more apps
|
||||
logs:set [--global|<app>] <key> <value> # Set or clear a logs property for an app
|
||||
logs:vector-logs [--num num] [--tail] # Display vector log output
|
||||
|
||||
@@ -7,6 +7,7 @@ git:allow-host <host> # Adds a host to known_hosts
|
||||
git:auth <host> [<username> <password>] # Configures netrc authentication for a given git server
|
||||
git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-username> <git-email>] # Updates an app's git repository with a given archive file
|
||||
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
|
||||
git:load-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a docker image loaded from stdin
|
||||
git:sync [--build] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
|
||||
git:initialize <app> # Initialize a git repository for an app
|
||||
git:public-key # Outputs the dokku public deploy key
|
||||
@@ -161,8 +162,9 @@ If the image is a private image that requires a docker login to access, the `reg
|
||||
|
||||
Building an app from an image will result in the following files being extracted from the source image (with all custom paths specified for each file being respected):
|
||||
|
||||
- nginx.conf.sigil
|
||||
- Procfile
|
||||
- `app.json`
|
||||
- `nginx.conf.sigil`
|
||||
- `Procfile`
|
||||
|
||||
In the case where the repository is later modified to manually add any of the above files and deployed via `git push`, the files will still be extracted from the initial source image. To avoid this, please clear the `source-image` git property. It will be set back to the original source image on any subsequent `git:from-image` calls.
|
||||
|
||||
@@ -211,6 +213,62 @@ Finally, if the archive url is specified as `--`, the archive will be fetched fr
|
||||
curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar | dokku git:from-archive node-js-app --
|
||||
```
|
||||
|
||||
### Initializing an app repository from a remote image without a registry
|
||||
|
||||
> New as of 0.30.0
|
||||
|
||||
A Dokku app repository can be initialized or updated from the contents of an image archive tar file via the `git:load-image` command. This method can be used when a Docker Registry is unavailable to act as an intermediary for storing an image, such as when building an image in CI and deploying directly from that image.
|
||||
|
||||
```shell
|
||||
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started:latest
|
||||
```
|
||||
|
||||
In the above example, we are saving the image to a tar file via `docker image save`, streaming that to the Dokku host, and then running `git:load-image` on the incoming stream. Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
|
||||
|
||||
```Dockerfile
|
||||
FROM dokku/node-js-getting-started:latest
|
||||
```
|
||||
|
||||
When deploying an app via `git:load-image`, it is highly recommended to use a unique image tag when building the image. Not doing so will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
|
||||
|
||||
```shell
|
||||
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
|
||||
```
|
||||
|
||||
The resulting `git:load-image` call would then be:
|
||||
|
||||
```shell
|
||||
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
```
|
||||
|
||||
The `git:load-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||
|
||||
```shell
|
||||
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
Building an app from an image will result in the following files being extracted from the source image (with all custom paths specified for each file being respected):
|
||||
|
||||
- `app.json`
|
||||
- `nginx.conf.sigil`
|
||||
- `Procfile`
|
||||
|
||||
In the case where the repository is later modified to manually add any of the above files and deployed via `git push`, the files will still be extracted from the initial source image. To avoid this, please clear the `source-image` git property. It will be set back to the original source image on any subsequent `git:load-image` calls.
|
||||
|
||||
```shell
|
||||
# sets an empty value
|
||||
dokku git:set node-js-app source-image
|
||||
```
|
||||
|
||||
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||
|
||||
```shell
|
||||
docker image save dokku/node-js-getting-started:latest | ssh dokku@dokku.me git:load-image --build-dir path/to/build node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
|
||||
### Initializing an app repository from a remote repository
|
||||
|
||||
> New as of 0.23.0
|
||||
|
||||
@@ -89,6 +89,22 @@ In addition, the following commands have special local side-effects:
|
||||
- `apps:destroy`:
|
||||
- Removes the local `dokku` git remote if set.
|
||||
|
||||
#### Specifying a remote
|
||||
|
||||
While many users will only ever push to a single dokku remote from a given repository, it may be useful to point the same repository at multiple remotes, especially in the case of pre-production environments. This can be done via the `remote` commands. These commands are _only_ available within the official remote client, and are not server-side commands.
|
||||
|
||||
To see your currently configured remote, run `dokku remote`. This will respect the `--remote` flag.
|
||||
|
||||
To list all available remotes, run `dokku remote:list`. This is equivalent to running `git remote`.
|
||||
|
||||
To add a remote, run `dokku remote:add $REMOTE_NAME dokku@dokku.me:$APP_NAME`, replacing `$REMOTE_NAME` with your desired remote name, the `$APP_NAME` with your desired app name and the host `dokku.me` with your Dokku host. This is equivalent to running `git remote add $REMOTE_NAME dokku@dokku.me:$APP_NAME`.
|
||||
|
||||
To remove a remote, run `dokku remote:remove $REMOTE_NAME`. This is equivalent to running `git remote remove $REMOTE_NAME`.
|
||||
|
||||
By default, the remote in use is `dokku`. To change the remote the client uses by default, run `dokku remote:set $REMOTE_NAME`, where `$REMOTE_NAME` is the name of your desired remote. This will not check the value specified, so that remote _must_ be available or errors will occur when running normal client commands. Note that specifying `--remote` when running dokku commands will override this configuration value.
|
||||
|
||||
To clear the configured remote, run `dokku remote:unset`. The client will unset the configured remote, and will default back to `dokku`, or the value of `--remote` if specified.
|
||||
|
||||
## Unofficial Clients
|
||||
|
||||
Please refer to the [community clients](/docs/community/clients.md) list for more details.
|
||||
|
||||
@@ -42,7 +42,7 @@ The keys for a specific user may be listed by specifying a second argument to th
|
||||
dokku ssh-keys:list admin
|
||||
```
|
||||
|
||||
> 0.22.3
|
||||
> New as of 0.22.3
|
||||
|
||||
The output format may be specified via the `--format` flag. Supported values include `json` and `text`.
|
||||
|
||||
|
||||
@@ -221,6 +221,22 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-get-property`
|
||||
|
||||
- Description: Return the value for an app's builder property
|
||||
- Invoked by:
|
||||
- Arguments: `$APP $KEY`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; PROPERTY="$2"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-image-is-cnb`
|
||||
|
||||
- Description: Checks if an image is cnb-based
|
||||
@@ -1196,7 +1212,7 @@ echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
> Warning: The arguments INTERNAL_PORT and INTERNAL_IP_ADDRESS are no longer sufficient to retrieve all app listeners. Please run `plugn trigger network-get-listeners APP` within any implementation of `nginx-pre-reload` in order to retrieve all application listeners.
|
||||
|
||||
- Description: Run before nginx reloads hosts
|
||||
- Invoked by: `dokku nginx:build-config`
|
||||
- Invoked by: `dokku proxy:build-config`
|
||||
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
|
||||
- Example:
|
||||
|
||||
@@ -1519,71 +1535,6 @@ BUILDER_TYPE="$1"; APP="$2"; IMAGE=$3
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-buildpack`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-pack`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using pack.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-dockerfile`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using a dockerfile.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-stop`
|
||||
|
||||
- Description: Can be used to run commands after an app is manually stopped
|
||||
@@ -2424,7 +2375,7 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
|
||||
- Description: Returns a list of storage mounts
|
||||
- Invoked by: `dokku storage:list` and `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $PHASE $FORMAT`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.29.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.30.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -9,11 +9,11 @@ We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
All pull requests have tests run against them on [GitHub Actions](https://github.com/features/actions), a continuous integration platform that provides Docker support for Ubuntu Trusty 18.04.
|
||||
All pull requests have tests run against them on [GitHub Actions](https://github.com/features/actions), a continuous integration platform that provides Docker support for Ubuntu Focal 20.04.
|
||||
|
||||
If you wish to skip tests for a particular commit, e.g. documentation changes, you may add the `[ci skip]` designator to your commit message. Commits that _should_ be tested but have the above designator will not be merged.
|
||||
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 18.04, we only provide official installation support for that platform and the latest LTS release of Ubuntu (currently 20.04).
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Focal 20.04, we only provide official installation support for that platform and the latest LTS release of Ubuntu (currently 20.04).
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ You can always install Dokku straight from the latest - potentially unstable - `
|
||||
|
||||
```shell
|
||||
# using a branch results in installing from source
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh;
|
||||
wget https://dokku.com/install/master/bootstrap.sh;
|
||||
sudo DOKKU_BRANCH=master bash bootstrap.sh
|
||||
```
|
||||
|
||||
@@ -47,7 +47,7 @@ sudo SSHCOMMAND_URL=https://raw.githubusercontent.com/yourusername/sshcommand/ma
|
||||
The bootstrap script allows the Dokku repository URL to be overridden to bootstrap a host from your own clone of Dokku using the `DOKKU_REPO` environment variable. Example:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh;
|
||||
wget https://dokku.com/install/master/bootstrap.sh;
|
||||
chmod +x bootstrap.sh
|
||||
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
|
||||
```
|
||||
|
||||
@@ -12,9 +12,10 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
# install dokku
|
||||
wget -qO- https://packagecloud.io/dokku/dokku/gpgkey | sudo tee /etc/apt/trusted.gpg.d/dokku.asc
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
echo "bionic focal jammy" | grep -q "$OS_ID" || OS_ID="bionic"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
# programmatically determine distro and codename
|
||||
DISTRO="$(awk -F= '$1=="ID" { print tolower($2) ;}' /etc/os-release)"
|
||||
OS_ID="$(awk -F= '$1=="VERSION_CODENAME" { print tolower($2) ;}' /etc/os-release)"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/${DISTRO}/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get -qq -y install dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.29.2
|
||||
docker pull dokku/dokku:0.30.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -12,13 +12,14 @@ Next, run the image.
|
||||
docker container run \
|
||||
--env DOKKU_HOSTNAME=dokku.me \
|
||||
--env DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku \
|
||||
--env DOKKU_LIB_HOST_ROOT=/var/lib/dokku/var/lib/dokku \
|
||||
--name dokku \
|
||||
--publish 3022:22 \
|
||||
--publish 8080:80 \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.29.2
|
||||
dokku/dokku:0.30.2
|
||||
```
|
||||
|
||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||
@@ -40,6 +41,8 @@ Other docker container options can also be used when running Dokku, though the s
|
||||
|
||||
## Plugin Installation
|
||||
|
||||
### On Dokku start
|
||||
|
||||
To install custom plugins, create a `plugin-list` file in the host's `/var/lib/dokku` directory. The plugins listed herein will be automatically installed by Dokku on container boot. This file should be the following format:
|
||||
|
||||
```yaml
|
||||
@@ -53,6 +56,16 @@ postgres: https://github.com/dokku/dokku-postgres.git
|
||||
redis: https://github.com/dokku/dokku-redis.git
|
||||
```
|
||||
|
||||
### Prior to Dokku start
|
||||
|
||||
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command. Note that the version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
|
||||
|
||||
```Dockerfile
|
||||
FROM dokku/dokku:0.30.2
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
|
||||
```
|
||||
|
||||
## SSH Key Management
|
||||
|
||||
To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.
|
||||
|
||||
@@ -19,7 +19,7 @@ source openrc.sh # Set the environment variables for DreamHost Cloud
|
||||
|
||||
This allows OpenStack client to connect to DreamHost API endpoints.
|
||||
The command below creates a new server instance named `my-dokku-instance`
|
||||
based on Ubuntu 18.04, with 2 GB RAM and 1 CPU (the flavor called
|
||||
based on Ubuntu 20.04, with 2 GB RAM and 1 CPU (the flavor called
|
||||
`supersonic`), opening network port access to HTTP and SSH (the
|
||||
`default` security group), and the name of the chosen SSH key. This
|
||||
key will be automatically added to the new server in the
|
||||
@@ -28,7 +28,7 @@ be reused by Dokku.
|
||||
|
||||
```sh
|
||||
openstack server create \
|
||||
--image Ubuntu-18.04 \
|
||||
--image Ubuntu-20.04 \
|
||||
--flavor gp1.supersonic \
|
||||
--security-group default \
|
||||
--key-name $YOUR_SSH_KEYNAME \
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
> For users that have customized the IP address of their VM - either in a custom `Vagrantfile` or via the `DOKKU_IP` environment variable - and are not using `10.0.0.2` for the Vagrant IP, you'll need to instead use the output of `vagrant ssh-config dokku` for your `~/.ssh/config` entry.
|
||||
|
||||
6. Connect to the server and add your ssh key to the install. Additionally, set the global domain name to `dokku.me`.
|
||||
6. Connect to the server via `vagrant ssh` and add your ssh key to the install. Additionally, set the global domain name to `dokku.me`.
|
||||
|
||||
```shell
|
||||
# usually your key is already available under the current user's `~/.ssh/authorized_keys` file
|
||||
|
||||
@@ -9,7 +9,7 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of any of the following operating systems:
|
||||
- [Ubuntu 18.04/20.04/22.04](https://www.ubuntu.com/download)
|
||||
- [Ubuntu 20.04/22.04](https://www.ubuntu.com/download)
|
||||
- [Debian 10+ x64](https://www.debian.org/distrib/)
|
||||
- A server with one of the following architectures
|
||||
- AMD64 (alternatively known as `x86_64`), commonly used for Intel cloud servers
|
||||
@@ -38,8 +38,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.29.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.29.2 bash bootstrap.sh
|
||||
wget https://dokku.com/install/v0.30.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -241,3 +241,22 @@ This could be a result of a bad proxy configuration (`http:5000:5000` may be inc
|
||||
```
|
||||
|
||||
Set `dokku proxy:ports-set front http:80:5000` to get proxy correctly configured for http endpoint.
|
||||
|
||||
### I deployed a new app but now subdomains are miss-routed
|
||||
|
||||
Sometimes nginx does something funky and cant actually reload for whatever reason.
|
||||
|
||||
```bash
|
||||
# Validate the configuration
|
||||
$ sudo nginx -t
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
|
||||
$ sudo service nginx restart
|
||||
|
||||
# Re-enable Letsencrypt
|
||||
```
|
||||
|
||||
Example: existing AppA (https) and AppB(https), deployed NEW (non-https) then noticed right away NEW's subdomain showed AppB's content and cert but under its own subdomain (cert miss-match of course). AppB still works. AppA also changed to show AppB content and cert.. Other apps were unaffected.
|
||||
|
||||
Consider caddy and traefik support via docker containers if this continues to be an issue.
|
||||
|
||||
@@ -18,6 +18,7 @@ Docker releases updates periodically to their engine. We recommend reading their
|
||||
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [Upgrading to 0.30](/docs/appendices/0.30.0-migration-guide.md)
|
||||
- [Upgrading to 0.29](/docs/appendices/0.29.0-migration-guide.md)
|
||||
- [Upgrading to 0.28](/docs/appendices/0.28.0-migration-guide.md)
|
||||
- [Upgrading to 0.27](/docs/appendices/0.27.0-migration-guide.md)
|
||||
|
||||
@@ -10,26 +10,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
@@ -38,7 +38,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
|
||||
</head>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<main class="container px-4 px-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.29.2</span></span></a>
|
||||
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.30.2</span></span></a>
|
||||
<h1 class="text-white hero-heading mt-5">An open source PAAS alternative to Heroku.</h1>
|
||||
<h4 class="text-white mt-5">Dokku helps you build and manage the lifecycle of applications from building to scaling.</h4>
|
||||
<div class="d-flex mt-5">
|
||||
@@ -114,19 +114,21 @@
|
||||
<p class="line">
|
||||
<span class="output"># download the installation script</span>
|
||||
</p>
|
||||
<br>
|
||||
<p class="line">
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.29.2/bootstrap.sh</span>
|
||||
<span class="command">wget https://dokku.com/bootstrap.sh</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<p class="line">
|
||||
<span class="output"># run the installer</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.29.2 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<p class="line">
|
||||
<span class="output"># Configure your server domain</span>
|
||||
</p>
|
||||
@@ -134,15 +136,23 @@
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">dokku domains:set-global dokku.me</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<p class="line">
|
||||
<span class="output"># and your ssh key to the dokku user</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "your-public-key-contents-here" | dokku ssh-keys:add admin</span>
|
||||
<span class="command">PUBLIC_KEY="your-public-key-contents-here"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># # create your first app and you're off to the races!</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "$PUBLIC_KEY" | dokku ssh-keys:add admin</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
<p class="line">
|
||||
<span class="output"># create your first app and you're off!</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="prompt">$</span>
|
||||
@@ -217,13 +227,13 @@
|
||||
Create</a>
|
||||
<a class="nav-link" id="nav-deploy-tab" data-bs-toggle="tab" href="#nav-deploy" role="tab" aria-controls="nav-deploy" aria-selected="false">
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.3141 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.29982 22.8765C4.60.29.22.9646 3.95721 23.29 3.46136 23.801C2.232 25.074 2.11548 29.7889 2.11548 29.7889C2.11548 29.7889 6.68686 29.6687 7.91692 28.3985C8.41409 27.8876 8.72993 27.2187 8.81347 26.4997" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.3141 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M5.29982 22.8765C4.60428 22.9646 3.95721 23.29 3.46136 23.801C2.232 25.074 2.11548 29.7889 2.11548 29.7889C2.11548 29.7889 6.68686 29.6687 7.91692 28.3985C8.41409 27.8876 8.72993 27.2187 8.81347 26.4997" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
Deploy</a>
|
||||
<a class="nav-link" id="nav-scale-tab" data-bs-toggle="tab" href="#nav-scale" role="tab" aria-controls="nav-scale" aria-selected="false">
|
||||
<svg width="23" height="24" viewBox="0 0 23 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0L2.5 0V21H23V23.7364H0V0ZM15.1473 4.08735C15.1473 3.89062 15.2543 3.57401 15.3891 3.4349C15.5239 3.29579 15.7067 3.21764 15.8973 3.21764H21.6473C21.8379 3.21764 22.2313 3.38443 22.3661 3.52353C22.5009 3.66264 22.6529 4.06992 22.6529 4.26665V10.2008C22.6529 10.3975 22.5985 10.5861 22.4637 10.7253C22.3289 10.8644 22.0.29.20.9376 21.8622 10.9376C21.6715 10.9376 21.2739 10.8644 21.1391 10.7253C21.0043 10.5861 20.9286 10.3975 20.9286 10.2008V6.34359L15.7349 12.8963C15.6713 12.9764 15.5028 13.1856 15.4132 13.2322C15.3236 13.2788 15.2256 13.3056 15.1254 13.3108C15.0252 13.3159 14.9251 13.2994 14.8314 13.2622C14.7378 13.225 14.6527 13.1681 14.5817 13.0949L10.9086 9.79904L5.65683 16.7063C5.43978 16.9911 4.8927 16.8125 4.47404 16.5042C4.08636 16.2187 3.75998 15.7452 3.99173 15.3696L9.97348 7.33459C10.0345 7.24783 10.113 7.17575 10.2037 7.12332C10.2943 7.0709 10.3948 7.03937 10.4984 7.0309C10.602 7.02244 10.7061 7.03725 10.8036 7.07432C10.9011 7.11138 10.9896 7.16981 11.0631 7.24558L14.8314 10.7253L19.3036 5.07432L15.8973 5.00841C15.7067 5.00841 15.4678 4.92015 15.333 4.78104C15.1982 4.64193 15.1473 4.28407 15.1473 4.08735Z" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0L2.5 0V21H23V23.7364H0V0ZM15.1473 4.08735C15.1473 3.89062 15.2543 3.57401 15.3891 3.4349C15.5239 3.29579 15.7067 3.21764 15.8973 3.21764H21.6473C21.8379 3.21764 22.2313 3.38443 22.3661 3.52353C22.5009 3.66264 22.6529 4.06992 22.6529 4.26665V10.2008C22.6529 10.3975 22.5985 10.5861 22.4637 10.7253C22.3289 10.8644 22.0528 10.9376 21.8622 10.9376C21.6715 10.9376 21.2739 10.8644 21.1391 10.7253C21.0043 10.5861 20.9286 10.3975 20.9286 10.2008V6.34359L15.7349 12.8963C15.6713 12.9764 15.5028 13.1856 15.4132 13.2322C15.3236 13.2788 15.2256 13.3056 15.1254 13.3108C15.0252 13.3159 14.9251 13.2994 14.8314 13.2622C14.7378 13.225 14.6527 13.1681 14.5817 13.0949L10.9086 9.79904L5.65683 16.7063C5.43978 16.9911 4.8927 16.8125 4.47404 16.5042C4.08636 16.2187 3.75998 15.7452 3.99173 15.3696L9.97348 7.33459C10.0345 7.24783 10.113 7.17575 10.2037 7.12332C10.2943 7.0709 10.3948 7.03937 10.4984 7.0309C10.602 7.02244 10.7061 7.03725 10.8036 7.07432C10.9011 7.11138 10.9896 7.16981 11.0631 7.24558L14.8314 10.7253L19.3036 5.07432L15.8973 5.00841C15.7067 5.00841 15.4678 4.92015 15.333 4.78104C15.1982 4.64193 15.1473 4.28407 15.1473 4.08735Z" />
|
||||
</svg>
|
||||
Scale</a>
|
||||
</div>
|
||||
@@ -408,7 +418,7 @@
|
||||
<g id="mysql" data-bs-toggle="svg-tooltip" data-bs-placement="bottom" title="MySQL" filter="url(#filter9_d_55_77)" transform="translate(79.2566,394.257) translate(-79.2566,-394.257)" style="animation: 30s linear infinite both mysql_t;">
|
||||
<ellipse fill="white" rx="51.2566" ry="51.2566" transform="translate(79.2566,394.257)"/>
|
||||
<path d="M39,411.45L41.6356,411.45L41.6356,401.092L45.7157,410.121C46.1971,411.214,46.8562,411.601,48.1485,411.601C49.4411,411.601,50.0746,411.214,50.5563,410.121L54.6364,401.092L54.6364,411.449L57.272,411.449L57.272,401.109C57.272,400.1,56.8664,399.612,56.0303,399.36C54.0283,398.738,52.685,399.276,52.0767,400.621L48.0726,409.533L44.1953,400.621C43.6124,399.276,42.2439,398.738,40.2419,399.36C39.4055,399.612,39,400.1,39,401.109L39,411.45L39,411.45ZM59.4635,403.019L62.0983,403.019L62.0983,408.725C62.0736,409.035,62.1982,409.763,63.642,409.785C64.3786,409.797,69.327,409.785,69.3732,409.785L69.3732,402.991L72.0141,402.991C72.0263,402.991,72.0115,412.257,72.0117,412.296C72.026,414.581,69.1626,415.078,67.8428,415.116L59.5205,415.116L59.5205,413.351C59.5353,413.351,67.8366,413.353,67.8575,413.351C69.5538,413.173,69.3535,412.334,69.3533,412.051L69.3533,411.363L63.7512,411.363C61.1447,411.339,59.4852,410.207,59.4647,408.905C59.4626,408.785,59.5209,403.076,59.4633,403.019L59.4635,403.019Z" fill="#00618A" transform="translate(55.5095,407.109) translate(-55.5095,-407.109)"/>
|
||||
<path d="M74.0451,411.45L81.6224,411.45C82.5094,411.45,83.371,411.265,84.0554,410.945C85.1957,410.424,85.7533,409.718,85.7533,408.793L85.7533,406.876C85.7533,406.12,85.1198,405.413,83.8779,404.943C83.2189,404.69,82.408,404.556,81.6224,404.556L78.4289,404.556C77.365,404.556,76.8581,404.236,76.7314,403.53C76.706,403.446,76.706,403.379,76.706,403.295L76.706,402.101C76.706,402.034,76.706,401.966,76.7314,401.882C76.8581,401.344,77.137,401.193,78.0745,401.109C78.1504,401.109,78.2518,401.092,78.328,401.092L85.8547,401.092L85.8547,399.344L78.4546,399.344C77.3902,399.344,76.8326,399.411,76.3259,399.562C74.7546,400.05,74.0704,400.823,74.0704,402.168L74.0704,403.698C74.0704,404.875,75.4136,405.884,77.6689,406.12C77.9226,406.136,78.1759,406.153,78.4291,406.153L81.1661,406.153C81.2677,406.153,81.3691,406.153,81.445,406.17C82.2814,406.237,82.636,406.389,82.8897,406.691C83.0416,406.842,83.0922,406.994,83.0922,407.162L83.0922,408.692C83.0922,408.877,82.9656,409.113,82.7124,409.314C82.4841,409.516,82.104,409.651,81.5971,409.684C81.4957,409.684,81.4198,409.701,81.3184,409.701L74.0449,409.701L74.0449,411.449L74.0451,411.45ZM102.195,408.406C102.195,410.205,103.538,411.214,106.25,411.416C106.503,411.433,106.757,411.45,107.01,411.45L113.878,411.45L113.878,409.701L106.959,409.701C105.413,409.701,104.831,409.314,104.831,408.39L104.831,399.343L102.195,399.343L102.195,408.406ZM87.4354,408.498L87.4354,402.264C87.4354,400.68,88.5529,399.719,90.762,399.416C90.9976,399.383,91.2352,399.366,91.4732,399.366L96.476,399.366C96.7298,399.366,96.9587,399.383,97.2126,399.416C99.4219,399.719,100.539,400.68,100.539,402.264L100.539,408.498C100.539,409.783,100.065,410.47,98.971,410.919L101.567,413.251L98.507,413.251L96.4066,411.364L94.2921,411.497L91.4732,411.497C90.9907,411.497,90.4829,411.43,89.9241,411.278C88.2481,410.823,87.4354,409.947,87.4354,408.498L87.4354,408.498ZM90.29.208.346C90.29.208.431,90.3054,408.515,90.3309,408.616C90.4831,409.341,91.1688,409.745,92.21,409.745L94.6044,409.745L92.4049,407.769L95.465,407.769L97.3835,409.492C97.7369,409.305,97.9697,409.018,98.0509,408.65C98.0762,408.566,98.0762,408.481,98.0762,408.397L98.0762,402.416C98.0762,402.348,98.0762,402.264,98.0509,402.18C97.8984,401.506,97.2128,401.118,96.1971,401.118L92.21,401.118C91.042,401.118,90.29.2,401.624,90.29.2,402.416L90.29.2,408.346L90.29.208.346Z" fill="#E48E00" transform="translate(93.9614,406.297) translate(-93.9614,-406.297)"/>
|
||||
<path d="M74.0451,411.45L81.6224,411.45C82.5094,411.45,83.371,411.265,84.0554,410.945C85.1957,410.424,85.7533,409.718,85.7533,408.793L85.7533,406.876C85.7533,406.12,85.1198,405.413,83.8779,404.943C83.2189,404.69,82.408,404.556,81.6224,404.556L78.4289,404.556C77.365,404.556,76.8581,404.236,76.7314,403.53C76.706,403.446,76.706,403.379,76.706,403.295L76.706,402.101C76.706,402.034,76.706,401.966,76.7314,401.882C76.8581,401.344,77.137,401.193,78.0745,401.109C78.1504,401.109,78.2518,401.092,78.328,401.092L85.8547,401.092L85.8547,399.344L78.4546,399.344C77.3902,399.344,76.8326,399.411,76.3259,399.562C74.7546,400.05,74.0704,400.823,74.0704,402.168L74.0704,403.698C74.0704,404.875,75.4136,405.884,77.6689,406.12C77.9226,406.136,78.1759,406.153,78.4291,406.153L81.1661,406.153C81.2677,406.153,81.3691,406.153,81.445,406.17C82.2814,406.237,82.636,406.389,82.8897,406.691C83.0416,406.842,83.0922,406.994,83.0922,407.162L83.0922,408.692C83.0922,408.877,82.9656,409.113,82.7124,409.314C82.4841,409.516,82.104,409.651,81.5971,409.684C81.4957,409.684,81.4198,409.701,81.3184,409.701L74.0449,409.701L74.0449,411.449L74.0451,411.45ZM102.195,408.406C102.195,410.205,103.538,411.214,106.25,411.416C106.503,411.433,106.757,411.45,107.01,411.45L113.878,411.45L113.878,409.701L106.959,409.701C105.413,409.701,104.831,409.314,104.831,408.39L104.831,399.343L102.195,399.343L102.195,408.406ZM87.4354,408.498L87.4354,402.264C87.4354,400.68,88.5529,399.719,90.762,399.416C90.9976,399.383,91.2352,399.366,91.4732,399.366L96.476,399.366C96.7298,399.366,96.9587,399.383,97.2126,399.416C99.4219,399.719,100.539,400.68,100.539,402.264L100.539,408.498C100.539,409.783,100.065,410.47,98.971,410.919L101.567,413.251L98.507,413.251L96.4066,411.364L94.2921,411.497L91.4732,411.497C90.9907,411.497,90.4829,411.43,89.9241,411.278C88.2481,410.823,87.4354,409.947,87.4354,408.498L87.4354,408.498ZM90.28,408.346C90.28,408.431,90.3054,408.515,90.3309,408.616C90.4831,409.341,91.1688,409.745,92.21,409.745L94.6044,409.745L92.4049,407.769L95.465,407.769L97.3835,409.492C97.7369,409.305,97.9697,409.018,98.0509,408.65C98.0762,408.566,98.0762,408.481,98.0762,408.397L98.0762,402.416C98.0762,402.348,98.0762,402.264,98.0509,402.18C97.8984,401.506,97.2128,401.118,96.1971,401.118L92.21,401.118C91.042,401.118,90.2802,401.624,90.2802,402.416L90.2802,408.346L90.28,408.346Z" fill="#E48E00" transform="translate(93.9614,406.297) translate(-93.9614,-406.297)"/>
|
||||
<path d="M116.197,396.443C114.577,396.399,113.339,396.549,112.281,396.993C111.981,397.119,111.501,397.122,111.452,397.497C111.617,397.67,111.643,397.927,111.774,398.139C112.027,398.546,112.453,399.091,112.834,399.377C113.25,399.69,113.678,400.024,114.124,400.294C114.917,400.775,115.802,401.05,116.565,401.532C117.015,401.816,117.462,402.174,117.901,402.495C118.118,402.653,118.264,402.9,118.546,402.999L118.546,402.953C118.398,402.765,118.36,402.507,118.224,402.311L117.625,401.715C117.039,400.942,116.296,400.262,115.506,399.698C114.876,399.248,113.465,398.64,113.203,397.91L113.156,397.864C113.603,397.814,114.126,397.653,114.539,397.543C115.231,397.358,115.85,397.406,116.565,397.222C116.888,397.131,117.21,397.039,117.533,396.947L117.533,396.764C117.171,396.395,116.914,395.906,116.519,395.572C115.488,394.698,114.362,393.824,113.203,393.096C112.56,392.692,111.765,392.43,111.083,392.087C110.854,391.972,110.451,391.913,110.3,391.721C109.942,391.266,109.747,390.691,109.471,390.162C108.893,389.054,108.325,387.843,107.813,386.677C107.463,385.882,107.235,385.098,106.799,384.385C104.707,380.962,102.456,378.897,98.9679,376.866C98.2258,376.434,97.3322,376.264,96.3879,376.041L94.8677,375.949C94.5584,375.82,94.2366,375.444,93.9462,375.261C92.7908,374.535,89.8272,372.955,88.9714,375.032C88.431,376.344,89.779,377.623,90.2611,378.288C90.5995,378.754,91.0327,379.276,91.2745,379.8C91.4336,380.145,91.4611,380.49,91.5971,380.855C91.9321,381.753,92.2231,382.73,92.6565,383.56C92.8755,383.98,93.1169,384.422,93.3937,384.798C93.5635,385.028,93.8543,385.13,93.9003,385.485C93.6158,385.882,93.5996,386.496,93.4397,386.998C92.7198,389.258,92.9913,392.066,94.0386,393.738C94.36,394.251,95.1169,395.352,96.1576,394.93C97.0681,394.561,96.8647,393.417,97.1251,392.408C97.184,392.18,97.1477,392.011,97.2632,391.858L97.2632,391.904L98.0924,393.554C98.706,394.538,99.7954,395.566,100.718,396.26C101.197,396.619,101.574,397.241,102.193,397.451L102.193,397.406L102.146,397.406C102.027,397.22,101.839,397.142,101.686,396.993C101.325,396.641,100.924,396.204,100.626,395.801C99.7868,394.667,99.0449,393.426,98.369,392.133C98.0462,391.516,97.7656,390.836,97.4935,390.208C97.3886,389.966,97.3899,389.6,97.1713,389.474C96.8733,389.934,96.4343,390.306,96.2038,390.85C95.8352,391.718,95.7876,392.777,95.6511,393.875C95.5703,393.904,95.606,393.884,95.5588,393.921C94.9172,393.767,94.6916,393.11,94.4534,392.546C93.85,391.12,93.7381,388.823,94.2687,387.182C94.4062,386.757,95.0268,385.419,94.7756,385.027C94.6557,384.636,94.26,384.409,94.0386,384.11C93.7646,383.74,93.491,383.253,93.3014,382.826C92.8078,381.714,92.5773,380.466,92.0577,379.342C91.8093,378.805,91.3892,378.261,91.0442,377.783C90.6623,377.254,90.2346,376.864,89.9386,376.224C89.8333,375.997,89.6903,375.633,89.8463,375.399C89.8961,375.241,89.9661,375.175,90.1229,375.124C90.3901,374.919,91.1343,375.192,91.4126,375.307C92.1515,375.613,92.768,375.904,93.3937,376.316C93.6942,376.514,93.998,376.898,94.361,377.004L94.7756,377.004C95.4241,377.152,96.1507,377.05,96.7565,377.233C97.8274,377.557,98.7871,378.061,99.6585,378.608C102.314,380.277,104.485,382.652,105.97,385.485C106.209,385.942,106.312,386.377,106.523,386.861C106.947,387.837,107.482,388.841,107.905,389.795C108.326,390.747,108.737,391.708,109.333,392.5C109.646,392.917,110.856,393.14,111.406,393.371C111.791,393.533,112.423,393.702,112.788,393.921C113.485,394.34,114.161,394.838,114.815,395.297C115.142,395.526,116.147,396.029,116.197,396.443L116.197,396.443Z" fill="#00618A" transform="translate(103.696,388.499) translate(-103.696,-388.499)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M95.6047,378.975C95.2669,378.969,95.028,379.012,94.7754,379.067L94.7754,379.113L94.8216,379.113C94.9827,379.442,95.2669,379.654,95.4664,379.938C95.6199,380.259,95.7735,380.58,95.9272,380.901L95.9731,380.855C96.2584,380.655,96.3891,380.335,96.3877,379.846C96.2734,379.727,96.2564,379.576,96.1574,379.434C96.0257,379.243,95.7708,379.135,95.6047,378.975L95.6047,378.975Z" fill="#00618A" transform="translate(95.5816,379.938) translate(-95.5816,-379.938)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M115.115,409.651C115.115,410.806,116.032,411.584,117.058,411.584C118.083,411.584,119,410.806,119,409.651C119,408.497,118.083,407.718,117.058,407.718C116.032,407.718,115.115,408.497,115.115,409.651L115.115,409.651ZM118.565,409.651C118.565,410.527,117.892,411.182,117.058,411.182C116.214,411.182,115.551,410.527,115.551,409.651C115.551,408.775,116.213,408.12,117.058,408.12C117.892,408.12,118.565,408.775,118.565,409.651ZM117.581,410.754L118.016,410.754L117.379,409.785C117.721,409.749,117.98,409.584,117.98,409.182C117.98,408.734,117.695,408.548,117.146,408.548L116.281,408.548L116.281,410.754L116.654,410.754L116.654,409.801L117.001,409.801L117.581,410.754L117.581,410.754ZM116.654,409.491L116.654,408.857L117.084,408.857C117.307,408.857,117.576,408.899,117.576,409.156C117.576,409.466,117.332,409.491,117.052,409.491L116.654,409.491L116.654,409.491Z" fill="#E48E00" transform="translate(117.058,409.651) translate(-117.058,-409.651)"/>
|
||||
@@ -705,7 +715,6 @@
|
||||
var release = data[0];
|
||||
const releaseSpan = document.getElementById("releaseVersion");
|
||||
releaseSpan.innerText = release.name;
|
||||
console.log(release);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -125,9 +125,7 @@ dokku network:info test-network
|
||||
|
||||
### Routing an app to a known ip:port combination
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
In some cases, it may be necessary to route an app to an existing `$IP:$PORT` combination. This is particularly the case for internal admin tools or services that aren't run by Dokku but have a web ui that would benefit from being exposed by Dokku. This can be done by setting a value for `static-web-lister` and running a few other commands when creating an app.
|
||||
In some cases, it may be necessary to route an app to an existing `$IP:$PORT` combination. This is particularly the case for internal admin tools or services that aren't run by Dokku but have a web ui that would benefit from being exposed by Dokku. This can be done by using a proxy application and routing requests through that.
|
||||
|
||||
```shell
|
||||
# for a service listening on:
|
||||
@@ -137,25 +135,23 @@ In some cases, it may be necessary to route an app to an existing `$IP:$PORT` co
|
||||
# create the app
|
||||
dokku apps:create local-app
|
||||
|
||||
# set the builder to the null builder, which does nothing
|
||||
dokku builder:set local-app selected null
|
||||
# add an extra host that maps host.docker.internal to the docker gateway
|
||||
dokku docker-options:add local-app deploy "--add-host=host.docker.internal:host-gateway"
|
||||
|
||||
# set the scheduler to the null scheduler, which does nothing
|
||||
dokku scheduler:set local-app selected null
|
||||
# set the SERVICE_HOST to the mapped hostname
|
||||
dokku config:set local-app SERVICE_HOST=host.docker.internal
|
||||
|
||||
# set the static-web-listener network property to the ip:port combination for your app.
|
||||
dokku network:set local-app static-web-listener 127.0.0.1:8080
|
||||
|
||||
# set the port map as desired for the port specified in your static-web-listener
|
||||
dokku proxy:ports-set local-app http:80:8080
|
||||
# set the SERVICE_PORT to the port combination for your app
|
||||
dokku config:set local-app SERVICE_PORT=8080
|
||||
|
||||
# set the domains desired
|
||||
dokku domains:set local-app local-app.dokku.me
|
||||
|
||||
dokku proxy:build-config local-app
|
||||
# deploy the service-proxy image
|
||||
dokku git:from-image local-app dokku/service-proxy:latest
|
||||
```
|
||||
|
||||
Only a single `$IP:$PORT` combination can be routed to for a given app, and that `$IP:$PORT` combination _must_ be accessible to the proxy, or requests to the app may not resolve.
|
||||
Only a single `$IP:$PORT` combination can be routed to for a given app, and that `$IP:$PORT` combination _must_ be accessible to the service proxy on initial deploy, or the service proxy won't start.
|
||||
|
||||
### Attaching an app to a network
|
||||
|
||||
@@ -200,7 +196,9 @@ dokku network:set --global initial-network
|
||||
|
||||
#### Network Aliases
|
||||
|
||||
When a container created for a deployment is being attached to a network - regardless of which `attach` property was used - a network alias of the pattern `APP.PROC_TYPE` will be added to all containers. This can be used to load-balance requests between containers. For an application named `node-js-app` with a process type of web, the network alias - or resolvable DNS record within the network - will be:
|
||||
> Note: This feature is only available when an app has been attached to a network other than the default `bridge` network.
|
||||
|
||||
When a container created for a deployment is being attached to a network - regardless of which network property was used - a network alias of the pattern `APP.PROC_TYPE` will be added to all containers. This can be used to load-balance requests between containers. For an application named `node-js-app` with a process type of web, the network alias - or resolvable DNS record within the network - will be:
|
||||
|
||||
```
|
||||
node-js-app.web
|
||||
@@ -262,27 +260,27 @@ Containers can be attached to a network for a variety of reasons:
|
||||
Whatever the reason, the semantics of the two network hooks are important and are outlined before.
|
||||
|
||||
- `attach-post-create`:
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created` but not `running`
|
||||
- Use case: When the container needs to access a resource on the network.
|
||||
- Example: The app needs to talk to a database on the same network when it first boots.
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created` but not `running`
|
||||
- Use case: When the container needs to access a resource on the network.
|
||||
- Example: The app needs to talk to a database on the same network when it first boots.
|
||||
- `attach-post-deploy`
|
||||
- Phase it applies to:
|
||||
- `deploy`: Deployed app containers.
|
||||
- Container state on attach: `running`
|
||||
- Use case: When another container on the network needs to access _this_ container.
|
||||
- Example: A background process needs to communicate with the web process exposed by this container.
|
||||
- Phase it applies to:
|
||||
- `deploy`: Deployed app containers.
|
||||
- Container state on attach: `running`
|
||||
- Use case: When another container on the network needs to access _this_ container.
|
||||
- Example: A background process needs to communicate with the web process exposed by this container.
|
||||
- `initial-network`:
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created`
|
||||
- Use case: When another container on the network is already running and needed by this container.
|
||||
- Example: A key-value store exposing itself to all your apps may be on the `initial-network`.
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created`
|
||||
- Use case: When another container on the network is already running and needed by this container.
|
||||
- Example: A key-value store exposing itself to all your apps may be on the `initial-network`.
|
||||
|
||||
> Warning: If the attachment fails during the `running` container state, this may result in your application failing to respond to proxied requests once older containers are removed.
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ For buildpack deployments, your application _must_ respect the `PORT` environmen
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/networking/proxy-management.md).
|
||||
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp` and manually exposing the ports via the `docker-options` plugin. For example, `dokku docker-options:add myapp deploy "-p 2456:2456/udp'`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/networking/proxy-management.md).
|
||||
|
||||
#### Applications using EXPOSE
|
||||
|
||||
@@ -147,7 +147,7 @@ Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port
|
||||
For example, if the Dokku installation is configured with the domain `dokku.me` and an application named `node-js-app` is deployed with following Dockerfile:
|
||||
|
||||
```
|
||||
FROM ubuntu:18.04
|
||||
FROM ubuntu:20.04
|
||||
EXPOSE 1234
|
||||
RUN python -m SimpleHTTPServer 1234
|
||||
```
|
||||
|
||||
170
docs/networking/proxies/haproxy.md
Normal file
170
docs/networking/proxies/haproxy.md
Normal file
@@ -0,0 +1,170 @@
|
||||
# Haproxy Proxy
|
||||
|
||||
> New as of 0.28.0
|
||||
|
||||
Dokku provides integration with the [Haproxy](http://www.haproxy.org) proxy service by utilizing the Docker label-based integration implemented by [EasyHaproxy](https://github.com/byjg/docker-easy-haproxy).
|
||||
|
||||
```
|
||||
haproxy:report [<app>] [<flag>] # Displays a haproxy report for one or more apps
|
||||
haproxy:logs [--num num] [--tail] # Display haproxy log output
|
||||
haproxy:set <app> <property> (<value>) # Set or clear an haproxy property for an app
|
||||
haproxy:show-config <app> # Display haproxy compose config
|
||||
haproxy:start # Starts the haproxy server
|
||||
haproxy:stop # Stops the haproxy server
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
Using the `caddy` plugin integration requires the `docker-compose-plugin` for Docker. See [this document](https://docs.docker.com/compose/install/) from the Docker documentation for more information on the installation process for the `docker-compose-plugin`.
|
||||
|
||||
## Usage
|
||||
|
||||
> Warning: As using multiple proxy plugins on a single Dokku installation can lead to issues routing requests to apps, doing so should be avoided. As the default proxy implementation is nginx, users are encouraged to stop the nginx service before switching to Haproxy.
|
||||
|
||||
The Haproxy plugin has specific rules for routing requests:
|
||||
|
||||
- Haproxy integration is exposed via docker labels attached to containers. Changes in labels require either app deploys or rebuilds.
|
||||
- While Haproxy will respect labels associated with other containers, only `web` containers have Haproxy labels injected by the plugin.
|
||||
- Only `http:80` and `https:443` port mappings are supported at this time.
|
||||
- Requests are routed as soon as the container is running and passing healthchecks.
|
||||
|
||||
### Switching to Haproxy
|
||||
|
||||
To use the Haproxy plugin, use the `proxy:set` command for the app in question:
|
||||
|
||||
```shell
|
||||
dokku proxy:set node-js-app haproxy
|
||||
```
|
||||
|
||||
This will enable the docker label-based Haproxy integration. All future deploys will inject the correct labels for Haproxy to read and route requests to containers. Due to the docker label-based integration used by Haproxy, a single deploy or rebuild will be required before requests will route successfully.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
Any changes to domains or port mappings will also require either a deploy or rebuild.
|
||||
|
||||
### Starting Haproxy container
|
||||
|
||||
Haproxy can be started via the `haproxy:start` command. This will start a Haproxy container via the `docker compose up` command.
|
||||
|
||||
```shell
|
||||
dokku haproxy:start
|
||||
```
|
||||
|
||||
### Stopping the Haproxy container
|
||||
|
||||
Haproxy may be stopped via the `haproxy:stop` command.
|
||||
|
||||
```shell
|
||||
dokku haproxy:stop
|
||||
```
|
||||
|
||||
The Haproxy container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||
|
||||
### Showing the Haproxy compose config
|
||||
|
||||
For debugging purposes, it may be useful to show the Haproxy compose config. This can be achieved via the `haproxy:show-config` command.
|
||||
|
||||
```shell
|
||||
dokku haproxy:show-config
|
||||
```
|
||||
|
||||
### Customizing the Haproxy container image
|
||||
|
||||
While the default Haproxy image is hardcoded, users may specify an alternative by setting the `image` property with the `--global` flag:
|
||||
|
||||
```shell
|
||||
dokku haproxy:set --global image byjg/easy-haproxy:4.0.0
|
||||
```
|
||||
|
||||
#### Checking the Haproxy container's logs
|
||||
|
||||
It may be necessary to check the Haproxy container's logs to ensure that Haproxy is operating as expected. This can be performed with the `haproxy:logs` command.
|
||||
|
||||
```shell
|
||||
dokku haproxy:logs
|
||||
```
|
||||
|
||||
This command also supports the following modifiers:
|
||||
|
||||
```shell
|
||||
--num NUM # the number of lines to display
|
||||
--tail # continually stream logs
|
||||
```
|
||||
|
||||
You can use these modifiers as follows:
|
||||
|
||||
```shell
|
||||
dokku haproxy:logs --tail --num 10
|
||||
```
|
||||
|
||||
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
||||
|
||||
### Changing the Haproxy log level
|
||||
|
||||
Haproxy log output is set to `ERROR` by default. It may be changed by setting the `log-level` property with the `--global` flag:
|
||||
|
||||
```shell
|
||||
dokku haproxy:set --global log-level DEBUG
|
||||
```
|
||||
|
||||
After modifying, the Haproxy container will need to be restarted.
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The haproxy plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
#### Enabling letsencrypt integration
|
||||
|
||||
By default, letsencrypt is disabled and https port mappings are ignored. To enable, set the `letsencrypt-email` property with the `--global` flag:
|
||||
|
||||
```shell
|
||||
dokku haproxy:set --global letsencrypt-email automated@dokku.sh
|
||||
```
|
||||
|
||||
After enabling, the Haproxy container will need to be restarted and apps will need to be rebuilt. All http requests will then be redirected to https.
|
||||
|
||||
#### Customizing the letsencrypt server
|
||||
|
||||
The letsencrypt integration is set to the production letsencrypt server by default. To change this, set the `letsencrypt-server` property with the `--global` flag:
|
||||
|
||||
```shell
|
||||
dokku haproxy:set --global letsencrypt-server https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
```
|
||||
|
||||
After enabling, the Haproxy container will need to be restarted and apps will need to be rebuilt to retrieve certificates from the new server.
|
||||
|
||||
## Displaying Haproxy reports for an app
|
||||
|
||||
You can get a report about the app's Haproxy config using the `haproxy:report` command:
|
||||
|
||||
```shell
|
||||
dokku haproxy:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
=====> python-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
=====> ruby-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku haproxy:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app haproxy information
|
||||
Haproxy image: byjg/easy-haproxy:4.0.0
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku haproxy:report node-js-app --haproxy-image
|
||||
```
|
||||
@@ -33,7 +33,7 @@ The nginx server can be started via `nginx:start`.
|
||||
|
||||
```shell
|
||||
dokku nginx:start
|
||||
````
|
||||
```
|
||||
|
||||
### Stopping nginx
|
||||
|
||||
@@ -43,7 +43,7 @@ The nginx server can be stopped via `nginx:stop`.
|
||||
|
||||
```shell
|
||||
dokku nginx:stop
|
||||
````
|
||||
```
|
||||
|
||||
### Binding to specific addresses
|
||||
|
||||
@@ -397,7 +397,17 @@ These are provided as an alternative to the generic Nginx error page, are shared
|
||||
|
||||
### Default site
|
||||
|
||||
By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration.
|
||||
By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. This means that accessing the dokku server via its IP address or a bogus domain name may return a seemingly random website.
|
||||
|
||||
> Warning: some versions of Nginx may create a default site when installed. This site is simply a static page which says "Welcome to Nginx", and if this default site is enabled, Nginx will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, run the following commands:
|
||||
>
|
||||
> ```
|
||||
> rm /etc/nginx/sites-enabled/default
|
||||
> dokku nginx:stop
|
||||
> dokku nginx:start
|
||||
> ```
|
||||
|
||||
If services should only be accessed via their domain name, you may want to disable the default site by adding the following configuration to the global nginx configuration.
|
||||
|
||||
Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
|
||||
|
||||
@@ -406,34 +416,28 @@ server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
# If services hosted by dokku are available via HTTPS, it is recommended
|
||||
# to also uncomment the following section.
|
||||
#
|
||||
# Please note that in order to let this work, you need an SSL certificate. However
|
||||
# it does not need to be valid. Users of Debian-based distributions can install the
|
||||
# `ssl-cert` package with `sudo apt install ssl-cert` to automatically generate
|
||||
# a self-signed certificate that is stored at `/etc/ssl/certs/ssl-cert-snakeoil.pem`.
|
||||
#
|
||||
#listen 443 ssl;
|
||||
#listen [::]:443 ssl;
|
||||
#ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||
#ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||
|
||||
server_name _;
|
||||
access_log off;
|
||||
return 410;
|
||||
return 444;
|
||||
}
|
||||
|
||||
# To handle HTTPS requests, you can uncomment the following section.
|
||||
#
|
||||
# Please note that in order to let this work as expected, you need a valid
|
||||
# SSL certificate for any domains being served. Browsers will show SSL
|
||||
# errors in all other cases.
|
||||
#
|
||||
# Note that the key and certificate files in the below example need to
|
||||
# be copied into /etc/nginx/ssl/ folder.
|
||||
#
|
||||
# server {
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl;
|
||||
# server_name _;
|
||||
# ssl_certificate /etc/nginx/ssl/cert.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/cert.key;
|
||||
# access_log off;
|
||||
# return 410;
|
||||
# }
|
||||
```
|
||||
|
||||
Make sure to reload nginx after creating this file by running `service nginx reload`.
|
||||
Make sure to reload nginx after creating this file by running `systemctl reload nginx.service`.
|
||||
|
||||
This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||
This will catch all unknown HOST header values and close the connection without responding. You can replace the `return 444;` with `return 410;` which will cause nginx to respond with an error page.
|
||||
|
||||
The configuration file must be loaded before `/etc/nginx/conf.d/dokku.conf`, so it can not be arranged as a vhost in `/etc/nginx/sites-enabled` that is only processed afterwards.
|
||||
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -48,7 +48,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.29.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
</head>
|
||||
@@ -176,6 +176,7 @@
|
||||
|
||||
<a href="/{{NAME}}/networking/proxy-management/" class="list-group-item">Proxy Management</a>
|
||||
<a href="/{{NAME}}/networking/proxies/caddy/" class="list-group-item">Caddy Proxy</a>
|
||||
<a href="/{{NAME}}/networking/proxies/haproxy/" class="list-group-item">Haproxy Proxy</a>
|
||||
<a href="/{{NAME}}/networking/proxies/nginx/" class="list-group-item">Nginx Proxy</a>
|
||||
<a href="/{{NAME}}/networking/proxies/traefik/" class="list-group-item">Traefik Proxy</a>
|
||||
|
||||
|
||||
3
dokku
3
dokku
@@ -141,6 +141,9 @@ execute_dokku_cmd() {
|
||||
caddy | caddy:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/caddy/caddy-vhosts}
|
||||
;;
|
||||
haproxy | haproxy:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/haproxy/haproxy-vhosts}
|
||||
;;
|
||||
nginx | nginx:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
|
||||
;;
|
||||
|
||||
@@ -50,6 +50,10 @@ theme:
|
||||
custom_dir: docs/_overrides
|
||||
favicon: assets/favicons/favicon-96x96.png
|
||||
features:
|
||||
- content.code.copy
|
||||
- content.action.edit
|
||||
- content.action.view
|
||||
- navigation.footer
|
||||
- navigation.indexes
|
||||
- navigation.instant
|
||||
- navigation.sections
|
||||
|
||||
16
package.mk
16
package.mk
@@ -1,3 +1,7 @@
|
||||
ifndef PKR_VAR_dokku_version
|
||||
PKR_VAR_dokku_version = $(shell grep Version debian/control | cut -d' ' -f2)
|
||||
endif
|
||||
|
||||
/tmp/build-dokku/var/lib/dokku/GIT_REV:
|
||||
mkdir -p /tmp/build-dokku
|
||||
mkdir -p /tmp/build-dokku/usr/share/bash-completion/completions
|
||||
@@ -31,3 +35,15 @@ ifdef DOKKU_GIT_REV
|
||||
else
|
||||
git rev-parse HEAD > /tmp/build-dokku/var/lib/dokku/GIT_REV
|
||||
endif
|
||||
|
||||
.PHONY: image/build/digitalocean
|
||||
image/build/digitalocean:
|
||||
packer build -var 'dokku_version=${PKR_VAR_dokku_version}' contrib/images/digitalocean/packer.pkr.hcl
|
||||
|
||||
.PHONY: image/init/digitalocean
|
||||
image/init/digitalocean:
|
||||
packer init contrib/images/digitalocean/packer.pkr.hcl
|
||||
|
||||
.PHONY: image/validate/digitalocean
|
||||
image/validate/digitalocean:
|
||||
packer validate -var 'dokku_version=${PKR_VAR_dokku_version}' contrib/images/digitalocean/packer.pkr.hcl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/app-json/.gitignore
vendored
1
plugins/app-json/.gitignore
vendored
@@ -7,3 +7,4 @@
|
||||
/triggers
|
||||
/triggers/*
|
||||
/app-json-process-deploy-parallelism
|
||||
/core-*
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/report subcommands/set
|
||||
TRIGGERS = triggers/app-json-process-deploy-parallelism triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
TRIGGERS = triggers/app-json-process-deploy-parallelism triggers/core-post-deploy triggers/core-post-extract triggers/install triggers/post-app-clone-setup triggers/post-app-rename triggers/post-app-rename-setup triggers/post-create triggers/post-delete triggers/post-deploy triggers/pre-deploy triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = app-json
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package appjson
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
@@ -45,10 +43,10 @@ type Formation struct {
|
||||
|
||||
// GetAppjsonDirectory returns the directory containing a given app's extracted app.json file
|
||||
func GetAppjsonDirectory(appName string) string {
|
||||
return filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
return common.GetAppDataDirectory("app-json", appName)
|
||||
}
|
||||
|
||||
// GetAppjsonPath returns the path to a given app's extracted app.json file
|
||||
// GetAppjsonPath returns the path to a given app's extracted app.json file for use by other plugins
|
||||
func GetAppjsonPath(appName string) string {
|
||||
return filepath.Join(GetAppjsonDirectory(appName), "app.json")
|
||||
return getProcessSpecificAppJSONPath(appName)
|
||||
}
|
||||
|
||||
@@ -81,11 +81,11 @@ func constructScript(command string, shell string, isHerokuishImage bool, isCnbI
|
||||
}
|
||||
|
||||
func getAppJSON(appName string) (AppJSON, error) {
|
||||
if !common.FileExists(GetAppjsonPath(appName)) {
|
||||
if !hasAppJSON(appName) {
|
||||
return AppJSON{}, nil
|
||||
}
|
||||
|
||||
b, err := ioutil.ReadFile(GetAppjsonPath(appName))
|
||||
b, err := ioutil.ReadFile(getProcessSpecificAppJSONPath(appName))
|
||||
if err != nil {
|
||||
return AppJSON{}, fmt.Errorf("Cannot read app.json file: %v", err)
|
||||
}
|
||||
@@ -102,6 +102,21 @@ func getAppJSON(appName string) (AppJSON, error) {
|
||||
return appJSON, nil
|
||||
}
|
||||
|
||||
func getAppJSONPath(appName string) string {
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
return filepath.Join(directory, "app.json")
|
||||
}
|
||||
|
||||
func getProcessSpecificAppJSONPath(appName string) string {
|
||||
existingAppJSON := getAppJSONPath(appName)
|
||||
processSpecificAppJSON := fmt.Sprintf("%s.%s", existingAppJSON, os.Getenv("DOKKU_PID"))
|
||||
if common.FileExists(processSpecificAppJSON) {
|
||||
return processSpecificAppJSON
|
||||
}
|
||||
|
||||
return existingAppJSON
|
||||
}
|
||||
|
||||
// getPhaseScript extracts app.json from app image and returns the appropriate json key/value
|
||||
func getPhaseScript(appName string, phase string) (string, error) {
|
||||
appJSON, err := getAppJSON(appName)
|
||||
@@ -156,6 +171,19 @@ func getDokkuAppShell(appName string) string {
|
||||
return shell
|
||||
}
|
||||
|
||||
func hasAppJSON(appName string) bool {
|
||||
appJSONPath := getAppJSONPath(appName)
|
||||
if common.FileExists(fmt.Sprintf("%s.%s.missing", appJSONPath, os.Getenv("DOKKU_PID"))) {
|
||||
return false
|
||||
}
|
||||
|
||||
if common.FileExists(fmt.Sprintf("%s.%s", appJSONPath, os.Getenv("DOKKU_PID"))) {
|
||||
return true
|
||||
}
|
||||
|
||||
return common.FileExists(appJSONPath)
|
||||
}
|
||||
|
||||
func cleanupDeploymentContainer(appName string, containerID string, phase string) error {
|
||||
if phase != "predeploy" {
|
||||
os.Setenv("DOKKU_SKIP_IMAGE_RETIRE", "true")
|
||||
@@ -454,35 +482,7 @@ func createdContainerID(appName string, dockerArgs []string, image string, comma
|
||||
return containerID, err
|
||||
}
|
||||
|
||||
func refreshAppJSON(appName string, image string) error {
|
||||
baseDirectory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json")
|
||||
if !common.DirectoryExists(baseDirectory) {
|
||||
return errors.New("Run 'dokku plugin:install' to ensure the correct directories exist")
|
||||
}
|
||||
|
||||
directory := GetAppjsonDirectory(appName)
|
||||
if !common.DirectoryExists(directory) {
|
||||
if err := os.MkdirAll(directory, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
appjsonPath := GetAppjsonPath(appName)
|
||||
if common.FileExists(appjsonPath) {
|
||||
if err := os.Remove(appjsonPath); err != nil {
|
||||
return errors.New("Unable to remove previous app.json file")
|
||||
}
|
||||
}
|
||||
|
||||
common.CopyFromImage(appName, image, reportComputedAppjsonpath(appName), appjsonPath)
|
||||
return nil
|
||||
}
|
||||
|
||||
func setScale(appName string, image string) error {
|
||||
if err := injectDokkuScale(appName, image); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
appJSON, err := getAppJSON(appName)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -507,68 +507,3 @@ func setScale(appName string, image string) error {
|
||||
|
||||
return common.PlugnTrigger("ps-set-scale", args...)
|
||||
}
|
||||
|
||||
func injectDokkuScale(appName string, image string) error {
|
||||
appJSON, err := getAppJSON(appName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
baseDirectory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json")
|
||||
if !common.DirectoryExists(baseDirectory) {
|
||||
return errors.New("Run 'dokku plugin:install' to ensure the correct directories exist")
|
||||
}
|
||||
|
||||
dokkuScaleFile := filepath.Join(baseDirectory, "DOKKU_SCALE")
|
||||
previouslyExtracted := common.FileExists(dokkuScaleFile)
|
||||
if previouslyExtracted {
|
||||
os.Remove(dokkuScaleFile)
|
||||
}
|
||||
|
||||
common.CopyFromImage(appName, image, "DOKKU_SCALE", dokkuScaleFile)
|
||||
|
||||
if !common.FileExists(dokkuScaleFile) {
|
||||
return nil
|
||||
}
|
||||
|
||||
lines, err := common.FileToSlice(dokkuScaleFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if appJSON.Formation == nil {
|
||||
common.LogWarn("Deprecated: Injecting scale settings from DOKKU_SCALE file. Use the 'formation' key the app.json file to specify scaling instead of 'DOKKU_SCALE'.")
|
||||
appJSON.Formation = make(map[string]Formation)
|
||||
} else {
|
||||
common.LogWarn("Deprecated: DOKKU_SCALE ignored in favor of 'formation' key in the app.json")
|
||||
return nil
|
||||
}
|
||||
|
||||
for _, line := range lines {
|
||||
if line == "" || strings.HasPrefix(line, "#") {
|
||||
continue
|
||||
}
|
||||
|
||||
procParts := strings.SplitN(line, "=", 2)
|
||||
if len(procParts) != 2 {
|
||||
continue
|
||||
}
|
||||
|
||||
processType := procParts[0]
|
||||
quantity, err := strconv.Atoi(procParts[1])
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
appJSON.Formation[processType] = Formation{
|
||||
Quantity: &quantity,
|
||||
}
|
||||
}
|
||||
|
||||
b, err := json.Marshal(appJSON)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(GetAppjsonPath(appName), b, 0644)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ go 1.19
|
||||
require (
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
github.com/otiai10/copy v1.9.0
|
||||
github.com/spf13/pflag v1.0.5
|
||||
golang.org/x/sync v0.1.0
|
||||
)
|
||||
@@ -13,7 +14,7 @@ require (
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -2,16 +2,26 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+Bu
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
|
||||
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
||||
github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4=
|
||||
github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
||||
github.com/otiai10/mint v1.4.0 h1:umwcf7gbpEwf7WFzqmWwSv0CzbeMsae2u9ZvpP8j2q4=
|
||||
github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQLTlFI=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 h1:yssD99+7tqHWO5Gwh81phT+67hg+KttniBr6UnEXOY8=
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -22,16 +22,30 @@ func main() {
|
||||
appName := flag.Arg(0)
|
||||
processType := flag.Arg(1)
|
||||
err = appjson.TriggerAppJSONProcessDeployParallelism(appName, processType)
|
||||
case "core-post-deploy":
|
||||
appName := flag.Arg(0)
|
||||
err = appjson.TriggerCorePostDeploy(appName)
|
||||
case "core-post-extract":
|
||||
appName := flag.Arg(0)
|
||||
sourceWorkDir := flag.Arg(1)
|
||||
err = appjson.TriggerCorePostExtract(appName, sourceWorkDir)
|
||||
case "install":
|
||||
err = appjson.TriggerInstall()
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppRename(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = appjson.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-create":
|
||||
appName := flag.Arg(0)
|
||||
err = appjson.TriggerPostCreate(appName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = appjson.TriggerPostDelete(appName)
|
||||
|
||||
@@ -3,9 +3,12 @@ package appjson
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/otiai10/copy"
|
||||
)
|
||||
|
||||
// TriggerAppJSONProcessDeployParallelism returns the max number of processes to deploy in parallel
|
||||
@@ -34,18 +37,97 @@ func TriggerAppJSONProcessDeployParallelism(appName string, processType string)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerInstall initializes app restart policies
|
||||
// TriggerCorePostDeploy sets a property to
|
||||
// allow the app to be restored on boot
|
||||
func TriggerCorePostDeploy(appName string) error {
|
||||
existingAppJSON := getAppJSONPath(appName)
|
||||
processSpecificAppJSON := fmt.Sprintf("%s.%s", existingAppJSON, os.Getenv("DOKKU_PID"))
|
||||
if common.FileExists(processSpecificAppJSON) {
|
||||
if err := os.Rename(processSpecificAppJSON, existingAppJSON); err != nil {
|
||||
return err
|
||||
}
|
||||
} else if common.FileExists(fmt.Sprintf("%s.missing", processSpecificAppJSON)) {
|
||||
if err := os.Remove(fmt.Sprintf("%s.missing", processSpecificAppJSON)); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if common.FileExists(existingAppJSON) {
|
||||
if err := os.Remove(existingAppJSON); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerCorePostExtract ensures that the main app.json is the one specified by app-json-path
|
||||
func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
|
||||
appJSONPath := strings.Trim(reportComputedAppjsonpath(appName), "/")
|
||||
if appJSONPath == "" {
|
||||
appJSONPath = "app.json"
|
||||
}
|
||||
|
||||
existingAppJSON := getAppJSONPath(appName)
|
||||
files, err := filepath.Glob(fmt.Sprintf("%s.*", existingAppJSON))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, f := range files {
|
||||
if err := os.Remove(f); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
processSpecificAppJSON := fmt.Sprintf("%s.%s", existingAppJSON, os.Getenv("DOKKU_PID"))
|
||||
b, _ := common.PlugnTriggerOutput("git-get-property", []string{appName, "source-image"}...)
|
||||
appSourceImage := strings.TrimSpace(string(b[:]))
|
||||
|
||||
b, _ = common.PlugnTriggerOutput("builder-get-property", []string{appName, "build-dir"}...)
|
||||
buildDir := strings.TrimSpace(string(b[:]))
|
||||
|
||||
repoDefaultAppJSONPath := path.Join(sourceWorkDir, "app.json")
|
||||
if appSourceImage == "" {
|
||||
repoAppJSONPath := path.Join(sourceWorkDir, buildDir, appJSONPath)
|
||||
if !common.FileExists(repoAppJSONPath) {
|
||||
if appJSONPath != "app.json" && common.FileExists(repoDefaultAppJSONPath) {
|
||||
if err := os.Remove(repoDefaultAppJSONPath); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificAppJSON))
|
||||
}
|
||||
|
||||
if err := copy.Copy(repoAppJSONPath, processSpecificAppJSON); err != nil {
|
||||
return fmt.Errorf("Unable to extract app.json: %v", err.Error())
|
||||
}
|
||||
|
||||
if appJSONPath != "app.json" {
|
||||
if err := copy.Copy(repoAppJSONPath, repoDefaultAppJSONPath); err != nil {
|
||||
return fmt.Errorf("Unable to move app.json into place: %v", err.Error())
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if err := common.CopyFromImage(appName, appSourceImage, path.Join(buildDir, appJSONPath), processSpecificAppJSON); err != nil {
|
||||
return common.TouchFile(fmt.Sprintf("%s.missing", processSpecificAppJSON))
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: add validation to app.json file by ensuring it can be deserialized
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerInstall initializes app-json directory structures
|
||||
func TriggerInstall() error {
|
||||
if err := common.PropertySetup("app-json"); err != nil {
|
||||
return fmt.Errorf("Unable to install the app-json plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json")
|
||||
if err := os.MkdirAll(directory, 0755); err != nil {
|
||||
if err := common.SetupAppData("app-json"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return common.SetPermissions(directory, 0755)
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new app-json files
|
||||
@@ -55,7 +137,12 @@ func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.CloneAppData("app-json", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostAppRename removes the old app data
|
||||
func TriggerPostAppRename(oldAppName string, newAppName string) error {
|
||||
return common.MigrateAppDataDirectory("app-json", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames app-json files
|
||||
@@ -68,13 +155,17 @@ func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.CloneAppData("app-json", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostCreate ensures apps the correct data directory structure
|
||||
func TriggerPostCreate(appName string) error {
|
||||
return common.CreateAppDataDirectory("app-json", appName)
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the app-json data for a given app container
|
||||
func TriggerPostDelete(appName string) error {
|
||||
directory := filepath.Join(common.MustGetEnv("DOKKU_LIB_ROOT"), "data", "app-json", appName)
|
||||
dataErr := os.RemoveAll(directory)
|
||||
dataErr := common.RemoveAppDataDirectory("app-json", appName)
|
||||
propertyErr := common.PropertyDestroy("app-json", appName)
|
||||
|
||||
if dataErr != nil {
|
||||
@@ -97,10 +188,6 @@ func TriggerPostDeploy(appName string, imageTag string) error {
|
||||
// TriggerPreDeploy is a trigger to execute predeploy and release deployment tasks
|
||||
func TriggerPreDeploy(appName string, imageTag string) error {
|
||||
image := common.GetAppImageName(appName, imageTag, "")
|
||||
if err := refreshAppJSON(appName, image); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := executeScript(appName, image, imageTag, "predeploy"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
apps_create() {
|
||||
declare desc="verifies app name and creates an app"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-create"
|
||||
plugn trigger app-create "$APP"
|
||||
}
|
||||
|
||||
apps_destroy() {
|
||||
declare desc="destroys an app"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-destroy"
|
||||
plugn trigger app-destroy "$APP"
|
||||
}
|
||||
|
||||
apps_exists() {
|
||||
declare desc="checks if an app exists"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-exists"
|
||||
plugn trigger app-exists "$APP"
|
||||
}
|
||||
|
||||
apps_maybe_create() {
|
||||
declare desc="creates an app dir if allowed"
|
||||
declare APP="$1"
|
||||
declare deprecated=true
|
||||
|
||||
dokku_log_warn "Deprecated: plugn#app-maybe-create"
|
||||
plugn trigger app-maybe-create "$APP"
|
||||
}
|
||||
@@ -10,9 +10,10 @@ require (
|
||||
require (
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/otiai10/copy v1.9.0 // indirect
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 // indirect
|
||||
golang.org/x/sync v0.1.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -2,14 +2,24 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+Bu
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
|
||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
||||
github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4=
|
||||
github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI=
|
||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
||||
github.com/otiai10/mint v1.4.0 h1:umwcf7gbpEwf7WFzqmWwSv0CzbeMsae2u9ZvpP8j2q4=
|
||||
github.com/otiai10/mint v1.4.0/go.mod h1:gifjb2MYOoULtKLqUAEILUG/9KONW6f7YsJ6vQLTlFI=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861 h1:yssD99+7tqHWO5Gwh81phT+67hg+KttniBr6UnEXOY8=
|
||||
golang.org/x/net v0.0.0-20220421235706-1d1ef9303861/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
|
||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -32,8 +32,8 @@ func main() {
|
||||
err = apps.TriggerAppMaybeCreate(appName)
|
||||
case "deploy-source-set":
|
||||
appName := flag.Arg(0)
|
||||
sourceType := flag.Arg(0)
|
||||
sourceMetadata := flag.Arg(0)
|
||||
sourceType := flag.Arg(1)
|
||||
sourceMetadata := flag.Arg(2)
|
||||
err = apps.TriggerDeploySourceSet(appName, sourceType, sourceMetadata)
|
||||
case "install":
|
||||
err = apps.TriggerInstall()
|
||||
|
||||
@@ -12,6 +12,7 @@ trigger-builder-dockerfile-builder-release() {
|
||||
return
|
||||
fi
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.app-name=$APP" "--label=com.dokku.image-stage=release" "--label=dokku")
|
||||
|
||||
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
@@ -19,13 +20,11 @@ trigger-builder-dockerfile-builder-release() {
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting docker labels on image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
@@ -10,7 +11,9 @@ trigger-builder-herokuish-builder-detect() {
|
||||
local ARCHITECTURE="$(dpkg --print-architecture 2>/dev/null || true)"
|
||||
|
||||
if [[ "$ARCHITECTURE" == "armhf" ]] || [[ "$ARCHITECTURE" == "arm64" ]]; then
|
||||
return
|
||||
if [[ "$(fn-builder-herokuish-computed-allowed "$APP")" != "true" ]]; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if fn-has-buildpacks-file "$SOURCECODE_WORK_DIR"; then
|
||||
|
||||
@@ -13,7 +13,6 @@ trigger-builder-herokuish-builder-release() {
|
||||
return
|
||||
fi
|
||||
|
||||
local CID
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local DOCKER_BUILD_LABEL_ARGS=("--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.app-name=$APP" "--label=com.dokku.image-stage=release" "--label=dokku")
|
||||
|
||||
@@ -30,7 +29,6 @@ trigger-builder-herokuish-builder-release() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.29.2"
|
||||
version = "0.30.2"
|
||||
[plugin.config]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user