Compare commits
479 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4139fb1d7f | ||
|
|
4977d57e5a | ||
|
|
00d02121d9 | ||
|
|
038b768585 | ||
|
|
c7c1e4ab17 | ||
|
|
1ee0fc7dc5 | ||
|
|
22cfab9912 | ||
|
|
24d94576a9 | ||
|
|
6cdd81ca7a | ||
|
|
8d25b931dd | ||
|
|
990ca04374 | ||
|
|
e09b0eb1b9 | ||
|
|
f3114212b6 | ||
|
|
5b738f50c3 | ||
|
|
a0d92469a9 | ||
|
|
26e9cc9b8c | ||
|
|
6f0b32e86b | ||
|
|
625ea14c8f | ||
|
|
5846301a48 | ||
|
|
7f7a044a07 | ||
|
|
f8ccf52079 | ||
|
|
6168b0c71c | ||
|
|
d06f337c3c | ||
|
|
3218a496c5 | ||
|
|
56e18be2cf | ||
|
|
a84f9bca72 | ||
|
|
72e8c8d978 | ||
|
|
aee691a5fb | ||
|
|
622548057c | ||
|
|
69e56fc976 | ||
|
|
c1279468d8 | ||
|
|
d6468f4713 | ||
|
|
1467aaea74 | ||
|
|
5717e71755 | ||
|
|
04905bf553 | ||
|
|
2b1e173c03 | ||
|
|
3f127a7cc4 | ||
|
|
4bc3de5540 | ||
|
|
b44be8def9 | ||
|
|
f842869c3d | ||
|
|
977b4567f8 | ||
|
|
48d5820b8c | ||
|
|
192f7cf768 | ||
|
|
121e4737a8 | ||
|
|
bdf0b6c509 | ||
|
|
87c4cb7230 | ||
|
|
1431724b85 | ||
|
|
fb9d77878d | ||
|
|
94f4d1325c | ||
|
|
b8680f7de7 | ||
|
|
11d9ed6724 | ||
|
|
914475f3e4 | ||
|
|
9bd6e17903 | ||
|
|
515994c8d3 | ||
|
|
798a413096 | ||
|
|
1d0d050596 | ||
|
|
820883e60c | ||
|
|
afc318526c | ||
|
|
eb6f85f083 | ||
|
|
64f0f2674d | ||
|
|
a0b84d52ef | ||
|
|
f7c46a46f4 | ||
|
|
bbbe0e763d | ||
|
|
ef25a9b0d8 | ||
|
|
dac566e75e | ||
|
|
4436bb2023 | ||
|
|
5dc2f20432 | ||
|
|
3c5a98cb1b | ||
|
|
60b343470b | ||
|
|
40b20e0c08 | ||
|
|
ce0177967d | ||
|
|
801e28b824 | ||
|
|
871c986841 | ||
|
|
e98cfa8bd5 | ||
|
|
f24ce401df | ||
|
|
a124c419ec | ||
|
|
26be81f1bd | ||
|
|
5b7cfe906d | ||
|
|
e571e59507 | ||
|
|
1fc3261be6 | ||
|
|
20145bd631 | ||
|
|
03cb4691bb | ||
|
|
d30f0238db | ||
|
|
e68780bd07 | ||
|
|
a038e99b2a | ||
|
|
b3ec751b8c | ||
|
|
e9482e4624 | ||
|
|
6037ebb15a | ||
|
|
128fe6edac | ||
|
|
c07c9dc4ec | ||
|
|
4259e6d4a1 | ||
|
|
4003c3f1a6 | ||
|
|
ae6f9b6a20 | ||
|
|
3bac38d501 | ||
|
|
d609299f3b | ||
|
|
4b327ff59e | ||
|
|
1accac821c | ||
|
|
def3eeb4a0 | ||
|
|
70d47400a4 | ||
|
|
dcb2f2d0a7 | ||
|
|
98cf6e714a | ||
|
|
9787b67854 | ||
|
|
729ede8df0 | ||
|
|
123c4d1411 | ||
|
|
093ff059a9 | ||
|
|
a537714375 | ||
|
|
44bfd571bd | ||
|
|
b0b0dd046d | ||
|
|
0cb68eeac5 | ||
|
|
d4997aeccc | ||
|
|
85b21f61be | ||
|
|
0333c92b86 | ||
|
|
e1f97b57e3 | ||
|
|
a9aea2386c | ||
|
|
994b3de64c | ||
|
|
fca84b151c | ||
|
|
4bb901bd15 | ||
|
|
4b80d3a1ea | ||
|
|
ea7c02ca89 | ||
|
|
a9fe838d86 | ||
|
|
1ee5fbda46 | ||
|
|
ac0b1fc574 | ||
|
|
358b19b55a | ||
|
|
fc57ae329a | ||
|
|
b904adb2b2 | ||
|
|
f0f41c7a02 | ||
|
|
5a2e42aaff | ||
|
|
4d41cbd3ab | ||
|
|
687c90844d | ||
|
|
9e3efa481c | ||
|
|
6c1d5d650b | ||
|
|
dc8db44705 | ||
|
|
8721640947 | ||
|
|
4364ad96ee | ||
|
|
ba1dcd3d38 | ||
|
|
099049ac6c | ||
|
|
68c9ed7043 | ||
|
|
2326eb6dfb | ||
|
|
c301a36a44 | ||
|
|
1ffb62ac82 | ||
|
|
204732ce39 | ||
|
|
08f38892af | ||
|
|
2a86c6cb06 | ||
|
|
3bbf5370da | ||
|
|
55c57d049b | ||
|
|
b62038d7ca | ||
|
|
0548c482bd | ||
|
|
20a23bcdd3 | ||
|
|
777932992a | ||
|
|
9bd75a9a5e | ||
|
|
d6b04d4e59 | ||
|
|
53f9714306 | ||
|
|
7ef41b207c | ||
|
|
e23d3767f6 | ||
|
|
c0856a426a | ||
|
|
d5ace76fc4 | ||
|
|
8e779e25fb | ||
|
|
c44d779695 | ||
|
|
30a94d1f9d | ||
|
|
18cc5d4f80 | ||
|
|
38ae4a1009 | ||
|
|
34c0f92eeb | ||
|
|
24614a39e0 | ||
|
|
01cc8a8c68 | ||
|
|
303e059f2b | ||
|
|
1b92ecbf6f | ||
|
|
1958594177 | ||
|
|
34d5a965d2 | ||
|
|
dc84545982 | ||
|
|
4f7e4d1622 | ||
|
|
469cc63489 | ||
|
|
8b8e867386 | ||
|
|
b77bd45808 | ||
|
|
1c767938e5 | ||
|
|
160ebe1743 | ||
|
|
a538ced9e1 | ||
|
|
00e409db90 | ||
|
|
363d6c6af3 | ||
|
|
b774e5d6f9 | ||
|
|
9947cd9e8a | ||
|
|
31ec6f4605 | ||
|
|
a06532596b | ||
|
|
f3724fd8cf | ||
|
|
841856f7c7 | ||
|
|
f465c0e221 | ||
|
|
2f0d6c606f | ||
|
|
73f61b75d5 | ||
|
|
66d790ca2d | ||
|
|
a30668ad21 | ||
|
|
57b14e7a54 | ||
|
|
d6bd127ee9 | ||
|
|
a4ebdd6319 | ||
|
|
1afb559dc1 | ||
|
|
ea10d9ad4c | ||
|
|
ad7c7dabe7 | ||
|
|
d34df8642c | ||
|
|
d3617f745b | ||
|
|
05307b3402 | ||
|
|
0777637f6a | ||
|
|
8a7858d8f5 | ||
|
|
8e8290575b | ||
|
|
dcb31237d3 | ||
|
|
0a14835f1b | ||
|
|
93e4835e5e | ||
|
|
2cea316d3d | ||
|
|
c9ba6e476f | ||
|
|
0498d45549 | ||
|
|
db7acc5747 | ||
|
|
069d93ca56 | ||
|
|
8d4660279d | ||
|
|
3b8ad5c9ec | ||
|
|
8b0a609948 | ||
|
|
7e9a8ecc3a | ||
|
|
75e6b1675f | ||
|
|
c2724a6a66 | ||
|
|
1199062c0b | ||
|
|
1dbc0ef9cb | ||
|
|
f52bea2e83 | ||
|
|
e28b589fab | ||
|
|
ec212d52cf | ||
|
|
8569395cae | ||
|
|
fdf37e1752 | ||
|
|
4aebdd7e83 | ||
|
|
86f76daa72 | ||
|
|
ee163f192f | ||
|
|
e7652fbae3 | ||
|
|
867e43998f | ||
|
|
3b81a9204c | ||
|
|
aad86b72a0 | ||
|
|
de09675d85 | ||
|
|
83dd75a9b3 | ||
|
|
49dc73028e | ||
|
|
f976bd574b | ||
|
|
55bada62b9 | ||
|
|
1ae49bfc1f | ||
|
|
96835df625 | ||
|
|
33405029a2 | ||
|
|
cdcdc78549 | ||
|
|
5ec456e557 | ||
|
|
2efe1fe8d7 | ||
|
|
c0275d1d2b | ||
|
|
e837543332 | ||
|
|
64e453d2d4 | ||
|
|
a5d8561a0b | ||
|
|
fe1d6bdf6b | ||
|
|
6937c95351 | ||
|
|
89df6f33d3 | ||
|
|
94b6f67eb2 | ||
|
|
795de088cc | ||
|
|
873d0b3938 | ||
|
|
1f29fa6f9e | ||
|
|
3d31df53cc | ||
|
|
d93e9f7af4 | ||
|
|
76674ec941 | ||
|
|
f452e9af89 | ||
|
|
bf4960c435 | ||
|
|
eb952b072f | ||
|
|
5158e415e3 | ||
|
|
f54d1bc4a9 | ||
|
|
830cb22542 | ||
|
|
b385ea2ce9 | ||
|
|
91b0ac6cc0 | ||
|
|
b235983169 | ||
|
|
faa442bf54 | ||
|
|
cbdbea0aff | ||
|
|
4d8f831a76 | ||
|
|
4259077589 | ||
|
|
2d2a8dd642 | ||
|
|
2720ee2033 | ||
|
|
351d404415 | ||
|
|
ac09d74128 | ||
|
|
d86defdb0d | ||
|
|
e71375e6d5 | ||
|
|
d0ea7e99b6 | ||
|
|
7d33ff97c9 | ||
|
|
94e3b1d96b | ||
|
|
04cb238dfa | ||
|
|
f0cf04132b | ||
|
|
7753ada119 | ||
|
|
ee1b4557fe | ||
|
|
c60ddeb780 | ||
|
|
bf481bc5fc | ||
|
|
d77a62cc16 | ||
|
|
9cbc3ba8c7 | ||
|
|
8d5c098bd7 | ||
|
|
4e88a7ae95 | ||
|
|
5a5ec0a350 | ||
|
|
b2d806887d | ||
|
|
be2b626170 | ||
|
|
065a24bf7c | ||
|
|
7e49284b87 | ||
|
|
78f67228bc | ||
|
|
827d7450c8 | ||
|
|
df1d616fd4 | ||
|
|
3e570c2dad | ||
|
|
d0d00d9c99 | ||
|
|
673aa115bc | ||
|
|
f90ef17338 | ||
|
|
09aa6ad874 | ||
|
|
b7c4cf4021 | ||
|
|
888898fb09 | ||
|
|
357e089409 | ||
|
|
f5f28d76fc | ||
|
|
f0fb5720c9 | ||
|
|
aa7f483f98 | ||
|
|
b96b7688e3 | ||
|
|
3672871b1f | ||
|
|
577c6cdeee | ||
|
|
c0232f0910 | ||
|
|
88a09b267f | ||
|
|
fb8ade7e07 | ||
|
|
eacd8d0ef6 | ||
|
|
deedd4f689 | ||
|
|
b3179b65b2 | ||
|
|
e4b09130aa | ||
|
|
9d5cbeeb19 | ||
|
|
986c05ff7e | ||
|
|
02a89d01f9 | ||
|
|
ed46a2e67b | ||
|
|
70a1b6a863 | ||
|
|
9f3879b225 | ||
|
|
1a320eafad | ||
|
|
8faa338bd4 | ||
|
|
23779c066f | ||
|
|
540c058a6f | ||
|
|
2731132f29 | ||
|
|
48cd5b11a5 | ||
|
|
b6c3d2f4ab | ||
|
|
1e41964873 | ||
|
|
92cff9be3f | ||
|
|
4d79ce7de5 | ||
|
|
1b1f9bf5ee | ||
|
|
b5db30af59 | ||
|
|
474ebf5c3c | ||
|
|
0fffe28a82 | ||
|
|
f013f297c3 | ||
|
|
a84d35271e | ||
|
|
a94fae6ce8 | ||
|
|
9a86cae550 | ||
|
|
56c535041e | ||
|
|
2acbe517ca | ||
|
|
ab65e404ad | ||
|
|
510e3083e0 | ||
|
|
7b183317ae | ||
|
|
06b744f55f | ||
|
|
3322287009 | ||
|
|
e50f3019da | ||
|
|
fdfa534048 | ||
|
|
436115f0d8 | ||
|
|
3810b6dcf9 | ||
|
|
8fcfae3464 | ||
|
|
74092f42c5 | ||
|
|
50fde8e7c8 | ||
|
|
37d97eaaa5 | ||
|
|
6662952eb6 | ||
|
|
6ddd7f09e9 | ||
|
|
56b75f80af | ||
|
|
d58f570295 | ||
|
|
420a964822 | ||
|
|
e72f5b1d90 | ||
|
|
713cc3033a | ||
|
|
621204069e | ||
|
|
fb764bfd48 | ||
|
|
aa323f7439 | ||
|
|
2cd028e577 | ||
|
|
fd1f80c485 | ||
|
|
ea910d38d3 | ||
|
|
1f1dea4341 | ||
|
|
523fd5b674 | ||
|
|
b5a41b1412 | ||
|
|
2e1121e1d8 | ||
|
|
ec757a5d5a | ||
|
|
4f4854ecf8 | ||
|
|
c5f6e24877 | ||
|
|
25a96c295b | ||
|
|
5826f0dffd | ||
|
|
1d4c263ed8 | ||
|
|
f5e167e318 | ||
|
|
443014004d | ||
|
|
936adb20b2 | ||
|
|
7293d1dec3 | ||
|
|
d224785d8c | ||
|
|
e6695a147a | ||
|
|
c43c404e68 | ||
|
|
1535549a8f | ||
|
|
be67490f23 | ||
|
|
e68e1425a6 | ||
|
|
6105a01c0e | ||
|
|
ef73bc55ba | ||
|
|
6a0451ba6d | ||
|
|
fcac34e7b5 | ||
|
|
e2557e948d | ||
|
|
ca04c2dc48 | ||
|
|
1cfaa6c942 | ||
|
|
24a5beaf66 | ||
|
|
36985c24f2 | ||
|
|
7adc06926e | ||
|
|
85f4bb4182 | ||
|
|
03da8462f7 | ||
|
|
756f8f26b8 | ||
|
|
cb55bac476 | ||
|
|
42701f6cd9 | ||
|
|
9aa93949f5 | ||
|
|
eb1c4001af | ||
|
|
032eed49a0 | ||
|
|
e9429c5c09 | ||
|
|
2c7823a34a | ||
|
|
89e88f1d1c | ||
|
|
ff6a3437b0 | ||
|
|
ffb747e318 | ||
|
|
29e7d234f1 | ||
|
|
28d5cbfe46 | ||
|
|
3503217f55 | ||
|
|
82e3863796 | ||
|
|
d38820472e | ||
|
|
868ee5f758 | ||
|
|
c7f81d806b | ||
|
|
b6083b9834 | ||
|
|
c658aac5a7 | ||
|
|
4499c9190c | ||
|
|
8efb02827f | ||
|
|
7d9ad8f285 | ||
|
|
0d73bc19fc | ||
|
|
017e155941 | ||
|
|
bb4cb727f2 | ||
|
|
6b47699dd1 | ||
|
|
000e5b08de | ||
|
|
17f3bc17d9 | ||
|
|
7eb90da14b | ||
|
|
ad438fbe19 | ||
|
|
99b4cf91dd | ||
|
|
194bd7c72c | ||
|
|
459a8c437b | ||
|
|
5787fd0750 | ||
|
|
fe24ce3276 | ||
|
|
6305947991 | ||
|
|
e2064e9e47 | ||
|
|
3da43da8db | ||
|
|
f319102931 | ||
|
|
bacf4dd1f2 | ||
|
|
cf10ee598a | ||
|
|
bd1be293e4 | ||
|
|
4ff159c897 | ||
|
|
8a74a0070d | ||
|
|
933a3e802c | ||
|
|
68e78f114e | ||
|
|
12feec5562 | ||
|
|
b11d9bc3a0 | ||
|
|
3a4365baf4 | ||
|
|
f6b35bfc14 | ||
|
|
698ce64a33 | ||
|
|
1eb122be85 | ||
|
|
d738aa49dc | ||
|
|
d13ddb74c0 | ||
|
|
a86e82353e | ||
|
|
7ab55e111e | ||
|
|
9c6fc8a81c | ||
|
|
f6919ee252 | ||
|
|
334cf430cb | ||
|
|
5a13128c36 | ||
|
|
a60e65c824 | ||
|
|
6aa3583416 | ||
|
|
e4059fc848 | ||
|
|
62acbc4ffe | ||
|
|
bfea0fbdc4 | ||
|
|
06fe283bc5 | ||
|
|
c15e4ee8bc | ||
|
|
f8c8031ded | ||
|
|
2cac8718dd | ||
|
|
343a98560b | ||
|
|
17b3e4f078 | ||
|
|
c135d205d6 | ||
|
|
d539ceed0c | ||
|
|
30a0c864e2 | ||
|
|
9e00d8738c | ||
|
|
06ebf84943 | ||
|
|
9068fe8bd5 | ||
|
|
dbe856eafb | ||
|
|
facf2f2f53 |
@@ -7,12 +7,16 @@
|
|||||||
"DOKKU_HOST_ROOT": "${localWorkspaceFolder}/tmp/data/home/dokku",
|
"DOKKU_HOST_ROOT": "${localWorkspaceFolder}/tmp/data/home/dokku",
|
||||||
"GO_ROOT_MOUNT": "${localWorkspaceFolder}:/go/src/github.com/dokku/dokku"
|
"GO_ROOT_MOUNT": "${localWorkspaceFolder}:/go/src/github.com/dokku/dokku"
|
||||||
},
|
},
|
||||||
"extensions": [
|
"customizations": {
|
||||||
"golang.go",
|
"vscode": {
|
||||||
"mads-hartmann.bash-ide-vscode",
|
"extensions": [
|
||||||
"ms-vscode.makefile-tools",
|
"golang.go",
|
||||||
"sleistner.vscode-fileutils"
|
"mads-hartmann.bash-ide-vscode",
|
||||||
],
|
"ms-vscode.makefile-tools",
|
||||||
|
"sleistner.vscode-fileutils"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"initializeCommand": ["mkdir", "-p", "tmp/data"],
|
"initializeCommand": ["mkdir", "-p", "tmp/data"],
|
||||||
"mounts": [
|
"mounts": [
|
||||||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
|
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
|
||||||
|
|||||||
16
.github/commands/ci-setup
vendored
16
.github/commands/ci-setup
vendored
@@ -2,19 +2,23 @@
|
|||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
DOKKU_DOMAIN=${DOKKU_DOMAIN:="dokku.me"}
|
||||||
|
|
||||||
echo "=====> set hostname"
|
echo "=====> set hostname"
|
||||||
hostname
|
hostname
|
||||||
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
|
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
|
||||||
sudo hostname "dokku.me"
|
sudo hostname "$DOKKU_DOMAIN"
|
||||||
echo "dokku.me" | sudo tee /etc/hostname
|
echo "$DOKKU_DOMAIN" | sudo tee /etc/hostname
|
||||||
hostname
|
hostname
|
||||||
sudo cat /etc/hostname
|
sudo cat /etc/hostname
|
||||||
|
|
||||||
echo "=====> resolve dokku.me"
|
echo "=====> resolve $DOKKU_DOMAIN"
|
||||||
sudo apt -qq -y --no-install-recommends install net-tools
|
sudo apt -qq -y --no-install-recommends install net-tools
|
||||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
if [[ "$DOKKU_DOMAIN" == "dokku.me" ]]; then
|
||||||
ifconfig
|
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||||
sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
ifconfig
|
||||||
|
sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||||
|
fi
|
||||||
|
|
||||||
echo "=====> install ci-dependencies"
|
echo "=====> install ci-dependencies"
|
||||||
make ci-dependencies
|
make ci-dependencies
|
||||||
|
|||||||
119
.github/dependabot.yml
vendored
119
.github/dependabot.yml
vendored
@@ -8,6 +8,125 @@ updates:
|
|||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
labels:
|
labels:
|
||||||
- "type: dependencies"
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/app-json"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/apps"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/builder"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/buildpacks"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/common"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/config"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/cron"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/docker-options"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/logs"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/network"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/nginx-vhosts"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/proxy"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/ps"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/registry"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/repo"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/resource"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/plugins/scheduler"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
labels:
|
||||||
|
- "type: dependencies"
|
||||||
- package-ecosystem: bundler
|
- package-ecosystem: bundler
|
||||||
directory: "/tests/apps/ruby"
|
directory: "/tests/apps/ruby"
|
||||||
schedule:
|
schedule:
|
||||||
|
|||||||
66
.github/workflows/ci.yml
vendored
66
.github/workflows/ci.yml
vendored
@@ -15,9 +15,34 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-commit:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
outputs:
|
||||||
|
skip: ${{ steps.check-commit.outputs.skip }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: check if message contain keywords ace scopeid
|
||||||
|
id: check-commit
|
||||||
|
run: |
|
||||||
|
# checking for "docs" or "[ci skip]" messages
|
||||||
|
message=$(git log -1 --pretty=format:'%s')
|
||||||
|
if [[ "$message" =~ "\[(ci skip)\]" ]]; then
|
||||||
|
echo "Skipping tests due to [ci skip] message"
|
||||||
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "$message" =~ "^docs:" ]]; then
|
||||||
|
echo "Skipping tests due to "docs:" prefix on message"
|
||||||
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: build
|
name: build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
needs: check-commit
|
||||||
|
if: ${{ needs.check-commit.outputs.skip != 'true' }}
|
||||||
outputs:
|
outputs:
|
||||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -36,6 +61,8 @@ jobs:
|
|||||||
|
|
||||||
- name: build package
|
- name: build package
|
||||||
run: ./tests/ci/setup.sh build
|
run: ./tests/ci/setup.sh build
|
||||||
|
env:
|
||||||
|
SKIP_IMAGE_BUILD: true
|
||||||
|
|
||||||
- name: set matrix for build
|
- name: set matrix for build
|
||||||
id: set-matrix
|
id: set-matrix
|
||||||
@@ -50,6 +77,43 @@ jobs:
|
|||||||
name: build
|
name: build
|
||||||
path: build
|
path: build
|
||||||
|
|
||||||
|
build-image:
|
||||||
|
name: build-image.${{ matrix.architecture }}
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
architecture:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: download packages
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: build
|
||||||
|
|
||||||
|
- name: set up qemu
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
|
- name: set up docker buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: build docker image
|
||||||
|
timeout-minutes: 20
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform ${{ matrix.architecture }} \
|
||||||
|
--progress plain \
|
||||||
|
--tag "dokku/dokku:latest" \
|
||||||
|
.
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
name: unit.${{ matrix.index }}
|
name: unit.${{ matrix.index }}
|
||||||
needs: build
|
needs: build
|
||||||
@@ -161,6 +225,8 @@ jobs:
|
|||||||
name: publish-test-results
|
name: publish-test-results
|
||||||
needs: unit-tests
|
needs: unit-tests
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
permissions:
|
||||||
|
checks: write
|
||||||
# the build-and-test job might be skipped, we don't need to run this job then
|
# the build-and-test job might be skipped, we don't need to run this job then
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
|
|
||||||
|
|||||||
11
.github/workflows/lint.yml
vendored
11
.github/workflows/lint.yml
vendored
@@ -46,9 +46,17 @@ jobs:
|
|||||||
version: latest
|
version: latest
|
||||||
- name: Run packer init
|
- name: Run packer init
|
||||||
run: "make image/init/digitalocean"
|
run: "make image/init/digitalocean"
|
||||||
|
env:
|
||||||
|
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Get changed files in the docs folder
|
||||||
|
id: changed-files-specific
|
||||||
|
uses: tj-actions/changed-files@v37.5.2
|
||||||
|
with:
|
||||||
|
files: contrib/images/digitalocean/**
|
||||||
- name: Run `packer validate`
|
- name: Run `packer validate`
|
||||||
env:
|
env:
|
||||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||||
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: "make image/validate/digitalocean"
|
run: "make image/validate/digitalocean"
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
@@ -60,9 +68,6 @@ jobs:
|
|||||||
- name: Run shellcheck
|
- name: Run shellcheck
|
||||||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
|
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
|
||||||
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
||||||
env:
|
|
||||||
# keep in sync with tests/shellcheck-exclude
|
|
||||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2030 -e SC2031 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235 -e SC2267 -e SC2295
|
|
||||||
|
|
||||||
shfmt:
|
shfmt:
|
||||||
name: shfmt
|
name: shfmt
|
||||||
|
|||||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -91,14 +91,16 @@ jobs:
|
|||||||
- name: Run `packer validate`
|
- name: Run `packer validate`
|
||||||
env:
|
env:
|
||||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||||
PKR_VAR_dokku_version: ${{ needs.release.outputs.version }}
|
run: |
|
||||||
run: "make image/validate/digitalocean"
|
VERSION=${{ needs.release.outputs.version }}
|
||||||
|
PKR_VAR_dokku_version="${VERSION:1}" make image/validate/digitalocean
|
||||||
|
|
||||||
- name: Bump Digitalocean Image
|
- name: Bump Digitalocean Image
|
||||||
env:
|
env:
|
||||||
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
|
||||||
PKR_VAR_dokku_version: ${{ needs.release.outputs.version }}
|
run: |
|
||||||
run: "make image/build/digitalocean"
|
VERSION=${{ needs.release.outputs.version }}
|
||||||
|
PKR_VAR_dokku_version="${VERSION:1}" make image/build/digitalocean
|
||||||
|
|
||||||
- name: upload packages
|
- name: upload packages
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|||||||
@@ -1,9 +1,33 @@
|
|||||||
|
# SC1001 - This \/ will be a regular '/' in this context - https://github.com/koalaman/shellcheck/wiki/SC1001
|
||||||
|
# SC1003 - Want to escape a single quote? echo 'This is how it'\''s done' - https://github.com/koalaman/shellcheck/wiki/SC1003
|
||||||
|
# SC1090 - Can't follow non-constant source. Use a directive to specify location - https://github.com/koalaman/shellcheck/wiki/SC1090
|
||||||
# SC1091 - Not following: FILE: does not exist (No such file or directory) - https://github.com/koalaman/shellcheck/wiki/SC1091
|
# SC1091 - Not following: FILE: does not exist (No such file or directory) - https://github.com/koalaman/shellcheck/wiki/SC1091
|
||||||
# - used for sourcing function files throughout the codebase
|
# SC1117 - Backslash is literal in "\n". Prefer explicit escaping: "\\n" - https://github.com/koalaman/shellcheck/wiki/SC1117
|
||||||
|
# SC2029 - Note that, unescaped, this expands on the client side - https://github.com/koalaman/shellcheck/wiki/SC2029
|
||||||
|
# SC2030 - Modification of var is local (to subshell caused by pipeline). - https://github.com/koalaman/shellcheck/wiki/SC2030
|
||||||
|
# SC2031 - var was modified in a subshell. That change might be lost. - https://github.com/koalaman/shellcheck/wiki/SC2031
|
||||||
# SC2034 - VAR appears unused - https://github.com/koalaman/shellcheck/wiki/SC2034
|
# SC2034 - VAR appears unused - https://github.com/koalaman/shellcheck/wiki/SC2034
|
||||||
# - used for declaring desc and deprecated function variables
|
# SC2046 - Quote this to prevent word splitting - https://github.com/koalaman/shellcheck/wiki/SC2046
|
||||||
# SC2064 - Use single quotes, otherwise this expands now rather than when signalled. - https://github.com/koalaman/shellcheck/wiki/SC2064
|
# SC2064 - Use single quotes, otherwise this expands now rather than when signalled. - https://github.com/koalaman/shellcheck/wiki/SC2064
|
||||||
# - used for traps
|
# SC2068 - Double quote array expansions to avoid re-splitting elements - https://github.com/koalaman/shellcheck/wiki/SC2068
|
||||||
|
# SC2086 - Double quote to prevent globbing and word splitting - https://github.com/koalaman/shellcheck/wiki/SC2086
|
||||||
|
# SC2119 - Use 'function "$@"' if function's $1 should mean script's $1 - https://github.com/koalaman/shellcheck/wiki/SC2119
|
||||||
|
# SC2120 - Function references arguments, but none are ever passed - https://github.com/koalaman/shellcheck/wiki/SC2120
|
||||||
|
# SC2128 - Expanding an array without an index only gives the first element - https://github.com/koalaman/shellcheck/wiki/SC2128
|
||||||
|
# SC2148 - Tips depend on target shell and yours is unknown. Add a shebang - https://github.com/koalaman/shellcheck/wiki/SC2148
|
||||||
|
# SC2153 - Possible misspelling: DOKKU_ROOT may not be assigned, but DOKKU_PORT is - https://github.com/koalaman/shellcheck/wiki/SC2153
|
||||||
|
# SC2154 - Var is referenced but not assigned - https://github.com/koalaman/shellcheck/wiki/SC2154
|
||||||
# SC2155 - Declare and assign separately to avoid masking return values - https://github.com/koalaman/shellcheck/wiki/SC2155
|
# SC2155 - Declare and assign separately to avoid masking return values - https://github.com/koalaman/shellcheck/wiki/SC2155
|
||||||
# - used throughout the codebase
|
# SC2162 - read without -r will mangle backslashes - https://github.com/koalaman/shellcheck/wiki/SC2162
|
||||||
disable=SC1091,SC2034,SC2064,SC2155
|
# SC2174 - When used with -p, -m only applies to the deepest directory - https://github.com/koalaman/shellcheck/wiki/SC2174
|
||||||
|
# SC2179 - Use array+=("item") to append items to an array - https://github.com/koalaman/shellcheck/wiki/SC2179
|
||||||
|
# SC2191 - The = here is literal. To assign by index, use ( [index]=value ) with no spaces. To keep as literal, quote it - https://github.com/koalaman/shellcheck/wiki/SC2191
|
||||||
|
# SC2199 - Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @) - https://github.com/koalaman/shellcheck/wiki/SC2199
|
||||||
|
# SC2207 - Prefer mapfile or read -a to split command output (or quote to avoid splitting) - https://github.com/koalaman/shellcheck/wiki/SC2207
|
||||||
|
# SC2219 - Instead of 'let expr', prefer (( expr )) - https://github.com/koalaman/shellcheck/wiki/SC2219
|
||||||
|
# SC2220 - Invalid flags are not handled. Add a *) case - https://github.com/koalaman/shellcheck/wiki/SC2220
|
||||||
|
# SC2231 - Quote expansions in this for loop glob to prevent wordsplitting, e.g. "$dir"/*.txt - https://github.com/koalaman/shellcheck/wiki/SC2231
|
||||||
|
# SC2235 - Use { ..; } instead of (..) to avoid subshell overhead - https://github.com/koalaman/shellcheck/wiki/SC2235
|
||||||
|
# SC2267 - GNU xargs -i is deprecated in favor of -I{} - https://github.com/koalaman/shellcheck/wiki/SC2267
|
||||||
|
# SC2295 - Expansions inside ${..} need to be quoted separately, otherwise they match as patterns - https://github.com/koalaman/shellcheck/wiki/SC2295
|
||||||
|
disable=SC1001,SC1003,SC1090,SC1091,SC1117,SC2029,SC2030,SC2031,SC2034,SC2046,SC2064,SC2068,SC2086,SC2119,SC2120,SC2128,SC2148,SC2153,SC2154,SC2155,SC2162,SC2174,SC2179,SC2191,SC2199,SC2207,SC2219,SC2220,SC2231,SC2235,SC2267,SC2295
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
linters:
|
|
||||||
shellcheck:
|
|
||||||
shell: bash
|
|
||||||
exclude: SC2034,SC1090,SC2191
|
|
||||||
golint:
|
|
||||||
|
|
||||||
files:
|
|
||||||
ignore:
|
|
||||||
- 'debian/*'
|
|
||||||
- 'docs/*'
|
|
||||||
- 'tests/*'
|
|
||||||
- '*/vendor/*'
|
|
||||||
731
HISTORY.md
731
HISTORY.md
File diff suppressed because it is too large
Load Diff
13
Makefile
13
Makefile
@@ -3,7 +3,8 @@ DOKKU_VERSION ?= master
|
|||||||
TARGETARCH ?= amd64
|
TARGETARCH ?= amd64
|
||||||
|
|
||||||
DOCKER_IMAGE_LABELER_VERSION ?= 0.5.0
|
DOCKER_IMAGE_LABELER_VERSION ?= 0.5.0
|
||||||
HEROKUISH_VERSION ?= 0.5.38
|
DOCKER_CONTAINER_HEALTHCHECKER_VERSION ?= 0.6.4
|
||||||
|
HEROKUISH_VERSION ?= 0.6.0
|
||||||
LAMBDA_BUILDER_VERSION ?= 0.4.0
|
LAMBDA_BUILDER_VERSION ?= 0.4.0
|
||||||
NETRC_VERSION ?= 0.6.0
|
NETRC_VERSION ?= 0.6.0
|
||||||
PLUGN_VERSION ?= 0.12.0
|
PLUGN_VERSION ?= 0.12.0
|
||||||
@@ -11,6 +12,7 @@ PROCFILE_VERSION ?= 0.15.0
|
|||||||
SIGIL_VERSION ?= 0.9.0
|
SIGIL_VERSION ?= 0.9.0
|
||||||
SSHCOMMAND_VERSION ?= 0.16.0
|
SSHCOMMAND_VERSION ?= 0.16.0
|
||||||
DOCKER_IMAGE_LABELER_URL ?= https://github.com/dokku/docker-image-labeler/releases/download/v${DOCKER_IMAGE_LABELER_VERSION}/docker-image-labeler_${DOCKER_IMAGE_LABELER_VERSION}_linux_${TARGETARCH}.tgz
|
DOCKER_IMAGE_LABELER_URL ?= https://github.com/dokku/docker-image-labeler/releases/download/v${DOCKER_IMAGE_LABELER_VERSION}/docker-image-labeler_${DOCKER_IMAGE_LABELER_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
|
DOCKER_CONTAINER_HEALTHCHECKER_URL ?= https://github.com/dokku/docker-container-healthchecker/releases/download/v${DOCKER_CONTAINER_HEALTHCHECKER_VERSION}/docker-container-healthchecker_${DOCKER_CONTAINER_HEALTHCHECKER_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
LAMBDA_BUILDER_URL ?= https://github.com/dokku/lambda-builder/releases/download/v${LAMBDA_BUILDER_VERSION}/lambda-builder_${LAMBDA_BUILDER_VERSION}_linux_${TARGETARCH}.tgz
|
LAMBDA_BUILDER_URL ?= https://github.com/dokku/lambda-builder/releases/download/v${LAMBDA_BUILDER_VERSION}/lambda-builder_${LAMBDA_BUILDER_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
NETRC_URL ?= https://github.com/dokku/netrc/releases/download/v${NETRC_VERSION}/netrc_${NETRC_VERSION}_linux_${TARGETARCH}.tgz
|
NETRC_URL ?= https://github.com/dokku/netrc/releases/download/v${NETRC_VERSION}/netrc_${NETRC_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_${TARGETARCH}.tgz
|
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
@@ -18,7 +20,7 @@ PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/d
|
|||||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/gliderlabs-sigil_${SIGIL_VERSION}_linux_${TARGETARCH}.tgz
|
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/gliderlabs-sigil_${SIGIL_VERSION}_linux_${TARGETARCH}.tgz
|
||||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest-20
|
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest-22
|
||||||
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
||||||
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
||||||
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
||||||
@@ -135,7 +137,7 @@ plugin-dependencies: plugn procfile-util
|
|||||||
plugins: plugn procfile-util docker
|
plugins: plugn procfile-util docker
|
||||||
sudo -E dokku plugin:install --core
|
sudo -E dokku plugin:install --core
|
||||||
|
|
||||||
dependencies: apt-update docker-image-labeler lambda-builder netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq parallel
|
dependencies: apt-update docker-image-labeler docker-container-healthchecker lambda-builder netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq parallel
|
||||||
$(MAKE) -e stack
|
$(MAKE) -e stack
|
||||||
|
|
||||||
apt-update:
|
apt-update:
|
||||||
@@ -161,6 +163,11 @@ docker-image-labeler:
|
|||||||
tar xzf /tmp/docker-image-labeler_latest.tgz -C /usr/local/bin
|
tar xzf /tmp/docker-image-labeler_latest.tgz -C /usr/local/bin
|
||||||
mv /usr/local/bin/docker-image-labeler-${TARGETARCH} /usr/local/bin/docker-image-labeler
|
mv /usr/local/bin/docker-image-labeler-${TARGETARCH} /usr/local/bin/docker-image-labeler
|
||||||
|
|
||||||
|
docker-container-healthchecker:
|
||||||
|
wget -qO /tmp/docker-container-healthchecker_latest.tgz ${DOCKER_CONTAINER_HEALTHCHECKER_URL}
|
||||||
|
tar xzf /tmp/docker-container-healthchecker_latest.tgz -C /usr/local/bin
|
||||||
|
mv /usr/local/bin/docker-container-healthchecker-${TARGETARCH} /usr/local/bin/docker-container-healthchecker
|
||||||
|
|
||||||
lambda-builder:
|
lambda-builder:
|
||||||
wget -qO /tmp/lambda-builder_latest.tgz ${LAMBDA_BUILDER_URL}
|
wget -qO /tmp/lambda-builder_latest.tgz ${LAMBDA_BUILDER_URL}
|
||||||
tar xzf /tmp/lambda-builder_latest.tgz -C /usr/local/bin
|
tar xzf /tmp/lambda-builder_latest.tgz -C /usr/local/bin
|
||||||
|
|||||||
@@ -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`:
|
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
wget https://dokku.com/install/v0.30.2/bootstrap.sh
|
wget -NP . https://dokku.com/install/v0.31.0/bootstrap.sh
|
||||||
sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh
|
sudo DOKKU_TAG=v0.31.0 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.
|
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.
|
||||||
|
|||||||
12
bootstrap.sh
12
bootstrap.sh
@@ -12,7 +12,7 @@ set -eo pipefail
|
|||||||
# That's good because it prevents our output overlapping with wget's.
|
# That's good because it prevents our output overlapping with wget's.
|
||||||
# It also means that we can't run a partially downloaded script.
|
# It also means that we can't run a partially downloaded script.
|
||||||
|
|
||||||
SUPPORTED_VERSIONS="Debian [10, 11], Ubuntu [18.04, 20.04, 22.04]"
|
SUPPORTED_VERSIONS="Debian [10, 11, 12], Ubuntu [18.04, 20.04, 22.04]"
|
||||||
|
|
||||||
log-fail() {
|
log-fail() {
|
||||||
declare desc="log fail formatter"
|
declare desc="log fail formatter"
|
||||||
@@ -28,7 +28,7 @@ ensure-environment() {
|
|||||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
hostname -f >/dev/null 2>&1 || {
|
hostname -f &>/dev/null || {
|
||||||
log-fail "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
log-fail "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ install-dokku-from-deb-package() {
|
|||||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||||
local OS_ID
|
local OS_ID
|
||||||
|
|
||||||
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "22.04" "10" "11"; then
|
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "22.04" "10" "11" "12"; then
|
||||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ install-dokku-from-deb-package() {
|
|||||||
OS_ID="bionic"
|
OS_ID="bionic"
|
||||||
fi
|
fi
|
||||||
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||||
OS_IDS=("stretch" "buster" "bullseye")
|
OS_IDS=("stretch" "buster" "bullseye" "bookworm")
|
||||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||||
OS_ID="bullseye"
|
OS_ID="bullseye"
|
||||||
fi
|
fi
|
||||||
@@ -220,19 +220,15 @@ install-dokku-from-deb-package() {
|
|||||||
[[ -n $DOKKU_NGINX_ENABLE ]] && echo "dokku dokku/nginx_enable string $DOKKU_NGINX_ENABLE" | sudo debconf-set-selections
|
[[ -n $DOKKU_NGINX_ENABLE ]] && echo "dokku dokku/nginx_enable string $DOKKU_NGINX_ENABLE" | sudo debconf-set-selections
|
||||||
|
|
||||||
if [[ -n $DOKKU_CHECKOUT ]]; then
|
if [[ -n $DOKKU_CHECKOUT ]]; then
|
||||||
# shellcheck disable=SC2086
|
|
||||||
apt-get -qq -y $NO_INSTALL_RECOMMENDS install "dokku=$DOKKU_CHECKOUT"
|
apt-get -qq -y $NO_INSTALL_RECOMMENDS install "dokku=$DOKKU_CHECKOUT"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
|
||||||
apt-get -qq -y $NO_INSTALL_RECOMMENDS install dokku
|
apt-get -qq -y $NO_INSTALL_RECOMMENDS install dokku
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
export DOKKU_DISTRO DOKKU_DISTRO_VERSION
|
export DOKKU_DISTRO DOKKU_DISTRO_VERSION
|
||||||
# shellcheck disable=SC1091
|
|
||||||
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
|
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
|
||||||
# shellcheck disable=SC1091
|
|
||||||
DOKKU_DISTRO_VERSION=$(. /etc/os-release && echo "$VERSION_ID")
|
DOKKU_DISTRO_VERSION=$(. /etc/os-release && echo "$VERSION_ID")
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
|||||||
@@ -4,5 +4,4 @@ set -eo pipefail
|
|||||||
DOKKU_DOCKER_CONTAINER_NAME=${DOKKU_DOCKER_CONTAINER_NAME:=dokku}
|
DOKKU_DOCKER_CONTAINER_NAME=${DOKKU_DOCKER_CONTAINER_NAME:=dokku}
|
||||||
|
|
||||||
# TODO: handle cases where we need a tty
|
# TODO: handle cases where we need a tty
|
||||||
# shellcheck disable=SC2086
|
|
||||||
docker exec $DOKKU_DOCKER_ENV -i "$DOKKU_DOCKER_CONTAINER_NAME" dokku "$@"
|
docker exec $DOKKU_DOCKER_ENV -i "$DOKKU_DOCKER_CONTAINER_NAME" dokku "$@"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ fn-dokku-host() {
|
|||||||
declare DOKKU_GIT_REMOTE="$1" DOKKU_HOST="$2"
|
declare DOKKU_GIT_REMOTE="$1" DOKKU_HOST="$2"
|
||||||
|
|
||||||
if [[ -z "$DOKKU_HOST" ]]; then
|
if [[ -z "$DOKKU_HOST" ]]; then
|
||||||
if [[ -d .git ]] || git rev-parse --git-dir >/dev/null 2>&1; then
|
if [[ -d .git ]] || git rev-parse --git-dir &>/dev/null; then
|
||||||
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
|
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -109,7 +109,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$APP" ]]; then
|
if [[ -z "$APP" ]]; then
|
||||||
if [[ -d .git ]] || git rev-parse --git-dir >/dev/null 2>&1; then
|
if [[ -d .git ]] || git rev-parse --git-dir &>/dev/null; then
|
||||||
set +e
|
set +e
|
||||||
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||||
set -e
|
set -e
|
||||||
@@ -190,7 +190,6 @@ main() {
|
|||||||
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
|
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
|
||||||
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
||||||
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
||||||
# shellcheck disable=SC2068,SC2086
|
|
||||||
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ || {
|
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ || {
|
||||||
ssh_exit_code="$?"
|
ssh_exit_code="$?"
|
||||||
echo " ! Failed to execute dokku command over ssh: exit code $?" 1>&2
|
echo " ! Failed to execute dokku command over ssh: exit code $?" 1>&2
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ pkgs=(apache2-utils
|
|||||||
debconf
|
debconf
|
||||||
)
|
)
|
||||||
|
|
||||||
dokku_pkgs=(docker-image-labeler
|
dokku_pkgs=(docker-docker-container-healthchecker
|
||||||
|
docker-image-labeler
|
||||||
gliderlabs-sigil
|
gliderlabs-sigil
|
||||||
lambda-builder
|
lambda-builder
|
||||||
netrc
|
netrc
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ cmdExists() {
|
|||||||
function getDistro {
|
function getDistro {
|
||||||
if [ -f /etc/os-release ]; then
|
if [ -f /etc/os-release ]; then
|
||||||
# freedesktop.org and systemd
|
# freedesktop.org and systemd
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
OS=$NAME
|
OS=$NAME
|
||||||
VER=$VERSION_ID
|
VER=$VERSION_ID
|
||||||
@@ -41,7 +40,6 @@ function getDistro {
|
|||||||
VER=$(lsb_release -sr)
|
VER=$(lsb_release -sr)
|
||||||
elif [ -f /etc/lsb-release ]; then
|
elif [ -f /etc/lsb-release ]; then
|
||||||
# For some versions of Debian/Ubuntu without lsb_release command
|
# For some versions of Debian/Ubuntu without lsb_release command
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /etc/lsb-release
|
. /etc/lsb-release
|
||||||
OS=$DISTRIB_ID
|
OS=$DISTRIB_ID
|
||||||
VER=$DISTRIB_RELEASE
|
VER=$DISTRIB_RELEASE
|
||||||
@@ -255,11 +253,9 @@ function checkUsers {
|
|||||||
if [[ "${u[0]}" == "${user}" ]]; then
|
if [[ "${u[0]}" == "${user}" ]]; then
|
||||||
if [[ ${u[1]} == "!" ]] || [[ ${u[1]} == "!!" ]] || [[ ${u[1]} == "*" ]]; then
|
if [[ ${u[1]} == "!" ]] || [[ ${u[1]} == "!!" ]] || [[ ${u[1]} == "*" ]]; then
|
||||||
echo -en "\e[32m[PASS]\e[0m User ${user} has no password set.\n"
|
echo -en "\e[32m[PASS]\e[0m User ${user} has no password set.\n"
|
||||||
# shellcheck disable=SC2030
|
|
||||||
((PASS++))
|
((PASS++))
|
||||||
else
|
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"
|
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++))
|
((FAIL++))
|
||||||
STATUS=2
|
STATUS=2
|
||||||
fi
|
fi
|
||||||
@@ -292,7 +288,6 @@ function checkUsers {
|
|||||||
STATUS=2
|
STATUS=2
|
||||||
else
|
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"
|
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++))
|
((WARN++))
|
||||||
if [[ $STATUS != 2 ]]; then
|
if [[ $STATUS != 2 ]]; then
|
||||||
STATUS=1
|
STATUS=1
|
||||||
@@ -352,11 +347,9 @@ function checkFirewall {
|
|||||||
ufwa=$(ufw status | head -1 | sed -e "s/^Status:\ //")
|
ufwa=$(ufw status | head -1 | sed -e "s/^Status:\ //")
|
||||||
if [[ $ufwa == "active" ]]; then
|
if [[ $ufwa == "active" ]]; then
|
||||||
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
FW_VER="\e[32m[PASS]\e[0m Firewall service (${fw}) is active\n"
|
||||||
# shellcheck disable=SC2031
|
|
||||||
((PASS++))
|
((PASS++))
|
||||||
else
|
else
|
||||||
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
FW_VER="\e[93m[WARN]\e[0m No firewall is configured. Ensure ${fw} is installed and configured\n"
|
||||||
# shellcheck disable=SC2031
|
|
||||||
((WARN++))
|
((WARN++))
|
||||||
fi
|
fi
|
||||||
elif [[ $OS == "CentOS Linux" ]] || [[ $OS == "CentOS Stream" ]] || [[ $OS == "Rocky Linux" ]] || [[ $OS == "AlmaLinux" ]]; then
|
elif [[ $OS == "CentOS Linux" ]] || [[ $OS == "CentOS Stream" ]] || [[ $OS == "Rocky Linux" ]] || [[ $OS == "AlmaLinux" ]]; then
|
||||||
@@ -451,7 +444,6 @@ function checkUpdates {
|
|||||||
sleep 2
|
sleep 2
|
||||||
apt-get --just-print upgrade | grep -i security | awk '{print $2}' | awk '!seen[$0]++'
|
apt-get --just-print upgrade | grep -i security | awk '{print $2}' | awk '!seen[$0]++'
|
||||||
echo -en
|
echo -en
|
||||||
# shellcheck disable=SC2031
|
|
||||||
((FAIL++))
|
((FAIL++))
|
||||||
STATUS=2
|
STATUS=2
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -9,19 +9,16 @@ readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
|||||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||||
|
|
||||||
log-info() {
|
log-info() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log info formatter"
|
declare desc="Log info formatter"
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
log-error() {
|
log-error() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log error formatter"
|
declare desc="Log error formatter"
|
||||||
echo "! $*" 1>&2
|
echo "! $*" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
log-fail() {
|
log-fail() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log fail formatter"
|
declare desc="Log fail formatter"
|
||||||
log-error "$*"
|
log-error "$*"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -158,7 +155,7 @@ fn-publish-package() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
DIST=debian
|
DIST=debian
|
||||||
OS_IDS=("buster" "bullseye")
|
OS_IDS=("buster" "bullseye" "bookworm")
|
||||||
for OS_ID in "${OS_IDS[@]}"; do
|
for OS_ID in "${OS_IDS[@]}"; do
|
||||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||||
@@ -186,8 +183,12 @@ fn-replace-version() {
|
|||||||
|
|
||||||
fn-repo-merged-requests() {
|
fn-repo-merged-requests() {
|
||||||
declare desc="Retrieves all pull request ids since a given release of dokku"
|
declare desc="Retrieves all pull request ids since a given release of dokku"
|
||||||
declare TAG="$1"
|
declare TAG="$1" IS_PATCH="$2"
|
||||||
git log "v${TAG}..HEAD" --oneline | grep "Merge pull request" | cut -d' ' -f 5 | cut -d '#' -f2
|
if [[ "$IS_PATCH" == "true" ]]; then
|
||||||
|
git log "v${TAG}..HEAD" --oneline | grep "Merge pull request" | cut -d' ' -f 5 | cut -d '#' -f2
|
||||||
|
else
|
||||||
|
curl -u "$RELEASE_GITHUB_USERNAME:$RELEASE_GITHUB_API_TOKEN" --fail -sS "https://api.github.com/search/issues?q=repo:dokku/dokku+milestone:v${NEXT_VERSION}+is:pr&per_page=100" | jq '.items[].number'
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
fn-repo-push-tags() {
|
fn-repo-push-tags() {
|
||||||
@@ -204,7 +205,7 @@ fn-repo-push-tags() {
|
|||||||
|
|
||||||
fn-repo-update() {
|
fn-repo-update() {
|
||||||
declare desc="Updates files within the repository for a given release"
|
declare desc="Updates files within the repository for a given release"
|
||||||
declare IS_RELEASE="$1" CURRENT_VERSION="$2" NEXT_VERSION="$3"
|
declare IS_RELEASE="$1" CURRENT_VERSION="$2" NEXT_VERSION="$3" IS_PATCH="$4"
|
||||||
|
|
||||||
log-info "(release-dokku) Replacing ${CURRENT_VERSION} with ${NEXT_VERSION}"
|
log-info "(release-dokku) Replacing ${CURRENT_VERSION} with ${NEXT_VERSION}"
|
||||||
for f in plugins/*/plugin.toml; do
|
for f in plugins/*/plugin.toml; do
|
||||||
@@ -241,13 +242,13 @@ fn-repo-update() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
log-info "(release-dokku) Adding HISTORY.md, committing and tagging"
|
log-info "(release-dokku) Adding HISTORY.md, committing and tagging"
|
||||||
fn-repo-update-history-and-commit "$CURRENT_VERSION" "$NEXT_VERSION"
|
fn-repo-update-history-and-commit "$CURRENT_VERSION" "$NEXT_VERSION" "$IS_PATCH"
|
||||||
git tag "v${NEXT_VERSION}"
|
git tag "v${NEXT_VERSION}"
|
||||||
}
|
}
|
||||||
|
|
||||||
fn-repo-update-history-and-commit() {
|
fn-repo-update-history-and-commit() {
|
||||||
declare desc="Updates the history file and commits the changes"
|
declare desc="Updates the history file and commits the changes"
|
||||||
declare CURRENT_VERSION="$1" NEXT_VERSION="$2"
|
declare CURRENT_VERSION="$1" NEXT_VERSION="$2" IS_PATCH="$3"
|
||||||
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
|
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
|
||||||
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
|
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
|
||||||
|
|
||||||
@@ -255,7 +256,7 @@ fn-repo-update-history-and-commit() {
|
|||||||
|
|
||||||
mkdir -p /tmp/github-data
|
mkdir -p /tmp/github-data
|
||||||
|
|
||||||
for PULL_REQUEST_ID in $(fn-repo-merged-requests "$CURRENT_VERSION"); do
|
for PULL_REQUEST_ID in $(fn-repo-merged-requests "$CURRENT_VERSION" "$IS_PATCH"); do
|
||||||
ISSUE_FILE="/tmp/github-data/${PULL_REQUEST_ID}.json"
|
ISSUE_FILE="/tmp/github-data/${PULL_REQUEST_ID}.json"
|
||||||
if [[ ! -f "$ISSUE_FILE" ]]; then
|
if [[ ! -f "$ISSUE_FILE" ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
@@ -305,7 +306,7 @@ fn-repo-update-history-and-commit() {
|
|||||||
HISTORY="${HISTORY}"$'\n\n'"## ${NEXT_VERSION}"
|
HISTORY="${HISTORY}"$'\n\n'"## ${NEXT_VERSION}"
|
||||||
HISTORY="${HISTORY}"$'\n\n'"Install/update via the bootstrap script:"
|
HISTORY="${HISTORY}"$'\n\n'"Install/update via the bootstrap script:"
|
||||||
HISTORY="${HISTORY}"$'\n\n'"\`\`\`shell"
|
HISTORY="${HISTORY}"$'\n\n'"\`\`\`shell"
|
||||||
HISTORY="${HISTORY}"$'\n'"wget https://dokku.com/install/v${NEXT_VERSION}/bootstrap.sh"
|
HISTORY="${HISTORY}"$'\n'"wget -NP . https://dokku.com/install/v${NEXT_VERSION}/bootstrap.sh"
|
||||||
HISTORY="${HISTORY}"$'\n'"sudo DOKKU_TAG=v${NEXT_VERSION} bash bootstrap.sh"
|
HISTORY="${HISTORY}"$'\n'"sudo DOKKU_TAG=v${NEXT_VERSION} bash bootstrap.sh"
|
||||||
HISTORY="${HISTORY}"$'\n'"\`\`\`"
|
HISTORY="${HISTORY}"$'\n'"\`\`\`"
|
||||||
|
|
||||||
@@ -391,7 +392,7 @@ fn-build-docker-image() {
|
|||||||
--push \
|
--push \
|
||||||
--tag "dokku/dokku:latest" \
|
--tag "dokku/dokku:latest" \
|
||||||
--tag "dokku/dokku:$VERSION" .
|
--tag "dokku/dokku:$VERSION" .
|
||||||
else
|
elif [[ "$SKIP_IMAGE_BUILD" != "true" ]]; then
|
||||||
docker buildx build \
|
docker buildx build \
|
||||||
--platform linux/arm,linux/arm64,linux/amd64 \
|
--platform linux/arm,linux/arm64,linux/amd64 \
|
||||||
--progress plain \
|
--progress plain \
|
||||||
@@ -402,7 +403,7 @@ fn-build-docker-image() {
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
declare RELEASE="$1"
|
declare RELEASE="$1"
|
||||||
local CURRENT_VERSION NEXT_VERSION IS_RELEASE
|
local CURRENT_VERSION NEXT_VERSION IS_PATCH IS_RELEASE
|
||||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish" "build")
|
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish" "build")
|
||||||
|
|
||||||
if [[ "$RELEASE" == '--trace' ]]; then
|
if [[ "$RELEASE" == '--trace' ]]; then
|
||||||
@@ -433,9 +434,14 @@ main() {
|
|||||||
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
||||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||||
|
|
||||||
|
IS_PATCH="false"
|
||||||
|
if [[ "$RELEASE" == "patch" ]]; then
|
||||||
|
IS_PATCH="true"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "v${NEXT_VERSION}" >build/next-version
|
echo "v${NEXT_VERSION}" >build/next-version
|
||||||
|
|
||||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION" "$IS_PATCH"
|
||||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
|
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
|
||||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_arm64.deb" || log-fail "Error extracting deb package"
|
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_arm64.deb" || log-fail "Error extracting deb package"
|
||||||
|
|||||||
@@ -7,19 +7,16 @@ readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
|||||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||||
|
|
||||||
log-info() {
|
log-info() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log info formatter"
|
declare desc="Log info formatter"
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
}
|
||||||
|
|
||||||
log-error() {
|
log-error() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log error formatter"
|
declare desc="Log error formatter"
|
||||||
echo "! $*" 1>&2
|
echo "! $*" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
log-fail() {
|
log-fail() {
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log fail formatter"
|
declare desc="Log fail formatter"
|
||||||
log-error "$*"
|
log-error "$*"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
1
debian/config
vendored
1
debian/config
vendored
@@ -3,7 +3,6 @@ set -eo pipefail
|
|||||||
[[ $TRACE ]] && set -x
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,10 +1,10 @@
|
|||||||
Package: dokku
|
Package: dokku
|
||||||
Version: 0.30.2
|
Version: 0.31.0
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-image-labeler (>= 0.2.2), lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-container-healthchecker (>= 0.6.4), docker-image-labeler (>= 0.2.2), lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
||||||
Recommends: herokuish (>= 0.3.4), bash-completion, dokku-update, dokku-event-listener
|
Recommends: herokuish (>= 0.7.0), bash-completion, dokku-update, dokku-event-listener
|
||||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||||
|
|||||||
2
debian/postinst
vendored
2
debian/postinst
vendored
@@ -3,12 +3,10 @@ set -eo pipefail
|
|||||||
[[ $TRACE ]] && set -x
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -r /etc/default/dokku ]]; then
|
if [[ -r /etc/default/dokku ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source /etc/default/dokku
|
source /etc/default/dokku
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
1
debian/postrm
vendored
1
debian/postrm
vendored
@@ -3,7 +3,6 @@ set -eo pipefail
|
|||||||
[[ $TRACE ]] && set -x
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
1
debian/preinst
vendored
1
debian/preinst
vendored
@@ -3,7 +3,6 @@ set -eo pipefail
|
|||||||
[[ $TRACE ]] && set -x
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ main() {
|
|||||||
|
|
||||||
if [[ -f /mnt/dokku/plugin-list ]]; then
|
if [[ -f /mnt/dokku/plugin-list ]]; then
|
||||||
while read line; do
|
while read line; do
|
||||||
local plugin_name="$(echo "$line" | awk '{print $2}')"
|
local plugin_name="$(echo "$line" | awk -F: '{print $1}')"
|
||||||
if dokku plugin:installed "$plugin_name"; then
|
if dokku plugin:installed "$plugin_name"; then
|
||||||
log-warn "Skipping already installed plugin: $plugin_name"
|
log-warn "Skipping already installed plugin: $plugin_name"
|
||||||
else
|
else
|
||||||
dokku plugin:install "$plugin_name" "$(echo "$line" | cut -d':' -f1)"
|
dokku plugin:install "$(echo "$line" | awk -F': ' '{print $2}')" --name "$plugin_name"
|
||||||
fi
|
fi
|
||||||
done </mnt/dokku/plugin-list
|
done </mnt/dokku/plugin-list
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler,/usr/bin/pack,/usr/bin/crontab
|
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/pack,/usr/bin/crontab
|
||||||
|
|||||||
20
docker/usr/local/bin/docker-container-healthchecker
Executable file
20
docker/usr/local/bin/docker-container-healthchecker
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
|
main() {
|
||||||
|
declare desc="re-runs docker-container-healthchecker commands as sudo"
|
||||||
|
local DOCKER_CONTAINER_HEALTHCHECKER_BIN=""
|
||||||
|
if [[ -x "/usr/bin/docker-container-healthchecker" ]]; then
|
||||||
|
DOCKER_CONTAINER_HEALTHCHECKER_BIN="/usr/bin/docker-container-healthchecker"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$DOCKER_CONTAINER_HEALTHCHECKER_BIN" ]]; then
|
||||||
|
echo "! No docker-container-healthchecker binary found" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo -E "$DOCKER_CONTAINER_HEALTHCHECKER_BIN" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
4
docs/_build/Dockerfile
vendored
4
docs/_build/Dockerfile
vendored
@@ -1,10 +1,10 @@
|
|||||||
FROM python:3.11.2-alpine
|
FROM python:3.11.4-alpine
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY docs/_build/requirements.txt .
|
COPY docs/_build/requirements.txt .
|
||||||
|
|
||||||
RUN apk add --no-cache bash yaml && \
|
RUN apk add --no-cache bash build-base yaml && \
|
||||||
pip install --no-cache-dir -r requirements.txt
|
pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY docs/_build/entrypoint /bin/entrypoint
|
COPY docs/_build/entrypoint /bin/entrypoint
|
||||||
|
|||||||
26
docs/_build/requirements.txt
vendored
26
docs/_build/requirements.txt
vendored
@@ -1,23 +1,23 @@
|
|||||||
beautifulsoup4==4.12.0
|
beautifulsoup4==4.12.2
|
||||||
click==8.1.3
|
click==8.1.6
|
||||||
ghp-import==2.1.0
|
ghp-import==2.1.0
|
||||||
importlib-metadata==6.1.0
|
importlib-metadata==6.8.0
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
Markdown>=3.2.1,<3.5
|
Markdown>=3.2.1,<3.5
|
||||||
MarkupSafe==2.1.2
|
MarkupSafe==2.1.3
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
mkdocs==1.4.2
|
mkdocs==1.5.2
|
||||||
mkdocs-exclude==1.0.2
|
mkdocs-exclude==1.0.2
|
||||||
mkdocs-material==9.1.3
|
mkdocs-material==9.1.21
|
||||||
mkdocs-material-extensions==1.1.1
|
mkdocs-material-extensions==1.1.1
|
||||||
packaging==23.0
|
packaging==23.1
|
||||||
Pygments==2.14.0
|
Pygments==2.15.1
|
||||||
pymdown-extensions==9.10
|
pymdown-extensions==10.1
|
||||||
pyparsing==3.0.9
|
pyparsing==3.1.1
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
PyYAML==6.0
|
PyYAML==6.0.1
|
||||||
pyyaml_env_tag==0.1
|
pyyaml_env_tag==0.1
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
soupsieve==2.4
|
soupsieve==2.4.1
|
||||||
watchdog==3.0.0
|
watchdog==3.0.0
|
||||||
zipp==3.15.0
|
zipp==3.16.2
|
||||||
|
|||||||
@@ -57,8 +57,11 @@ Please keep the above in mind when utilizing deployment tasks.
|
|||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `app.json` file to use for a given app. This can be done via the `app-json:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json` file.
|
When deploying a monorepo, it may be desirable to specify the specific path of the `app.json` file to use for a given app. This can be done via the `app-json:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json` file.
|
||||||
|
|
||||||
|
For deploys via the `git:from-image` and `git:load-image` commands, the `app.json` is extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `app.json` extracted directly from the source code. Both cases will respect the configured `appjson-path` property value.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku app-json:set node-js-app appjson-path second-app.json
|
dokku app-json:set node-js-app appjson-path .dokku/app.json
|
||||||
```
|
```
|
||||||
|
|
||||||
The default value may be set by passing an empty value for the option:
|
The default value may be set by passing an empty value for the option:
|
||||||
@@ -137,8 +140,6 @@ Dokku provides limited support for the `app.json` manifest from Heroku (document
|
|||||||
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||||
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||||
|
|
||||||
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
|
||||||
|
|
||||||
> Warning: Any failed `app.json` deployment task will fail the deploy. In the case of either phase, a failure will not affect any running containers.
|
> Warning: Any failed `app.json` deployment task will fail the deploy. In the case of either phase, a failure will not affect any running containers.
|
||||||
|
|
||||||
The following is an example `app.json` file. Please note that only the `scripts.dokku.predeploy` and `scripts.dokku.postdeploy` tasks are supported by Dokku at this time. All other fields will be ignored and can be omitted.
|
The following is an example `app.json` file. Please note that only the `scripts.dokku.predeploy` and `scripts.dokku.postdeploy` tasks are supported by Dokku at this time. All other fields will be ignored and can be omitted.
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
```
|
```
|
||||||
plugin:disable <name> # Disable an installed plugin (third-party only)
|
plugin:disable <name> # Disable an installed plugin (third-party only)
|
||||||
plugin:enable <name> # Enable a previously disabled plugin
|
plugin:enable <name> # Enable a previously disabled plugin
|
||||||
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]] # Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
|
plugin:install [--core|--git-url] [--committish branch|commit|tag] [--name custom-plugin-name] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
|
||||||
plugin:installed <name> # Checks if a plugin is installed
|
plugin:installed <name> # Checks if a plugin is installed
|
||||||
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
||||||
plugin:list # Print active plugins
|
plugin:list # Print active plugins
|
||||||
plugin:trigger <args...>. # Trigger an arbitrary plugin hook
|
plugin:trigger <args...>. # Trigger an arbitrary plugin hook
|
||||||
plugin:uninstall <name> # Uninstall a plugin (third-party only)
|
plugin:uninstall <name> # Uninstall a plugin (third-party only)
|
||||||
plugin:update [name [committish]] # Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
|
plugin:update [name [branch|commit|tag]] # Optionally update named plugin from git (and pin to the specified branch/commit/tag) & run update trigger for active plugins
|
||||||
```
|
```
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
|||||||
|
|
||||||
```
|
```
|
||||||
plugn: dev
|
plugn: dev
|
||||||
00_dokku-standard 0.30.2 enabled dokku core standard plugin
|
00_dokku-standard 0.31.0 enabled dokku core standard plugin
|
||||||
20_events 0.30.2 enabled dokku core events logging plugin
|
20_events 0.31.0 enabled dokku core events logging plugin
|
||||||
app-json 0.30.2 enabled dokku core app-json plugin
|
app-json 0.31.0 enabled dokku core app-json plugin
|
||||||
apps 0.30.2 enabled dokku core apps plugin
|
apps 0.31.0 enabled dokku core apps plugin
|
||||||
build-env 0.30.2 enabled dokku core build-env plugin
|
build-env 0.31.0 enabled dokku core build-env plugin
|
||||||
buildpacks 0.30.2 enabled dokku core buildpacks plugin
|
buildpacks 0.31.0 enabled dokku core buildpacks plugin
|
||||||
certs 0.30.2 enabled dokku core certificate management plugin
|
certs 0.31.0 enabled dokku core certificate management plugin
|
||||||
checks 0.30.2 enabled dokku core checks plugin
|
checks 0.31.0 enabled dokku core checks plugin
|
||||||
common 0.30.2 enabled dokku core common plugin
|
common 0.31.0 enabled dokku core common plugin
|
||||||
config 0.30.2 enabled dokku core config plugin
|
config 0.31.0 enabled dokku core config plugin
|
||||||
docker-options 0.30.2 enabled dokku core docker-options plugin
|
docker-options 0.31.0 enabled dokku core docker-options plugin
|
||||||
domains 0.30.2 enabled dokku core domains plugin
|
domains 0.31.0 enabled dokku core domains plugin
|
||||||
enter 0.30.2 enabled dokku core enter plugin
|
enter 0.31.0 enabled dokku core enter plugin
|
||||||
git 0.30.2 enabled dokku core git plugin
|
git 0.31.0 enabled dokku core git plugin
|
||||||
logs 0.30.2 enabled dokku core logs plugin
|
logs 0.31.0 enabled dokku core logs plugin
|
||||||
network 0.30.2 enabled dokku core network plugin
|
network 0.31.0 enabled dokku core network plugin
|
||||||
nginx-vhosts 0.30.2 enabled dokku core nginx-vhosts plugin
|
nginx-vhosts 0.31.0 enabled dokku core nginx-vhosts plugin
|
||||||
plugin 0.30.2 enabled dokku core plugin plugin
|
plugin 0.31.0 enabled dokku core plugin plugin
|
||||||
proxy 0.30.2 enabled dokku core proxy plugin
|
proxy 0.31.0 enabled dokku core proxy plugin
|
||||||
ps 0.30.2 enabled dokku core ps plugin
|
ps 0.31.0 enabled dokku core ps plugin
|
||||||
repo 0.30.2 enabled dokku core repo plugin
|
repo 0.31.0 enabled dokku core repo plugin
|
||||||
resource 0.30.2 enabled dokku core resource plugin
|
resource 0.31.0 enabled dokku core resource plugin
|
||||||
scheduler-docker-local 0.30.2 enabled dokku core scheduler-docker-local plugin
|
scheduler-docker-local 0.31.0 enabled dokku core scheduler-docker-local plugin
|
||||||
shell 0.30.2 enabled dokku core shell plugin
|
shell 0.31.0 enabled dokku core shell plugin
|
||||||
ssh-keys 0.30.2 enabled dokku core ssh-keys plugin
|
ssh-keys 0.31.0 enabled dokku core ssh-keys plugin
|
||||||
storage 0.30.2 enabled dokku core storage plugin
|
storage 0.31.0 enabled dokku core storage plugin
|
||||||
tags 0.30.2 enabled dokku core tags plugin
|
tags 0.31.0 enabled dokku core tags plugin
|
||||||
tar 0.30.2 enabled dokku core tar plugin
|
tar 0.31.0 enabled dokku core tar plugin
|
||||||
trace 0.30.2 enabled dokku core trace plugin
|
trace 0.31.0 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.
|
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||||
@@ -165,6 +165,12 @@ An optional commit SHA-like object may be specified.
|
|||||||
dokku plugin:update postgres 2.0.0
|
dokku plugin:update postgres 2.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Any future invocation of `plugin:update` will respect the previously specified SHA-like object. To follow a particular branch again, specify that branch:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:update postgres main
|
||||||
|
```
|
||||||
|
|
||||||
### Uninstalling a plugin
|
### Uninstalling a plugin
|
||||||
|
|
||||||
Third party plugins can be uninstalled using the `plugin:uninstall` command:
|
Third party plugins can be uninstalled using the `plugin:uninstall` command:
|
||||||
|
|||||||
@@ -69,22 +69,22 @@ dokku registry:set --global server
|
|||||||
The following are the values that should be used for common remote servers:
|
The following are the values that should be used for common remote servers:
|
||||||
|
|
||||||
- Amazon Elastic Container Registry:
|
- Amazon Elastic Container Registry:
|
||||||
- value: `$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/`
|
- value: `$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/`
|
||||||
- notes: The `$AWS_ACCOUNT_ID` and `$AWS_REGION` should match the values for your account and region, respectively. Additionally, an IAM profile that allows `push` access to the repository specified by `image-repo` should be attached to your Dokku server.
|
- notes: The `$AWS_ACCOUNT_ID` and `$AWS_REGION` should match the values for your account and region, respectively. Additionally, an IAM profile that allows `push` access to the repository specified by `image-repo` should be attached to your Dokku server.
|
||||||
- Azure Container Registry:
|
- Azure Container Registry:
|
||||||
- value `$REGISTRY_NAME.azurecr.io/`
|
- value `$REGISTRY_NAME.azurecr.io/`
|
||||||
- notes: The `$AKS_REGISTRY_NAME` should match the name of the registry created on your account.
|
- notes: The `$AKS_REGISTRY_NAME` should match the name of the registry created on your account.
|
||||||
- Docker Hub:
|
- Docker Hub:
|
||||||
- value: `docker.io/`
|
- value: `docker.io/`
|
||||||
- notes: Requires owning the namespace used in the `image-repo` value.
|
- notes: Requires owning the namespace used in the `image-repo` value.
|
||||||
- Digitalocean:
|
- Digitalocean:
|
||||||
- value: `registry.digitalocean.com/`
|
- value: `registry.digitalocean.com/`
|
||||||
- notes: Requires setting the correct `image-repo` value for your registry.
|
- notes: Requires setting the correct `image-repo` value for your registry.
|
||||||
- Github Container Registry:
|
- Github Container Registry:
|
||||||
- value: `ghcr.io/`
|
- value: `ghcr.io/`
|
||||||
- notes: Requires that the authenticated user has access to the namespace used in the `image-repo` value.
|
- notes: Requires that the authenticated user has access to the namespace used in the `image-repo` value.
|
||||||
- Quay.io:
|
- Quay.io:
|
||||||
- value: `quay.io/`
|
- value: `quay.io/`
|
||||||
|
|
||||||
### Specifying an image repository name
|
### Specifying an image repository name
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
## Removals
|
## 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 [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.
|
- Support for the `DOKKU_SCALE` file - deprecated in 0.25.0 - has been removed in favor of the `formation` 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 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.
|
- 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-buildpack`
|
||||||
|
|||||||
36
docs/appendices/0.31.0-migration-guide.md
Normal file
36
docs/appendices/0.31.0-migration-guide.md
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
# 0.31.0 Migration Guide
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Herokuish build cache is now mounted from a docker volume - eg. `cache-node-js-app` - instead of the local filesystem. All existing app cache will be cleared upon upgrading past 0.29.0.
|
||||||
|
- The `vector` container integration now mounts config to `/etc/vector` instead of the path `/etc/vector/vector.json`, allowing users the ability to provide extra configuration for Vector Sinks. To take advantage of the new functionality, the vector container should be stopped (via `dokku logs:vector-stop`) and then started (via `dokku logs:vector-start`).
|
||||||
|
- The `traefik` integration now mounts config to `/data` instead of the path `/acme.json`, fixing permissions issues under certain architectures. To take advantage of the new functionality, the traefik container should be stopped (via `dokku traefik:stop`) and then started (via `dokku traefik:start`).
|
||||||
|
- Users no longer need to clear the `source-image` git property when transitioning from image-based deploys (`git:from-image` and `git:load-image`) to other deployment methods (git push, `git:from-archive`, `git:sync`).
|
||||||
|
- For deploys via the `git:from-image` and `git:load-image` commands, the `CHECKS` file is now extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `CHECKS` extracted directly from the source code. The filename in both cases is `CHECKS` and cannot be modified.
|
||||||
|
- Port mappings are now auto-detected during the build process. Users may override detected port mappings via the `ports` plugin. A default port mapping of `http:80:5000` will be used if none is otherwise specified.
|
||||||
|
- Users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-container-healthchecker` binary to work correctly. A reference version has been placed in the `docker` skeleton directory. This should only impact platform developers, and users of our Docker image will already have the file available.
|
||||||
|
- The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-22`, and is based on both the `heroku-22` stack as well as Ubuntu 22.04. Users that wish to stick with the old, `heroku-20`/Ubuntu 20.04 builder may specify `gliderlabs/herokuish:latest-20` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
|
||||||
|
- The default image used for Cloud Native Buildpack builds is now `heroku/builder:22`, and is based on both the `heroku-22` stack as well as Ubuntu 22.04. Users that wish to stick with the old, `heroku-20`/Ubuntu 20.04 builder may specify `heroku/buildpacks:20` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
|
||||||
|
|
||||||
|
## Deprecations
|
||||||
|
|
||||||
|
- The `proxy:ports*` commands have been replaced with the new `ports` plugin. Users will be able to use the old `proxy:ports*` commands for a single minor release, and they will be removed in the next minor release.
|
||||||
|
- The `common#get_available_port()` function has been deprecated and will be removed in the next release. Users should avoid interacting with this function and instead use the `ports-get-available` plugin trigger for fetching an available port.
|
||||||
|
- The `proxy-configure-ports` plugin trigger has been deprecated and will be removed in the next release. Users should instead trigger the `ports-configure` plugin trigger.
|
||||||
|
- The `common#get_dockerfile_exposed_ports()` function is deprecated and will be removed in the next release. There is no replacement for this as it's only use in Dokku core was in the `builder-dockerfile` plugin.
|
||||||
|
- The `common#get_exposed_ports_from_image()` function is deprecated and will be removed in the next release. There is no replacement for this as it's only use in Dokku core was during the build process.
|
||||||
|
- The environment variable `DOKKU_PROXY_PORT_MAP` has been migrated to the properties system. Direct changes to the value will be ignored, and users should interact with port maps via the `ports` plugin.
|
||||||
|
- The `CHECKS` file is deprecated in favor of defining healthchecks in the `app.json` file. The [docker-container-healthchecker](https://github.com/dokku/docker-container-healthchecker) tool can be used to generate healthcheck entries in `app.json` format from existing `CHECKS` files. See the [zero-downtime deploy documentation](/docs/deployment/zero-downtime-deploys.md) for more information on how the new zero downtime check format works.
|
||||||
|
- ARM support is now deprecated, and will be removed in the next minor release. ARM releases are not tested in CI and do not get testing locally. Users of ARM installations on platforms such as the Raspberry PI should consider migrating to ARM64. ARM64 will continue to be supported by Dokku, and there are no plans to remove support for ARM64.
|
||||||
|
|
||||||
|
## Un-Deprecations
|
||||||
|
|
||||||
|
- The bare `apps` and `config` cli aliases are no longer deprecated. This better follows Heroku's output and is more useful to users. The subcommands will be treated as the primary, documented versions, while the aliases are there for convenience.
|
||||||
|
|
||||||
|
## Removals
|
||||||
|
|
||||||
|
- The variable `RAW_TCP_PORTS` is no longer exposed for `nginx.conf.sigil` templating.
|
||||||
|
- The environment variable `DOKKU_DOCKERFILE_PORTS` is no longer in use. Users wishing to change port mappings should instead use the `ports` plugin.
|
||||||
|
- The `common#get_app_raw_tcp_ports()` function has been removed in the next release. Users should instead use the `ports-get` plugin trigger for fetching ports for an app.
|
||||||
|
- The plugin trigger `network-compute-ports` has been removed. It's only use was in the `scheduler-docker-local` plugin, for exposing ports. It's functionality is now implemented via the `ports` plugin.
|
||||||
|
- The plugin trigger `network-get-port` has been removed. It's only use was in the `scheduler-docker-local` plugin, for recording ports. It's functionality is now implemented via the `ports` plugin.
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
<browserconfig>
|
<browserconfig>
|
||||||
<msapplication>
|
<msapplication>
|
||||||
<tile>
|
<tile>
|
||||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-70x70.png"/>
|
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-150x150.png"/>
|
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-310x310.png"/>
|
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-310x150.png"/>
|
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||||
<TileColor>#da532c</TileColor>
|
<TileColor>#da532c</TileColor>
|
||||||
</tile>
|
</tile>
|
||||||
</msapplication>
|
</msapplication>
|
||||||
|
|||||||
@@ -2,37 +2,37 @@
|
|||||||
"name": "Dokku",
|
"name": "Dokku",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||||
"sizes": "36x36",
|
"sizes": "36x36",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "0.75"
|
"density": "0.75"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||||
"sizes": "48x48",
|
"sizes": "48x48",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.0"
|
"density": "1.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||||
"sizes": "72x72",
|
"sizes": "72x72",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.5"
|
"density": "1.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||||
"sizes": "96x96",
|
"sizes": "96x96",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "2.0"
|
"density": "2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "3.0"
|
"density": "3.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.30.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.31.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "4.0"
|
"density": "4.0"
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
"0.27.10",
|
"0.27.10",
|
||||||
"0.28.4",
|
"0.28.4",
|
||||||
"0.29.4",
|
"0.29.4",
|
||||||
"0.30.2"
|
"0.30.11",
|
||||||
|
"0.31.0"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
|||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
|
| [Cron Restart](https://github.com/dokku/dokku-cron-restart) | [dokku][] | 0.30.0+ |
|
||||||
| [CouchDB](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
| [CouchDB](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
||||||
| [Elasticsearch](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
| [Elasticsearch](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Grafana/Graphite/Statsd](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
|
| [Grafana/Graphite/Statsd](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
|
||||||
|
|||||||
@@ -111,12 +111,10 @@ The following config variables have special meanings and can be set in a variety
|
|||||||
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
||||||
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
||||||
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
|
||||||
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
||||||
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
||||||
| `DOKKU_PROXY_PORT` | automatically assigned | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |
|
| `DOKKU_PROXY_PORT` | automatically assigned | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |
|
||||||
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |
|
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |
|
||||||
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |
|
|
||||||
| `DOKKU_SKIP_ALL_CHECKS` | none | `dokku config:set` | |
|
| `DOKKU_SKIP_ALL_CHECKS` | none | `dokku config:set` | |
|
||||||
| `DOKKU_SKIP_CLEANUP` | | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | When a deploy is triggered, if this is set to a non-empty value, then old docker containers and images will not be removed. |
|
| `DOKKU_SKIP_CLEANUP` | | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | When a deploy is triggered, if this is set to a non-empty value, then old docker containers and images will not be removed. |
|
||||||
| `DOKKU_SKIP_DEFAULT_CHECKS` | | `dokku config:set` | |
|
| `DOKKU_SKIP_DEFAULT_CHECKS` | | `dokku config:set` | |
|
||||||
|
|||||||
@@ -132,37 +132,12 @@ See the [NGINX HSTS documentation](/docs/networking/proxies/nginx.md#hsts-header
|
|||||||
|
|
||||||
Certain versions of nginx have bugs that prevent [HTTP/2](https://nginx.org/en/docs/http/ngx_http_v2_module.html) from properly responding to all clients, thus causing applications to be unavailable. For HTTP/2 to be enabled in your applications' nginx configs, you need to have installed nginx 1.11.5 or higher. See [issue 2435](https://github.com/dokku/dokku/issues/2435) for more details.
|
Certain versions of nginx have bugs that prevent [HTTP/2](https://nginx.org/en/docs/http/ngx_http_v2_module.html) from properly responding to all clients, thus causing applications to be unavailable. For HTTP/2 to be enabled in your applications' nginx configs, you need to have installed nginx 1.11.5 or higher. See [issue 2435](https://github.com/dokku/dokku/issues/2435) for more details.
|
||||||
|
|
||||||
## Running behind a load balancer
|
|
||||||
|
|
||||||
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-Port` and `X-Forwarded-For`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
|
|
||||||
|
|
||||||
If your server runs behind an HTTP(S) load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application via `nginx:set`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku nginx:set node-js-app x-forwarded-for-value "\$http_x_forwarded_for"
|
|
||||||
dokku nginx:set node-js-app x-forwarded-port-value "\$http_x_forwarded_port"
|
|
||||||
dokku nginx:set node-js-app x-forwarded-proto-value "\$http_x_forwarded_proto"
|
|
||||||
```
|
|
||||||
|
|
||||||
Only use this option if:
|
|
||||||
1. All requests are terminated at the load balancer, and forwarded to Nginx
|
|
||||||
2. The load balancer is configured to send the `X-Forwarded-` headers (this may be off by default)
|
|
||||||
|
|
||||||
If it's possible to make HTTP(S) requests directly to Nginx, bypassing the load balancer, or if the load balancer is not configured to set these headers, then it becomes possible for a client to set these headers to arbitrary values.
|
|
||||||
|
|
||||||
The `x-forwarded-ssl` property may also be set for application frameworks that require this value. Note that this is a non-standard version of setting `x-forwarded-proto` to `https`, and should only be done as a last resort.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# force-setting value to `on`
|
|
||||||
dokku nginx:set node-js-app x-forwarded-ssl on
|
|
||||||
|
|
||||||
# force-setting value to `off`
|
|
||||||
dokku nginx:set node-js-app x-forwarded-ssl on
|
|
||||||
|
|
||||||
# removing the value from nginx.conf (default)
|
|
||||||
dokku nginx:set node-js-app x-forwarded-ssl
|
|
||||||
```
|
|
||||||
|
|
||||||
### SSL Port Exposure
|
### SSL Port Exposure
|
||||||
|
|
||||||
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.
|
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku ports:add <APP> https:443:99999`.
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
### Running behind a proxy (`X-Forwarded-Ssl`, etc.)
|
||||||
|
|
||||||
|
See the [running behind another proxy documentation](/docs/networking/proxies/nginx.md#running-behind-another-proxy--configuring-x-forwarded--headers) for more information on how to configure your Nginx config when your server is running behind a proxy (e.g. load balancer, etc.).
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ Once you have configured Dokku with at least one user, you can deploy applicatio
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# from your local machine
|
# from your local machine
|
||||||
# SSH access to github must be enabled on this host
|
|
||||||
git clone https://github.com/heroku/ruby-getting-started
|
git clone https://github.com/heroku/ruby-getting-started
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -62,7 +61,7 @@ Now you can deploy the `ruby-getting-started` app to your Dokku server. All you
|
|||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
cd ruby-getting-started
|
cd ruby-getting-started
|
||||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||||
git push dokku main:master
|
git push dokku main
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
||||||
@@ -71,7 +70,7 @@ git push dokku main:master
|
|||||||
|
|
||||||
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
||||||
|
|
||||||
After running `git push dokku main:master`, you should have output similar to this in your terminal:
|
After running `git push dokku main`, you should have output similar to this in your terminal:
|
||||||
|
|
||||||
```
|
```
|
||||||
Counting objects: 231, done.
|
Counting objects: 231, done.
|
||||||
@@ -180,7 +179,7 @@ If you do not enter a fully qualified domain name when pushing your app, Dokku d
|
|||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
# the below example assumes your app server domain or IP is dokku.me. Push in the form of: dokku@{serveripordomain}:{dokkuappname}
|
# the below example assumes your app server domain or IP is dokku.me. Push in the form of: dokku@{serveripordomain}:{dokkuappname}
|
||||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||||
git push dokku main:master
|
git push dokku main
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -194,7 +193,7 @@ You can also specify the fully qualified name as follows:
|
|||||||
# from your local machine
|
# from your local machine
|
||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
git remote add dokku dokku@dokku.me:app.dokku.me
|
git remote add dokku dokku@dokku.me:app.dokku.me
|
||||||
git push dokku main:master
|
git push dokku main
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -208,7 +207,7 @@ This is useful when you want to deploy to the root domain:
|
|||||||
# from your local machine
|
# from your local machine
|
||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
git remote add dokku dokku@dokku.me:dokku.me
|
git remote add dokku dokku@dokku.me:dokku.me
|
||||||
git push dokku main:master
|
git push dokku main
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ By default, Dokku will deploy the renamed app, though you can skip the deploy by
|
|||||||
dokku apps:rename --skip-deploy node-js-app io-js-app
|
dokku apps:rename --skip-deploy node-js-app io-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to also change your git remote on your local machine in order to make `git push dokku main:master` work again. For this you can use `git remote set-url`.
|
Remember to also change your git remote on your local machine in order to make `git push dokku main` work again. For this you can use `git remote set-url`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git remote set-url dokku dokku@dokku.me:io-js-app
|
git remote set-url dokku dokku@dokku.me:io-js-app
|
||||||
|
|||||||
@@ -60,8 +60,10 @@ dokku builder:set node-js-app selected pack
|
|||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `project.toml` file to use for a given app. This can be done via the `builder-pack:set` command. If a value other than `project.toml` is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `project.toml`.
|
When deploying a monorepo, it may be desirable to specify the specific path of the `project.toml` file to use for a given app. This can be done via the `builder-pack:set` command. If a value other than `project.toml` is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `project.toml`.
|
||||||
|
|
||||||
|
For deploys via the `git:from-image` and `git:load-image` commands, the `project.toml` is extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `project.toml` extracted directly from the source code. Both cases will respect the configured `projecttoml-path` property value.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku builder-pack:set node-js-app projecttoml-path project2.toml
|
dokku builder-pack:set node-js-app projecttoml-path .dokku/project.toml
|
||||||
```
|
```
|
||||||
|
|
||||||
The default value may be set by passing an empty value for the option:
|
The default value may be set by passing an empty value for the option:
|
||||||
@@ -134,7 +136,7 @@ project2.toml
|
|||||||
|
|
||||||
> New as of 0.23.0
|
> New as of 0.23.0
|
||||||
|
|
||||||
The default stack builder in use by CNB buildpacks in Dokku is based on `heroku/buildpacks`. Users may desire to switch the stack builder to a custom version, either to update the operating system or to customize packages included with the stack builder. This can be performed via the `buildpacks:set-property` command.
|
The default stack builder in use by CNB buildpacks in Dokku is based on `heroku/builder:22`. Users may desire to switch the stack builder to a custom version, either to update the operating system or to customize packages included with the stack builder. This can be performed via the `buildpacks:set-property` command.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku buildpacks:set-property node-js-app stack paketobuildpacks/build:base-cnb
|
dokku buildpacks:set-property node-js-app stack paketobuildpacks/build:base-cnb
|
||||||
@@ -148,7 +150,7 @@ dokku buildpacks:set-property node-js-app stack
|
|||||||
|
|
||||||
A change in the stack builder value will execute the `post-stack-set` trigger.
|
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||||
|
|
||||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_BUILDER` environment variable (`heroku/buildpacks` by default).
|
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_BUILDER` environment variable (`heroku/builder:22` by default).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# set globally
|
# set globally
|
||||||
@@ -157,3 +159,7 @@ dokku buildpacks:set-property --global stack paketobuildpacks/build:base-cnb
|
|||||||
# unset globally
|
# unset globally
|
||||||
dokku buildpacks:set-property --global stack
|
dokku buildpacks:set-property --global stack
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Specifying commands via Procfile
|
||||||
|
|
||||||
|
See the [Procfile documentation](/docs/processes/process-management.md#procfile) for more information on how to specify different processes for your app.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Dokku will only select the `dockerfile` builder if both the `herokuish` and `pac
|
|||||||
If an application was previously deployed via buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
If an application was previously deployed via buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
dokku proxy:clear node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
### Changing the `Dockerfile` location
|
### Changing the `Dockerfile` location
|
||||||
@@ -38,6 +38,8 @@ dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
|||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `Dockerfile` file to use for a given app. This can be done via the `builder-dockerfile:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
When deploying a monorepo, it may be desirable to specify the specific path of the `Dockerfile` file to use for a given app. This can be done via the `builder-dockerfile:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
||||||
|
|
||||||
|
For git push, `git:from-archive`, and `git:sync` workflows, the `Dockerfile` is extracted directly from the source code, respecting the configured `dockerfile-path` property value.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku builder-dockerfile:set node-js-app dockerfile-path Dockerfile2
|
dokku builder-dockerfile:set node-js-app dockerfile-path Dockerfile2
|
||||||
```
|
```
|
||||||
@@ -112,10 +114,10 @@ Dockerfile2
|
|||||||
|
|
||||||
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
||||||
|
|
||||||
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](/docs/advanced-usage/docker-options.md):
|
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](/docs/advanced-usage/docker-options.md). All environment variables set by the `config` plugin are automatically exported during a docker build, and thus `--build-arg` only requires setting a key without a value.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
dokku docker-options:add node-js-app build '--build-arg NODE_ENV'
|
||||||
```
|
```
|
||||||
|
|
||||||
Once set, the Dockerfile usage would be as follows:
|
Once set, the Dockerfile usage would be as follows:
|
||||||
@@ -148,18 +150,18 @@ ENV NODE_ENV ${NODE_ENV}
|
|||||||
RUN echo $NODE_ENV
|
RUN echo $NODE_ENV
|
||||||
```
|
```
|
||||||
|
|
||||||
### Building images with Docker Buildkit
|
### Building images with Docker BuildKit
|
||||||
|
|
||||||
If your Dockerfile is using Docker engine's [buildkit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set. Additionally, complete build log output can be forced via `BUILDKIT_PROGRESS=plain`. Both of these environment variables can be set as follows:
|
If your Dockerfile is using Docker Engine's [BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set (unless you're using Docker Engine v24 or higher, which [uses BuildKit by default](https://docs.docker.com/build/buildkit/#getting-started)). Additionally, complete build log output can be forced via `BUILDKIT_PROGRESS=plain`. Both of these environment variables can be set as follows:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/default/dokku
|
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/default/dokku
|
||||||
echo "export BUILDKIT_PROGRESS=plain" | sudo tee -a /etc/default/dokku
|
echo "export BUILDKIT_PROGRESS=plain" | sudo tee -a /etc/default/dokku
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Buildkit directory caching
|
#### BuildKit directory caching
|
||||||
|
|
||||||
Buildkit implements the `RUN --mount` option, enabling mount directory caches for `RUN` directives. The following is an example that mounts debian packaging related directories, which can speed up fetching of remote package data.
|
BuildKit implements the `RUN --mount` option, enabling mount directory caches for `RUN` directives. The following is an example that mounts debian packaging related directories, which can speed up fetching of remote package data.
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM debian:latest
|
FROM debian:latest
|
||||||
@@ -196,32 +198,7 @@ Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disa
|
|||||||
|
|
||||||
> New as of 0.5.0
|
> New as of 0.5.0
|
||||||
|
|
||||||
You can also customize the run command using a `Procfile`, much like you would on Heroku or
|
See the [Procfile documentation](/docs/processes/process-management.md#procfile) for more information on how to specify different processes for your app.
|
||||||
with a buildpack deployed app. The `Procfile` should contain one or more lines defining [process types and associated commands](https://devcenter.heroku.com/articles/procfile#declaring-process-types).
|
|
||||||
When you deploy your app, a Docker image will be built. The `Procfile` will be extracted from the image
|
|
||||||
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
|
||||||
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
|
||||||
|
|
||||||
```Procfile
|
|
||||||
web: bin/run-prod.sh
|
|
||||||
worker: bin/run-worker.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
And `Dockerfile`:
|
|
||||||
|
|
||||||
```Dockerfile
|
|
||||||
FROM ubuntu:20.04
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . ./
|
|
||||||
CMD ["bin/run-dev.sh"]
|
|
||||||
```
|
|
||||||
|
|
||||||
When you deploy this app the `web` process will automatically be scaled to 1 and your Docker container
|
|
||||||
will be started basically using the command `docker run bin/run-prod.sh`. If you want to also run
|
|
||||||
a worker container for this app, you can run `dokku ps:scale worker=1` and a new container will be
|
|
||||||
started by running `docker run bin/run-worker.sh` (the actual `docker run` commands are a bit more
|
|
||||||
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
|
||||||
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
|
||||||
|
|
||||||
### Exposed ports
|
### Exposed ports
|
||||||
|
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ dokku buildpacks:set-property node-js-app stack
|
|||||||
|
|
||||||
A change in the stack builder value will execute the `post-stack-set` trigger.
|
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||||
|
|
||||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_IMAGE` environment variable (`gliderlabs/herokuish:latest-20` by default).
|
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_IMAGE` environment variable (`gliderlabs/herokuish:latest-22` by default).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# set globally
|
# set globally
|
||||||
@@ -213,18 +213,18 @@ dokku buildpacks:report
|
|||||||
|
|
||||||
```
|
```
|
||||||
=====> node-js-app buildpacks information
|
=====> node-js-app buildpacks information
|
||||||
Buildpacks computed stack: gliderlabs/herokuish:v0.5.23-20
|
Buildpacks computed stack: gliderlabs/herokuish:v0.7.0-22
|
||||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
Buildpacks global stack: gliderlabs/herokuish:latest-22
|
||||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||||
Buildpacks stack: gliderlabs/herokuish:v0.5.23-20
|
Buildpacks stack: gliderlabs/herokuish:v0.7.0-20
|
||||||
=====> python-sample buildpacks information
|
=====> python-sample buildpacks information
|
||||||
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
Buildpacks computed stack: gliderlabs/herokuish:latest-22
|
||||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
Buildpacks global stack: gliderlabs/herokuish:latest-22
|
||||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
||||||
Buildpacks stack:
|
Buildpacks stack:
|
||||||
=====> ruby-sample buildpacks information
|
=====> ruby-sample buildpacks information
|
||||||
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
Buildpacks computed stack: gliderlabs/herokuish:latest-22
|
||||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
Buildpacks global stack: gliderlabs/herokuish:latest-22
|
||||||
Buildpacks list:
|
Buildpacks list:
|
||||||
Buildpacks stack:
|
Buildpacks stack:
|
||||||
```
|
```
|
||||||
@@ -301,7 +301,7 @@ false
|
|||||||
If an application was previously deployed via Dockerfile, the following commands should be run before a buildpack deploy will succeed:
|
If an application was previously deployed via Dockerfile, the following commands should be run before a buildpack deploy will succeed:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
dokku ports:clear node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using a specific buildpack version
|
### Using a specific buildpack version
|
||||||
@@ -322,31 +322,6 @@ This will use the latest commit on the `master` branch of the specified buildpac
|
|||||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
|
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||||
```
|
```
|
||||||
|
|
||||||
### Specifying commands via Procfile
|
|
||||||
|
|
||||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
|
||||||
|
|
||||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
|
||||||
|
|
||||||
The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
|
|
||||||
|
|
||||||
If the file exists, it should not be empty, as doing so may result in a failed deploy.
|
|
||||||
|
|
||||||
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
|
|
||||||
|
|
||||||
```
|
|
||||||
<process type>: <command>
|
|
||||||
```
|
|
||||||
|
|
||||||
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
|
|
||||||
|
|
||||||
```Procfile
|
|
||||||
worker: env QUEUE=* bundle exec rake resque:work
|
|
||||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
|
||||||
```
|
|
||||||
|
|
||||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
|
||||||
|
|
||||||
### `curl` build timeouts
|
### `curl` build timeouts
|
||||||
|
|
||||||
Certain buildpacks may time out in retrieving dependencies via `curl`. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a `curl` command.
|
Certain buildpacks may time out in retrieving dependencies via `curl`. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a `curl` command.
|
||||||
@@ -361,3 +336,7 @@ dokku config:set --global CURL_CONNECT_TIMEOUT=180
|
|||||||
### Clearing buildpack cache
|
### Clearing buildpack cache
|
||||||
|
|
||||||
See the [repository management documentation](/docs/advanced-usage/repository-management.md#clearing-app-cache) for more information on how to clear buildpack build cache for an application.
|
See the [repository management documentation](/docs/advanced-usage/repository-management.md#clearing-app-cache) for more information on how to clear buildpack build cache for an application.
|
||||||
|
|
||||||
|
### Specifying commands via Procfile
|
||||||
|
|
||||||
|
See the [Procfile documentation](/docs/processes/process-management.md#procfile) for more information on how to specify different processes for your app.
|
||||||
|
|||||||
@@ -43,8 +43,10 @@ The `lambda` builder plugin delegates all build logic to [lambda-builder](https:
|
|||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `lambda.yml` file to use for a given app. This can be done via the `builder-lambda:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
When deploying a monorepo, it may be desirable to specify the specific path of the `lambda.yml` file to use for a given app. This can be done via the `builder-lambda:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
||||||
|
|
||||||
|
For deploys via the `git:from-image` and `git:load-image` commands, the `lambda.yml` is extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `lambda.yml` extracted directly from the source code. Both cases will respect the configured `lambdayml-path` property value.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku builder-lambda:set node-js-app lambdayml-path lambda2.yml
|
dokku builder-lambda:set node-js-app lambdayml-path .dokku/lambda.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
The default value may be set by passing an empty value for the option:
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|||||||
@@ -160,19 +160,6 @@ dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "
|
|||||||
|
|
||||||
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
|
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
|
||||||
|
|
||||||
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:from-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.
|
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
|
```shell
|
||||||
@@ -248,19 +235,6 @@ The `git:load-image` command can optionally take a git `user.name` and `user.ema
|
|||||||
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"
|
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.
|
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
|
```shell
|
||||||
|
|||||||
@@ -82,15 +82,9 @@ Note that increasing the value of `parallel-schedule-count` may significantly im
|
|||||||
|
|
||||||
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
|
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
|
||||||
|
|
||||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
|
||||||
|
|
||||||
- Buildpacks: `/app/app.json`
|
|
||||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
|
||||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
|
||||||
|
|
||||||
The `formation` key should be specified as follows in the `app.json` file:
|
The `formation` key should be specified as follows in the `app.json` file:
|
||||||
|
|
||||||
```Procfile
|
```json
|
||||||
{
|
{
|
||||||
"formation": {
|
"formation": {
|
||||||
"web": {
|
"web": {
|
||||||
@@ -107,6 +101,8 @@ Omitting or removing the entry will result in parallelism for that process type
|
|||||||
|
|
||||||
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||||
|
|
||||||
|
See the [app.json location documentation](/docs/advanced-usage/deployment-tasks.md#changing-the-appjson-location) for more information on where to place your `app.json` file.
|
||||||
|
|
||||||
## Scheduler Interface
|
## Scheduler Interface
|
||||||
|
|
||||||
The following sections describe implemented scheduler functionality for the `docker-local` scheduler.
|
The following sections describe implemented scheduler functionality for the `docker-local` scheduler.
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ dokku ssh-keys:list --format json admin
|
|||||||
|
|
||||||
### Adding SSH keys
|
### Adding SSH keys
|
||||||
|
|
||||||
You can add your public key to Dokku with the `ssh-keys:add` command. The output will be the fingerprint of the SSH key:
|
You can add your public key to Dokku with the `ssh-keys:add` command. The path specified must contain your desired public ssh key contents and must exist on the server. Any special characters - such as `~` - are interpreted under the `dokku` user context. The output will be the fingerprint of the SSH key:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
||||||
@@ -72,6 +72,26 @@ SHA256:ABC123ABC123+abc123abc123Zabc123abcZ123abc
|
|||||||
|
|
||||||
> `KEY_NAME` is a unique name which is used to identify public keys. Attempting to re-use a key name will result in an error. The SSH (Git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all its actions.
|
> `KEY_NAME` is a unique name which is used to identify public keys. Attempting to re-use a key name will result in an error. The SSH (Git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all its actions.
|
||||||
|
|
||||||
|
Alternatively, you may pipe the contents of your ssh key via `cat` or `echo` into the `ssh-keys:add` command instead of specifying a path to the ssh key:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo "$CONTENTS_OF_YOUR_PUBLIC_SSH_KEY_HERE" | dokku ssh-keys:add KEY_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
SHA256:ABC123ABC123+abc123abc123Zabc123abcZ123abc
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cat path/to/id_rsa.pub | dokku ssh-keys:add KEY_NAME
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
SHA256:ABC123ABC123+abc123abc123Zabc123abcZ123abc
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Admin users and root can add keys remotely by specifying the `dokku` bin on their `ssh` command:
|
Admin users and root can add keys remotely by specifying the `dokku` bin on their `ssh` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ checks:skip <app> [process-type(s)] Skip zero-downtime checks for all proc
|
|||||||
|
|
||||||
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
|
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
|
||||||
|
|
||||||
You may both create user-defined checks for web processes using a `CHECKS` file, as well as customize any and all parts of this experience using the checks plugin.
|
You may both create user-defined checks for web processes using the `healthchecks` key in the `app.json` file, as well as customize any and all parts of this experience using the checks plugin.
|
||||||
|
|
||||||
> Web checks are performed via `curl` on Dokku host. Some application code - such
|
> Web checks are performed via `curl` on Dokku host. Some application code - such
|
||||||
> as the Django framework - checks for specific hostnames or header values, these
|
> as the Django framework - checks for specific hostnames or header values, these
|
||||||
@@ -42,7 +42,7 @@ There are certain settings that can be configured via environment variables:
|
|||||||
- `DOKKU_DEFAULT_CHECKS_WAIT`: (default: `10`) If no user-defined checks are specified - or if the process being checked is not a `web` process - this is the period of time Dokku will wait before checking that a container is still running.
|
- `DOKKU_DEFAULT_CHECKS_WAIT`: (default: `10`) If no user-defined checks are specified - or if the process being checked is not a `web` process - this is the period of time Dokku will wait before checking that a container is still running.
|
||||||
- `DOKKU_DOCKER_STOP_TIMEOUT`: (default: `10`) Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands *also* respect this value. If not specified, the Docker defaults for the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.
|
- `DOKKU_DOCKER_STOP_TIMEOUT`: (default: `10`) Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands *also* respect this value. If not specified, the Docker defaults for the [`docker stop` command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.
|
||||||
|
|
||||||
The following settings may also be specified in the `CHECKS` file, though are available as environment variables in order to ease application reuse.
|
The following settings may also be specified in the `app.json` file, though are available as environment variables in order to ease application reuse.
|
||||||
|
|
||||||
- `DOKKU_CHECKS_WAIT`: (default: `5`) Wait this many seconds for the container to start before running checks.
|
- `DOKKU_CHECKS_WAIT`: (default: `5`) Wait this many seconds for the container to start before running checks.
|
||||||
- `DOKKU_CHECKS_TIMEOUT`: (default: `30`) Wait this many seconds for each response before marking it as a failure.
|
- `DOKKU_CHECKS_TIMEOUT`: (default: `30`) Wait this many seconds for each response before marking it as a failure.
|
||||||
@@ -135,97 +135,45 @@ dokku checks:report node-js-app --checks-disabled-list
|
|||||||
|
|
||||||
## Customizing checks
|
## Customizing checks
|
||||||
|
|
||||||
|
> New as of 0.31.0
|
||||||
|
|
||||||
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use Dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use Dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
||||||
|
|
||||||
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, Dokku will fallback to the aforementioned process uptime check.
|
Healthchecks are run against all process from your application's `Procfile`. When no healthcheck is defined, Dokku will fallback to a process uptime check.
|
||||||
|
|
||||||
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
|
One or more healthchecks can be defined in the `app.json` file - see the [deployment task documentation](/docs/advanced-usage/deployment-tasks.md) for more information on how this is extracted - under the `healthchecks.web` path:
|
||||||
|
|
||||||
- check instructions
|
```json
|
||||||
- settings (NAME=VALUE)
|
{
|
||||||
- comments (lines starting with #)
|
"healthchecks": {
|
||||||
- empty lines
|
"web": [
|
||||||
|
{
|
||||||
> For Dockerfile and Docker Image based deploys, the file *must* be in the `WORKDIR` directory of the built image. `/app` is used by default as the root container directory for buildpack-based deploys.
|
"type": "startup",
|
||||||
|
"name": "web check",
|
||||||
### Check instructions
|
"description": "Checking if the app responds to the /health/ready endpoint",
|
||||||
|
"path": "/health/ready",
|
||||||
The format of a check instruction is a path or relative URL, optionally followed by the expected content:
|
"attempts": 3
|
||||||
|
}
|
||||||
```
|
]
|
||||||
/about Our Amazing Team
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The `CHECKS` file can contain multiple checks:
|
A healthcheck entry takes the following properties:
|
||||||
|
|
||||||
```
|
- `attempts`: (default: `3` seconds) Number of retry attempts to perform on failure.
|
||||||
/ My Amazing App
|
- `command`: (default `''` - empty string) Command to execute within container.
|
||||||
/stylesheets/index.css .body
|
- `content`: (default: `''` - empty string) Content to search in http path check output.
|
||||||
/scripts/index.js $(function()
|
initialDelay default: 0, unit: seconds) Number of seconds to wait after a container has started before triggering the healthcheck.
|
||||||
/images/logo.png
|
- `name`: (default: autogenerated) The name of the healthcheck. If unspecified, it will be autogenerated from the rest of the healthcheck information.
|
||||||
```
|
- `path`: (default: `/` - for http checks): An http path to check.
|
||||||
|
- `timeout`: (default: `5` seconds): Number of seconds to wait before timing out a healthcheck.
|
||||||
|
- `type`: (default: `""` - none): Type of the healthcheck. Options: liveness, readiness, startup.
|
||||||
|
- `uptime`: (default: `""` - none): Amount of time the container must be alive before the container is considered healthy. Any restarts will cause this to check to fail, and this check does not respect retries.
|
||||||
|
- `wait`: (default: `5` seconds): Number of seconds to wait between healthcheck attempts.
|
||||||
|
|
||||||
To check an application that supports multiple hostnames, use relative URLs that include the hostname:
|
> Warning: Healthchecks are implemented by specific scheduler plugins, and not all plugins support all options. Please consult the scheduler documentation for further details on what is supported.
|
||||||
|
|
||||||
```
|
See the [docker-container-healthchecker](https://github.com/dokku/docker-container-healthchecker) documentation for more details on how healthchecks are interpreted.
|
||||||
//admin.dokku.me Admin Dashboard
|
|
||||||
//static.dokku.me/logo.png
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also specify the protocol to explicitly check HTTPS requests:
|
|
||||||
|
|
||||||
```
|
|
||||||
https://admin.dokku.me Admin Dashboard
|
|
||||||
https://static.dokku.me/logo.png
|
|
||||||
```
|
|
||||||
|
|
||||||
While a full URL may be used in order to invoke checks, if you are using relative URLs, the port *must* be omitted.
|
|
||||||
|
|
||||||
> Changed as of 0.22.5
|
|
||||||
|
|
||||||
Please note that dollar sign bracket characters (`{` and `}`) must be escaped when used within a `CHECKS` file. Escaping follows golang template rules. The proper way to do this is via one of the following methods:
|
|
||||||
|
|
||||||
```
|
|
||||||
# escaping the `{` character
|
|
||||||
# using double-quotes
|
|
||||||
{{"{"}}
|
|
||||||
|
|
||||||
# using raw string constants
|
|
||||||
{{`{`}}
|
|
||||||
|
|
||||||
# escaping the `}` character
|
|
||||||
# using double-quotes
|
|
||||||
{{"}"}}
|
|
||||||
|
|
||||||
# using raw string constants
|
|
||||||
{{`}`}}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Templating Checks Files
|
|
||||||
|
|
||||||
> New as of 0.22.5
|
|
||||||
|
|
||||||
An app's `CHECKS` file is sent through a single pass of the [`sigil`](https://github.com/gliderlabs/sigil/) templating tool. This enables usage of Golang templating within application `CHECKS` files. In addition to general templating access, access to app environment variables is also allowed via the `var` function:
|
|
||||||
|
|
||||||
```
|
|
||||||
{{ var "SOME_ENV_VAR" }}
|
|
||||||
```
|
|
||||||
|
|
||||||
This may be useful if certain zero-downtime checks require access to an app-specific value, such as a domain name.
|
|
||||||
|
|
||||||
### Check settings
|
|
||||||
|
|
||||||
The default behavior is to wait for `5` seconds before running the checks, to timeout the checks after `30` seconds, and to attempt the checks `5` times. If the checks fail `5` times, the deployment is considered failed and the old container will continue serving traffic.
|
|
||||||
|
|
||||||
You can change the default behavior by setting `WAIT`, `TIMEOUT`, and `ATTEMPTS` to different values in the `CHECKS` file:
|
|
||||||
|
|
||||||
```
|
|
||||||
WAIT=30 # Wait 1/2 minute
|
|
||||||
TIMEOUT=60 # Timeout after a minute
|
|
||||||
ATTEMPTS=10 # Attempt checks 10 times
|
|
||||||
|
|
||||||
/ My Amazing App
|
|
||||||
```
|
|
||||||
|
|
||||||
## Manually invoking checks
|
## Manually invoking checks
|
||||||
|
|
||||||
@@ -312,182 +260,3 @@ dokku checks:run node-js-app web.3
|
|||||||
-----> Running pre-flight checks
|
-----> Running pre-flight checks
|
||||||
Invalid container id specified (APP.web.3)
|
Invalid container id specified (APP.web.3)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example: Successful Rails deployment
|
|
||||||
|
|
||||||
In this example, a Rails application is successfully deployed to Dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful. `WAIT` is set to `10` because our application takes a while to boot up. `ATTEMPTS` is set to `6`, but the third attempt succeeds.
|
|
||||||
|
|
||||||
### Successful `CHECKS` file
|
|
||||||
|
|
||||||
```
|
|
||||||
WAIT=10
|
|
||||||
ATTEMPTS=6
|
|
||||||
/check.txt simple_check
|
|
||||||
```
|
|
||||||
|
|
||||||
For this check to work, we've added a line to `config/routes.rb` that simply returns a string:
|
|
||||||
|
|
||||||
```
|
|
||||||
get '/check.txt', to: proc {[200, {}, ['simple_check']]}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Successful deploy output
|
|
||||||
|
|
||||||
> Note: The output has been trimmed for brevity.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git push dokku master
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Cleaning up...
|
|
||||||
-----> Building node-js-app from herokuish...
|
|
||||||
-----> Adding BUILD_ENV to build environment...
|
|
||||||
-----> Ruby app detected
|
|
||||||
-----> Compiling Ruby/Rails
|
|
||||||
-----> Using Ruby version: ruby-2.0.0
|
|
||||||
|
|
||||||
.....
|
|
||||||
|
|
||||||
-----> Discovering process types
|
|
||||||
Procfile declares types -> web
|
|
||||||
-----> Releasing node-js-app...
|
|
||||||
-----> Deploying node-js-app...
|
|
||||||
-----> Running pre-flight checks
|
|
||||||
-----> Attempt 1/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/check.txt => "simple_check"
|
|
||||||
!
|
|
||||||
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
|
||||||
! Check attempt 1/6 failed.
|
|
||||||
-----> Attempt 2/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/check.txt => "simple_check"
|
|
||||||
!
|
|
||||||
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
|
||||||
! Check attempt 2/6 failed.
|
|
||||||
-----> Attempt 3/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/check.txt => "simple_check"
|
|
||||||
-----> All checks successful!
|
|
||||||
=====> node-js-app container output:
|
|
||||||
=> Booting Thin
|
|
||||||
=> Rails 4.2.0 application starting in production on http://0.0.0.0:5000
|
|
||||||
=> Run `rails server -h` for more startup options
|
|
||||||
=> Ctrl-C to shutdown server
|
|
||||||
Thin web server (v1.6.3 codename Protein Powder)
|
|
||||||
Maximum connections set to 1024
|
|
||||||
Listening on 0.0.0.0:5000, CTRL+C to stop
|
|
||||||
=====> end node-js-app container output
|
|
||||||
-----> Running post-deploy
|
|
||||||
-----> Configuring myapp.dokku.me...
|
|
||||||
-----> Creating http nginx.conf
|
|
||||||
Reloading nginx
|
|
||||||
-----> Shutting down old container in 60 seconds
|
|
||||||
=====> Application deployed:
|
|
||||||
http://myapp.dokku.me
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example: Failing Rails deployment
|
|
||||||
|
|
||||||
In this example, a Rails application fails to deploy. The reason for the failure is that the PostgreSQL database connection fails. The initial checks will fail while we wait for the server to start up, just like in the above example. However, once the server does start accepting connections, we will see an error 500 due to the PostgreSQL database connection failure.
|
|
||||||
|
|
||||||
Once the attempts have been exceeded, the deployment fails and we see the container output, which shows the PostgreSQL connection errors.
|
|
||||||
|
|
||||||
### Failing `CHECKS` file
|
|
||||||
|
|
||||||
```
|
|
||||||
WAIT=10
|
|
||||||
ATTEMPTS=6
|
|
||||||
/
|
|
||||||
```
|
|
||||||
|
|
||||||
> The check to the root url `/` would normally access the database.
|
|
||||||
|
|
||||||
### Failing deploy output
|
|
||||||
|
|
||||||
> Note: The output has been trimmed for brevity.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
git push dokku master
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Cleaning up...
|
|
||||||
-----> Building node-js-app from herokuish...
|
|
||||||
-----> Adding BUILD_ENV to build environment...
|
|
||||||
-----> Ruby app detected
|
|
||||||
-----> Compiling Ruby/Rails
|
|
||||||
-----> Using Ruby version: ruby-2.0.0
|
|
||||||
|
|
||||||
.....
|
|
||||||
|
|
||||||
Discovering process types
|
|
||||||
Procfile declares types -> web
|
|
||||||
Releasing node-js-app...
|
|
||||||
Deploying node-js-app...
|
|
||||||
Running pre-flight checks
|
|
||||||
-----> Attempt 1/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
|
|
||||||
! Check attempt 1/6 failed.
|
|
||||||
-----> Attempt 2/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
|
|
||||||
! Check attempt 2/6 failed.
|
|
||||||
-----> Attempt 3/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
|
||||||
! Check attempt 3/6 failed.
|
|
||||||
-----> Attempt 4/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
|
||||||
! Check attempt 4/6 failed.
|
|
||||||
-----> Attempt 5/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
|
||||||
! Check attempt 5/6 failed.
|
|
||||||
-----> Attempt 6/6 Waiting for 10 seconds ...
|
|
||||||
CHECKS expected result:
|
|
||||||
http://localhost/ => ""
|
|
||||||
!
|
|
||||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
|
||||||
Could not start due to 1 failed checks.
|
|
||||||
! Check attempt 6/6 failed.
|
|
||||||
=====> node-js-app container output:
|
|
||||||
=> Booting Thin
|
|
||||||
=> Rails 4.2.0 application starting in production on http://0.0.0.0:5000
|
|
||||||
=> Run `rails server -h` for more startup options
|
|
||||||
=> Ctrl-C to shutdown server
|
|
||||||
Thin web server (v1.6.3 codename Protein Powder)
|
|
||||||
Maximum connections set to 1024
|
|
||||||
Listening on 0.0.0.0:5000, CTRL+C to stop
|
|
||||||
Started GET "/" for 172.17.42.1 at 2015-03-26 21:36:47 +0000
|
|
||||||
Is the server running on host "172.17.42.1" and accepting
|
|
||||||
TCP/IP connections on port 5431?
|
|
||||||
PG::ConnectionBad (could not connect to server: Connection refused
|
|
||||||
Is the server running on host "172.17.42.1" and accepting
|
|
||||||
TCP/IP connections on port 5431?
|
|
||||||
):
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
|
|
||||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection
|
|
||||||
=====> end node-js-app container output
|
|
||||||
/usr/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
|
|
||||||
To dokku@dokku.me:myapp
|
|
||||||
! [remote rejected] dokku -> master (pre-receive hook declined)
|
|
||||||
error: failed to push some refs to 'dokku@dokku.me:myapp'
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ if ! command -v "nginx" &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# `which` example
|
# `which` example
|
||||||
if ! which nginx >/dev/null 2>&1; then
|
if ! which nginx &>/dev/null; then
|
||||||
dokku_log_fail "Missing nginx, install it"
|
dokku_log_fail "Missing nginx, install it"
|
||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -104,6 +104,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `app-json-get-content`
|
||||||
|
|
||||||
|
- Description: Outputs the contents of the app-json file, if any
|
||||||
|
- Invoked by: Deployment checks
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `app-maybe-create`
|
### `app-maybe-create`
|
||||||
|
|
||||||
- Description: Creates an app (gated by whether this is globally enabled or not)
|
- Description: Creates an app (gated by whether this is globally enabled or not)
|
||||||
@@ -297,6 +312,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `certs-force`
|
||||||
|
|
||||||
|
- Description: Echos `true` if a cert should be simulated for the app, no output otherwise
|
||||||
|
- Invoked by:
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `check-deploy`
|
### `check-deploy`
|
||||||
|
|
||||||
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
|
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
|
||||||
@@ -599,6 +629,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
echo 'derp.dkr.ecr.us-east-1.amazonaws.com'
|
echo 'derp.dkr.ecr.us-east-1.amazonaws.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `deploy-source-set`
|
||||||
|
|
||||||
|
- Description: Used to set metadata about how the app is being deployed
|
||||||
|
- Invoked by: `git:from-archive`, `git:from-image`, `git:load-image`, `git:sync`, and all git push commands
|
||||||
|
- Arguments: `$APP $SOURCE_TYPE $METADATA`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `docker-args-build`
|
### `docker-args-build`
|
||||||
|
|
||||||
> Warning: Deprecated, please use `docker-args-process-build` instead
|
> Warning: Deprecated, please use `docker-args-process-build` instead
|
||||||
@@ -1006,21 +1051,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
### `network-compute-ports`
|
|
||||||
|
|
||||||
- Description: Computes the ports for a given app container
|
|
||||||
- Invoked by: `internally triggered by proxy-build-config within proxy implementations`
|
|
||||||
- Arguments: `$APP $PROC_TYPE $IS_HEROKUISH_CONTAINER $CONTAINER_INDEX`
|
|
||||||
- Example:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
||||||
|
|
||||||
# TODO
|
|
||||||
```
|
|
||||||
|
|
||||||
### `network-config-exists`
|
### `network-config-exists`
|
||||||
|
|
||||||
- Description: Returns whether the network configuration for a given app exists
|
- Description: Returns whether the network configuration for a given app exists
|
||||||
@@ -1066,21 +1096,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
### `network-get-port`
|
|
||||||
|
|
||||||
- Description: Return the port for a given app container
|
|
||||||
- Invoked by: `internally triggered by a deploy`
|
|
||||||
- Arguments: `$APP $PROCESS_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
|
||||||
- Example:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|
||||||
|
|
||||||
# TODO
|
|
||||||
```
|
|
||||||
|
|
||||||
### `network-get-property`
|
### `network-get-property`
|
||||||
|
|
||||||
- Description: Return the value for an app's network property
|
- Description: Return the value for an app's network property
|
||||||
@@ -1226,6 +1241,97 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
nginx -t
|
nginx -t
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `ports-clear`
|
||||||
|
|
||||||
|
- Description: Clears the ports for a given app without triggering further restarts or rebuilds
|
||||||
|
- Invoked by: internally
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
|
### `ports-configure`
|
||||||
|
|
||||||
|
- Description: Configures the initial proxy ports
|
||||||
|
- Invoked by: `internally triggered by proxy plugins`
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
|
### `ports-get`
|
||||||
|
|
||||||
|
- Description: Returns a list of port mappings, newline delimited
|
||||||
|
- Invoked by: Various networking plugins
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
|
### `ports-get-available`
|
||||||
|
|
||||||
|
- Description: Prints out an available port greater than 1024
|
||||||
|
- Invoked by: Various networking plugins
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
|
### `ports-get-property`
|
||||||
|
|
||||||
|
- Description: Return the value for an app's ports property
|
||||||
|
- Invoked by:
|
||||||
|
- Arguments: `$APP $KEY`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
APP="$1"; PROPERTY="$2"
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
|
### `ports-set-detected`
|
||||||
|
|
||||||
|
- Description: Allows builders to specify detected port mappings for a given app
|
||||||
|
- Invoked by: Builder plugins
|
||||||
|
- Arguments: `$APP [$PORT_MAPPING...]`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `post-app-clone`
|
### `post-app-clone`
|
||||||
|
|
||||||
- Description: Allows you to run commands after an app was cloned.
|
- Description: Allows you to run commands after an app was cloned.
|
||||||
@@ -1388,7 +1494,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
- Description: This trigger should be used to do stuff to containers after they are created but before they are started. They are explicitely for commands that may involve network traffic, and _not_ for commands that are self-contained, such as chown or tar.
|
- Description: This trigger should be used to do stuff to containers after they are created but before they are started. They are explicitely for commands that may involve network traffic, and _not_ for commands that are self-contained, such as chown or tar.
|
||||||
- Invoked by: `dokku run`, `dokku ps:rebuild`, `dokku deploy`
|
- Invoked by: `dokku run`, `dokku ps:rebuild`, `dokku deploy`
|
||||||
- Arguments "app|service" "$CONTAINER_ID" "$APP|$SERVICE" "$PHASE"
|
- Arguments: "app|service" "$CONTAINER_ID" "$APP|$SERVICE" "$PHASE"
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
@@ -1498,8 +1604,8 @@ popd &>/dev/null
|
|||||||
|
|
||||||
### `post-proxy-ports-update`
|
### `post-proxy-ports-update`
|
||||||
|
|
||||||
- Description: Allows you to run commands once the proxy port mappings for an app have been updated. It also sends the invoking command. This can be "add", "clear" or "remove".
|
- Description: Allows you to run commands once the port mappings for an app have been updated. It also sends the invoking command. This can be "add", "clear" or "remove".
|
||||||
- Invoked by: `dokku proxy:ports-add`, `dokku proxy:ports-clear`, `dokku proxy:ports-remove`
|
- Invoked by: `dokku ports:add`, `dokku ports:clear`, `dokku ports:remove`
|
||||||
- Arguments: `$APP` `action name`
|
- Arguments: `$APP` `action name`
|
||||||
- Example:
|
- Example:
|
||||||
|
|
||||||
@@ -1715,7 +1821,7 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
|||||||
dokku_log_info1 "Installing GraphicsMagick..."
|
dokku_log_info1 "Installing GraphicsMagick..."
|
||||||
|
|
||||||
CMD="cat > gm && \
|
CMD="cat > gm && \
|
||||||
dpkg -s graphicsmagick >/dev/null 2>&1 || \
|
dpkg -s graphicsmagick &>/dev/null || \
|
||||||
(apt-get update -qq && apt-get -qq -y --no-install-recommends install graphicsmagick && apt-get clean)"
|
(apt-get update -qq && apt-get -qq -y --no-install-recommends install graphicsmagick && apt-get clean)"
|
||||||
|
|
||||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||||
@@ -1810,6 +1916,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
# TODO
|
# TODO
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `procfile-exists`
|
||||||
|
|
||||||
|
- Description: Checks if a procfile exists for the specified app
|
||||||
|
- Invoked by: `internally`
|
||||||
|
- Arguments: `$APP`
|
||||||
|
- Example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
```
|
||||||
|
|
||||||
### `proxy-build-config`
|
### `proxy-build-config`
|
||||||
|
|
||||||
- Description: Builds the proxy implementation configuration for a given app
|
- Description: Builds the proxy implementation configuration for a given app
|
||||||
@@ -1842,7 +1963,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
|||||||
|
|
||||||
### `proxy-configure-ports`
|
### `proxy-configure-ports`
|
||||||
|
|
||||||
- Description: Configures the proxy port mapping
|
> Warning: Deprecated, please use `ports-configure` instead
|
||||||
|
|
||||||
|
- Description: Configures the port mapping
|
||||||
- Invoked by: `internally triggered by proxy plugins`
|
- Invoked by: `internally triggered by proxy plugins`
|
||||||
- Arguments: `$APP`
|
- Arguments: `$APP`
|
||||||
- Example:
|
- Example:
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
|||||||
```shell
|
```shell
|
||||||
# having dokku-arch in ../dokku-arch
|
# having dokku-arch in ../dokku-arch
|
||||||
vagrant up build-arch
|
vagrant up build-arch
|
||||||
# wait for "==> build-arch: ==> Finished making: dokku 0.30.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
# wait for "==> build-arch: ==> Finished making: dokku 0.31.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||||
cd ../dokku-arch
|
cd ../dokku-arch
|
||||||
git add PKGBUILD .SRCINFO
|
git add PKGBUILD .SRCINFO
|
||||||
git commit -m 'Update to dokku 0.9.9'
|
git commit -m 'Update to dokku 0.9.9'
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ You can always install Dokku straight from the latest - potentially unstable - `
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# using a branch results in installing from source
|
# using a branch results in installing from source
|
||||||
wget https://dokku.com/install/master/bootstrap.sh;
|
wget -NP . https://dokku.com/install/master/bootstrap.sh;
|
||||||
sudo DOKKU_BRANCH=master bash 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:
|
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
|
```shell
|
||||||
wget https://dokku.com/install/master/bootstrap.sh;
|
wget -NP . https://dokku.com/install/master/bootstrap.sh;
|
||||||
chmod +x bootstrap.sh
|
chmod +x bootstrap.sh
|
||||||
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
|
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Pull the dokku/dokku image:
|
Pull the dokku/dokku image:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker pull dokku/dokku:0.30.2
|
docker pull dokku/dokku:0.31.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Next, run the image.
|
Next, run the image.
|
||||||
@@ -19,7 +19,7 @@ docker container run \
|
|||||||
--publish 8443:443 \
|
--publish 8443:443 \
|
||||||
--volume /var/lib/dokku:/mnt/dokku \
|
--volume /var/lib/dokku:/mnt/dokku \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
dokku/dokku:0.30.2
|
dokku/dokku:0.31.0
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||||
@@ -61,7 +61,7 @@ redis: https://github.com/dokku/dokku-redis.git
|
|||||||
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.
|
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
|
```Dockerfile
|
||||||
FROM dokku/dokku:0.30.2
|
FROM dokku/dokku:0.31.0
|
||||||
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
|
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
|
||||||
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
|
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# for debian systems, installs Dokku via apt-get
|
# for debian systems, installs Dokku via apt-get
|
||||||
wget https://dokku.com/install/v0.30.2/bootstrap.sh
|
wget -NP . https://dokku.com/install/v0.31.0/bootstrap.sh
|
||||||
sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh
|
sudo DOKKU_TAG=v0.31.0 bash bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||||
|
|||||||
@@ -58,10 +58,8 @@ A value of 64 would allow domains with up to 64 characters. Set it to 128 if you
|
|||||||
Save the file and try stopping nginx and starting it again:
|
Save the file and try stopping nginx and starting it again:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
/etc/init.d/nginx stop
|
dokku nginx:stop
|
||||||
## * Stopping nginx nginx [ OK ]
|
dokku nginx:start
|
||||||
/etc/init.d/nginx start
|
|
||||||
## * Starting nginx nginx [ OK ]
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -74,12 +72,12 @@ For example, if you have an `EXPOSE` directive like so:
|
|||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
```
|
```
|
||||||
|
|
||||||
The proxy port mapping will be `http:8000:8000`.
|
The port mapping will be `http:8000:8000`.
|
||||||
|
|
||||||
To avoid this issue, either of the following can be done:
|
To avoid this issue, either of the following can be done:
|
||||||
|
|
||||||
- Remove `EXPOSE` directive: This will require respecting the `$PORT` environment variable (automatically set by Dokku). Once that change is deployed, the port mapping should be cleared via the `dokku proxy:ports-clear $APP` command (where `$APP` is your app name).
|
- Remove `EXPOSE` directive: This will require respecting the `$PORT` environment variable (automatically set by Dokku). Once that change is deployed, the port mapping should be cleared via the `dokku ports:clear $APP` command (where `$APP` is your app name).
|
||||||
- Update the port mapping: Updating the port mapping to redirect port `80` to your app's exposed port via `dokku proxy:ports-set $APP http:80:$EXPOSED_PORT` can also fix the issue. This will also allow certificate management and the letsencrypt plugin to work correctly.
|
- Update the port mapping: Updating the port mapping to redirect port `80` to your app's exposed port via `dokku ports:set $APP http:80:$EXPOSED_PORT` can also fix the issue. This will also allow certificate management and the letsencrypt plugin to work correctly.
|
||||||
|
|
||||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||||
|
|
||||||
@@ -167,7 +165,11 @@ When specifying your port you may want to use something similar to:
|
|||||||
var port = process.env.PORT || 3000
|
var port = process.env.PORT || 3000
|
||||||
```
|
```
|
||||||
|
|
||||||
Please see https://github.com/dokku/dokku/issues/282.
|
Please see [#282](https://github.com/dokku/dokku/issues/282).
|
||||||
|
|
||||||
|
Additionally, your application should listen/bind to all interfaces (`0.0.0.0`). Many frameworks default to listening on `127.0.0.1`.
|
||||||
|
|
||||||
|
Please see [#5798](https://github.com/dokku/dokku/issues/5798).
|
||||||
|
|
||||||
### Deployment fails because of slow internet connection, messages shows `gzip: stdin: unexpected end of file`.
|
### Deployment fails because of slow internet connection, messages shows `gzip: stdin: unexpected end of file`.
|
||||||
|
|
||||||
@@ -231,16 +233,14 @@ If this solves the issue temporarily, longer term you should consider [configuri
|
|||||||
|
|
||||||
### My application deploys properly, but won't load in browser "connection refused"
|
### My application deploys properly, but won't load in browser "connection refused"
|
||||||
|
|
||||||
This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku proxy:report myapp` to check if your app has the correct proxy configuration. It should show something like the following.
|
This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku ports:report node-js-app` to check if your app has the correct proxy configuration. It should show something like the following.
|
||||||
|
|
||||||
```
|
```
|
||||||
=====> myapp proxy information
|
=====> node-js-app ports information
|
||||||
Proxy enabled: true
|
Port map: http:80:5000 https:443:5000
|
||||||
Proxy port map: http:80:5000 https:443:5000
|
|
||||||
Proxy type: nginx
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Set `dokku proxy:ports-set front http:80:5000` to get proxy correctly configured for http endpoint.
|
Set `dokku ports:set node-js-app http:80:5000` to get proxy correctly configured for http endpoint.
|
||||||
|
|
||||||
### I deployed a new app but now subdomains are miss-routed
|
### I deployed a new app but now subdomains are miss-routed
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||||
|
|
||||||
|
- [Upgrading to 0.31](/docs/appendices/0.31.0-migration-guide.md)
|
||||||
- [Upgrading to 0.30](/docs/appendices/0.30.0-migration-guide.md)
|
- [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.29](/docs/appendices/0.29.0-migration-guide.md)
|
||||||
- [Upgrading to 0.28](/docs/appendices/0.28.0-migration-guide.md)
|
- [Upgrading to 0.28](/docs/appendices/0.28.0-migration-guide.md)
|
||||||
@@ -61,7 +62,7 @@ dokku ps:stopall
|
|||||||
# for versions between 0.8.1 and 0.11.3, use
|
# for versions between 0.8.1 and 0.11.3, use
|
||||||
dokku --quiet apps:list | xargs -L1 dokku ps:stop
|
dokku --quiet apps:list | xargs -L1 dokku ps:stop
|
||||||
|
|
||||||
# for versions versions older than 0.8.1, use
|
# for versions older than 0.8.1, use
|
||||||
dokku --quiet apps | xargs -L1 dokku ps:stop
|
dokku --quiet apps | xargs -L1 dokku ps:stop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -10,26 +10,26 @@
|
|||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
<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.30.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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.31.0/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.31.0/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.31.0/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="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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">
|
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/favicon.ico">
|
||||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||||
<meta name="application-name" content="Dokku">
|
<meta name="application-name" content="Dokku">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-144x144.png">
|
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/browserconfig.xml">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<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">
|
<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.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/style.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/style.css" rel="stylesheet">
|
||||||
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
|
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
<main class="container px-4 px-lg-5">
|
<main class="container px-4 px-lg-5">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-7">
|
<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.30.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.31.0</span></span></a>
|
||||||
<h1 class="text-white hero-heading mt-5">An open source PAAS alternative to Heroku.</h1>
|
<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>
|
<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">
|
<div class="d-flex mt-5">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="line">
|
<p class="line">
|
||||||
<span class="prompt">$</span>
|
<span class="prompt">$</span>
|
||||||
<span class="command">wget https://dokku.com/bootstrap.sh</span>
|
<span class="command">wget -NP . https://dokku.com/bootstrap.sh</span>
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p class="line">
|
<p class="line">
|
||||||
<span class="prompt">$</span>
|
<span class="prompt">$</span>
|
||||||
<span class="command">sudo DOKKU_TAG=v0.30.2 bash bootstrap.sh</span>
|
<span class="command">sudo DOKKU_TAG=v0.31.0 bash bootstrap.sh</span>
|
||||||
</p>
|
</p>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
@@ -418,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;">
|
<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)"/>
|
<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="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.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="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.31.0,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 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="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)"/>
|
<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)"/>
|
||||||
|
|||||||
@@ -161,15 +161,25 @@ Apps will default to being associated with the default `bridge` network or a net
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# associates the network after a container is created but before it is started
|
# associates the network after a container is created but before it is started
|
||||||
|
# commonly used for cross-app networking
|
||||||
dokku network:set node-js-app attach-post-create test-network
|
dokku network:set node-js-app attach-post-create test-network
|
||||||
|
|
||||||
# associates the network after the deploy is successful but before the proxy is updated
|
# associates the network after the deploy is successful but before the proxy is updated
|
||||||
|
# used for cross-app networking when healthchecks must be invoked first
|
||||||
dokku network:set node-js-app attach-post-deploy other-test-network
|
dokku network:set node-js-app attach-post-deploy other-test-network
|
||||||
|
|
||||||
# associates the network at container creation
|
# associates the network at container creation
|
||||||
|
# typically blocks access to services and external routing
|
||||||
dokku network:set node-js-app initial-network global-network
|
dokku network:set node-js-app initial-network global-network
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Multiple networks can also be specified for the `attach-post-create` and `attach-post-deploy` phases.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# one or more networks can be specified
|
||||||
|
dokku network:set node-js-app attach-post-create test-network test-network-2
|
||||||
|
```
|
||||||
|
|
||||||
Setting the `attach` network property to an empty value will de-associate the container with the network.
|
Setting the `attach` network property to an empty value will de-associate the container with the network.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|||||||
@@ -1,37 +1,52 @@
|
|||||||
# Port Management
|
# Port Management
|
||||||
|
|
||||||
> New as of 0.5.0, Enhanced in 0.6.0
|
> New as of 0.31.0, replaces the previous `proxy:ports*` commands
|
||||||
|
|
||||||
```
|
```
|
||||||
proxy:ports <app> # List proxy port mappings for an app
|
ports:list <app> # List port mappings for an app
|
||||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings to an app
|
ports:add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add port mappings to an app
|
||||||
proxy:ports-clear <app> # Clear all proxy port mappings for an app
|
ports:clear <app> # Clear all port mappings for an app
|
||||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Remove specific proxy port mappings from an app
|
ports:remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Remove specific port mappings from an app
|
||||||
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for an app
|
ports:set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set port mappings for an app
|
||||||
```
|
```
|
||||||
|
|
||||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
> Warning: Mapping alternative ports may conflict with the active firewall installed on your server or hosting provider. Such software includes - but is not limited to - AWS Security Groups, iptables, and UFW. Please consult the documentation for those softwares as applicable.
|
> Warning: Mapping alternative ports may conflict with the active firewall installed on your server or hosting provider. Such software includes - but is not limited to - AWS Security Groups, iptables, and UFW. Please consult the documentation for those softwares as applicable.
|
||||||
>
|
>
|
||||||
> Users should also avoid setting the `PORT` environment variable. Dokku will use port mappings to set this value. Overriding this manually may cause issues in application routing.
|
> Users should also avoid setting the `PORT` environment variable. Dokku will use port mappings to set this value. Overriding this manually may cause issues in application routing.
|
||||||
|
|
||||||
> New as of 0.6.0
|
You can now configure `host -> container` port mappings with the `ports:*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
||||||
|
|
||||||
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
|
||||||
|
|
||||||
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
||||||
|
|
||||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` commands detailed below.
|
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `ports:*` commands detailed below.
|
||||||
|
|
||||||
|
### Port Scheme
|
||||||
|
|
||||||
|
The proxy port scheme is as follows:
|
||||||
|
|
||||||
|
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
||||||
|
|
||||||
|
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports the `http`, `https`, `grpc` and `grpcs` schemes.
|
||||||
|
For the `grpc` and `grpcs` see [nginx blog post on grpc](https://www.nginx.com/blog/nginx-1-13-10-grpc/).
|
||||||
|
|
||||||
|
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
||||||
|
|
||||||
|
To change the proxy implementation in use for an application, use the `proxy:set` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# no validation will be performed against
|
||||||
|
# the specified proxy implementation
|
||||||
|
dokku proxy:set node-js-app nginx
|
||||||
|
```
|
||||||
|
|
||||||
### Listing port mappings
|
### Listing port mappings
|
||||||
|
|
||||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
To inspect the port mapping for a given application, use the `ports:list` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku proxy:ports node-js-app
|
dokku ports:list node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -62,15 +77,13 @@ curl http://node-js-app.dokku.me:8080
|
|||||||
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
||||||
```
|
```
|
||||||
|
|
||||||
However, we can use the `proxy:ports-add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
However, we can use the `ports:add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku proxy:ports-add node-js-app http:8080:5000
|
dokku ports:add node-js-app http:8080:5000
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
-----> Setting config vars
|
|
||||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
|
||||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||||
-----> Creating http nginx.conf
|
-----> Creating http nginx.conf
|
||||||
Reloading nginx
|
Reloading nginx
|
||||||
@@ -98,15 +111,13 @@ Hello World!
|
|||||||
|
|
||||||
### Setting all port mappings at once
|
### Setting all port mappings at once
|
||||||
|
|
||||||
Port mappings can also be force set using the `proxy:ports-set` command.
|
Port mappings can also be force set using the `ports:set` command.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku proxy:ports-set node-js-app http:8080:5000
|
dokku ports:set node-js-app http:8080:5000
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
-----> Setting config vars
|
|
||||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
|
||||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||||
-----> Creating http nginx.conf
|
-----> Creating http nginx.conf
|
||||||
Reloading nginx
|
Reloading nginx
|
||||||
@@ -114,21 +125,21 @@ dokku proxy:ports-set node-js-app http:8080:5000
|
|||||||
|
|
||||||
### Removing a port mapping
|
### Removing a port mapping
|
||||||
|
|
||||||
A port mapping can be removed using the `proxy:ports-remove` command if it no longer necessary:
|
A port mapping can be removed using the `ports:remove` command if it no longer necessary:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku proxy:ports-remove node-js-app http:80:5000
|
dokku ports:remove node-js-app http:80:5000
|
||||||
```
|
```
|
||||||
|
|
||||||
Ports may also be removed by specifying only the `host-port` value. This effectively acts as a wildcard and removes all mappings for that particular host port.
|
Ports may also be removed by specifying only the `host-port` value. This effectively acts as a wildcard and removes all mappings for that particular host port.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku proxy:ports-remove node-js-app http:80
|
dokku ports:remove node-js-app http:80
|
||||||
```
|
```
|
||||||
|
|
||||||
## Port management by Deployment Method
|
## Port management by Deployment Method
|
||||||
|
|
||||||
> Warning: If you set a proxy port map but _do not have a global domain set_, Dokku will reset that map upon first deployment.
|
> Warning: If you set a port map but _do not have a global domain set_, Dokku will reset that map upon first deployment.
|
||||||
|
|
||||||
### Buildpacks
|
### Buildpacks
|
||||||
|
|
||||||
@@ -138,7 +149,7 @@ For buildpack deployments, your application _must_ respect the `PORT` environmen
|
|||||||
|
|
||||||
> Changed as of 0.5.0
|
> 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` 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).
|
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
|
#### Applications using EXPOSE
|
||||||
|
|
||||||
@@ -156,10 +167,10 @@ The application would be exposed to the user at `node-js-app.dokku.me:1234`. If
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# add a port mapping to port 80
|
# add a port mapping to port 80
|
||||||
dokku proxy:ports-add node-js-app http:80:1234
|
dokku ports:add node-js-app http:80:1234
|
||||||
|
|
||||||
# remove the incorrect port mapping
|
# remove the incorrect port mapping
|
||||||
dokku proxy:ports-remove node-js-app http:1234:1234
|
dokku ports:remove node-js-app http:1234:1234
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Applications not using EXPOSE
|
#### Applications not using EXPOSE
|
||||||
@@ -169,24 +180,40 @@ Any application that does not use an `EXPOSE` directive will result in Dokku def
|
|||||||
- modify your application to support the `PORT` environment variable.
|
- modify your application to support the `PORT` environment variable.
|
||||||
- switch to using an `EXPOSE` directive in your Dockerfile.
|
- switch to using an `EXPOSE` directive in your Dockerfile.
|
||||||
|
|
||||||
#### Switching between `EXPOSE` usage modes
|
### Displaying ports reports for an app
|
||||||
|
|
||||||
When switching between `EXPOSE` usage modes, it is important to reset your port management. The following two commands can be used to reset your state and redeploy your application.
|
You can get a report about the app's ports status using the `ports:report` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# assuming your application is called `node-js-app`
|
dokku ports:report
|
||||||
dokku config:unset --no-restart node-js-app DOKKU_DOCKERFILE_PORTS PORT
|
|
||||||
dokku proxy:ports-clear node-js-app
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Image
|
```
|
||||||
|
=====> node-js-app ports information
|
||||||
|
Port map detected: http:80:5000
|
||||||
|
Port map: http:80:5000 https:443:5000
|
||||||
|
=====> python-sample ports information
|
||||||
|
Port map detected: http:80:5000
|
||||||
|
Port map: http:80:5000
|
||||||
|
=====> ruby-sample ports information
|
||||||
|
Port map detected: http:80:5000
|
||||||
|
Port map: http:80:5000
|
||||||
|
```
|
||||||
|
|
||||||
When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate port mapping. If this behavior is not desired, you can override that configuration variable with the following commands.
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# assuming your application is called `node-js-app`
|
dokku ports:report node-js-app
|
||||||
dokku config:set node-js-app DOKKU_DOCKERFILE_PORTS="1234/tcp 80/tcp"
|
|
||||||
dokku proxy:ports-clear node-js-app
|
|
||||||
```
|
```
|
||||||
|
|
||||||
All other port-related behavior is the same as when deploying via Dockerfile.
|
```
|
||||||
|
=====> node-js-app ports information
|
||||||
|
Port map detected: http:80:5000
|
||||||
|
Port map: http:80:5000 https:443:5000
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku ports:report node-js-app --ports-map
|
||||||
|
```
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ You can use these modifiers as follows:
|
|||||||
dokku caddy:logs --tail --num 10
|
dokku caddy:logs --tail --num 10
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
The above command will show logs continually from the caddy container, with an initial history of 10 log lines
|
||||||
|
|
||||||
### Changing the Caddy log level
|
### Changing the Caddy log level
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ haproxy:stop # Stops the haproxy server
|
|||||||
|
|
||||||
## Requirements
|
## 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`.
|
Using the `haproxy` 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
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,42 @@ Once the HSTS setting is disabled globally, it can be re-enabled on a per-app ba
|
|||||||
dokku nginx:set node-js-app hsts true
|
dokku nginx:set node-js-app hsts true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Running behind another proxy — configuring `X-Forwarded-*` headers:
|
||||||
|
|
||||||
|
Dokku's default Nginx configuration passes the de-facto standard HTTP headers [`X-Forwarded-For`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For), [`X-Forwarded-Proto`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto), and `X-Forwarded-Port` to your application.
|
||||||
|
These headers indicate the IP address of the original client making the request, the protocol of the original request (HTTP or HTTPS), and the port number of the original request, respectively.
|
||||||
|
|
||||||
|
If you have another HTTP proxy sitting in between the end user and your server (for example, a load balancer, or a CDN), then the values of these headers will contain information about (e.g. the IP address of) the the closest proxy, and not the end user.
|
||||||
|
|
||||||
|
To fix this, assuming that the other proxy also passes `X-Forwarded-*` headers, which in turn contain information about the end user, you can tell Nginx include those values in the `X-Forwarded-*` headers that it sends to your application. You can do this via `nginx:set`, like so:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app x-forwarded-for-value '$http_x_forwarded_for'
|
||||||
|
dokku nginx:set node-js-app x-forwarded-port-value '$http_x_forwarded_port'
|
||||||
|
dokku nginx:set node-js-app x-forwarded-proto-value '$http_x_forwarded_proto'
|
||||||
|
```
|
||||||
|
|
||||||
|
However, note that you should only do this if:
|
||||||
|
|
||||||
|
1. Requests to your website always go through a trusted proxy.
|
||||||
|
2. That proxy is configured to send the aforementioned `X-Forwarded-*` headers.
|
||||||
|
|
||||||
|
Otherwise, if it's possible for clients to make HTTP requests directly against your server, bypassing the other proxy, or if the other proxy is not configured to set these headers, then a client can basically pass any arbitrary values for these headers (which your app then presumably reads) and thereby fake an IP address, for example.
|
||||||
|
|
||||||
|
There's also the `X-Forwarded-Ssl` header which a less common alternative to `X-Forwarded-Proto` — and because of that, isn't included in Dokku's default Nginx configuration.
|
||||||
|
But you can tell Nginx to send this header as well, if necessary.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# force-setting value to `on`
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl on
|
||||||
|
|
||||||
|
# force-setting value to `off`
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl off
|
||||||
|
|
||||||
|
# removing the value from nginx.conf (default)
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl
|
||||||
|
```
|
||||||
|
|
||||||
### Checking access logs
|
### Checking access logs
|
||||||
|
|
||||||
> Note: Changing this value globally or on a per-app basis will require rebuilding the nginx config via the `proxy:build-config` command.
|
> Note: Changing this value globally or on a per-app basis will require rebuilding the nginx config via the `proxy:build-config` command.
|
||||||
@@ -293,14 +329,17 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
|||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `nginx.conf.sigil` file to use for a given app. This can be done via the `nginx:set` command. If a value is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `nginx.conf.sigil`.
|
When deploying a monorepo, it may be desirable to specify the specific path of the `nginx.conf.sigil` file to use for a given app. This can be done via the `nginx:set` command. If a value is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `nginx.conf.sigil`.
|
||||||
|
|
||||||
|
For deploys via the `git:from-image` and `git:load-image` commands, the `nginx.conf.sigil` is extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `nginx.conf.sigil` extracted directly from the source code. Both cases will respect the configured `nginx-conf-sigil-path` property value.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku nginx:set node-js-app nginx-conf-sigil-path dokku/nginx.conf.sigil
|
dokku nginx:set node-js-app nginx-conf-sigil-path .dokku/nginx.conf.sigil
|
||||||
```
|
```
|
||||||
|
|
||||||
This property can also be changed globally, which will take into effect if there is no value at the app level.
|
This property can also be changed globally, which will take into effect if there is no value at the app level.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku nginx:set --global nginx-conf-sigil-path dokku/nginx.conf.sigil
|
dokku nginx:set --global nginx-conf-sigil-path .dokku/nginx.conf.sigil
|
||||||
```
|
```
|
||||||
|
|
||||||
In either case, the value can be reset by specifying an empty value.
|
In either case, the value can be reset by specifying an empty value.
|
||||||
@@ -337,9 +376,8 @@ Unsetting this value is the same as enabling custom nginx config usage.
|
|||||||
{{ .PROXY_PORT }} Non-SSL nginx listener port (same as `DOKKU_PROXY_PORT` config var)
|
{{ .PROXY_PORT }} Non-SSL nginx listener port (same as `DOKKU_PROXY_PORT` config var)
|
||||||
{{ .PROXY_SSL_PORT }} SSL nginx listener port (same as `DOKKU_PROXY_SSL_PORT` config var)
|
{{ .PROXY_SSL_PORT }} SSL nginx listener port (same as `DOKKU_PROXY_SSL_PORT` config var)
|
||||||
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
|
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
|
||||||
{{ .PROXY_PORT_MAP }} List of port mappings (same as `DOKKU_PROXY_PORT_MAP` config var)
|
{{ .PROXY_PORT_MAP }} List of port mappings (same as the `map` ports property)
|
||||||
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from `DOKKU_PROXY_PORT_MAP` config var)
|
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from the `map` ports property)
|
||||||
{{ .RAW_TCP_PORTS }} List of exposed tcp ports as defined by Dockerfile `EXPOSE` directive (**Dockerfile apps only**)
|
|
||||||
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
|
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
|
||||||
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
||||||
```
|
```
|
||||||
@@ -457,10 +495,6 @@ See the [customizing hostnames documentation](/docs/configuration/domains.md#cus
|
|||||||
|
|
||||||
See the [disabling vhosts documentation](/docs/configuration/domains.md#disabling-vhosts) for more information on how to disable domain usage for your app.
|
See the [disabling vhosts documentation](/docs/configuration/domains.md#disabling-vhosts) for more information on how to disable domain usage for your app.
|
||||||
|
|
||||||
### Running behind a load balancer
|
|
||||||
|
|
||||||
See the [load balancer documentation](/docs/configuration/ssl.md#running-behind-a-load-balancer) for more information on how to configure your nginx config for running behind a network load balancer.
|
|
||||||
|
|
||||||
### SSL Configuration
|
### SSL Configuration
|
||||||
|
|
||||||
See the [ssl documentation](/docs/configuration/ssl.md) for more information on how to configure SSL certificates for your application.
|
See the [ssl documentation](/docs/configuration/ssl.md) for more information on how to configure SSL certificates for your application.
|
||||||
@@ -471,7 +505,7 @@ See the [proxy documentation](/docs/networking/proxy-management.md) for more inf
|
|||||||
|
|
||||||
### Managing Proxy Port mappings
|
### Managing Proxy Port mappings
|
||||||
|
|
||||||
See the [proxy documentation](/docs/networking/proxy-management.md#proxy-port-mapping) for more information on how to manage ports proxied for your app.
|
See the [ports documentation](/docs/networking/port-management.md) for more information on how to manage ports proxied for your app.
|
||||||
|
|
||||||
### Regenerating nginx config
|
### Regenerating nginx config
|
||||||
|
|
||||||
|
|||||||
164
docs/networking/proxies/openresty.md
Normal file
164
docs/networking/proxies/openresty.md
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
# OpenResty Proxy
|
||||||
|
|
||||||
|
> New as of 0.31.0
|
||||||
|
|
||||||
|
Dokku can provide integration with the [OpenResty](https://openresty.org/) proxy service by utilizing the Docker label-based integration implemented by [openresty-docker-proxy](https://github.com/dokku/openresty-docker-proxy).
|
||||||
|
|
||||||
|
```
|
||||||
|
openresty:report [<app>] [<flag>] # Displays a openresty report for one or more apps
|
||||||
|
openresty:logs [--num num] [--tail] # Display openresty log output
|
||||||
|
openresty:set <app> <property> (<value>) # Set or clear an openresty property for an app
|
||||||
|
openresty:show-config <app> # Display openresty compose config
|
||||||
|
openresty:start # Starts the openresty server
|
||||||
|
openresty:stop # Stops the openresty server
|
||||||
|
```
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
Using the `openresty` 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 OpenResty.
|
||||||
|
|
||||||
|
The OpenResty plugin has specific rules for routing requests:
|
||||||
|
|
||||||
|
- OpenResty integration is exposed via docker labels attached to containers. Changes in labels require either app deploys or rebuilds.
|
||||||
|
- While OpenResty will respect labels associated with other containers, only `web` containers have OpenResty 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 OpenResty
|
||||||
|
|
||||||
|
To use the OpenResty plugin, use the `proxy:set` command for the app in question:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku proxy:set node-js-app openresty
|
||||||
|
```
|
||||||
|
|
||||||
|
This will enable the docker label-based OpenResty integration. All future deploys will inject the correct labels for OpenResty to read and route requests to containers. Due to the docker label-based integration used by OpenResty, 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 OpenResty container
|
||||||
|
|
||||||
|
OpenResty can be started via the `openresty:start` command. This will start a OpenResty container via the `docker compose up` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:start
|
||||||
|
```
|
||||||
|
|
||||||
|
### Stopping the OpenResty container
|
||||||
|
|
||||||
|
OpenResty may be stopped via the `openresty:stop` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:stop
|
||||||
|
```
|
||||||
|
|
||||||
|
The OpenResty container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||||
|
|
||||||
|
### Showing the OpenResty compose config
|
||||||
|
|
||||||
|
For debugging purposes, it may be useful to show the OpenResty compose config. This can be achieved via the `openresty:show-config` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:show-config
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing the OpenResty container image
|
||||||
|
|
||||||
|
While the default OpenResty image is hardcoded, users may specify an alternative by setting the `image` property with the `--global` flag:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:set --global image dokku/openresty-docker-proxy:0.5.6
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Checking the OpenResty container's logs
|
||||||
|
|
||||||
|
It may be necessary to check the OpenResty container's logs to ensure that OpenResty is operating as expected. This can be performed with the `openresty:logs` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty: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 openresty:logs --tail --num 10
|
||||||
|
```
|
||||||
|
|
||||||
|
The above command will show logs continually from the openresty container, with an initial history of 10 log lines
|
||||||
|
|
||||||
|
### SSL Configuration
|
||||||
|
|
||||||
|
The OpenResty 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 openresty:set --global letsencrypt-email automated@dokku.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
After enabling, the OpenResty 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 openresty:set --global letsencrypt-server https://acme-staging-v02.api.letsencrypt.org/directory
|
||||||
|
```
|
||||||
|
|
||||||
|
After enabling, the OpenResty container will need to be restarted and apps will need to be rebuilt to retrieve certificates from the new server.
|
||||||
|
|
||||||
|
## Displaying OpenResty reports for an app
|
||||||
|
|
||||||
|
You can get a report about the app's OpenResty config using the `openresty:report` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:report
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app openresty information
|
||||||
|
Openresty image: dokku/openresty-docker-proxy:0.5.6
|
||||||
|
Openresty letsencrypt email: automated@dokku.sh
|
||||||
|
=====> python-app openresty information
|
||||||
|
Openresty image: dokku/openresty-docker-proxy:0.5.6
|
||||||
|
Openresty letsencrypt email: automated@dokku.sh
|
||||||
|
=====> ruby-app openresty information
|
||||||
|
Openresty image: dokku/openresty-docker-proxy:0.5.6
|
||||||
|
Openresty letsencrypt email: automated@dokku.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:report node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app openresty information
|
||||||
|
Openresty image: dokku/openresty-docker-proxy:0.5.6
|
||||||
|
Openresty letsencrypt email: automated@dokku.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku openresty:report node-js-app --openresty-letsencrypt-email
|
||||||
|
```
|
||||||
@@ -102,7 +102,7 @@ You can use these modifiers as follows:
|
|||||||
dokku traefik:logs --tail --num 10
|
dokku traefik:logs --tail --num 10
|
||||||
```
|
```
|
||||||
|
|
||||||
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
The above command will show logs continually from the traefik container, with an initial history of 10 log lines
|
||||||
|
|
||||||
### Changing the Traefik log level
|
### Changing the Traefik log level
|
||||||
|
|
||||||
|
|||||||
@@ -73,15 +73,12 @@ dokku proxy:report
|
|||||||
=====> node-js-app proxy information
|
=====> node-js-app proxy information
|
||||||
Proxy enabled: true
|
Proxy enabled: true
|
||||||
Proxy type: nginx
|
Proxy type: nginx
|
||||||
Proxy port map: http:80:5000 https:443:5000
|
|
||||||
=====> python-sample proxy information
|
=====> python-sample proxy information
|
||||||
Proxy enabled: true
|
Proxy enabled: true
|
||||||
Proxy type: nginx
|
Proxy type: nginx
|
||||||
Proxy port map: http:80:5000
|
|
||||||
=====> ruby-sample proxy information
|
=====> ruby-sample proxy information
|
||||||
Proxy enabled: true
|
Proxy enabled: true
|
||||||
Proxy type: nginx
|
Proxy type: nginx
|
||||||
Proxy port map: http:80:5000
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run the command for a specific app also.
|
You can run the command for a specific app also.
|
||||||
@@ -94,7 +91,6 @@ dokku proxy:report node-js-app
|
|||||||
=====> node-js-app proxy information
|
=====> node-js-app proxy information
|
||||||
Proxy enabled: true
|
Proxy enabled: true
|
||||||
Proxy type: nginx
|
Proxy type: nginx
|
||||||
Proxy port map: http:80:5000 https:443:5000
|
|
||||||
```
|
```
|
||||||
|
|
||||||
You can pass flags which will output only the value of the specific information you want. For example:
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
@@ -105,22 +101,7 @@ dokku proxy:report node-js-app --proxy-type
|
|||||||
|
|
||||||
#### Proxy Port Scheme
|
#### Proxy Port Scheme
|
||||||
|
|
||||||
The proxy port scheme is as follows:
|
See the [port scheme documentation](/docs/networking/port-management.md#port-scheme) for more information on the port mapping scheme used by dokku.
|
||||||
|
|
||||||
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
|
||||||
|
|
||||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports the `http`, `https`, `grpc` and `grpcs` schemes.
|
|
||||||
For the `grpc` and `grpcs` see [nginx blog post on grpc](https://www.nginx.com/blog/nginx-1-13-10-grpc/).
|
|
||||||
|
|
||||||
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
|
||||||
|
|
||||||
To change the proxy implementation in use for an application, use the `proxy:set` command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# no validation will be performed against
|
|
||||||
# the specified proxy implementation
|
|
||||||
dokku proxy:set node-js-app nginx
|
|
||||||
```
|
|
||||||
|
|
||||||
### Proxy port mapping
|
### Proxy port mapping
|
||||||
|
|
||||||
@@ -136,7 +117,7 @@ From Dokku versions `0.5.0` until `0.11.0`, enabling or disabling an application
|
|||||||
|
|
||||||
Custom plugins names _must_ have the suffix `-vhosts` or scheduler overriding via `proxy:set` may not function as expected.
|
Custom plugins names _must_ have the suffix `-vhosts` or scheduler overriding via `proxy:set` may not function as expected.
|
||||||
|
|
||||||
At this time, the following dokku commands are used to implement a complete proxy implementation.
|
At this time, the following dokku commands are used to interact with a complete proxy implementation.
|
||||||
|
|
||||||
- `domains:add`: Adds a given domain to an app.
|
- `domains:add`: Adds a given domain to an app.
|
||||||
- triggers: `post-domains-update`
|
- triggers: `post-domains-update`
|
||||||
@@ -158,13 +139,13 @@ At this time, the following dokku commands are used to implement a complete prox
|
|||||||
- triggers: `proxy-disable`
|
- triggers: `proxy-disable`
|
||||||
- `proxy:enable`: Enables the proxy configuration for an app.
|
- `proxy:enable`: Enables the proxy configuration for an app.
|
||||||
- triggers: `proxy-enable`
|
- triggers: `proxy-enable`
|
||||||
- `proxy:ports-add`: Adds one or more port mappings to an app
|
- `ports:add`: Adds one or more port mappings to an app
|
||||||
- triggers: `post-proxy-ports-update`
|
- triggers: `post-proxy-ports-update`
|
||||||
- `proxy:ports-clear`: Clears out all port mappings for an app.
|
- `ports:clear`: Clears out all port mappings for an app.
|
||||||
- triggers: `post-proxy-ports-update`
|
- triggers: `post-proxy-ports-update`
|
||||||
- `proxy:ports-remove`: Removes one or more port mappings from an app.
|
- `ports:remove`: Removes one or more port mappings from an app.
|
||||||
- triggers: `post-proxy-ports-update`
|
- triggers: `post-proxy-ports-update`
|
||||||
- `proxy:ports-set`: Sets all port mappings for an app.
|
- `ports:set`: Sets all port mappings for an app.
|
||||||
- triggers: `post-proxy-ports-update`
|
- triggers: `post-proxy-ports-update`
|
||||||
|
|
||||||
Proxy implementations may decide to omit some functionality here, or use plugin triggers to supplement config with information from other plugins.
|
Proxy implementations may decide to omit some functionality here, or use plugin triggers to supplement config with information from other plugins.
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ dokku run:list node-js-app --format json
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Stopping a one-off cotainer
|
### Stopping a one-off container
|
||||||
|
|
||||||
> New as of 0.29.0
|
> New as of 0.29.0
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ dokku run node-js-app sleep 300
|
|||||||
|
|
||||||
# stop the container
|
# stop the container
|
||||||
dokku run:stop --container node-js-app.run.2313
|
dokku run:stop --container node-js-app.run.2313
|
||||||
````
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
node-js-app.run.2313
|
node-js-app.run.2313
|
||||||
|
|||||||
@@ -105,6 +105,77 @@ proctype: qty
|
|||||||
web: 1
|
web: 1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Defining Processes
|
||||||
|
|
||||||
|
#### Procfile
|
||||||
|
|
||||||
|
> Note: Dokku supports the Procfile format as defined in [this document](https://github.com/dokku/procfile-util/blob/master/PROCFILE_FORMAT.md) under "Strict Mode" parsing rules.
|
||||||
|
|
||||||
|
Apps can define processes to run by using a `Procfile`. A `Procfile` is a simple text file that can be used to specify multiple commands, each of which is subject to process scaling. In the case where the built image sets a default command to run - either through usage of `CMD` for Dockerfile-based builds, a default process for buildpack-based builds, or any other method for the builder in use - the `Procfile` will take precedence.
|
||||||
|
|
||||||
|
If the file exists, it should not be empty, as doing so may result in a failed deploy.
|
||||||
|
|
||||||
|
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
|
||||||
|
|
||||||
|
```
|
||||||
|
<process type>: <command>
|
||||||
|
```
|
||||||
|
|
||||||
|
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
|
||||||
|
|
||||||
|
```Procfile
|
||||||
|
worker: env QUEUE=* bundle exec rake resque:work
|
||||||
|
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||||
|
```
|
||||||
|
|
||||||
|
If the app build declares an `ENTRYPOINT`, the command defined in the `Procfile` is passed as an argument to that entrypoint. This is the case for all Dockerfile-based, Docker Image, and Cloud Native Buildpack deployments.
|
||||||
|
|
||||||
|
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [web process scaling documentation](/docs/processes/process-management.md#the-web-process) for more details around scaling individual processes.
|
||||||
|
|
||||||
|
See the [Procfile location documentation](/docs/processes/process-management.md#changing-the-procfile-location) for more information on where to place your `Procfile` file.
|
||||||
|
|
||||||
|
#### The `web` process
|
||||||
|
|
||||||
|
For initial app deploys, Dokku will default to starting a single `web` process for each app. This process may be defined within the `Procfile` or as the `CMD` (for Dockerfile or Docker image deploys). Scaling of the `web` process - and all other processes - may be managed via `ps:scale` or the `formation` key in the `app.json` file either before or after the initial deploy.
|
||||||
|
|
||||||
|
There are also a few other exceptions for the `web` process.
|
||||||
|
|
||||||
|
- By default, the built-in nginx proxy implementation only proxies the `web` process (others may be handled via a custom `nginx.conf.sigil`).
|
||||||
|
- See the [nginx request proxying documentation](/docs/networking/proxies/nginx.md#request-proxying) for more information on how nginx handles proxied requests.
|
||||||
|
- Only the `web` process may be bound to an external port.
|
||||||
|
|
||||||
|
#### The `release` process
|
||||||
|
|
||||||
|
The `Procfile` also supports a special `release` command which acts in a similar way to the [Heroku Release Phase](https://devcenter.heroku.com/articles/release-phase). See the [Release deployment task documentation](/docs/advanced-usage/deployment-tasks.md#procfile-release-command) for more information on how Dokku handles this process type.
|
||||||
|
|
||||||
|
#### Changing the `Procfile` location
|
||||||
|
|
||||||
|
When deploying a monorepo, it may be desirable to specify the specific path of the `Procfile` file to use for a given app. This can be done via the `ps:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `Procfile`.
|
||||||
|
|
||||||
|
For deploys via the `git:from-image` and `git:load-image` commands, the `Procfile` is extracted from the configured `WORKDIR` property of the image. For all other deploys - git push, `git:from-archive`, `git:sync` - will have the `Procfile` extracted directly from the source code. Both cases will respect the configured `procfile-path` property value.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku ps:set node-js-app procfile-path .dokku/Procfile
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku ps:set node-js-app procfile-path
|
||||||
|
```
|
||||||
|
|
||||||
|
The `procfile-path` property can also be set globally. The global default is `Procfile`, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku ps:set --global procfile-path global-Procfile
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku ps:set --global procfile-path
|
||||||
|
```
|
||||||
|
|
||||||
### Scaling apps
|
### Scaling apps
|
||||||
|
|
||||||
#### Via CLI
|
#### Via CLI
|
||||||
@@ -133,13 +204,7 @@ dokku ps:scale --skip-deploy node-js-app web=1
|
|||||||
|
|
||||||
> Using a `formation` key in an `app.json` file with _any_ `quantity` specified disables the ability to use `ps:scale` for scaling. All processes not specified in the `app.json` will have their process count set to zero.
|
> Using a `formation` key in an `app.json` file with _any_ `quantity` specified disables the ability to use `ps:scale` for scaling. All processes not specified in the `app.json` will have their process count set to zero.
|
||||||
|
|
||||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
Users can also configure scaling within the codebase itself to manage process scaling. The `formation` key should be specified as follows in the `app.json` file:
|
||||||
|
|
||||||
- Buildpacks: `/app/app.json`
|
|
||||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
|
||||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
|
||||||
|
|
||||||
The `formation` key should be specified as follows in the `app.json` file:
|
|
||||||
|
|
||||||
```Procfile
|
```Procfile
|
||||||
{
|
{
|
||||||
@@ -154,44 +219,9 @@ The `formation` key should be specified as follows in the `app.json` file:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Removing the file will result in Dokku respecting the `ps:scale` command for setting scale values. The values set via the `app.json` file from a previous deploy will be respected.
|
Removing the `formation` key or removing the `app.json` file from your repository will result in Dokku respecting the `ps:scale` command for setting scale values. The values set via the `app.json` file from a previous deploy will be respected.
|
||||||
|
|
||||||
#### The `web` process
|
See the [app.json location documentation](/docs/advanced-usage/deployment-tasks.md#changing-the-appjson-location) for more information on where to place your `app.json` file.
|
||||||
|
|
||||||
For initial app deploys, Dokku will default to starting a single `web` process for each app. This process may be defined within the `Procfile` or as the `CMD` (for Dockerfile or Docker image deploys). Scaling of the `web` process - and all other processes - may be managed via `ps:scale` or the `formation` key in the `app.json` file either before or after the initial deploy.
|
|
||||||
|
|
||||||
There are also a few other exceptions for the `web` process.
|
|
||||||
|
|
||||||
- Custom checks defined by a `CHECKS` file only apply to the `web` process type.
|
|
||||||
- By default, the built-in nginx proxy implementation only proxies the `web` process (others may be handled via a custom `nginx.conf.sigil`).
|
|
||||||
- See the [nginx request proxying documentation](/docs/networking/proxies/nginx.md#request-proxying) for more information on how nginx handles proxied requests.
|
|
||||||
- Only the `web` process may be bound to an external port.
|
|
||||||
|
|
||||||
#### Changing the `Procfile` location
|
|
||||||
|
|
||||||
When deploying a monorepo, it may be desirable to specify the specific path of the `Procfile` file to use for a given app. This can be done via the `ps:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `Procfile`.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:set node-js-app procfile-path Procfile2
|
|
||||||
```
|
|
||||||
|
|
||||||
The default value may be set by passing an empty value for the option:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:set node-js-app procfile-path
|
|
||||||
```
|
|
||||||
|
|
||||||
The `procfile-path` property can also be set globally. The global default is `Procfile`, and the global value is used when no app-specific value is set.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:set --global procfile-path global-Procfile
|
|
||||||
```
|
|
||||||
|
|
||||||
The default value may be set by passing an empty value for the option.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:set --global procfile-path
|
|
||||||
```
|
|
||||||
|
|
||||||
### Stopping apps
|
### Stopping apps
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
> New as of 0.23.0
|
> New as of 0.23.0
|
||||||
|
|
||||||
```
|
```
|
||||||
cron:list <app> # List scheduled cron tasks for an app
|
cron:list <app> [--format json|stdout] # List scheduled cron tasks for an app
|
||||||
cron:report [<app>] [<flag>] # Display report about an app
|
cron:report [<app>] [<flag>] # Display report about an app
|
||||||
|
cron:run <app> <cron_id> [--detach] # Run a cron task on the fly
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -35,6 +36,8 @@ A cron entry takes the following properties:
|
|||||||
|
|
||||||
Zero or more cron commands can be specified per app. Cron entries are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
|
Zero or more cron commands can be specified per app. Cron entries are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
|
||||||
|
|
||||||
|
See the [app.json location documentation](/docs/advanced-usage/deployment-tasks.md#changing-the-appjson-location) for more information on where to place your `app.json` file.
|
||||||
|
|
||||||
#### Task Environment
|
#### Task Environment
|
||||||
|
|
||||||
When running scheduled cron tasks, there are a few items to be aware of:
|
When running scheduled cron tasks, there are a few items to be aware of:
|
||||||
@@ -42,7 +45,7 @@ When running scheduled cron tasks, there are a few items to be aware of:
|
|||||||
- Scheduled cron tasks are performed within the app environment available at runtime. If the app image does not exist, the command may fail to execute.
|
- Scheduled cron tasks are performed within the app environment available at runtime. If the app image does not exist, the command may fail to execute.
|
||||||
- Schedules are performed on the hosting server's timezone, which is typically UTC.
|
- Schedules are performed on the hosting server's timezone, which is typically UTC.
|
||||||
- At this time, only the `PATH` and `SHELL` environment variables are specified in the cron template.
|
- At this time, only the `PATH` and `SHELL` environment variables are specified in the cron template.
|
||||||
- Each scheduled task is executed within a one-off `run` container, and thus inherit any docker-options specified for `run` containers.Resources are never shared between scheduled tasks.
|
- Each scheduled task is executed within a one-off `run` container, and thus inherit any docker-options specified for `run` containers. Resources are never shared between scheduled tasks.
|
||||||
- Scheduled cron tasks are supported on a per-scheduler basis, and are currently only implemented by the `docker-local` scheduler.
|
- Scheduled cron tasks are supported on a per-scheduler basis, and are currently only implemented by the `docker-local` scheduler.
|
||||||
- Tasks for _all_ apps managed by the `docker-local` scheduler are written to a single crontab file owned by the `dokku` user. The `dokku` user's crontab should be considered reserved for this purpose.
|
- Tasks for _all_ apps managed by the `docker-local` scheduler are written to a single crontab file owned by the `dokku` user. The `dokku` user's crontab should be considered reserved for this purpose.
|
||||||
|
|
||||||
@@ -60,6 +63,32 @@ cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5 @daily node index.js
|
|||||||
cGhwPT09dHJ1ZT09PSogKiAqICogKg== * * * * * true
|
cGhwPT09dHJ1ZT09PSogKiAqICogKg== * * * * * true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The output can also be displayed in json format:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku cron:list node-js-app --format json
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
[{"id":"cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5","app":"node-js-app","command":"node index.js","schedule":"@daily"}]
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Executing a cron task on the fly
|
||||||
|
|
||||||
|
Cron tasks can be invoked via the `cron:run` command. This command takes an `app` argument and a `cron id` (retrievable from `cron:list` output).
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku cron:run node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, the task is run in an attached container - as supported by the scheduler. To run in a background detached container, specify the `--detach` flag:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku cron:run node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5 --detach
|
||||||
|
```
|
||||||
|
|
||||||
|
All one-off cron executions have their containers terminated after invocation.
|
||||||
|
|
||||||
#### Displaying reports
|
#### Displaying reports
|
||||||
|
|
||||||
You can get a report about the cron configuration for apps using the `cron:report` command:
|
You can get a report about the cron configuration for apps using the `cron:report` command:
|
||||||
|
|||||||
@@ -9,26 +9,26 @@
|
|||||||
<meta name="author" content="">
|
<meta name="author" content="">
|
||||||
<title>Dokku - {{DOC_TITLE}}</title>
|
<title>Dokku - {{DOC_TITLE}}</title>
|
||||||
|
|
||||||
<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="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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.31.0/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.31.0/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.31.0/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="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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">
|
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/favicon.ico">
|
||||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||||
<meta name="application-name" content="Dokku">
|
<meta name="application-name" content="Dokku">
|
||||||
<meta name="msapplication-TileColor" content="#da532c">
|
<meta name="msapplication-TileColor" content="#da532c">
|
||||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/favicons/mstile-144x144.png">
|
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/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="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/favicons/browserconfig.xml">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<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://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.30.2/docs/assets/style.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.31.0/docs/assets/style.css" rel="stylesheet">
|
||||||
<!-- <link href="./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">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
@@ -178,6 +178,7 @@
|
|||||||
<a href="/{{NAME}}/networking/proxies/caddy/" class="list-group-item">Caddy Proxy</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/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/nginx/" class="list-group-item">Nginx Proxy</a>
|
||||||
|
<a href="/{{NAME}}/networking/proxies/openresty/" class="list-group-item">Openresty Proxy</a>
|
||||||
<a href="/{{NAME}}/networking/proxies/traefik/" class="list-group-item">Traefik Proxy</a>
|
<a href="/{{NAME}}/networking/proxies/traefik/" class="list-group-item">Traefik Proxy</a>
|
||||||
|
|
||||||
<a href="#" class="list-group-item disabled">Advanced Usage</a>
|
<a href="#" class="list-group-item disabled">Advanced Usage</a>
|
||||||
|
|||||||
13
dokku
13
dokku
@@ -4,7 +4,6 @@ shopt -s nullglob
|
|||||||
|
|
||||||
export DOCKER_BIN=docker
|
export DOCKER_BIN=docker
|
||||||
if [[ -r /etc/default/dokku ]]; then
|
if [[ -r /etc/default/dokku ]]; then
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source /etc/default/dokku
|
source /etc/default/dokku
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -31,9 +30,8 @@ fi
|
|||||||
export DOKKU_HOST_ROOT=${DOKKU_HOST_ROOT:=$DOKKU_ROOT}
|
export DOKKU_HOST_ROOT=${DOKKU_HOST_ROOT:=$DOKKU_ROOT}
|
||||||
|
|
||||||
export DOKKU_DISTRO
|
export DOKKU_DISTRO
|
||||||
# shellcheck disable=SC1091
|
|
||||||
DOKKU_DISTRO=$(
|
DOKKU_DISTRO=$(
|
||||||
. /etc/os-release >/dev/null 2>&1 || true
|
. /etc/os-release &>/dev/null || true
|
||||||
echo "$ID"
|
echo "$ID"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -41,8 +39,8 @@ DOKKU_DISTRO=$(
|
|||||||
# configuration can ever override the DOCKER_BIN value
|
# configuration can ever override the DOCKER_BIN value
|
||||||
export DOCKER_BIN=${DOCKER_BIN:="docker"}
|
export DOCKER_BIN=${DOCKER_BIN:="docker"}
|
||||||
|
|
||||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest-20"}
|
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest-22"}
|
||||||
export DOKKU_CNB_BUILDER=${DOKKU_CNB_BUILDER:="heroku/buildpacks"}
|
export DOKKU_CNB_BUILDER=${DOKKU_CNB_BUILDER:="heroku/builder:22"}
|
||||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||||
|
|
||||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
||||||
@@ -109,12 +107,10 @@ fi
|
|||||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||||
export -n SSH_ORIGINAL_COMMAND
|
export -n SSH_ORIGINAL_COMMAND
|
||||||
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]]; then
|
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]]; then
|
||||||
# shellcheck disable=SC2086
|
|
||||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
||||||
exit $?
|
exit $?
|
||||||
else
|
else
|
||||||
set -f
|
set -f
|
||||||
# shellcheck disable=SC2086
|
|
||||||
$0 $SSH_ORIGINAL_COMMAND
|
$0 $SSH_ORIGINAL_COMMAND
|
||||||
set +f
|
set +f
|
||||||
exit $?
|
exit $?
|
||||||
@@ -147,6 +143,9 @@ execute_dokku_cmd() {
|
|||||||
nginx | nginx:*)
|
nginx | nginx:*)
|
||||||
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
|
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
|
||||||
;;
|
;;
|
||||||
|
openresty | openresty:*)
|
||||||
|
local PLUGIN_NAME=${PLUGIN_NAME/openresty/openresty-vhosts}
|
||||||
|
;;
|
||||||
traefik | traefik:*)
|
traefik | traefik:*)
|
||||||
local PLUGIN_NAME=${PLUGIN_NAME/traefik/traefik-vhosts}
|
local PLUGIN_NAME=${PLUGIN_NAME/traefik/traefik-vhosts}
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ markdown_extensions:
|
|||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
- tables
|
- tables
|
||||||
|
- toc:
|
||||||
|
permalink: true
|
||||||
|
|
||||||
repo_url: https://github.com/dokku/dokku
|
repo_url: https://github.com/dokku/dokku
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core standard plugin"
|
description = "dokku core standard plugin"
|
||||||
version = "0.30.2"
|
version = "0.31.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -26,8 +26,10 @@ cmd-report() {
|
|||||||
dokku_log_info1 "herokuish version: "
|
dokku_log_info1 "herokuish version: "
|
||||||
if [[ "$ARCHITECTURE" == "armhf" ]] || [[ "$ARCHITECTURE" == "arm64" ]]; then
|
if [[ "$ARCHITECTURE" == "armhf" ]] || [[ "$ARCHITECTURE" == "arm64" ]]; then
|
||||||
dokku_log_warn "herokuish not supported on $ARCHITECTURE architecture"
|
dokku_log_warn "herokuish not supported on $ARCHITECTURE architecture"
|
||||||
else
|
elif verify_image "$DOKKU_IMAGE"; then
|
||||||
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||||
|
else
|
||||||
|
dokku_log_warn "Herokuish image $DOKKU_IMAGE is not available"
|
||||||
fi
|
fi
|
||||||
dokku_log_info1 "dokku version: $(dokku_version)"
|
dokku_log_info1 "dokku version: $(dokku_version)"
|
||||||
dokku_log_info1 "plugn version: $(plugn version)"
|
dokku_log_info1 "plugn version: $(plugn version)"
|
||||||
|
|||||||
1
plugins/20_events/app-json-get-content
Symbolic link
1
plugins/20_events/app-json-get-content
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/certs-force
Symbolic link
1
plugins/20_events/certs-force
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
@@ -14,7 +14,6 @@ trigger-events-install() {
|
|||||||
|
|
||||||
# This can be done unconditionally as mkdir -p
|
# This can be done unconditionally as mkdir -p
|
||||||
# exits gracefully if the path already exists
|
# exits gracefully if the path already exists
|
||||||
# shellcheck disable=SC2174
|
|
||||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||||
case "$DOKKU_DISTRO" in
|
case "$DOKKU_DISTRO" in
|
||||||
arch | debian | raspbian)
|
arch | debian | raspbian)
|
||||||
@@ -64,7 +63,7 @@ $DOKKU_LOGS_DIR/*.log {
|
|||||||
compress
|
compress
|
||||||
delaycompress
|
delaycompress
|
||||||
postrotate
|
postrotate
|
||||||
reload rsyslog >/dev/null 2>&1 || true
|
reload rsyslog &>/dev/null || true
|
||||||
endscript
|
endscript
|
||||||
create 664 syslog dokku
|
create 664 syslog dokku
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core events logging plugin"
|
description = "dokku core events logging plugin"
|
||||||
version = "0.30.2"
|
version = "0.31.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
1
plugins/20_events/ports-clear
Symbolic link
1
plugins/20_events/ports-clear
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/ports-configure
Symbolic link
1
plugins/20_events/ports-configure
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/ports-get
Symbolic link
1
plugins/20_events/ports-get
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/ports-get-available
Symbolic link
1
plugins/20_events/ports-get-available
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/ports-set-detected
Symbolic link
1
plugins/20_events/ports-set-detected
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
1
plugins/20_events/procfile-exists
Symbolic link
1
plugins/20_events/procfile-exists
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
hook
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
SUBCOMMANDS = subcommands/report subcommands/set
|
SUBCOMMANDS = subcommands/report subcommands/set
|
||||||
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
|
TRIGGERS = triggers/app-json-process-deploy-parallelism triggers/app-json-get-content 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
|
BUILD = commands subcommands triggers
|
||||||
PLUGIN_NAME = app-json
|
PLUGIN_NAME = app-json
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ go 1.19
|
|||||||
require (
|
require (
|
||||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||||
github.com/otiai10/copy v1.9.0
|
github.com/otiai10/copy v1.12.0
|
||||||
github.com/spf13/pflag v1.0.5
|
github.com/spf13/pflag v1.0.5
|
||||||
golang.org/x/sync v0.1.0
|
golang.org/x/sync v0.3.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
golang.org/x/sys v0.10.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/dokku/dokku/plugins/common => ../common
|
replace github.com/dokku/dokku/plugins/common => ../common
|
||||||
|
|||||||
@@ -5,23 +5,18 @@ github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hj
|
|||||||
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
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 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||||
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||||
github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4=
|
github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY=
|
||||||
github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI=
|
github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww=
|
||||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
|
||||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
|
||||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||||
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 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core app-json plugin"
|
description = "dokku core app-json plugin"
|
||||||
version = "0.30.2"
|
version = "0.31.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ func main() {
|
|||||||
appName := flag.Arg(0)
|
appName := flag.Arg(0)
|
||||||
processType := flag.Arg(1)
|
processType := flag.Arg(1)
|
||||||
err = appjson.TriggerAppJSONProcessDeployParallelism(appName, processType)
|
err = appjson.TriggerAppJSONProcessDeployParallelism(appName, processType)
|
||||||
|
case "app-json-get-content":
|
||||||
|
appName := flag.Arg(0)
|
||||||
|
err = appjson.TriggerAppJSONGetContent(appName)
|
||||||
case "core-post-deploy":
|
case "core-post-deploy":
|
||||||
appName := flag.Arg(0)
|
appName := flag.Arg(0)
|
||||||
err = appjson.TriggerCorePostDeploy(appName)
|
err = appjson.TriggerCorePostDeploy(appName)
|
||||||
|
|||||||
@@ -37,6 +37,28 @@ func TriggerAppJSONProcessDeployParallelism(appName string, processType string)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TriggerAppJSONGetContent outputs the contents of the app-json file, if any
|
||||||
|
func TriggerAppJSONGetContent(appName string) error {
|
||||||
|
if !hasAppJSON(appName) {
|
||||||
|
fmt.Print("{}")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
b, err := os.ReadFile(getProcessSpecificAppJSONPath(appName))
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("Cannot read app.json file: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
content := strings.TrimSpace(string(b))
|
||||||
|
if content == "" {
|
||||||
|
fmt.Print("{}")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt.Print(content)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// TriggerCorePostDeploy sets a property to
|
// TriggerCorePostDeploy sets a property to
|
||||||
// allow the app to be restored on boot
|
// allow the app to be restored on boot
|
||||||
func TriggerCorePostDeploy(appName string) error {
|
func TriggerCorePostDeploy(appName string) error {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package apps
|
package apps
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@@ -95,53 +94,6 @@ func destroyApp(appName string) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func listImagesByAppLabel(appName string) ([]string, error) {
|
|
||||||
command := []string{
|
|
||||||
common.DockerBin(),
|
|
||||||
"image",
|
|
||||||
"list",
|
|
||||||
"--quiet",
|
|
||||||
"--filter",
|
|
||||||
fmt.Sprintf("label=com.dokku.app-name=%v", appName),
|
|
||||||
}
|
|
||||||
|
|
||||||
var stderr bytes.Buffer
|
|
||||||
listCmd := common.NewShellCmd(strings.Join(command, " "))
|
|
||||||
listCmd.ShowOutput = false
|
|
||||||
listCmd.Command.Stderr = &stderr
|
|
||||||
b, err := listCmd.Output()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return []string{}, errors.New(strings.TrimSpace(stderr.String()))
|
|
||||||
}
|
|
||||||
|
|
||||||
output := strings.Split(strings.TrimSpace(string(b[:])), "\n")
|
|
||||||
return output, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func listImagesByImageRepo(imageRepo string) ([]string, error) {
|
|
||||||
command := []string{
|
|
||||||
common.DockerBin(),
|
|
||||||
"image",
|
|
||||||
"list",
|
|
||||||
"--quiet",
|
|
||||||
imageRepo,
|
|
||||||
}
|
|
||||||
|
|
||||||
var stderr bytes.Buffer
|
|
||||||
listCmd := common.NewShellCmd(strings.Join(command, " "))
|
|
||||||
listCmd.ShowOutput = false
|
|
||||||
listCmd.Command.Stderr = &stderr
|
|
||||||
b, err := listCmd.Output()
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return []string{}, errors.New(strings.TrimSpace(stderr.String()))
|
|
||||||
}
|
|
||||||
|
|
||||||
output := strings.Split(strings.TrimSpace(string(b[:])), "\n")
|
|
||||||
return output, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// creates an app if allowed
|
// creates an app if allowed
|
||||||
func maybeCreateApp(appName string) error {
|
func maybeCreateApp(appName string) error {
|
||||||
if err := appExists(appName); err == nil {
|
if err := appExists(appName); err == nil {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ require (
|
|||||||
require (
|
require (
|
||||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||||
github.com/otiai10/copy v1.9.0 // indirect
|
github.com/otiai10/copy v1.12.0 // indirect
|
||||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
|
||||||
golang.org/x/sync v0.1.0 // indirect
|
golang.org/x/sync v0.3.0 // indirect
|
||||||
golang.org/x/sys v0.6.0 // indirect
|
golang.org/x/sys v0.10.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/dokku/dokku/plugins/common => ../common
|
replace github.com/dokku/dokku/plugins/common => ../common
|
||||||
|
|||||||
@@ -3,23 +3,18 @@ github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcju
|
|||||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
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/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/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/onsi/gomega v1.27.4 h1:Z2AnStgsdSayCMDiCU42qIz+HLqEPcgiOCXjAU/w+8E=
|
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI=
|
||||||
github.com/otiai10/copy v1.9.0 h1:7KFNiCgZ91Ru4qW4CWPf/7jqtxLagGRmIxWldPP9VY4=
|
github.com/otiai10/copy v1.12.0 h1:cLMgSQnXBs1eehF0Wy/FAGsgDTDmAqFR7rQylBb1nDY=
|
||||||
github.com/otiai10/copy v1.9.0/go.mod h1:hsfX19wcn0UWIHUQ3/4fHuehhk2UyArQ9dVFAn3FczI=
|
github.com/otiai10/copy v1.12.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww=
|
||||||
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
|
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
|
||||||
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
|
github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk=
|
||||||
github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
|
github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||||
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 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||||
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
|
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||||
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
|
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||||
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||||
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
|
|
||||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core apps plugin"
|
description = "dokku core apps plugin"
|
||||||
version = "0.30.2"
|
version = "0.31.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/dokku/dokku/plugins/apps"
|
||||||
"github.com/dokku/dokku/plugins/common"
|
"github.com/dokku/dokku/plugins/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -37,7 +38,15 @@ func main() {
|
|||||||
|
|
||||||
cmd := flag.Arg(0)
|
cmd := flag.Arg(0)
|
||||||
switch cmd {
|
switch cmd {
|
||||||
case "apps", "apps:help":
|
case "apps":
|
||||||
|
args := flag.NewFlagSet("apps", flag.ExitOnError)
|
||||||
|
args.Usage = usage
|
||||||
|
args.Parse(os.Args[2:])
|
||||||
|
|
||||||
|
if err := apps.CommandList(); err != nil {
|
||||||
|
common.LogFailWithError(err)
|
||||||
|
}
|
||||||
|
case "apps:help":
|
||||||
usage()
|
usage()
|
||||||
case "help":
|
case "help":
|
||||||
command := common.NewShellCmd(fmt.Sprintf("ps -o command= %d", os.Getppid()))
|
command := common.NewShellCmd(fmt.Sprintf("ps -o command= %d", os.Getppid()))
|
||||||
|
|||||||
@@ -101,19 +101,5 @@ func TriggerPostDelete(appName string) error {
|
|||||||
common.LogWarn(err.Error())
|
common.LogWarn(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
imagesByAppLabel, err := listImagesByAppLabel(appName)
|
|
||||||
if err != nil {
|
|
||||||
common.LogWarn(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
imageRepo := common.GetAppImageRepo(appName)
|
|
||||||
imagesByRepo, err := listImagesByImageRepo(imageRepo)
|
|
||||||
if err != nil {
|
|
||||||
common.LogWarn(err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
images := append(imagesByAppLabel, imagesByRepo...)
|
|
||||||
common.RemoveImages(images)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ trigger-builder-dockerfile-builder-build() {
|
|||||||
|
|
||||||
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
||||||
|
|
||||||
# extract first port from Dockerfile
|
|
||||||
suppress_output dos2unix Dockerfile
|
|
||||||
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
|
|
||||||
[[ -n "$DOCKERFILE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKERFILE_PORTS"
|
|
||||||
plugn trigger pre-build-dockerfile "$APP"
|
plugn trigger pre-build-dockerfile "$APP"
|
||||||
|
|
||||||
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
||||||
@@ -38,8 +34,10 @@ trigger-builder-dockerfile-builder-build() {
|
|||||||
declare -a ARG_ARRAY
|
declare -a ARG_ARRAY
|
||||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||||
|
|
||||||
|
eval "$(config_export app "$APP")"
|
||||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
||||||
|
|
||||||
|
plugn trigger ports-set-detected "$APP" "$(fn-builder-dockerfile-get-detect-port-map "$APP" "$IMAGE" "$SOURCECODE_WORK_DIR/Dockerfile")"
|
||||||
plugn trigger post-build-dockerfile "$APP"
|
plugn trigger post-build-dockerfile "$APP"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,3 +88,50 @@ fn-builder-dockerfile-dockerfile-path() {
|
|||||||
|
|
||||||
fn-plugin-property-get-default "builder-dockerfile" "$APP" "dockerfile-path" ""
|
fn-plugin-property-get-default "builder-dockerfile" "$APP" "dockerfile-path" ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn-builder-dockerfile-get-ports-from-dockerfile() {
|
||||||
|
declare desc="return all exposed ports from passed file path"
|
||||||
|
declare DOCKERFILE_PATH="$1"
|
||||||
|
|
||||||
|
suppress_output dos2unix "$DOCKERFILE_PATH"
|
||||||
|
local ports="$(grep -E "^EXPOSE " "$DOCKERFILE_PATH" | awk '{ print $2 }' | xargs)" || true
|
||||||
|
echo "$ports"
|
||||||
|
}
|
||||||
|
|
||||||
|
fn-builder-dockerfile-get-ports-from-image() {
|
||||||
|
declare desc="return all exposed ports from passed image name"
|
||||||
|
declare IMAGE="$1"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2016
|
||||||
|
local ports="$("$DOCKER_BIN" image inspect --format '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE" | xargs)" || true
|
||||||
|
echo "$ports"
|
||||||
|
}
|
||||||
|
|
||||||
|
fn-builder-dockerfile-get-detect-port-map() {
|
||||||
|
declare desc="extracts and echos a port mapping from the app"
|
||||||
|
declare APP="$1" IMAGE="$2" DOCKERFILE_PATH="$3"
|
||||||
|
|
||||||
|
local detected_ports=$(fn-builder-dockerfile-get-ports-from-dockerfile "$DOCKERFILE_PATH")
|
||||||
|
|
||||||
|
if [[ -z "$detected_ports" ]]; then
|
||||||
|
local detected_ports=$(fn-builder-dockerfile-get-ports-from-image "$IMAGE")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "$detected_ports" ]]; then
|
||||||
|
local port_map=""
|
||||||
|
for p in $detected_ports; do
|
||||||
|
if [[ "$p" =~ .*udp.* ]]; then
|
||||||
|
p=${p//\/udp/}
|
||||||
|
port_map+="udp:$p:$p "
|
||||||
|
else
|
||||||
|
p=${p//\/tcp/}
|
||||||
|
port_map+="http:$p:$p "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "$port_map" | xargs
|
||||||
|
else
|
||||||
|
# ensure we have a port mapping
|
||||||
|
plugn trigger ports-configure "$APP"
|
||||||
|
echo "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[plugin]
|
[plugin]
|
||||||
description = "dokku core builder-dockerfile plugin"
|
description = "dokku core builder-dockerfile plugin"
|
||||||
version = "0.30.2"
|
version = "0.31.0"
|
||||||
[plugin.config]
|
[plugin.config]
|
||||||
|
|||||||
@@ -3,6 +3,16 @@ set -eo pipefail
|
|||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||||
|
|
||||||
|
fn-builder-herokuish-ensure-cache() {
|
||||||
|
declare APP="$1"
|
||||||
|
|
||||||
|
existing_cache="$("$DOCKER_BIN" volume ls --quiet --filter label=com.dokku.app-name=test --filter label=com.dokku.builder-type=herokuish)"
|
||||||
|
if [[ "$existing_cache" != "cache-$APP" ]]; then
|
||||||
|
"$DOCKER_BIN" volume rm "cache-$APP" &>/dev/null || true
|
||||||
|
"$DOCKER_BIN" volume create "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.app-name=$APP" "--label=com.dokku.builder-type=herokuish" "cache-$APP" >/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
trigger-builder-herokuish-builder-build() {
|
trigger-builder-herokuish-builder-build() {
|
||||||
declare desc="builder-herokuish builder-build plugin trigger"
|
declare desc="builder-herokuish builder-build plugin trigger"
|
||||||
declare trigger="builder-build"
|
declare trigger="builder-build"
|
||||||
@@ -21,8 +31,6 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local IMAGE=$(get_app_image_name "$APP")
|
local IMAGE=$(get_app_image_name "$APP")
|
||||||
local DOKKU_APP_CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
|
||||||
local DOKKU_APP_HOST_CACHE_DIR="$DOKKU_HOST_ROOT/$APP/cache"
|
|
||||||
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL dokku=" "--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.image-stage=build" "--change" "LABEL com.dokku.builder-type=herokuish" "--change" "LABEL com.dokku.app-name=$APP")
|
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL dokku=" "--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.image-stage=build" "--change" "LABEL com.dokku.builder-type=herokuish" "--change" "LABEL com.dokku.app-name=$APP")
|
||||||
local DOCKER_RUN_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=herokuish" "--label=com.dokku.app-name=$APP")
|
local DOCKER_RUN_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=herokuish" "--label=com.dokku.app-name=$APP")
|
||||||
local CID TAR_CID
|
local CID TAR_CID
|
||||||
@@ -49,7 +57,6 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$TAR_CID" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$TAR_CID" "$IMAGE" >/dev/null
|
||||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
||||||
|
|
||||||
[[ -d $DOKKU_APP_CACHE_DIR ]] || mkdir -p "$DOKKU_APP_CACHE_DIR"
|
|
||||||
plugn trigger pre-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
plugn trigger pre-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
|
|
||||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||||
@@ -60,8 +67,8 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||||
|
|
||||||
local DOKKU_CONTAINER_EXIT_CODE=0
|
local DOKKU_CONTAINER_EXIT_CODE=0
|
||||||
if ! CID=$("$DOCKER_BIN" container create "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -v "$DOKKU_APP_HOST_CACHE_DIR:/cache" --env=CACHE_PATH=/cache "${ARG_ARRAY[@]}" "$IMAGE" /build); then
|
fn-builder-herokuish-ensure-cache "$APP"
|
||||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
if ! CID=$("$DOCKER_BIN" container create "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -v "cache-$APP:/cache" --env=CACHE_PATH=/cache "${ARG_ARRAY[@]}" "$IMAGE" /build); then
|
||||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||||
dokku_log_warn "Failure during app build"
|
dokku_log_warn "Failure during app build"
|
||||||
return 1
|
return 1
|
||||||
@@ -70,7 +77,6 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
plugn trigger post-container-create "app" "$CID" "$APP" "build"
|
plugn trigger post-container-create "app" "$CID" "$APP" "build"
|
||||||
"$DOCKER_BIN" container start "$CID" >/dev/null || DOKKU_CONTAINER_EXIT_CODE=$?
|
"$DOCKER_BIN" container start "$CID" >/dev/null || DOKKU_CONTAINER_EXIT_CODE=$?
|
||||||
if ! "$DOCKER_BIN" container attach "$CID"; then
|
if ! "$DOCKER_BIN" container attach "$CID"; then
|
||||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
|
||||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||||
dokku_log_warn "Failure during app build"
|
dokku_log_warn "Failure during app build"
|
||||||
return 1
|
return 1
|
||||||
@@ -78,15 +84,17 @@ trigger-builder-herokuish-builder-build() {
|
|||||||
|
|
||||||
DOKKU_CONTAINER_EXIT_CODE="$("$DOCKER_BIN" container wait "$CID" 2>/dev/null || echo "$DOKKU_CONTAINER_EXIT_CODE")"
|
DOKKU_CONTAINER_EXIT_CODE="$("$DOCKER_BIN" container wait "$CID" 2>/dev/null || echo "$DOKKU_CONTAINER_EXIT_CODE")"
|
||||||
if [[ "$DOKKU_CONTAINER_EXIT_CODE" -ne 0 ]]; then
|
if [[ "$DOKKU_CONTAINER_EXIT_CODE" -ne 0 ]]; then
|
||||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
|
||||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||||
dokku_log_warn "Failure during app build"
|
dokku_log_warn "Failure during app build"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
|
||||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
|
||||||
plugn trigger scheduler-register-retired "$APP" "$CID"
|
plugn trigger scheduler-register-retired "$APP" "$CID"
|
||||||
|
|
||||||
|
# ensure we have a port mapping
|
||||||
|
plugn trigger ports-configure "$APP"
|
||||||
|
plugn trigger ports-set-detected "$APP" "http:$(plugn trigger ports-get-property "$APP" proxy-port):5000"
|
||||||
plugn trigger post-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
plugn trigger post-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user