Compare commits
542 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e11499e676 | ||
|
|
a56f173568 | ||
|
|
cae35e6701 | ||
|
|
66a772b8c7 | ||
|
|
c91a6d1a55 | ||
|
|
e86f49e64a | ||
|
|
cb5a782f92 | ||
|
|
610a2ca477 | ||
|
|
234969866e | ||
|
|
9cf8e7b0bb | ||
|
|
4da5f5e7ac | ||
|
|
72a4637beb | ||
|
|
ea1316fdfc | ||
|
|
18deebaea2 | ||
|
|
57da0e1ff0 | ||
|
|
908d203a64 | ||
|
|
88631483b4 | ||
|
|
cef73e7872 | ||
|
|
583fb52f8d | ||
|
|
39ab4808a7 | ||
|
|
d82ad0a10a | ||
|
|
62caa85423 | ||
|
|
b70e59f9ff | ||
|
|
75a9b2a4d2 | ||
|
|
0c96e5deb9 | ||
|
|
a97862dd7b | ||
|
|
061a812f50 | ||
|
|
f5d5b4fcda | ||
|
|
6e50444d05 | ||
|
|
d525d51221 | ||
|
|
5dc3018d6d | ||
|
|
d84df2cc41 | ||
|
|
d61b830e4a | ||
|
|
cd7d47c381 | ||
|
|
3ef092fda9 | ||
|
|
99e98fb68a | ||
|
|
fb6502044c | ||
|
|
49e48f5f56 | ||
|
|
0b8fbfdeb9 | ||
|
|
5a2decb4e4 | ||
|
|
99fcd613fe | ||
|
|
c4b8bd8da9 | ||
|
|
309dd5a614 | ||
|
|
1b32ccbe38 | ||
|
|
c482a3ff37 | ||
|
|
f39fd64a5b | ||
|
|
38a13ecd39 | ||
|
|
7d59b45fdb | ||
|
|
c6a6eff7db | ||
|
|
c5575bb300 | ||
|
|
293050bc17 | ||
|
|
f8c9efe230 | ||
|
|
057c418be4 | ||
|
|
0be0ad7ef7 | ||
|
|
eeaa6799fd | ||
|
|
7fd1882dbb | ||
|
|
76c0aed2ad | ||
|
|
b9c331cf99 | ||
|
|
e789504db1 | ||
|
|
e15ebe6a94 | ||
|
|
2b5a49cdc6 | ||
|
|
b50f2cb45e | ||
|
|
7fa9b72144 | ||
|
|
62a361cbe0 | ||
|
|
b881be1cfe | ||
|
|
c230a6ac90 | ||
|
|
82ad2bbd17 | ||
|
|
0d3fd1e943 | ||
|
|
051a329873 | ||
|
|
aa156b2834 | ||
|
|
6d62835734 | ||
|
|
b968ced6e9 | ||
|
|
48dc5d8cc1 | ||
|
|
8186934f72 | ||
|
|
0b758d2ba0 | ||
|
|
bd47c76d26 | ||
|
|
3f0c46d43d | ||
|
|
cd21e90edf | ||
|
|
3d34625399 | ||
|
|
c9c0d11b66 | ||
|
|
8e2fc50746 | ||
|
|
35d026bf38 | ||
|
|
09bf7cb3f0 | ||
|
|
9f0fe29417 | ||
|
|
855fc1e672 | ||
|
|
8dbe59bff7 | ||
|
|
66d327a5d1 | ||
|
|
054bf26b0e | ||
|
|
329e97c8ee | ||
|
|
0bce3238bc | ||
|
|
ac821d92cf | ||
|
|
db412399ba | ||
|
|
7100853a2e | ||
|
|
994e220ebf | ||
|
|
a33add8000 | ||
|
|
231ab0ecd4 | ||
|
|
0b09d38e2e | ||
|
|
0007df1fc1 | ||
|
|
de908efda1 | ||
|
|
3f85b682fb | ||
|
|
05486d6df1 | ||
|
|
e6bf778a65 | ||
|
|
6ecf6c31ba | ||
|
|
130b9d6c4b | ||
|
|
f4a37f6867 | ||
|
|
2a5fcd001e | ||
|
|
b961f01906 | ||
|
|
c0957ebfc3 | ||
|
|
137ea8c30d | ||
|
|
e8a31141fc | ||
|
|
d3ef846b59 | ||
|
|
b5be68f9d0 | ||
|
|
6fd4b5adb1 | ||
|
|
26e8524ae5 | ||
|
|
09b656e37e | ||
|
|
59316f4a21 | ||
|
|
cff51b8ec9 | ||
|
|
e5a9d29215 | ||
|
|
9beefe923f | ||
|
|
009e37d840 | ||
|
|
b06aeeccb1 | ||
|
|
1ba5269779 | ||
|
|
94357b961e | ||
|
|
579d430303 | ||
|
|
7199d37636 | ||
|
|
93080498f6 | ||
|
|
00f3d498a2 | ||
|
|
de84a038d2 | ||
|
|
11e9cd13ae | ||
|
|
9d3785147e | ||
|
|
8e4dc1c2d0 | ||
|
|
2be8df1228 | ||
|
|
9f32747c98 | ||
|
|
acff195fcb | ||
|
|
b4d7d37d9b | ||
|
|
d978f98c23 | ||
|
|
973313e3aa | ||
|
|
fdf09adcd5 | ||
|
|
02e2fa73f5 | ||
|
|
7389bb3f03 | ||
|
|
2949e1125f | ||
|
|
38cbcb33ed | ||
|
|
2e774f0806 | ||
|
|
8987ec6704 | ||
|
|
63f4ec3867 | ||
|
|
d336d7c5c2 | ||
|
|
ebd27cd666 | ||
|
|
b1ae58f968 | ||
|
|
0b40414170 | ||
|
|
acdc0109aa | ||
|
|
b1b67b3238 | ||
|
|
7d7c035b57 | ||
|
|
799a5713c2 | ||
|
|
5dd297bb49 | ||
|
|
5801fd98a4 | ||
|
|
9d3538d587 | ||
|
|
3a961d2de7 | ||
|
|
c2c2e2ccbd | ||
|
|
0740636d53 | ||
|
|
77f9862549 | ||
|
|
e19b52442b | ||
|
|
b04080bcb1 | ||
|
|
04e1837e9e | ||
|
|
ce275837ac | ||
|
|
4c7cd3f2af | ||
|
|
1e0899ee04 | ||
|
|
57cf1dce61 | ||
|
|
1a57c30bae | ||
|
|
cfee47f382 | ||
|
|
962818b0ea | ||
|
|
848373def5 | ||
|
|
bcc5516afe | ||
|
|
411aa119a3 | ||
|
|
d759c6c12d | ||
|
|
0c388615cc | ||
|
|
e30d9fdba3 | ||
|
|
53f520d5c6 | ||
|
|
35252444e1 | ||
|
|
1b6c0ce6b6 | ||
|
|
aa6a651f1d | ||
|
|
7357579af2 | ||
|
|
4a60497d3e | ||
|
|
7a1537e38e | ||
|
|
e67b96780d | ||
|
|
b0abeb49dd | ||
|
|
ef7894fdfa | ||
|
|
be5ea845fc | ||
|
|
1cb586b2e7 | ||
|
|
95935f5944 | ||
|
|
deea791e58 | ||
|
|
d6391de55f | ||
|
|
58de433afa | ||
|
|
cacd7e169c | ||
|
|
bd539797db | ||
|
|
37c83e1c52 | ||
|
|
b3a802a965 | ||
|
|
2d9f0f939c | ||
|
|
ab509a7424 | ||
|
|
52ef7e7cdc | ||
|
|
231078125a | ||
|
|
16d8bd480c | ||
|
|
e282c2dd7e | ||
|
|
ca3a306b30 | ||
|
|
c8537bff48 | ||
|
|
9818cc6461 | ||
|
|
8eb32e4371 | ||
|
|
b1c6f66fc7 | ||
|
|
b8c8797c6e | ||
|
|
385aed85b9 | ||
|
|
d39f4ce54d | ||
|
|
46b83d06cc | ||
|
|
397527eb21 | ||
|
|
ec4bd32169 | ||
|
|
a8c4065dcf | ||
|
|
6940035d78 | ||
|
|
13be4d07a6 | ||
|
|
b5f2d82f49 | ||
|
|
73e7ff7b18 | ||
|
|
89e2be720e | ||
|
|
001e431fa1 | ||
|
|
d42fb02136 | ||
|
|
bb176e4130 | ||
|
|
5de1c298eb | ||
|
|
414ea55ca8 | ||
|
|
e425092d00 | ||
|
|
26e3232f2c | ||
|
|
10d2fdea92 | ||
|
|
7c11e32e1c | ||
|
|
69f5f6c475 | ||
|
|
47759439d7 | ||
|
|
fc8a8d6138 | ||
|
|
4613efe191 | ||
|
|
74e62e38f9 | ||
|
|
dcb79f8c0b | ||
|
|
6ff05715e5 | ||
|
|
fb449ab630 | ||
|
|
32e45107f7 | ||
|
|
a134111f79 | ||
|
|
5ec35496d8 | ||
|
|
f485062677 | ||
|
|
d068ab9722 | ||
|
|
30866dd98b | ||
|
|
e939eeb652 | ||
|
|
22ccfe6442 | ||
|
|
f4a55172da | ||
|
|
686c16fa32 | ||
|
|
743896ff56 | ||
|
|
9937068d41 | ||
|
|
5ee37fde2d | ||
|
|
686a577037 | ||
|
|
b7c2e4c1d6 | ||
|
|
566cd25336 | ||
|
|
6fc3f58cb7 | ||
|
|
8958ea0f2d | ||
|
|
7dd4efad39 | ||
|
|
9485f26e9b | ||
|
|
69c8c0141d | ||
|
|
782e4cba64 | ||
|
|
c9f488f8b8 | ||
|
|
63b18cc902 | ||
|
|
8b41bc6520 | ||
|
|
4a4432af16 | ||
|
|
4c3f55896e | ||
|
|
ecb1732d5b | ||
|
|
78d0857da3 | ||
|
|
df9344c245 | ||
|
|
6b431378a1 | ||
|
|
38a58a17e4 | ||
|
|
d2ecd76646 | ||
|
|
ca5946636f | ||
|
|
6a92368059 | ||
|
|
90681ce475 | ||
|
|
adabaa286f | ||
|
|
840f113a4f | ||
|
|
f82cb325d8 | ||
|
|
347372d5fe | ||
|
|
cf246f206b | ||
|
|
d4988ed182 | ||
|
|
c3c4b5d42b | ||
|
|
8118fd9743 | ||
|
|
0a3133fbcc | ||
|
|
18f388ad76 | ||
|
|
55d1b896fd | ||
|
|
08a104b997 | ||
|
|
be886ef1f6 | ||
|
|
83cccc0af1 | ||
|
|
4c1b9989aa | ||
|
|
5dc6c829b3 | ||
|
|
ce60ef6bff | ||
|
|
e1cbf08a95 | ||
|
|
168d4b5e8d | ||
|
|
b4ab5a5764 | ||
|
|
645ba5728f | ||
|
|
02d653a1aa | ||
|
|
39c7699962 | ||
|
|
9b05804edf | ||
|
|
fe9472ff09 | ||
|
|
79b344bbe4 | ||
|
|
e3f0160e5f | ||
|
|
4d9e8f5f7d | ||
|
|
2429503b21 | ||
|
|
ff4b0de04c | ||
|
|
9078dabc82 | ||
|
|
a18bb02115 | ||
|
|
8ea12f6c5d | ||
|
|
a1b1d5cba1 | ||
|
|
bb4b6df651 | ||
|
|
3568cbef8c | ||
|
|
8382bebcf2 | ||
|
|
02dca4a1a3 | ||
|
|
4dd000ca9e | ||
|
|
297041bfc4 | ||
|
|
52f6e8c59b | ||
|
|
c6ec59be87 | ||
|
|
404f08626b | ||
|
|
6a9629cdc4 | ||
|
|
d6c3c52cec | ||
|
|
52cd280782 | ||
|
|
815febdb39 | ||
|
|
2d76284a8c | ||
|
|
347b0f5389 | ||
|
|
9e9a19a817 | ||
|
|
ddfc3ba696 | ||
|
|
d581f2de64 | ||
|
|
a35798e357 | ||
|
|
0c25465df4 | ||
|
|
906e2c5615 | ||
|
|
3b04b80a94 | ||
|
|
00a175bef7 | ||
|
|
a3a37a1948 | ||
|
|
6527552a62 | ||
|
|
55e2681ad7 | ||
|
|
81257cafa1 | ||
|
|
8964f77978 | ||
|
|
72d480c9dd | ||
|
|
e66c2373a7 | ||
|
|
af38710352 | ||
|
|
d432cb514c | ||
|
|
db4311c655 | ||
|
|
c4d69b662f | ||
|
|
972830a5f3 | ||
|
|
e3c81afb6a | ||
|
|
fe206d53d9 | ||
|
|
096e9346ad | ||
|
|
5f342dcf27 | ||
|
|
e02528280b | ||
|
|
63358c3d34 | ||
|
|
0f5ed9844b | ||
|
|
200de06d1e | ||
|
|
3d1ab26777 | ||
|
|
71295b7658 | ||
|
|
9539c28ef4 | ||
|
|
d8653f97b7 | ||
|
|
a5e6739e16 | ||
|
|
dd7d1d2f8d | ||
|
|
2a747138af | ||
|
|
935c231518 | ||
|
|
10385e9877 | ||
|
|
32027da467 | ||
|
|
3dd583213c | ||
|
|
91f4de2f68 | ||
|
|
4b8acf5c34 | ||
|
|
53e272ab22 | ||
|
|
6decb6f19a | ||
|
|
ce3b8c3d5c | ||
|
|
b86fb133b2 | ||
|
|
6d68ddfcb9 | ||
|
|
827354d3d1 | ||
|
|
81ab56d7ee | ||
|
|
58a7e535dd | ||
|
|
721b464de9 | ||
|
|
accfc3b793 | ||
|
|
80b20ec4c1 | ||
|
|
a355b8019a | ||
|
|
1494e07c34 | ||
|
|
c9cf213afb | ||
|
|
291e052ece | ||
|
|
72deeec81f | ||
|
|
5e6630f042 | ||
|
|
b44aa8b8ea | ||
|
|
ad2d219691 | ||
|
|
986400c8e2 | ||
|
|
48ee225dbe | ||
|
|
9f395318b3 | ||
|
|
3f0051a04f | ||
|
|
8841f91767 | ||
|
|
afc2d13b40 | ||
|
|
45395743fe | ||
|
|
1d1458862b | ||
|
|
92c81cc05d | ||
|
|
60bed60fa9 | ||
|
|
baec410580 | ||
|
|
77e51a39fa | ||
|
|
907f2d6344 | ||
|
|
0a9997ee3a | ||
|
|
ed60adfdc8 | ||
|
|
1406283b63 | ||
|
|
e34d8431da | ||
|
|
09a5c292cd | ||
|
|
9f9ebc99ec | ||
|
|
35ed98ae71 | ||
|
|
8f70e25e12 | ||
|
|
605bbb165a | ||
|
|
54703c9216 | ||
|
|
daf03a6389 | ||
|
|
e67324cac9 | ||
|
|
8ab1abd3b4 | ||
|
|
23731f6561 | ||
|
|
9fe3f49cb4 | ||
|
|
750a31013f | ||
|
|
814385eda9 | ||
|
|
438261b1f9 | ||
|
|
2044496750 | ||
|
|
798793f7f8 | ||
|
|
e799709391 | ||
|
|
2326195eea | ||
|
|
40564464f9 | ||
|
|
54c987ea16 | ||
|
|
a513047e5a | ||
|
|
1c17e43bb7 | ||
|
|
431dc6c1a0 | ||
|
|
8bb559c965 | ||
|
|
50863a9b76 | ||
|
|
a1860bae14 | ||
|
|
fa8267ca09 | ||
|
|
9dae004651 | ||
|
|
f9e163c63a | ||
|
|
e561f87b17 | ||
|
|
48ade9853f | ||
|
|
78621481a6 | ||
|
|
92de37b23a | ||
|
|
35287a2d28 | ||
|
|
360c587086 | ||
|
|
844b86840a | ||
|
|
94f5c04bf3 | ||
|
|
e76f8da482 | ||
|
|
4d1beedd05 | ||
|
|
b3bc109abe | ||
|
|
0b1775746d | ||
|
|
592b10122d | ||
|
|
f1dd722971 | ||
|
|
24c47e17f8 | ||
|
|
8c6e4c6483 | ||
|
|
34b5234e2f | ||
|
|
b05a2b6da2 | ||
|
|
9ed22eafea | ||
|
|
498bdd0491 | ||
|
|
92ac9cc729 | ||
|
|
9c68cd53fc | ||
|
|
3b3fc5d5c1 | ||
|
|
b4e95fe0d5 | ||
|
|
7bd4d32cb3 | ||
|
|
903d7ce614 | ||
|
|
12f3c12070 | ||
|
|
cb281e17e6 | ||
|
|
06b565f3e5 | ||
|
|
798725bb54 | ||
|
|
a3ef91f2ae | ||
|
|
cd28fe69a5 | ||
|
|
f1ead08549 | ||
|
|
6e3fddb544 | ||
|
|
dd2bbc7722 | ||
|
|
a9ce738f68 | ||
|
|
0e219b05e9 | ||
|
|
ea9cf024d5 | ||
|
|
0d1952592e | ||
|
|
43e7ee06fb | ||
|
|
692bfa7cde | ||
|
|
dbcfb7ee9f | ||
|
|
5f80cd3c20 | ||
|
|
eecee94e70 | ||
|
|
f55dc640ec | ||
|
|
a4ac67a1e0 | ||
|
|
14838de344 | ||
|
|
6b6b1c2aa4 | ||
|
|
8662f4550f | ||
|
|
78dba3be3c | ||
|
|
76911a7dc8 | ||
|
|
68de421630 | ||
|
|
ccbe0b0877 | ||
|
|
6a7d2e5252 | ||
|
|
f83a03a3dc | ||
|
|
44fcea0ffa | ||
|
|
c02059c965 | ||
|
|
92d2895d99 | ||
|
|
2b93c76b1d | ||
|
|
8cbaf1e004 | ||
|
|
b4c4d5d70f | ||
|
|
a00d9de400 | ||
|
|
a36ebd130d | ||
|
|
5b1763aa4a | ||
|
|
53c8f61ffc | ||
|
|
b806154e90 | ||
|
|
1be6ace7b5 | ||
|
|
9d9530b01d | ||
|
|
c4838b4af9 | ||
|
|
5ca3ca5189 | ||
|
|
3457844687 | ||
|
|
346e8284c8 | ||
|
|
180a5e79c9 | ||
|
|
377166d822 | ||
|
|
9256248cfd | ||
|
|
e074cffd4f | ||
|
|
30ac3c24c0 | ||
|
|
4c766b8f0e | ||
|
|
e30fad51de | ||
|
|
9734d09ff1 | ||
|
|
0c3f659854 | ||
|
|
2b1c8f64fb | ||
|
|
2cf3a3d0cf | ||
|
|
4105f0027c | ||
|
|
1dc2a7e20a | ||
|
|
d8753ca8d4 | ||
|
|
d68d02b204 | ||
|
|
8e7a51daec | ||
|
|
8b046b9bd7 | ||
|
|
5b19256109 | ||
|
|
79b0bebb78 | ||
|
|
950b7ed6be | ||
|
|
9432cdd37c | ||
|
|
5bd499a9bc | ||
|
|
5506c9e27d | ||
|
|
e07703645e | ||
|
|
3ca6245b00 | ||
|
|
925c6c4c28 | ||
|
|
0588b6f161 | ||
|
|
fee2d50148 | ||
|
|
9a2c8e04a5 | ||
|
|
2517d392a4 | ||
|
|
a0b6663bef | ||
|
|
5fb7b0a74c | ||
|
|
026d04a65f | ||
|
|
94ace70626 | ||
|
|
2d36dc2a04 | ||
|
|
f3819a46e9 | ||
|
|
c66e08041a | ||
|
|
9e9f601690 | ||
|
|
c9bc4f8615 | ||
|
|
34ee8e7079 | ||
|
|
4ab30b8c14 | ||
|
|
3bc6f071cf | ||
|
|
0669121242 |
@@ -13,13 +13,8 @@ jobs:
|
||||
- run: |
|
||||
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
- run: |
|
||||
if [[ "$(lsb_release -rs)" == "14.04" ]]; then
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
else
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to ens4
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev ens4
|
||||
fi
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to ens4
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev ens4
|
||||
- run: |
|
||||
case $CIRCLE_NODE_INDEX in
|
||||
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
|
||||
|
||||
@@ -7,6 +7,7 @@ build
|
||||
docs
|
||||
tests
|
||||
!build/dokku.deb
|
||||
!tests/dhparam.pem
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/dokku-update
|
||||
!contrib/bash-completion
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
---
|
||||
linters:
|
||||
shellcheck:
|
||||
shell: bash
|
||||
@@ -5,6 +6,8 @@ linters:
|
||||
golint:
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- './debian/*'
|
||||
- '*/vendor/*'
|
||||
ignore:
|
||||
- 'debian/*'
|
||||
- 'docs/*'
|
||||
- 'tests/*'
|
||||
- '*/vendor/*'
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at dokku@josediazgonzalez.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
20
Dockerfile
20
Dockerfile
@@ -10,22 +10,25 @@ ARG DOKKU_SKIP_KEY_FILE=true
|
||||
ARG DOKKU_VHOST_ENABLE=false
|
||||
ARG DOKKU_WEB_CONFIG=false
|
||||
|
||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
|
||||
RUN addgroup --gid $DOKKU_GID dokku \
|
||||
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
|
||||
|
||||
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
|
||||
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | debconf-set-selections \
|
||||
&& curl -sSL https://packagecloud.io/dokku/dokku/gpgkey | apt-key add - \
|
||||
&& echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/dokku.list \
|
||||
&& mkdir -p /etc/nginx/ \
|
||||
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install --no-install-recommends --only-upgrade -y -qq openssl openssh-server \
|
||||
&& apt --no-install-recommends -qq -y install rsync /tmp/dokku.deb \
|
||||
&& apt-get purge -y -q syslog-ng-core \
|
||||
&& apt-get autoremove -y -q \
|
||||
&& apt-get upgrade -qq -y \
|
||||
&& apt-get install --no-install-recommends --only-upgrade -qq -y openssl openssh-server \
|
||||
&& apt install --no-install-recommends -qq -y rsync /tmp/dokku.deb \
|
||||
&& apt-get purge -qq -y syslog-ng-core \
|
||||
&& apt-get autoremove -qq -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
WORKDIR /tmp
|
||||
@@ -47,6 +50,7 @@ RUN \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
|
||||
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
|
||||
&& rm /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
||||
&& rm /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/*
|
||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/* /var/log/openresty/*
|
||||
|
||||
514
HISTORY.md
514
HISTORY.md
@@ -1,5 +1,519 @@
|
||||
# History
|
||||
|
||||
## 0.20.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.20.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3921: @josegonzalez Correct container_type handling when entering containers
|
||||
- #3919: @josegonzalez Fix bug with restarting containers not being routed to because of changing IP addresses
|
||||
|
||||
### New Features
|
||||
|
||||
- #3920: @josegonzalez Add the ability to list ssh keys for a specific user
|
||||
|
||||
## 0.20.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.20.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3916: @josegonzalez Change error exit to warning when no apps exist
|
||||
|
||||
### New Features
|
||||
|
||||
- #3918: @josegonzalez Upgrade herokuish to 0.5.11
|
||||
- #3915: @josegonzalez Add ability to check if a plugin has been installed
|
||||
- #3914: @josegonzalez Add ability to change or disable the access/error log path
|
||||
- #3913: @josegonzalez Upgrade herokuish
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3907: @josegonzalez Add sponsoring link to issue template
|
||||
- #3904: @jazzzz Update dokku-apt entry
|
||||
- #3902: @josegonzalez Remove extra commas from network docs
|
||||
|
||||
### Other
|
||||
|
||||
- #3909: @dependabot-preview[bot] chore(deps): bump werkzeug from 1.0.0 to 1.0.1 in /tests/apps/python-flask
|
||||
- #3903: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 172 to 173 in /tests/apps/php
|
||||
|
||||
## 0.20.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.20.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3891: @josegonzalez Add missing cpio dependency
|
||||
- #3861: @josegonzalez Fix app clone and rename calls
|
||||
- #3682: @josegonzalez Force tty check to run with the default language
|
||||
- #3853: @josegonzalez Add missing hooks to events plugin
|
||||
|
||||
### New Features
|
||||
|
||||
- #3899: @josegonzalez Drop unnecessary quotes on docker inspect calls
|
||||
- #3895: @josegonzalez Expose network listeners to nginx templates for all process types
|
||||
- #3893: @josegonzalez Rewrite apps plugin in golang
|
||||
- #3889: @josegonzalez Update herokuish
|
||||
- #3879: @josegonzalez Drop support for unsupported Debian and Ubuntu releases …
|
||||
- #3880: @josegonzalez Remove unnecessary source/import statements
|
||||
- #3871: @josegonzalez Rewrite proxy plugin in golang
|
||||
- #3869: @josegonzalez Standardize plugin trigger calls
|
||||
- #3870: @josegonzalez Use Println in favor of Fprintln for os.Stdout
|
||||
- #3868: @josegonzalez Remove ps command
|
||||
- #3866: @josegonzalez Unify nginx config commands
|
||||
- #3865: @josegonzalez Cleanup injected docker labels
|
||||
- #3860: @josegonzalez Remove deprecated egrep calls from codebase
|
||||
- #3854: @josegonzalez Remove deprecated code
|
||||
- #3852: @josegonzalez Standardize plugin code
|
||||
- #3850: @josegonzalez DRY up reports in golang
|
||||
- #3851: @josegonzalez Update herokuish to 0.5.6
|
||||
- #3847: @josegonzalez Custom docker networking
|
||||
- #3848: @josegonzalez Minor logging changes
|
||||
- #3843: @josegonzalez Enable HSTS by default
|
||||
- #3844: @josegonzalez Add global fallback for DOKKU_PROXY_PORT and DOKKU_PROXY_SSL_PORT
|
||||
- #3609: @jayjun Start long running containers with --init with tests
|
||||
- #3842: @josegonzalez rework docker-args-process trigger arguments
|
||||
- #3841: @josegonzalez Implement docker-options:clear
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3901: @Cellane 📝 Update information about Dokku CLI installation
|
||||
- #3892: @josegonzalez Move code of conduct to .github org repository
|
||||
- #3888: @decentral1se Mark 9+ for Debian version
|
||||
- #3874: @josegonzalez Push users to upgrade to recent versions
|
||||
- #3864: @alex-galey Change docs copyright to 2020
|
||||
- #3863: @josegonzalez Update issue template to remove ambiguity around reporting
|
||||
- #3849: @josegonzalez Reference correct property in network docs example
|
||||
- #3840: @ollej Add link to fonts plugin
|
||||
- #3838: @ltalirz Expand docs surrounding access control
|
||||
|
||||
### Other
|
||||
|
||||
- #3897: @dependabot-preview[bot] chore(deps): bump github.com/golang/protobuf from 1.3.4 to 1.3.5 in /tests/apps/gogrpc
|
||||
- #3896: @dependabot-preview[bot] chore(deps): bump maven-dependency-plugin from 3.1.1 to 3.1.2 in /tests/apps/java
|
||||
- #3894: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.27.1 to 1.28.0 in /tests/apps/gogrpc
|
||||
- #3885: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 171 to 172 in /tests/apps/php
|
||||
- #3884: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.26.v20200117 to 9.4.27.v20200227 in /tests/apps/java
|
||||
- #3877: @dependabot-preview[bot] chore(deps): bump github.com/golang/protobuf from 1.3.3 to 1.3.4 in /tests/apps/gogrpc
|
||||
- #3858: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 170 to 171 in /tests/apps/php
|
||||
- #3855: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 169 to 170 in /tests/apps/php
|
||||
- #3846: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.16.1 to 1.0.0 in /tests/apps/python-flask
|
||||
- #3845: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.27.0 to 1.27.1 in /tests/apps/gogrpc
|
||||
- #3833: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.26.0 to 1.27.0 in /tests/apps/gogrpc
|
||||
- #3837: @dependabot-preview[bot] chore(deps): bump jinja2 from 2.10.3 to 2.11.1 in /tests/apps/python-flask
|
||||
- #3836: @dependabot-preview[bot] chore(deps): bump github.com/golang/protobuf from 1.3.2 to 1.3.3 in /tests/apps/gogrpc
|
||||
- #3829: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.16.0 to 0.16.1 in /tests/apps/python-flask
|
||||
- #3830: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 166 to 169 in /tests/apps/php
|
||||
|
||||
## 0.19.13
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.13/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.13 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3828: @josegonzalez Reference correct file in nginx:report command
|
||||
|
||||
### Other
|
||||
|
||||
- #3824: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.25.v20191220 to 9.4.26.v20200117 in /tests/apps/java
|
||||
|
||||
## 0.19.12
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.12/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.12 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3819: @josegonzalez Allow binding nginx to specific IPv4/IPv6 interfaces
|
||||
- #3818: @josegonzalez Add support for host-mode networking
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3814: @treyssatvincent Use dokku:report to for listing domains
|
||||
- #3809: @josegonzalez Document nginx:show-conf
|
||||
- #3650: @vincelwt Clarify resource management for docker-local scheduler
|
||||
- #3806: @kimar Make default vhost example listen to ipv6
|
||||
|
||||
### Other
|
||||
|
||||
- #3816: @dependabot-preview[bot] chore(deps): bump handlebars from 4.6.0 to 4.7.1 in /tests/apps/.websocket.disabled
|
||||
- #3815: @dependabot-preview[bot] chore(deps): bump handlebars from 4.5.3 to 4.6.0 in /tests/apps/.websocket.disabled
|
||||
- #3811: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 165 to 166 in /tests/apps/php
|
||||
- #3812: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.24.v20191120 to 9.4.25.v20191220 in /tests/apps/java
|
||||
- #3810: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.25.2 to 1.25.3 in /tests/apps/php
|
||||
- #3808: @dependabot-preview[bot] chore(deps): [security] bump rack from 1.6.11 to 1.6.12 in /tests/apps/ruby
|
||||
- #3807: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.25.1 to 1.26.0 in /tests/apps/gogrpc
|
||||
- #3804: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 164 to 165 in /tests/apps/php
|
||||
|
||||
## 0.19.11
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.11/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.11 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3800: @josegonzalez Properly track failed check count
|
||||
|
||||
### New Features
|
||||
|
||||
- #3801: @josegonzalez Update herokuish
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3798: @znz Fix function descriptions in property-functions file
|
||||
|
||||
## 0.19.10
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.10 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3784: @josegonzalez Ensure checks attempts are tracked per-check instead of globally
|
||||
|
||||
### New Features
|
||||
|
||||
- #3793: @josegonzalez Omit DWARF symbol table and debug information from go binaries
|
||||
- #3792: @josegonzalez Unify property function implementations
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3712: @fruitl00p Added new plugin
|
||||
|
||||
### Other
|
||||
|
||||
- #3790: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/python-flask
|
||||
- #3791: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/multi
|
||||
- #3787: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/multi
|
||||
- #3788: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/python-flask
|
||||
- #3785: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/python-flask
|
||||
- #3786: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/multi
|
||||
- #3748: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-dokku-scale
|
||||
- #3749: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noappjson
|
||||
- #3747: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/config
|
||||
- #3746: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile
|
||||
- #3741: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express
|
||||
- #3783: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.23.v20191118 to 9.4.24.v20191120 in /tests/apps/java
|
||||
- #3777: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 3.4.32 to 3.4.35 in /tests/apps/php
|
||||
- #3774: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/python-flask
|
||||
- #3779: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.25.1 to 1.25.2 in /tests/apps/php
|
||||
- #3782: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.22.v20191022 to 9.4.23.v20191118 in /tests/apps/java
|
||||
|
||||
## 0.19.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3781: @michaelshobbs Respect DOKKU_APP_USER in is_image_herokuish_based
|
||||
|
||||
### Other
|
||||
|
||||
- #3773: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.25.0 to 1.25.1 in /tests/apps/gogrpc
|
||||
- #3772: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/multi
|
||||
- #3778: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 3.4.32 to 3.4.35 in /tests/apps/php
|
||||
- #3768: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.24.0 to 1.25.0 in /tests/apps/gogrpc
|
||||
|
||||
## 0.19.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
## 0.19.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3765: @znz Fix typo in desc of is_tls13_available
|
||||
|
||||
### Other
|
||||
|
||||
- #3739: @safeforge dokku run do not supports interactive mode.
|
||||
- #3762: @dependabot-preview[bot] chore(deps): bump handlebars from 4.4.5 to 4.5.1 in /tests/apps/.websocket.disabled
|
||||
|
||||
## 0.19.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
- #3761: @pithyless Fix type-errors in dokku-installer.py
|
||||
- #3759: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 163 to 164 in /tests/apps/php
|
||||
- #3758: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.21.v20190926 to 9.4.22.v20191022 in /tests/apps/java
|
||||
|
||||
## 0.19.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3756: @jayjun Redirect missing key_file warning to stderr
|
||||
|
||||
## 0.19.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3755: @dean1012 Warn if key_file is missing on install but do not exit
|
||||
|
||||
## 0.19.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3753: @josegonzalez Always use python3 for the installer
|
||||
|
||||
### Other
|
||||
|
||||
- #3743: @dependabot-preview[bot] chore(deps): [security] bump express from 3.1.2 to 4.17.1 in /tests/apps/.websocket.disabled
|
||||
- #3744: @dependabot-preview[bot] chore(deps): [security] bump handlebars from 1.0.12 to 4.4.5 in /tests/apps/.websocket.disabled
|
||||
- #3750: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile-bad
|
||||
- #3745: @dependabot-preview[bot] chore(deps): [security] bump express from 3.3.8 to 4.17.1 in /tests/apps/gitsubmodules
|
||||
- #3742: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noprocfile
|
||||
- #3729: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.12.0 to 1.25.1 in /tests/apps/php
|
||||
- #3732: @dependabot-preview[bot] chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
|
||||
- #3728: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 7.6.0.v20120127 to 9.4.21.v20190926 in /tests/apps/java
|
||||
- #3730: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.15.6 to 0.16.0 in /tests/apps/python-flask
|
||||
- #3737: @dependabot-preview[bot] chore(deps): bump express3-handlebars from 0.2.3 to 0.5.2 in /tests/apps/.websocket.disabled
|
||||
- #3734: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 59 to 163 in /tests/apps/php
|
||||
- #3735: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 2.6.4 to 2.8.51 in /tests/apps/php
|
||||
- #3723: @dependabot-preview[bot] chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
|
||||
- #3731: @dependabot-preview[bot] chore(deps): bump jinja2 from 2.10.1 to 2.10.3 in /tests/apps/python-flask
|
||||
- #3736: @dependabot-preview[bot] chore(deps): bump socket.io from 0.9.19 to 2.3.0 in /tests/apps/.websocket.disabled
|
||||
- #3726: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.23.0 to 1.24.0 in /tests/apps/gogrpc
|
||||
- #3727: @dependabot-preview[bot] chore(deps): bump maven-dependency-plugin from 2.4 to 3.1.1 in /tests/apps/java
|
||||
- #3733: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 2.6.4 to 2.8.50 in /tests/apps/php
|
||||
- #3720: @dependabot-preview[bot] chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
|
||||
- #3721: @dependabot-preview[bot] chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
|
||||
- #3719: @dependabot-preview[bot] chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
|
||||
|
||||
## 0.19.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3718: @josegonzalez Detect correct python binary to use
|
||||
|
||||
## 0.19.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3713: @josegonzalez Require nginx 1.13+ in order to enable tls1.3
|
||||
|
||||
## 0.19.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3688: @josegonzalez Correct shfmt issues
|
||||
- #3684: @josegonzalez Do not push betafish releases to docker hub
|
||||
- #3681: @josegonzalez Proper openresty support
|
||||
|
||||
### New Features
|
||||
|
||||
- #3687: @josegonzalez Add scheduler-post-run trigger
|
||||
- #3702: @josegonzalez Cleanup build and destroy logging output
|
||||
- #3693: @josegonzalez Remove ssh-keys user-auth trigger in favor of direct check in dokku binary
|
||||
- #3691: @josegonzalez Silence trigger logging
|
||||
- #3685: @josegonzalez Allow passing labels to one-off dokku containers
|
||||
- #3680: @josegonzalez Follow updated intermediate recommendations from the Mozilla SSL Config Generator
|
||||
- #3677: @josegonzalez Improve package build process
|
||||
- #3679: @josegonzalez Allow keeping the git directory during builds
|
||||
- #3577: @josegonzalez Use new-style docker management commands
|
||||
- #3678: @josegonzalez Add container-type to run and deploy containers
|
||||
- #3671: @josegonzalez Allow overriding checks doc url
|
||||
- #3662: @leshik Improve nginx ciphers compatibility
|
||||
- #3668: @josegonzalez Release latest docker image on release
|
||||
- #3659: @fzerorubigd Add support for grpc/grpcs port forwarding
|
||||
- #3690: @josegonzalez Add support for python3
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3701: @limenet Docs / Getting Started: use HTTPS instead of SSH for clone
|
||||
- #3699: @robhudson Add `dokku cleanup` to help output
|
||||
- #3669: @josegonzalez Fix reference to CHECKS file location
|
||||
|
||||
### Tests
|
||||
|
||||
- #3670: @josegonzalez Upgrade all python test deps
|
||||
|
||||
## 0.18.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3704: @josegonzalez Fail nginx:build-config if the image does not exist
|
||||
|
||||
## 0.18.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
- #3703: @scjody Update DOKKU_SCALE from Procfile during ps:scale
|
||||
|
||||
## 0.18.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3660: @josegonzalez Trigger builder-release for dockerfile correctly
|
||||
- #3655: @znz Fix filename of sshcommand tarball
|
||||
- #3648: @josegonzalez Copy the deb file before creating the image
|
||||
|
||||
### New Features
|
||||
|
||||
- #3656: @josegonzalez Allow users to customize the container start command
|
||||
- #3657: @josegonzalez Show error message when docker-related build commands fail
|
||||
- #3654: @josegonzalez Update herokuish to 0.5.3
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3652: @josegonzalez Correct issue in inspect call for issue template
|
||||
|
||||
## 0.18.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3645: @josegonzalez Use version in DOKKU_LIB_ROOT
|
||||
- #3644: @josegonzalez Refactor temp file handling
|
||||
- #3643: @josegonzalez Quiet deploy output
|
||||
- #3641: @josegonzalez Pass SOURCECODE_WORK_DIR to build-buildpack triggers
|
||||
- #3639: @josegonzalez Refer to upstream sshcommand package
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3642: @josegonzalez Correct issue with label change in docs
|
||||
- #3640: @josegonzalez Add missing popd to post-extract example
|
||||
|
||||
## 0.18.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3636: @josegonzalez Unify deb and rpm creation code
|
||||
- #3635: @josegonzalez Upgrade herokuish to 0.5.2
|
||||
|
||||
## 0.18.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
> If you're using Dokku - especially for commercial purposes - consider donating to project development via [OpenCollective](https://opencollective.com/dokku) or [Patreon](https://www.patreon.com/dokku). Funds go to general development, support, and infrastructure costs.
|
||||
>
|
||||
> If you'd like to sponsor specific functionality, see the project's [Sponsoring](https://github.com/dokku/.github/blob/master/SPONSORING.md) document.
|
||||
>
|
||||
> If you need help figuring out how to use a specific buildpack, or are having issues using multiple buildpacks, please see our [irc or slack channels](http://dokku.viewdocs.io/dokku/getting-started/where-to-get-help/#the-irc-and-slack-channels). Issues pertaining to buildpacks may be closed and locked.
|
||||
>
|
||||
> If you need support for a version of Dokku that is more than a year old, your issue may be closed without an answer. Please upgrade to a recent version.
|
||||
|
||||
## Description of problem
|
||||
|
||||
@@ -16,6 +20,8 @@
|
||||
|
||||
#### Expected Results
|
||||
|
||||
<-- Please replace APP_NAME with the name of your app -->
|
||||
|
||||
## Environment Information
|
||||
|
||||
### `dokku report APP_NAME` output
|
||||
@@ -23,14 +29,14 @@
|
||||
> This is required! Issues missing this information may be closed.
|
||||
>
|
||||
> For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
||||
> You may also run `dokku report` without any arguments to display the top-level reporting information.
|
||||
> In these cases, you may run `dokku report` without any arguments to display the top-level reporting information.
|
||||
|
||||
### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
|
||||
|
||||
### Additional information
|
||||
|
||||
- Container Inspect Output (if applicable) via `dokku inspect APP_NAME`
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Container Inspect Output (if applicable) via `dokku ps:inspect APP_NAME`
|
||||
- The nginx configuration (if applicable) via `dokku nginx:show-config APP_NAME`
|
||||
- Link to the exact repository being deployed (if possible/applicable):
|
||||
- If a deploy is failing or behaving unexpectedly:
|
||||
- Application name
|
||||
@@ -39,4 +45,4 @@
|
||||
- If using a `Dockerfile`, the contents of that file
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing Dokku commands after running `dokku trace:on`
|
||||
(BEWARE: `trace:on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
(BEWARE: `trace:on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXX):
|
||||
|
||||
21
Makefile
21
Makefile
@@ -2,7 +2,8 @@ DOKKU_VERSION ?= master
|
||||
|
||||
PROCFILE_VERSION ?= 0.6.0
|
||||
PLUGN_VERSION ?= 0.3.2
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.7.0/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.10.0
|
||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
@@ -107,10 +108,11 @@ addman: help2man man-db
|
||||
mandb
|
||||
|
||||
version:
|
||||
mkdir -p ${DOKKU_LIB_ROOT}
|
||||
ifeq ($(DOKKU_VERSION),master)
|
||||
git describe --tags > ~dokku/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
|
||||
git describe --tags > ${DOKKU_LIB_ROOT}/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ${DOKKU_LIB_ROOT}/VERSION
|
||||
else
|
||||
echo $(DOKKU_VERSION) > ~dokku/VERSION
|
||||
echo $(DOKKU_VERSION) > ${DOKKU_LIB_ROOT}/STABLE_VERSION
|
||||
endif
|
||||
|
||||
plugin-dependencies: plugn procfile-util
|
||||
@@ -119,12 +121,15 @@ plugin-dependencies: plugn procfile-util
|
||||
plugins: plugn procfile-util docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil dos2unix
|
||||
dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
apt-get update -qq
|
||||
|
||||
jq:
|
||||
apt-get install -qq -y jq
|
||||
|
||||
dos2unix:
|
||||
apt-get install -qq -y dos2unix
|
||||
|
||||
@@ -135,8 +140,8 @@ man-db:
|
||||
apt-get install -qq -y man-db
|
||||
|
||||
sshcommand:
|
||||
wget -qO /usr/local/bin/sshcommand ${SSHCOMMAND_URL}
|
||||
chmod +x /usr/local/bin/sshcommand
|
||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
||||
tar xzf /tmp/sshcommand_latest.tgz -C /usr/local/bin
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
|
||||
procfile-util:
|
||||
@@ -153,7 +158,7 @@ sigil:
|
||||
|
||||
docker:
|
||||
apt-get install -qq -y curl
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
grep -i -E "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
ifndef CI
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
@@ -169,7 +174,7 @@ ifdef BUILD_STACK
|
||||
@echo "Start building herokuish from source"
|
||||
docker images | grep gliderlabs/herokuish || (git clone ${STACK_URL} /tmp/herokuish && cd /tmp/herokuish && IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e ${BUILD_STACK_TARGETS} && rm -rf /tmp/herokuish)
|
||||
else
|
||||
ifeq ($(shell echo ${PREBUILT_STACK_URL} | egrep -q 'http.*://|file://' && echo $$?),0)
|
||||
ifeq ($(shell echo ${PREBUILT_STACK_URL} | grep -q -E 'http.*://|file://' && echo $$?),0)
|
||||
@echo "Start importing herokuish from ${PREBUILT_STACK_URL}"
|
||||
docker images | grep gliderlabs/herokuish || wget -nv -O - ${PREBUILT_STACK_URL} | gunzip -cd | docker import - gliderlabs/herokuish
|
||||
else
|
||||
|
||||
11
README.md
11
README.md
@@ -86,18 +86,21 @@ Support us with a monthly donation and help us continue our activities. [[Become
|
||||
|
||||
A fresh VM running any of the following operating systems:
|
||||
|
||||
- Ubuntu x64 - Any currently supported release
|
||||
- Debian 8.2+ x64
|
||||
- Ubuntu 16.04/18.04 x64 - Any currently supported release
|
||||
- Debian 9+ x64
|
||||
- CentOS 7 x64 *(experimental)*
|
||||
- Arch Linux x64 *(experimental)*
|
||||
|
||||
An SSH keypair that can be used for application deployment. If this exists before installation, it will be automatically imported into dokku.
|
||||
Otherwise, you will need to import the keypair manually after installation using `dokku ssh-keys:add`.
|
||||
|
||||
## Installation
|
||||
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.20.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
45
bootstrap.sh
45
bootstrap.sh
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
# A script to bootstrap dokku.
|
||||
# It expects to be run on Ubuntu 14.04 via 'sudo'
|
||||
# It expects to be run on Ubuntu 16.04/18.04, or CentOS 7 via 'sudo'
|
||||
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
|
||||
# It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source.
|
||||
|
||||
@@ -12,13 +12,20 @@ set -eo pipefail
|
||||
# That's good because it prevents our output overlapping with wget's.
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
SUPPORTED_VERSIONS="Debian [9, 10], CentOS [7], Ubuntu [16.04, 18.04]"
|
||||
|
||||
log-fail() {
|
||||
declare desc="log fail formatter"
|
||||
echo "$@" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
ensure-environment() {
|
||||
local FREE_MEMORY
|
||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||
|
||||
hostname -f >/dev/null 2>&1 || {
|
||||
echo "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"
|
||||
exit 1
|
||||
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"
|
||||
}
|
||||
|
||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
@@ -90,8 +97,7 @@ install-dokku-from-source() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
|
||||
if ! command -v apt-get &>/dev/null; then
|
||||
echo "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
exit 1
|
||||
log-fail "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
fi
|
||||
|
||||
apt-get -qq -y install git make software-properties-common
|
||||
@@ -115,8 +121,7 @@ install-dokku-from-package() {
|
||||
install-dokku-from-rpm-package "$@"
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported Linux distribution. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
exit 1
|
||||
log-fail "Unsupported Linux distribution. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -136,6 +141,10 @@ install-dokku-from-deb-package() {
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
local OS_ID
|
||||
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "16.04" "18.04" "9" "10"; then
|
||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||
fi
|
||||
|
||||
if [[ -n $DOKKU_DOCKERFILE ]]; then
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
fi
|
||||
@@ -156,26 +165,21 @@ install-dokku-from-deb-package() {
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_DISTRO_VERSION" == "14.04" ]]; then
|
||||
echo "--> Adding nginx PPA"
|
||||
add-apt-repository -y ppa:nginx/stable
|
||||
fi
|
||||
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "trusty")"
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
|
||||
DOKKU_DISTRO="ubuntu"
|
||||
OS_ID="trusty"
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_DISTRO" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful" "bionic")
|
||||
OS_IDS=("xenial" "bionic")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="trusty"
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
OS_IDS=("wheezy" "jessie" "stretch" "buster")
|
||||
OS_IDS=("stretch" "buster")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="stretch"
|
||||
OS_ID="buster"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -203,9 +207,8 @@ install-dokku-from-deb-package() {
|
||||
install-dokku-from-rpm-package() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
|
||||
if [[ "$DOKKU_DISTRO_VERSION" != "7" ]]; then
|
||||
echo "Only CentOS version 7 is supported."
|
||||
exit 1
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "7"; then
|
||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||
fi
|
||||
|
||||
echo "--> Installing docker"
|
||||
|
||||
37
common.mk
37
common.mk
@@ -1,4 +1,41 @@
|
||||
GO_ARGS ?= -a
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.12
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
build: $(BUILD)
|
||||
|
||||
build-in-docker: clean
|
||||
mkdir -p /tmp/dokku-go-build-cache
|
||||
docker run --rm \
|
||||
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
||||
-v /tmp/dokku-go-build-cache:/root/.cache/go-build \
|
||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
|
||||
|
||||
clean:
|
||||
rm -rf commands subcommands triggers prop
|
||||
find . -xtype l -delete
|
||||
|
||||
commands: **/**/commands.go
|
||||
go build -ldflags="-s -w" $(GO_ARGS) -o commands src/commands/commands.go
|
||||
|
||||
subcommands:
|
||||
go build -ldflags="-s -w" $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
|
||||
$(MAKE) $(SUBCOMMANDS)
|
||||
|
||||
subcommands/%:
|
||||
ln -sf subcommands $@
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src vendor Makefile *.go glide.*
|
||||
|
||||
triggers:
|
||||
go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
|
||||
$(MAKE) $(TRIGGERS)
|
||||
|
||||
triggers/%:
|
||||
ln -sf triggers $(shell echo $@ | cut -d '/' -f2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# bash completion for dd -*- shell-script -*-
|
||||
# bash completion for dokku -*- shell-script -*-
|
||||
|
||||
_dokku_complete_verify() {
|
||||
declare desc="shows bash completion"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:14.04
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& rm -rf plugins/common/*.go plugins/common/glide* plugins/common/vendor/ \
|
||||
&& make deb-dokku deb-sshcommand deb-sigil \
|
||||
rpm-dokku rpm-sshcommand rpm-sigil
|
||||
&& make deb-dokku deb-sigil \
|
||||
rpm-dokku rpm-sigil
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -16,7 +16,7 @@ def download_file(filename, url):
|
||||
|
||||
def upload_file(filename):
|
||||
versions = [
|
||||
"bionic",
|
||||
"xenial"
|
||||
]
|
||||
cmd_template = "package_cloud push dokku/dokku/ubuntu/{0} {1}"
|
||||
for version in versions:
|
||||
@@ -26,7 +26,7 @@ def upload_file(filename):
|
||||
|
||||
def main():
|
||||
auth = HTTPBasicAuth(PACKAGECLOUD_TOKEN, '')
|
||||
base = requests.get('https://packagecloud.io/api/v1/repos/dokku/dokku/packages/deb/ubuntu/trusty.json',
|
||||
base = requests.get('https://packagecloud.io/api/v1/repos/dokku/dokku/packages/deb/ubuntu/bionic.json',
|
||||
auth=auth)
|
||||
data = base.json()
|
||||
urls = []
|
||||
@@ -42,7 +42,7 @@ def main():
|
||||
download_urls['downloads/' + version['filename']] = version['download_url']
|
||||
|
||||
for filename, download_url in download_urls.items():
|
||||
print "downloading", filename
|
||||
print("downloading {0}".format(filename))
|
||||
download_file(filename, download_url)
|
||||
upload_file(filename)
|
||||
|
||||
|
||||
@@ -1,23 +1,44 @@
|
||||
#!/usr/bin/env python2.7
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import cgi
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
try:
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
except ImportError:
|
||||
import http.server as SimpleHTTPServer
|
||||
import socketserver as SocketServer
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.18.0'
|
||||
VERSION = 'v0.20.2'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
encoding = sys.stdout.encoding
|
||||
if encoding is None:
|
||||
encoding = 'utf-8'
|
||||
b = b.decode(encoding)
|
||||
b = b.strip()
|
||||
return b
|
||||
|
||||
|
||||
def string_to_bytes(s):
|
||||
if type(s) == str:
|
||||
encoding = sys.stdout.encoding
|
||||
if encoding is None:
|
||||
encoding = 'utf-8'
|
||||
s = s.encode(encoding)
|
||||
return s
|
||||
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'"
|
||||
hostname = subprocess.check_output(command, shell=True)
|
||||
if ':' in hostname:
|
||||
hostname = ''
|
||||
hostname = bytes_to_string(subprocess.check_output(command, shell=True))
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
@@ -33,26 +54,37 @@ admin_keys = []
|
||||
if os.path.isfile(key_file):
|
||||
try:
|
||||
command = "cat {0}".format(key_file)
|
||||
admin_keys = subprocess.check_output(command, shell=True).strip().split("\n")
|
||||
admin_keys = bytes_to_string(subprocess.check_output(command, shell=True)).strip().split("\n")
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
ufw_display = 'block'
|
||||
try:
|
||||
command = "sudo ufw status"
|
||||
ufw_output = subprocess.check_output(command, shell=True).strip()
|
||||
ufw_output = bytes_to_string(subprocess.check_output(command, shell=True).strip())
|
||||
if "inactive" in ufw_output:
|
||||
ufw_display = 'none'
|
||||
except subprocess.CalledProcessError:
|
||||
ufw_display = 'none'
|
||||
|
||||
|
||||
nginx_dir = '/etc/nginx'
|
||||
nginx_init = '/etc/init.d/nginx'
|
||||
try:
|
||||
command = "test -x /usr/bin/openresty"
|
||||
subprocess.check_output(command, shell=True)
|
||||
nginx_dir = '/usr/local/openresty/nginx/conf'
|
||||
nginx_init = '/etc/init.d/openresty'
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
|
||||
def check_boot():
|
||||
if 'onboot' not in sys.argv:
|
||||
return
|
||||
init_dir = os.getenv('INIT_DIR', '/etc/init')
|
||||
systemd_dir = os.getenv('SYSTEMD_DIR', '/etc/systemd/system')
|
||||
nginx_dir = os.getenv('NGINX_DIR', '/etc/nginx/conf.d')
|
||||
nginx_conf_dir = os.getenv('NGINX_CONF_DIR', '{0}/conf.d'.format(nginx_dir))
|
||||
|
||||
if os.path.exists(init_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f:
|
||||
@@ -69,8 +101,8 @@ def check_boot():
|
||||
f.write("[Install]\n")
|
||||
f.write("WantedBy=multi-user.target\n")
|
||||
f.write("WantedBy=graphical.target\n")
|
||||
if os.path.exists(nginx_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(nginx_dir), 'w') as f:
|
||||
if os.path.exists(nginx_conf_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(nginx_conf_dir), 'w') as f:
|
||||
f.write("upstream dokku-installer { server 127.0.0.1:2000; }\n")
|
||||
f.write("server {\n")
|
||||
f.write(" listen 80;\n")
|
||||
@@ -79,11 +111,18 @@ def check_boot():
|
||||
f.write(" }\n")
|
||||
f.write("}\n")
|
||||
|
||||
subprocess.call('rm -f /etc/nginx/sites-enabled/*', shell=True)
|
||||
subprocess.call('rm -f {0}/sites-enabled/*'.format(nginx_dir), shell=True)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
def write_content(self, content):
|
||||
try:
|
||||
self.wfile.write(content)
|
||||
except TypeError:
|
||||
self.wfile.write(string_to_bytes(content))
|
||||
|
||||
|
||||
def do_GET(self):
|
||||
content = PAGE.replace('{VERSION}', VERSION)
|
||||
content = content.replace('{UFW_DISPLAY}', ufw_display)
|
||||
@@ -92,7 +131,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(content)
|
||||
self.write_content(content)
|
||||
|
||||
def do_POST(self):
|
||||
if self.path not in ['/setup', '/setup/']:
|
||||
@@ -133,7 +172,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
user = user + str(index)
|
||||
command = ['sshcommand', 'acl-add', 'dokku', user]
|
||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
||||
proc.stdin.write(key)
|
||||
try:
|
||||
proc.stdin.write(key)
|
||||
except TypeError:
|
||||
proc.stdin.write(string_to_bytes(key))
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
@@ -146,9 +188,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
content = json.dumps({'status': 'ok'})
|
||||
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(json.dumps({'status': 'ok'}))
|
||||
self.write_content(content)
|
||||
|
||||
def web_admin_user_exists(self):
|
||||
return self.user_exists('web-admin(\d+)')
|
||||
@@ -163,11 +207,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
max_num = 0
|
||||
exists = False
|
||||
for line in proc.stdout:
|
||||
m = pattern.search(line)
|
||||
m = pattern.search(bytes_to_string(line))
|
||||
if m:
|
||||
# User of the form `user` or `user#` exists
|
||||
exists = True
|
||||
max_num = max(max_num, m.group(1))
|
||||
max_num = max(max_num, int(m.group(1)))
|
||||
if exists:
|
||||
return max_num
|
||||
else:
|
||||
@@ -203,7 +247,7 @@ class DeleteInstallerThread(object):
|
||||
thread.start()
|
||||
|
||||
def run(self):
|
||||
command = "rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start"
|
||||
command = "rm {0}/conf.d/dokku-installer.conf && {1} stop && {1} start".format(nginx_dir, nginx_init)
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
@@ -221,7 +265,7 @@ def main():
|
||||
|
||||
port = int(os.getenv('PORT', 2000))
|
||||
httpd = SocketServer.TCPServer(("", port), GetHandler)
|
||||
print "Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port)
|
||||
print("Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port))
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
@@ -136,7 +136,7 @@ fn-publish-package() {
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful" "bionic")
|
||||
OS_IDS=("xenial" "bionic")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -147,7 +147,7 @@ fn-publish-package() {
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("wheezy" "jessie" "stretch" "buster")
|
||||
OS_IDS=("stretch" "buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -323,7 +323,6 @@ fn-build-docker-image() {
|
||||
declare desc="Builds the dokku docker image and tags it with the given version"
|
||||
declare VERSION="$1"
|
||||
docker build -t "dokku/dokku:$VERSION" .
|
||||
docker push "dokku/dokku:$VERSION"
|
||||
}
|
||||
|
||||
main() {
|
||||
@@ -363,18 +362,26 @@ main() {
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
|
||||
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
if [[ "$RELEASE" == "build" ]]; then
|
||||
fn-build-docker-image "latest" || log-fail "Error building docker image"
|
||||
else
|
||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
|
||||
|
||||
if [[ "$IS_RELEASE" == "true" ]]; then
|
||||
docker tag "dokku/dokku:$NEXT_VERSION" "dokku/dokku:latest"
|
||||
docker push "dokku/dokku:$NEXT_VERSION"
|
||||
docker push "dokku/dokku:latest"
|
||||
fi
|
||||
fn-repo-push-tags "$IS_RELEASE"
|
||||
fi
|
||||
|
||||
if [[ "$IS_RELEASE" != "true" ]]; then
|
||||
git reset -q HEAD plugins/*/plugin.toml
|
||||
git checkout -- plugins/*/plugin.toml
|
||||
cp "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
|
||||
fi
|
||||
|
||||
echo "build/dokku_${NEXT_VERSION}_amd64.deb" >build/deb-filename
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
@@ -61,7 +61,7 @@ fn-publish-package() {
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful" "bionic")
|
||||
OS_IDS=("xenial" "bionic")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -72,7 +72,7 @@ fn-publish-package() {
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("wheezy" "jessie" "stretch" "buster")
|
||||
OS_IDS=("stretch" "buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
@@ -61,7 +61,7 @@ fn-publish-package() {
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful" "bionic")
|
||||
OS_IDS=("xenial" "bionic")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -72,7 +72,7 @@ fn-publish-package() {
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("wheezy" "jessie" "stretch" "buster")
|
||||
OS_IDS=("stretch" "buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXX")"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
|
||||
|
||||
44
deb.mk
44
deb.mk
@@ -2,7 +2,7 @@ BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.5.0
|
||||
HEROKUISH_VERSION ?= 0.5.11
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -16,17 +16,6 @@ DOKKU_UPDATE_VERSION ?= 0.1.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
define SSHCOMMAND_DESCRIPTION
|
||||
Turn SSH into a thin client specifically for your app
|
||||
Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.7.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
|
||||
define SIGIL_DESCRIPTION
|
||||
Standalone string interpolator and template processor
|
||||
Sigil is a command line tool for template processing
|
||||
@@ -45,9 +34,8 @@ ifndef IS_RELEASE
|
||||
endif
|
||||
|
||||
export SIGIL_DESCRIPTION
|
||||
export SSHCOMMAND_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-setup deb-sshcommand deb-sigil
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-setup deb-sigil
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
@@ -59,11 +47,11 @@ install-from-deb:
|
||||
|
||||
@echo "--> Installing dokku"
|
||||
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "trusty") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "bionic") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-sshcommand deb-sigil deb-dokku-update
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-sigil deb-dokku-update
|
||||
mv $(BUILD_DIRECTORY)/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
@@ -129,30 +117,6 @@ deb-dokku-update:
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
|
||||
deb-sshcommand:
|
||||
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/usr/local/bin"
|
||||
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand
|
||||
chmod +x /tmp/build/usr/local/bin/sshcommand
|
||||
|
||||
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \
|
||||
--version $(SSHCOMMAND_VERSION) \
|
||||
--architecture $(SSHCOMMAND_ARCHITECTURE) \
|
||||
--package $(BUILD_DIRECTORY)/$(SSHCOMMAND_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category admin \
|
||||
--description "$$SSHCOMMAND_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
|
||||
deb-sigil:
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
8
debian/control
vendored
8
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.18.0
|
||||
Version: 0.20.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog, dos2unix
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.10.0), gliderlabs-sigil, docker-engine-cs (>= 1.13.0) | docker-engine (>= 1.13.0) | docker-io (>= 1.13.0) | docker.io (>= 1.13.0) | docker-ce (>= 1.13.0) | docker-ee (>= 1.13.0), net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
|
||||
7
debian/lintian-overrides
vendored
7
debian/lintian-overrides
vendored
@@ -1,5 +1,5 @@
|
||||
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:87
|
||||
dokku: command-with-path-in-maintainer-script postinst:22 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:98
|
||||
dokku: changelog-file-missing-in-native-package
|
||||
dokku: statically-linked-binary
|
||||
dokku: unstripped-binary-or-object
|
||||
@@ -10,3 +10,6 @@ dokku: hardening-no-relro
|
||||
|
||||
# Built golang binaries link to libc
|
||||
dokku: missing-dependency-on-libc
|
||||
|
||||
# Temporary python dependency until #2247 is resolved
|
||||
dokku: python-script-but-no-python-dep usr/share/dokku/contrib/dokku-installer.py
|
||||
|
||||
220
debian/postinst
vendored
220
debian/postinst
vendored
@@ -26,6 +26,124 @@ call-sshcommand() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup-user() {
|
||||
echo "Setting up dokku user"
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
grep -i -E "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
mkdir -p "$DOKKU_ROOT/.ssh" "$DOKKU_ROOT/.dokkurc"
|
||||
touch "$DOKKU_ROOT/.ssh/authorized_keys"
|
||||
chown -R dokku:dokku "$DOKKU_ROOT/.ssh" "${DOKKU_ROOT}/.dokkurc"
|
||||
}
|
||||
|
||||
setup-storage() {
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data" "${DOKKU_LIB_ROOT}/data/storage"
|
||||
chown dokku:dokku "${DOKKU_LIB_ROOT}/data"
|
||||
}
|
||||
|
||||
setup-plugins() {
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/enabled" "${DOKKU_LIB_ROOT}/plugins/enabled"
|
||||
touch "${DOKKU_LIB_ROOT}/core-plugins/config.toml" "${DOKKU_LIB_ROOT}/plugins/config.toml"
|
||||
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then
|
||||
rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available
|
||||
fi
|
||||
done
|
||||
|
||||
db_get "dokku/nginx_enable"
|
||||
echo "Enabling all core plugins"
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/available" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then
|
||||
echo "Skipping enable of nginx-vhosts plugin"
|
||||
continue
|
||||
elif [ ! -d "${DOKKU_LIB_ROOT}/plugins/available/$plugin" ]; then
|
||||
ln -s "${DOKKU_LIB_ROOT}/core-plugins/available/$plugin" "${DOKKU_LIB_ROOT}/plugins/available/$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/core-plugins" plugn enable "$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/plugins" plugn enable "$plugin"
|
||||
fi
|
||||
done
|
||||
find -L "${DOKKU_LIB_ROOT}" -type l -delete
|
||||
chown dokku:dokku -R "${DOKKU_LIB_ROOT}/plugins" "${DOKKU_LIB_ROOT}/core-plugins"
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
}
|
||||
|
||||
setup-sshcommand() {
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' >"${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
fi
|
||||
}
|
||||
|
||||
setup-dokku-installer() {
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
[[ -x /usr/bin/openresty ]] && NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
|
||||
if command -v "python3" &>/dev/null; then
|
||||
sed -i '1 s/^.*$/#!\/usr\/bin\/env python3/' /usr/share/dokku/contrib/dokku-installer.py
|
||||
elif command -v "python2.7" &>/dev/null; then
|
||||
sed -i '1 s/^.*$/#!\/usr\/bin\/env python2.7/' /usr/share/dokku/contrib/dokku-installer.py
|
||||
fi
|
||||
|
||||
if [[ -f "$NGINX_ROOT/conf.d/dokku-installer.conf" ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2>/dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" >/dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
dpkg-handling() {
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" >"${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
call-sshcommand acl-add dokku default <"$RET" || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
abort-upgrade | abort-remove | abort-deconfigure) ;;
|
||||
|
||||
@@ -36,103 +154,13 @@ case "$1" in
|
||||
if [[ -f /sbin/modprobe ]]; then
|
||||
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
||||
fi
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
mkdir -p ${DOKKU_ROOT}/.dokkurc
|
||||
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
|
||||
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then
|
||||
rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available
|
||||
fi
|
||||
done
|
||||
|
||||
db_get "dokku/nginx_enable"
|
||||
echo "Enabling all core plugins"
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then
|
||||
echo "Skipping enable of nginx-vhosts plugin"
|
||||
continue
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn enable $plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin
|
||||
fi
|
||||
done
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' >"${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
fi
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
|
||||
rm -f ${DOKKU_ROOT}/VERSION
|
||||
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
||||
|
||||
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2>/dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" >/dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" >"${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
call-sshcommand acl-add dokku default <"$RET" || true
|
||||
fi
|
||||
fi
|
||||
setup-user
|
||||
setup-storage
|
||||
setup-plugins
|
||||
setup-sshcommand
|
||||
setup-dokku-installer
|
||||
dpkg-handling
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
2
debian/postrm
vendored
2
debian/postrm
vendored
@@ -28,6 +28,8 @@ main() {
|
||||
fi
|
||||
|
||||
if [[ "$1" == "purge" ]]; then
|
||||
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku.conf
|
||||
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku-installer.conf
|
||||
rm -f /etc/nginx/conf.d/dokku.conf
|
||||
rm -f /etc/nginx/conf.d/dokku-installer.conf
|
||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||
|
||||
79
debian/preinst
vendored
79
debian/preinst
vendored
@@ -7,51 +7,62 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
setup_dokku_installer() {
|
||||
NGINX_BASE_PATH="$1"
|
||||
NGINX_INIT_NAME="$2"
|
||||
|
||||
NGINX_CONF="${NGINX_BASE_PATH}/conf.d/dokku-installer.conf"
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
{
|
||||
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
|
||||
echo 'server {'
|
||||
echo ' listen 80;'
|
||||
echo ' location / {'
|
||||
echo ' proxy_pass http://dokku-installer;'
|
||||
echo ' }'
|
||||
echo '}'
|
||||
} >>$NGINX_CONF
|
||||
|
||||
rm -f $NGINX_BASE_PATH/sites-enabled/*
|
||||
DOKKU_DISTRO="$(
|
||||
. /etc/os-release >/dev/null 2>&1 || true
|
||||
echo "$ID"
|
||||
)"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
/usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" reload || /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" start
|
||||
;;
|
||||
ubuntu)
|
||||
if [[ -x /usr/bin/sv ]]; then
|
||||
/usr/bin/sv reload "$NGINX_INIT_NAME" || /usr/bin/sv start "$NGINX_INIT_NAME"
|
||||
else
|
||||
"/etc/init.d/$NGINX_INIT_NAME" reload || "/etc/init.d/$NGINX_INIT_NAME" start
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
{
|
||||
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
|
||||
echo 'server {'
|
||||
echo ' listen 80;'
|
||||
echo ' location / {'
|
||||
echo ' proxy_pass http://dokku-installer;'
|
||||
echo ' }'
|
||||
echo '}'
|
||||
} >>$NGINX_CONF
|
||||
|
||||
rm -f /etc/nginx/sites-enabled/*
|
||||
DOKKU_DISTRO="$(
|
||||
. /etc/os-release >/dev/null 2>&1 || true
|
||||
echo "$ID"
|
||||
)"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
NGINX_INIT="/usr/sbin/invoke-rc.d"
|
||||
"$NGINX_INIT" nginx reload || "$NGINX_INIT" nginx start
|
||||
;;
|
||||
ubuntu)
|
||||
NGINX_INIT="/etc/init.d/nginx"
|
||||
"$NGINX_INIT" reload || "$NGINX_INIT" start
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
setup_dokku_installer "/usr/local/openresty/nginx/conf" "openresty"
|
||||
else
|
||||
setup_dokku_installer "/etc/nginx" "nginx"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/skip_key_file"
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ ! -f "$RET" ]; then
|
||||
echo "Error: keyfile '$RET' not found."
|
||||
echo " you can enter a new keyfile path when you restart the installation."
|
||||
echo "Error: keyfile '$RET' not found." >&2
|
||||
echo " To deploy, you will need to generate a keypair and add with 'dokku ssh-keys:add'." >&2
|
||||
db_reset "dokku/key_file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -13,6 +13,8 @@ log-fail() {
|
||||
}
|
||||
|
||||
main() {
|
||||
local NGINX_ROOT
|
||||
|
||||
if [[ ! -d /mnt/dokku ]]; then
|
||||
log-info "Creating missing /mnt/dokku"
|
||||
mkdir -p /mnt/dokku
|
||||
@@ -49,14 +51,23 @@ main() {
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
|
||||
fi
|
||||
|
||||
if [[ ! -f /mnt/dokku/etc/nginx/dhparam.pem ]]; then
|
||||
mkdir -p /mnt/dokku/etc/nginx
|
||||
openssl dhparam -out /mnt/dokku/etc/nginx/dhparam.pem 2048
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
rm -rf /etc/runit/runsvdir/default/nginx
|
||||
else
|
||||
rm -rf /etc/runit/runsvdir/default/openresty
|
||||
fi
|
||||
|
||||
cp -f /mnt/dokku/etc/nginx/dhparam.pem /etc/nginx/dhparam.pem
|
||||
chown root:root /etc/nginx/dhparam.pem
|
||||
chown root:root /etc/nginx/conf.d
|
||||
if [[ ! -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" ]]; then
|
||||
mkdir -p "/mnt/dokku${NGINX_ROOT}"
|
||||
openssl dhparam -out "/mnt/dokku${NGINX_ROOT}/dhparam.pem" 2048
|
||||
fi
|
||||
|
||||
mkdir -p "${NGINX_ROOT}/conf.d"
|
||||
cp -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" "${NGINX_ROOT}/dhparam.pem"
|
||||
chown root:root "${NGINX_ROOT}/dhparam.pem"
|
||||
chown root:root "${NGINX_ROOT}/conf.d"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
7
docker/etc/runit/runsvdir/default/openresty/run
Executable file
7
docker/etc/runit/runsvdir/default/openresty/run
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/openresty
|
||||
exec 2>&1
|
||||
|
||||
echo "Running openresty"
|
||||
exec /usr/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf -g "daemon off;"
|
||||
30
docker/usr/local/openresty/nginx/conf/nginx.conf
Normal file
30
docker/usr/local/openresty/nginx/conf/nginx.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/openresty.pid;
|
||||
include /usr/local/openresty/nginx/conf/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /usr/local/openresty/nginx/conf/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
access_log /var/log/openresty/access.log;
|
||||
error_log /var/log/openresty/error.log;
|
||||
|
||||
gzip on;
|
||||
|
||||
include /usr/local/openresty/nginx/conf/conf.d/*.conf;
|
||||
include /usr/local/openresty/nginx/conf/sites-enabled/*;
|
||||
}
|
||||
@@ -34,7 +34,7 @@ Each "phase" has different expectations and limitations:
|
||||
|
||||
Please keep the above in mind when utilizing deployment tasks.
|
||||
|
||||
> To execute commands on the host during a release phase, see the [plugin creation documentation](/docs/development/plugin-creation) docs for more information on building your own custom plugin.
|
||||
> To execute commands on the host during a release phase, see the [plugin creation documentation](/docs/development/plugin-creation.md) docs for more information on building your own custom plugin.
|
||||
|
||||
## `app.json` deployment tasks
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during D
|
||||
|
||||
```
|
||||
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
|
||||
docker-options:clear <app> [<phase(s)>...] # Clear a docker options from application
|
||||
docker-options:remove <app> <phase(s)> OPTION # Remove Docker option from app for phase (comma-separated phase list)
|
||||
docker-options:report [<app>] [<flag>] # Displays a docker options report for one or more apps
|
||||
```
|
||||
@@ -44,6 +45,37 @@ dokku docker-options:add node-js-app run "-v /var/log/node-js-app:/app/logs"
|
||||
dokku docker-options:remove node-js-app run "-v /var/log/node-js-app:/app/logs"
|
||||
```
|
||||
|
||||
### Clear all Docker options for an app
|
||||
|
||||
Docker options can be removed for a specific app using the `docker-options:clear` command.
|
||||
|
||||
```shell
|
||||
dokku docker-options:clear node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Clearing docker-options for node-js-app on all phases
|
||||
```
|
||||
|
||||
One or more valid phases can also be specified. Phases are comma delimited, and specifying an invalid phase will result in an error.
|
||||
|
||||
```shell
|
||||
dokku docker-options:clear node-js-app run
|
||||
```
|
||||
|
||||
```
|
||||
-----> Clearing docker-options for node-js-app on phase run
|
||||
```
|
||||
|
||||
```shell
|
||||
dokku docker-options:clear node-js-app build,run
|
||||
```
|
||||
|
||||
```
|
||||
-----> Clearing docker-options for node-js-app on phase build
|
||||
-----> Clearing docker-options for node-js-app on phase run
|
||||
```
|
||||
|
||||
### Displaying docker-options reports for an app
|
||||
|
||||
> New as of 0.8.1
|
||||
|
||||
@@ -147,4 +147,4 @@ By default, Dokku will execute your buildpack application processes as the `hero
|
||||
|
||||
> NOTE: this user must exist in your herokuish image.
|
||||
|
||||
Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [scheduler-docker-local documentation](/docs/advanced-usage/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information.
|
||||
Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [docker-local scheduler documentation](/docs/advanced-usage/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
plugin:disable <name> # Disable an installed plugin (third-party only)
|
||||
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:installed <name> # Checks if a plugin is installed
|
||||
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
||||
plugin:list # Print active plugins
|
||||
plugin:trigger <args...>. # Trigger an arbitrary plugin hook
|
||||
@@ -32,35 +33,41 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.18.0 enabled dokku core standard plugin
|
||||
20_events 0.18.0 enabled dokku core events logging plugin
|
||||
app-json 0.18.0 enabled dokku core app-json plugin
|
||||
apps 0.18.0 enabled dokku core apps plugin
|
||||
build-env 0.18.0 enabled dokku core build-env plugin
|
||||
buildpacks 0.18.0 enabled dokku core buildpacks plugin
|
||||
certs 0.18.0 enabled dokku core certificate management plugin
|
||||
checks 0.18.0 enabled dokku core checks plugin
|
||||
common 0.18.0 enabled dokku core common plugin
|
||||
config 0.18.0 enabled dokku core config plugin
|
||||
docker-options 0.18.0 enabled dokku core docker-options plugin
|
||||
domains 0.18.0 enabled dokku core domains plugin
|
||||
enter 0.18.0 enabled dokku core enter plugin
|
||||
git 0.18.0 enabled dokku core git plugin
|
||||
logs 0.18.0 enabled dokku core logs plugin
|
||||
network 0.18.0 enabled dokku core network plugin
|
||||
nginx-vhosts 0.18.0 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.18.0 enabled dokku core plugin plugin
|
||||
proxy 0.18.0 enabled dokku core proxy plugin
|
||||
ps 0.18.0 enabled dokku core ps plugin
|
||||
repo 0.18.0 enabled dokku core repo plugin
|
||||
resource 0.18.0 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.18.0 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.18.0 enabled dokku core shell plugin
|
||||
ssh-keys 0.18.0 enabled dokku core ssh-keys plugin
|
||||
storage 0.18.0 enabled dokku core storage plugin
|
||||
tags 0.18.0 enabled dokku core tags plugin
|
||||
tar 0.18.0 enabled dokku core tar plugin
|
||||
trace 0.18.0 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.20.2 enabled dokku core standard plugin
|
||||
20_events 0.20.2 enabled dokku core events logging plugin
|
||||
app-json 0.20.2 enabled dokku core app-json plugin
|
||||
apps 0.20.2 enabled dokku core apps plugin
|
||||
build-env 0.20.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.20.2 enabled dokku core buildpacks plugin
|
||||
certs 0.20.2 enabled dokku core certificate management plugin
|
||||
checks 0.20.2 enabled dokku core checks plugin
|
||||
common 0.20.2 enabled dokku core common plugin
|
||||
config 0.20.2 enabled dokku core config plugin
|
||||
docker-options 0.20.2 enabled dokku core docker-options plugin
|
||||
domains 0.20.2 enabled dokku core domains plugin
|
||||
enter 0.20.2 enabled dokku core enter plugin
|
||||
git 0.20.2 enabled dokku core git plugin
|
||||
logs 0.20.2 enabled dokku core logs plugin
|
||||
network 0.20.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.20.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.20.2 enabled dokku core plugin plugin
|
||||
proxy 0.20.2 enabled dokku core proxy plugin
|
||||
ps 0.20.2 enabled dokku core ps plugin
|
||||
repo 0.20.2 enabled dokku core repo plugin
|
||||
resource 0.20.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.20.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.20.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.20.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.20.2 enabled dokku core storage plugin
|
||||
tags 0.20.2 enabled dokku core tags plugin
|
||||
tar 0.20.2 enabled dokku core tar plugin
|
||||
trace 0.20.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
You can check if a plugin has been installed via the `plugin:installed` command:
|
||||
|
||||
```shell
|
||||
dokku plugin:installed postgres
|
||||
```
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
@@ -27,6 +27,8 @@ Valid resource options include:
|
||||
- `--network-ingress`
|
||||
- `--network-egress`
|
||||
|
||||
See the [Supported Resource Management Properties](/docs/advanced-usage/schedulers/docker-local.md#supported-resource-management-properties) section of the docker local scheduler documentation for more information on how each resource limit maps to Docker.
|
||||
|
||||
Resource limits and reservations are applied only during the `run` and `deploy` phases of an application, and will not impact the `build` phase of an application.
|
||||
|
||||
### Resource Limits
|
||||
|
||||
@@ -66,9 +66,13 @@ The `docker-local` scheduler supports a minimal list of resource _limits_ and _r
|
||||
### Resource Limits
|
||||
|
||||
- cpu: (docker option: `--cpus`), and is specified in number of CPUs a process can access.
|
||||
- memory: (docker option: `--memory`) and should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes)
|
||||
- See the ["CPU" section](https://docs.docker.com/config/containers/resource_constraints/#cpu) of the Docker Runtime Options documentation for more information.
|
||||
- memory: (docker option: `--memory`) and should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes).
|
||||
- See the ["Memory" section](https://docs.docker.com/config/containers/resource_constraints/#memory) of the Docker Runtime Options documentation for more information.
|
||||
- memory-swap: (docker option: `--memory-swap`) and should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes)
|
||||
- See the ["Memory" section](https://docs.docker.com/config/containers/resource_constraints/#memory) of the Docker Runtime Options documentation for more information.
|
||||
|
||||
### Resource Reservations
|
||||
|
||||
- memory: (docker option: `--memory-reservation`) and should be specified with a suffix of `b` (bytes), `k` (kilobytes), `m` (megabytes), `g` (gigabytes)
|
||||
- See the ["Memory" section](https://docs.docker.com/config/containers/resource_constraints/#memory) of the Docker Runtime Options documentation for more information.
|
||||
|
||||
84
docs/appendices/0.20.0-migration-guide.md
Normal file
84
docs/appendices/0.20.0-migration-guide.md
Normal file
@@ -0,0 +1,84 @@
|
||||
# 0.20.0 Migration Guide
|
||||
|
||||
## Removals
|
||||
|
||||
### Command removals
|
||||
|
||||
The following commands were previously deprecated and were removed in this release.
|
||||
|
||||
- `apps`: Use `apps:list` instead.
|
||||
- `certs`: Use `certs:report` instead.
|
||||
- `certs:info`: Use `certs:report` instead.
|
||||
- `checks`: Use `checks:report` instead.
|
||||
- `docker-options`: Use `docker-options:report` instead.
|
||||
- `domains`: Use `domains:report` instead.
|
||||
- `plugin`: Use `plugin:list` instead.
|
||||
- `proxy`: Use `proxy:report` instead.
|
||||
- `trace`: Use `trace:on` or `trace:off` instead.
|
||||
- `ps`: Use `enter` with a container ID instead to run `ps auxww` within a container.
|
||||
|
||||
The refactor of the proxy plugin removes the following functions from being sourced in plugins:
|
||||
|
||||
- `proxy#get_app_proxy_port_map()`
|
||||
- `proxy#list_app_proxy_ports()`
|
||||
- `proxy#filter_app_proxy_ports()`
|
||||
- `proxy#add_proxy_ports()`
|
||||
- `proxy#remove_proxy_ports()`
|
||||
- `proxy#set_proxy_ports()`
|
||||
|
||||
The informal policy is to allow removal of functions within a `functions` file if they are not used in OSS plugins. Should you be affected by any such removals, please file an issue to expose the functionality via a plugin trigger.
|
||||
|
||||
### Remove support for Unsupported Operating Systems
|
||||
|
||||
Dokku will no longer distribute packages for Ubuntu versions that have reached either End of Life or End of Standard Support (for LTS releases). This currently includes the following releases:
|
||||
|
||||
- Ubuntu 14.04 (trusty)
|
||||
- Ubuntu 14.10 (utopic)
|
||||
- Ubuntu 15.04 (vivid)
|
||||
- Ubuntu 15.10 (wily)
|
||||
- Ubuntu 16.10 (yakkety)
|
||||
- Ubuntu 17.04 (zesty)
|
||||
- Ubuntu 17.10 (artful)
|
||||
|
||||
Dokku will no longer distribute packages for Debian versions that are not `stable` or `oldstable`. This currently includes the following releases:
|
||||
|
||||
- Debian 7 (wheezy)
|
||||
- Debian 8 (jessie)
|
||||
|
||||
### App report flags
|
||||
|
||||
The `--git-sha` flag was moved from the `apps:report` command to the `git:report` command.
|
||||
|
||||
## Changes
|
||||
|
||||
### App report flags
|
||||
|
||||
The following changes on the `apps:report` command were made in this release:
|
||||
|
||||
- The `--deploy-source` flag was renamed to `--app-deploy-source`.
|
||||
- The `--locked` flag was renamed to `--app-locked`.
|
||||
|
||||
### Network report flags
|
||||
|
||||
The following changes on the `network:report` command were made in this release:
|
||||
|
||||
- The `--network-listeners` flag was renamed to `--network-web-listeners`.
|
||||
|
||||
### Plugin Triggers
|
||||
|
||||
- The `network-get-port` trigger was incorrectly documented to have the `isHerokuishContainer` argument as the third argument. The code has been fixed to respect the documentation.
|
||||
- The `network-get-listeners` trigger now takes an additional `processType` argument. If not specified, it defaults to `web`. This default will be removed in an upcoming release.
|
||||
|
||||
## Deprecations
|
||||
|
||||
- `nginx:show-conf` has been deprecated in favor of `nginx:show-config`.
|
||||
- `proxy#is_app_proxy_enabled()` is deprecated in favor of `plugn trigger proxy-is-enabled`.
|
||||
- `proxy#get_app_proxy_type()` is deprecated in favor of `plugn trigger proxy-type`.
|
||||
- `apps#apps_create()` is deprecated in favor of `plugn trigger app-create`.
|
||||
- `apps#apps_destroy()` is deprecated in favor of `plugn trigger app-destroy`.
|
||||
- `apps#apps_exists()` is deprecated in favor of `plugn trigger app-exists`.
|
||||
- `apps#apps_maybe_create()` is deprecated in favor of `plugn trigger app-maybe-create`.
|
||||
- `plugin trigger network-get-listeners` usage without a second `processType` argument is deprecated.
|
||||
- `.NGINX_PORT` variable usage within `nginx.conf.sigil` templates is deprecated in favor of `.PROXY_PORT`.
|
||||
- `.NGINX_SSL_PORT` variable usage within `nginx.conf.sigil` templates is deprecated in favor of `.PROXY_SSL_PORT`.
|
||||
- `.DOKKU_APP_LISTENERS` variable usage within `nginx.conf.sigil` templates is deprecated in favor of `.DOKKU_APP_WEB_LISTENERS`.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -39,13 +39,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
"0.15.5",
|
||||
"0.16.4",
|
||||
"0.17.9",
|
||||
"0.18.0"
|
||||
"0.18.5",
|
||||
"0.19.13",
|
||||
"0.20.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,9 +6,21 @@ While Dokku does not yet have an official client, there are a multitude of ways
|
||||
|
||||
## (bash, zsh, etc.) `dokku_client.sh`
|
||||
|
||||
Of all methods, this is the *most* official method of interacting with your Dokku installation. It is a bash script that interacts with a remote Dokku installation via ssh. It is available in `contrib/dokku_client.sh` in the root of the Dokku repository.
|
||||
Of all methods, this is the *most* official method of interacting with your Dokku installation. It is a bash script that interacts with a remote Dokku installation via `ssh`. It is available in `contrib/dokku_client.sh` in the root of the Dokku repository.
|
||||
|
||||
To install, simply clone the Dokku repository down and add the `dokku` alias pointing at the script:
|
||||
It can be installed either via the [Homebrew](https://brew.sh) package manager (macOS only), or manually.
|
||||
|
||||
### Installation via Homebrew
|
||||
|
||||
To install, simply run the following command:
|
||||
|
||||
```shell
|
||||
brew install dokku/repo/dokku
|
||||
```
|
||||
|
||||
### Manual installation
|
||||
|
||||
To install manually, simply clone the Dokku repository down and add the `dokku` alias pointing at the script:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:dokku/dokku.git ~/.dokku
|
||||
@@ -35,6 +47,8 @@ alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
Configure the `DOKKU_HOST` environment variable or run `dokku` from a repository with a git remote named `dokku` pointed at your Dokku host in order to use the script as normal.
|
||||
|
||||
You can also configure a `DOKKU_PORT` environment variable if you are running ssh on a non-standard port. This defaults to `22`.
|
||||
@@ -51,7 +65,7 @@ See [documentation here](https://www.npmjs.com/package/dokku-toolbelt) for more
|
||||
|
||||
## (python) dokku-client
|
||||
|
||||
dokku-client is an extensible python-based cli wrapper for remote Dokku hosts. You can install it via the following shell command (assuming you have python and pip installed):
|
||||
dokku-client is an extensible python-based cli wrapper for remote Dokku hosts. You can install it via the following shell command (assuming you have python and pip installed):
|
||||
|
||||
```shell
|
||||
pip install dokku-client
|
||||
|
||||
@@ -72,7 +72,6 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
[dokku]: https://github.com/dokku
|
||||
[dokku-community]: https://github.com/dokku-community
|
||||
[dyson]: https://github.com/dyson
|
||||
[F4-Group]: https://github.com/F4-Group
|
||||
[fermuch]: https://github.com/fermuch
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[Flink]: https://github.com/Flink
|
||||
@@ -129,6 +128,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
[sarendsen]: https://github.com/sarendsen
|
||||
[baikunz]: https://github.com/baikunz
|
||||
[lazyatom]: https://github.com/lazyatom
|
||||
[ollej]: https://github.com/ollej
|
||||
|
||||
### Datastores
|
||||
|
||||
@@ -215,7 +215,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | 0.4.0+ |
|
||||
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.4.0+ |
|
||||
| [APT](https://github.com/dokku-community/dokku-apt) | [dokku-community][] | 0.18.x+ |
|
||||
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | 0.3.x |
|
||||
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | 0.3.x |
|
||||
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | 0.3.x |
|
||||
@@ -242,6 +242,9 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | 0.4.0+ |
|
||||
| [Dokku Wordpress](https://github.com/dokku-community/dokku-wordpress) | [dokku-community][] | 0.4.0+ |
|
||||
| [Access](https://github.com/mainto/dokku-access) | [mainto](https://github.com/mainto) | 0.4.0+ |
|
||||
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare](https://github.com/kingsquare) | 0.4.0+ |
|
||||
| [Fonts](https://github.com/ollej/dokku-fonts) | [ollej] | 0.19.11+ |
|
||||
|
||||
|
||||
### Deprecated Plugins
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ The domains plugin allows you to specify custom domains for applications. This p
|
||||
dokku domains:add node-js-app dokku.me
|
||||
|
||||
# list custom domains for app
|
||||
dokku domains node-js-app
|
||||
dokku domains:report node-js-app
|
||||
|
||||
# clear all custom domains for app
|
||||
dokku domains:clear node-js-app
|
||||
@@ -122,6 +122,8 @@ Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
|
||||
```nginx
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
access_log off;
|
||||
return 410;
|
||||
@@ -138,6 +140,7 @@ server {
|
||||
#
|
||||
# server {
|
||||
# listen 443 ssl;
|
||||
# listen [::]:443 ssl;
|
||||
# server_name _;
|
||||
# ssl_certificate /etc/nginx/ssl/cert.crt;
|
||||
# ssl_certificate_key /etc/nginx/ssl/cert.key;
|
||||
|
||||
@@ -90,6 +90,7 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
| `DOKKU_CHECKS_URL` | `http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
@@ -115,13 +116,14 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `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_PROXY_PORT` | automatically assigned | `dokku config:set` | |
|
||||
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `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_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_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_DEPLOY` | | `dokku config:set` | |
|
||||
| `DOKKU_START_CMD` | none | `dokku config:set` | Command to run instead of `/start $PROC_TYPE` |
|
||||
| `DOKKU_SYSTEM_GROUP` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System group to chown files as. |
|
||||
| `DOKKU_SYSTEM_USER` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System user to chown files as. |
|
||||
| `DOKKU_WAIT_TO_RETIRE` | `60` | `dokku config:set` | After a successful deploy, the grace period given to old containers before they are stopped/terminated. This is useful for ensuring completion of long-running http connections. |
|
||||
|
||||
@@ -6,9 +6,54 @@ Dokku uses nginx as its server for routing requests to specific applications. By
|
||||
nginx:access-logs <app> [-t] # Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> # (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t] # Show the nginx error logs for an application (-t follows)
|
||||
nginx:validate [<app>] [--clean] # Validates and optionally cleans up invalid nginx configurations
|
||||
nginx:report [<app>] [<flag>] # Displays a nginx report for one or more apps
|
||||
nginx:set <app> <property> (<value>) # Set or clear an nginx property for an app
|
||||
nginx:show-config <app> # Display app nginx config
|
||||
nginx:validate-config [<app>] [--clean] # Validates and optionally cleans up invalid nginx configurations
|
||||
```
|
||||
|
||||
## Binding to specific addresses
|
||||
|
||||
> New as of 0.19.2
|
||||
|
||||
By default, nginx will listen to all interfaces (`[::]` for IPv6, `0.0.0.0` for IPv4) when proxying requests to applications. This may be changed using the `bind-address-ipv4` and `bind-address-ipv6` properties. This is useful in cases where the proxying should be internal to a network or if there are multiple network interfaces that should respond with different content.
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app bind-address-ipv4 127.0.0.1
|
||||
dokku nginx:set node-js-app bind-address-ipv6 ::1
|
||||
```
|
||||
|
||||
This may be reverted by setting an empty bind address.
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app bind-address-ipv4
|
||||
dokku nginx:set node-js-app bind-address-ipv6
|
||||
```
|
||||
|
||||
> Warning: Validation is not performed on either value.
|
||||
|
||||
Users with apps that contain a custom `nginx.conf.sigil` file will need to modify the files to respect the new `NGINX_BIND_ADDRESS_IPV4` and `NGINX_BIND_ADDRESS_IPV6` variables.
|
||||
|
||||
## HSTS Header
|
||||
|
||||
> New as of 0.20.0
|
||||
|
||||
If SSL certificates are present, HSTS will be automatically enabled. It can be toggled via `nginx:set`:
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app hsts true
|
||||
dokku nginx:set node-js-app hsts false
|
||||
```
|
||||
|
||||
The following options are also available via the `nginx:set` command:
|
||||
|
||||
- `hsts` (type: boolean, default: `true`): Enables or disables HSTS for your application.
|
||||
- `hsts-include-subdomains` (type: boolean, default: `true`): Tells the browser that the HSTS policy also applies to all subdomains of the current domain.
|
||||
- `hsts-max-age` (type: integer, default: `15724800`): Time in seconds to cache HSTS configuration.
|
||||
- `hsts-preload` (type: boolean, default: `false`): Tells most major web browsers to include the domain in their HSTS preload lists.
|
||||
|
||||
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails until the max-age is reached.
|
||||
|
||||
## Checking access logs
|
||||
|
||||
You may check nginx access logs via the `nginx:access-logs` command. This assumes that app access logs are being stored in `/var/log/nginx/$APP-access.log`, as is the default in the generated `nginx.conf`.
|
||||
@@ -37,6 +82,31 @@ You may also follow the logs by specifying the `-t` flag.
|
||||
dokku nginx:error-logs node-js-app -t
|
||||
```
|
||||
|
||||
## Changing log path
|
||||
|
||||
> New as of 0.20.1
|
||||
|
||||
The path to where log files are stored can be changed by calling the `nginx:set` command with the following options:
|
||||
|
||||
- `access-log-path` (type: string, default: `${NGINX_LOG_ROOT}/${APP}-access.log`): Log path for nginx access logs
|
||||
- `error-log-path` (type: string, default: `${NGINX_LOG_ROOT}/${APP}-error.log`): Log path for nginx error logs
|
||||
|
||||
The defaults should not be changed without verifying that the paths will be writeable by nginx. However, this setting is useful for enabling or disabling logging by setting the values to `off`.
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app access-log-path off
|
||||
dokku nginx:set node-js-app error-log-path off
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku nginx:set node-js-app access-log-path
|
||||
dokku nginx:set node-js-app error-log-path
|
||||
```
|
||||
|
||||
In all cases, the nginx config must be regenerated after setting the above values.
|
||||
|
||||
## Regenerating nginx config
|
||||
|
||||
In certain cases, your app nginx configs may drift from the correct config for your app. You may regenerate the config at any point via the `nginx:build-config` command. This may fail if there are no current web listeners for your app.
|
||||
@@ -45,28 +115,36 @@ In certain cases, your app nginx configs may drift from the correct config for y
|
||||
dokku nginx:build-config node-js-app
|
||||
```
|
||||
|
||||
## Validating nginx configs
|
||||
## Showing the nginx config
|
||||
|
||||
It may be desired to validate an nginx config outside of the deployment process. To do so, run the `nginx:validate` command. With no arguments, this will validate all app nginx configs, one at a time. A minimal wrapper nginx config is generated for each app's nginx config, upon which `nginx -t` will be run.
|
||||
For debugging purposes, it may be useful to show the nginx config. This can be achieved via the `nginx:show-config` command.
|
||||
|
||||
```shell
|
||||
dokku nginx:validate
|
||||
dokku nginx:show-config node-js-app
|
||||
```
|
||||
|
||||
As app nginx configs are actually executed within a shared context, it is possible for an individual config to be invalid when being validated standalone but _also_ be valid within the global server context. As such, the exit code for the `nginx:validate` command is the exit code of `nginx -t` against the server's real nginx config.
|
||||
## Validating nginx configs
|
||||
|
||||
The `nginx:validate` command also takes an optional `--clean` flag. If specified, invalid nginx configs will be removed.
|
||||
It may be desired to validate an nginx config outside of the deployment process. To do so, run the `nginx:validate-config` command. With no arguments, this will validate all app nginx configs, one at a time. A minimal wrapper nginx config is generated for each app's nginx config, upon which `nginx -t` will be run.
|
||||
|
||||
```shell
|
||||
dokku nginx:validate-config
|
||||
```
|
||||
|
||||
As app nginx configs are actually executed within a shared context, it is possible for an individual config to be invalid when being validated standalone but _also_ be valid within the global server context. As such, the exit code for the `nginx:validate-config` command is the exit code of `nginx -t` against the server's real nginx config.
|
||||
|
||||
The `nginx:validate-config` command also takes an optional `--clean` flag. If specified, invalid nginx configs will be removed.
|
||||
|
||||
> Warning: Invalid app nginx config's will be removed _even if_ the config is valid in the global server context.
|
||||
|
||||
```shell
|
||||
dokku nginx:validate --clean
|
||||
dokku nginx:validate-config --clean
|
||||
```
|
||||
|
||||
The `--clean` flag may also be specified for a given app:
|
||||
|
||||
```shell
|
||||
dokku nginx:validate node-js-app --clean
|
||||
dokku nginx:validate-config node-js-app --clean
|
||||
```
|
||||
|
||||
## Customizing the nginx configuration
|
||||
@@ -90,7 +168,6 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
{{ .APP }} Application name
|
||||
{{ .APP_SSL_PATH }} Path to SSL certificate and key
|
||||
{{ .DOKKU_ROOT }} Global Dokku root directory (ex: app dir would be `{{ .DOKKU_ROOT }}/{{ .APP }}`)
|
||||
{{ .DOKKU_APP_LISTENERS }} List of IP:PORT pairs of app containers
|
||||
{{ .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)
|
||||
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
|
||||
@@ -101,6 +178,8 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
||||
```
|
||||
|
||||
Finally, each process type has it's network listeners - a list of IP:PORT pairs for the respective app containers - exposed via an `.DOKKU_APP_${PROCESS_TYPE}_LISTENERS` variable - the `PROCESS_TYPE` will be upper-cased with hyphens transformed into underscores. Users can use the new variables to expose non-web processes via the nginx proxy.
|
||||
|
||||
> Note: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
|
||||
|
||||
### Customizing via configuration files included by the default templates
|
||||
@@ -166,10 +245,6 @@ See the [default site documentation](/docs/configuration/domains.md#default-site
|
||||
|
||||
See the [load balancer documentation](/docs/configuration/ssl.md#running-behind-a-load-balancer).
|
||||
|
||||
## HSTS Header
|
||||
|
||||
See the [HSTS documentation](/docs/configuration/ssl.md#hsts-header).
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/docs/configuration/ssl.md).
|
||||
|
||||
@@ -113,9 +113,9 @@ dokku certs:report node-js-app --ssl-enabled
|
||||
|
||||
## HSTS Header
|
||||
|
||||
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. Dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
|
||||
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. Dokku does not enables this header by default
|
||||
|
||||
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails.
|
||||
See the [NGINX HSTS documentation](/docs/configuration/nginx.md#hsts-header) for more information.
|
||||
|
||||
## HTTP/2 support
|
||||
|
||||
@@ -125,7 +125,7 @@ Certain versions of nginx have bugs that prevent [HTTP/2](https://nginx.org/en/d
|
||||
|
||||
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 by using the following [nginx custom template](/docs/configuration/nginx.md#customizing-the-nginx-configuration)
|
||||
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 by using a [custom nginx template](/docs/configuration/nginx.md#customizing-the-nginx-configuration). The following is a simple example of how to do so.
|
||||
|
||||
```go
|
||||
server {
|
||||
@@ -150,7 +150,7 @@ server {
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
{{ range .DOKKU_APP_WEB_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
@@ -160,7 +160,7 @@ 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.
|
||||
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.
|
||||
|
||||
This could result in security issue, for example, if your application looks at the value of the `X-Forwarded-Proto` to determine if the request was made over HTTPS.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Once you have configured Dokku with at least one user, you can deploy applicatio
|
||||
```shell
|
||||
# from your local machine
|
||||
# SSH access to github must be enabled on this host
|
||||
git clone git@github.com:heroku/ruby-getting-started.git
|
||||
git clone https://github.com/heroku/ruby-getting-started
|
||||
```
|
||||
|
||||
### Create the app
|
||||
|
||||
@@ -134,6 +134,12 @@ Renaming node-js-app to io-js-app... done
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
|
||||
By default, Dokku will deploy the renamed app, though you can skip the deploy by using the `--skip-deploy` flag:
|
||||
|
||||
```shell
|
||||
dokku apps:rename --skip-deploy node-js-app io-js-app
|
||||
```
|
||||
|
||||
### Cloning an existing app
|
||||
|
||||
> New as of 0.11.5
|
||||
@@ -157,7 +163,7 @@ This will copy all of your app's contents into a new app directory with the name
|
||||
|
||||
> Warning: If you have exposed specific ports via `docker-options` plugin, or performed anything that cannot be done against multiple applications, `apps:clone` may result in errors.
|
||||
|
||||
By default, Dokku will deploy this new application, though you can skip the deploy by using the `--skip-deploy` flag:
|
||||
By default, Dokku will deploy this new app, though you can skip the deploy by using the `--skip-deploy` flag:
|
||||
|
||||
```shell
|
||||
dokku apps:clone --skip-deploy node-js-app io-js-app
|
||||
@@ -230,16 +236,14 @@ dokku apps:report
|
||||
```
|
||||
=====> node-js-app
|
||||
App dir: /home/dokku/node-js-app
|
||||
Git sha: dbddc3f
|
||||
Deploy source: git
|
||||
Locked: false
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
=====> python-sample
|
||||
not deployed
|
||||
=====> ruby-sample
|
||||
App dir: /home/dokku/ruby-sample
|
||||
Git sha: a2d477c
|
||||
Deploy source: git
|
||||
Locked: false
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -251,13 +255,12 @@ dokku apps:report node-js-app
|
||||
```
|
||||
=====> node-js-app
|
||||
App dir: /home/dokku/node-js-app
|
||||
Git sha: dbddc3f
|
||||
Deploy source: git
|
||||
Locked: false
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku apps:report node-js-app --git-sha
|
||||
dokku apps:report node-js-app --app-dir
|
||||
```
|
||||
|
||||
@@ -36,7 +36,7 @@ will show logs continually from the web process.
|
||||
|
||||
### Failed deploy logs
|
||||
|
||||
> Warning: The default `docker-local` scheduler will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server.
|
||||
> Warning: The default [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md) will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server.
|
||||
|
||||
In some cases, it may be useful to retrieve the logs from a previously failed deploy.
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ dokku docker-options:add node-js-app build '--file Dockerfile.dokku'
|
||||
Once set, the Dockerfile usage would be as follows:
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
@@ -50,7 +50,7 @@ RUN echo $NODE_ENV
|
||||
You may also set the argument as an environment variable
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
FROM ubuntu:18.04
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
@@ -101,7 +101,7 @@ worker: bin/run-worker.sh
|
||||
And `Dockerfile`:
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
FROM ubuntu:18.04
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
CMD ["bin/run-dev.sh"]
|
||||
|
||||
@@ -76,3 +76,28 @@ This behavior can be disabled entirely on a per-app basis by setting the `rev-en
|
||||
# override for a specific app
|
||||
dokku git:set node-js-app rev-env-var ""
|
||||
```
|
||||
|
||||
### Keeping the `.git` directory
|
||||
|
||||
By default, Dokku will remove the contents of the `.git` before triggering a build for a given app. This is generally a safe default as shipping the entire source code history of your app in the deployed image artifact is unnecessary as it increases bloat and potentially can leak information if there are any security issues with your app code.
|
||||
|
||||
To enable the `.git` directory, run the `git:set` command as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
|
||||
# keep the .git directory during builds
|
||||
dokku git:set node-js-app keep-git-dir true
|
||||
```
|
||||
|
||||
The default behavior is to delete this directory and it's contents. To revert to the default behavior, the `keep-git-dir` value can be set to either an empty string or `false`.
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
|
||||
# delete the .git directory during builds (default)
|
||||
dokku git:set node-js-app keep-git-dir false
|
||||
|
||||
# delete the .git directory during builds (default)
|
||||
dokku git:set node-js-app keep-git-dir ""
|
||||
```
|
||||
|
||||
@@ -92,7 +92,6 @@ dokku tags:deploy node-js-app v1
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
|
||||
@@ -46,6 +46,12 @@ dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Containers may have specific labels attached. In order to avoid issues with dokku internals, do not use any labels beginning with either `com.dokku` or `org.label-schema`.
|
||||
|
||||
```shell
|
||||
dokku --label=com.example.test-label=value run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Finally, you may wish to run a container in "detached" mode via the `--detach` Dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as Dokku will *not* automatically terminate the container.
|
||||
|
||||
```shell
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
> New as of 0.3.14, Enhanced in 0.7.0
|
||||
|
||||
```
|
||||
ps <app> # List processes running in app container(s)
|
||||
ps:inspect <app> # Displays a sanitized version of docker inspect for an app
|
||||
ps:rebuild <app> # Rebuild an app from source
|
||||
ps:rebuildall # Rebuild all apps from source
|
||||
@@ -25,14 +24,6 @@ By default, Dokku will only start a single `web` process - if defined - though p
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing processes running in an app container
|
||||
|
||||
To find out if your application's containers are running the commands you expect, simply run the `ps` command against that application.
|
||||
|
||||
```shell
|
||||
dokku ps node-js-app
|
||||
```
|
||||
|
||||
### Inspecting app containers
|
||||
|
||||
> New as of 0.13.0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
```
|
||||
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
|
||||
ssh-keys:list # List of all authorized Dokku public ssh keys
|
||||
ssh-keys:list [<name>] # List of all authorized Dokku public ssh keys
|
||||
ssh-keys:remove <name> # Remove SSH public key by name
|
||||
```
|
||||
|
||||
@@ -25,7 +25,7 @@ dokku ssh-keys:list
|
||||
```
|
||||
|
||||
```
|
||||
61:21:1f:88:7f:86:d4:3a:68:9f:18:aa:41:4f:bc:3d NAME="admin" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"
|
||||
SHA256:ABC123ABC123+abc123abc123Zabc123abcZ123abc NAME="admin" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"
|
||||
```
|
||||
|
||||
The output contains the following information:
|
||||
@@ -34,6 +34,14 @@ The output contains the following information:
|
||||
- The `KEY_NAME`.
|
||||
- A comma separated list of SSH options under the `SSHCOMMAND_ALLOWED_KEYS` name.
|
||||
|
||||
> New as of 0.20.2
|
||||
|
||||
The keys for a specific user may be listed by specifying a second argument to the `ssh-keys:list` command:
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:list admin
|
||||
```
|
||||
|
||||
### 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:
|
||||
@@ -43,7 +51,7 @@ dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
||||
```
|
||||
|
||||
```
|
||||
b7:76:27:4f:30:90:21:ae:d4:1e:70:20:35:3f:06:d6
|
||||
SHA256:ABC123ABC123+abc123abc123Zabc123abcZ123abc
|
||||
```
|
||||
|
||||
`KEY_NAME` is the name you want to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
|
||||
@@ -72,7 +80,8 @@ dokku ssh-keys:remove KEY_NAME
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
Keys are given unique names, which can be used in conjunction with the [user-auth](/docs/development/plugin-triggers.md#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
|
||||
Support for scoping commands to specific users can be added through plugins that take advantage of the [user-auth](/docs/development/plugin-triggers.md#user-auth) plugin trigger to handle command authorization.
|
||||
See also the list of [community-provided plugins](/docs/community/plugins.md).
|
||||
|
||||
## Granting other Unix user accounts Dokku access
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
> New as of 0.5.0
|
||||
|
||||
```
|
||||
checks <app> Show zero-downtime status
|
||||
checks:disable <app> [process-type(s)] Disable zero-downtime deployment for all processes (or comma-separated process-type list) ***WARNING: this will cause downtime during deployments***
|
||||
checks:enable <app> [process-type(s)] Enable zero-downtime deployment for all processes (or comma-separated process-type list)
|
||||
checks:report [<app>] [<flag>] Displays a checks report for one or more apps
|
||||
@@ -123,7 +122,7 @@ To specify checks, add a `CHECKS` file to the root of your project directory. Th
|
||||
- comments (lines starting with #)
|
||||
- empty lines
|
||||
|
||||
> For Dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
> 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.
|
||||
|
||||
### Check instructions
|
||||
|
||||
@@ -327,7 +326,6 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
-----> Running post-deploy
|
||||
-----> Configuring myapp.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old container in 60 seconds
|
||||
=====> Application deployed:
|
||||
|
||||
@@ -159,7 +159,7 @@ Certain systems may require a wrapper function around the `docker` binary for pr
|
||||
|
||||
```shell
|
||||
# good
|
||||
"$DOCKER_BIN" run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
"$DOCKER_BIN" container run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
|
||||
# bad
|
||||
docker run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
@@ -175,16 +175,16 @@ Note that where possible, a label `com.dokku.app-name=$APP` - where `$APP` is th
|
||||
|
||||
```shell
|
||||
# `docker build` example
|
||||
"$DOCKER_BIN" build "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_BUILD_ARGS ...
|
||||
"$DOCKER_BIN" image build "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_BUILD_ARGS ...
|
||||
|
||||
# `docker commit` example
|
||||
# Note that the arguments must be set as a local array
|
||||
# as arrays cannot be exported in shell
|
||||
local DOKKU_COMMIT_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL $DOKKU_CONTAINER_LABEL")
|
||||
"$DOCKER_BIN" commit --change "LABEL com.dokku.app-name=$APP" "${DOKKU_COMMIT_ARGS[@]}" ...
|
||||
local DOKKU_COMMIT_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL $DOKKU_CONTAINER_LABEL=")
|
||||
"$DOCKER_BIN" container commit --change "LABEL com.dokku.app-name=$APP" "${DOKKU_COMMIT_ARGS[@]}" ...
|
||||
|
||||
# `docker run` example
|
||||
"$DOCKER_BIN" run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
|
||||
"$DOCKER_BIN" container run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
|
||||
```
|
||||
|
||||
## Copy files from the built image using `copy_from_image`
|
||||
@@ -194,7 +194,7 @@ Avoid copying files from running containers as these files may change over time.
|
||||
```shell
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
local TMP_FILE=$(mktemp "/tmp/dokku-${FUNCNAME[0]}.XXXX")
|
||||
local TMP_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$TMP_FILE' >/dev/null" RETURN INT TERM
|
||||
|
||||
local IMAGE_TAG="$(get_running_image_tag "$APP")"
|
||||
@@ -233,10 +233,10 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_main_cmd() {
|
||||
cmd-hello-default() {
|
||||
declare desc="prints Hello \$APP"
|
||||
declare cmd="hello" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare cmd="hello"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
@@ -250,7 +250,7 @@ hello_main_cmd() {
|
||||
echo "Hello $APP"
|
||||
}
|
||||
|
||||
hello_main_cmd "$@"
|
||||
cmd-hello-default "$@"
|
||||
```
|
||||
|
||||
`hello/subcommands/world`
|
||||
@@ -261,15 +261,15 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_world_cmd() {
|
||||
cmd-hello-world() {
|
||||
declare desc="prints Hello world"
|
||||
declare cmd="hello:world" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
declare cmd="hello:world"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
echo "Hello world"
|
||||
}
|
||||
|
||||
hello_world_cmd "$@"
|
||||
cmd-hello-world "$@"
|
||||
```
|
||||
|
||||
`hello/commands`
|
||||
|
||||
@@ -29,6 +29,66 @@ The following plugin triggers describe those available to a Dokku installation.
|
||||
|
||||
> The example plugin trigger code is not guaranteed to be implemented as in within dokku, and are merely simplified examples. Please look at the Dokku source for larger, more in-depth examples.
|
||||
|
||||
### `app-create`
|
||||
|
||||
- Description: Creates an app
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-destroy`
|
||||
|
||||
- Description: Destroys an app (with confirmation if force isn't specified)
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-exists`
|
||||
|
||||
- Description: Creates an app
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-maybe-create`
|
||||
|
||||
- Description: Creates an app (gated by whether this is globally enabled or not)
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-restart`
|
||||
|
||||
- Description: Triggers an app restart
|
||||
@@ -143,7 +203,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
APP="$1"; CONTAINERID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
|
||||
APP="$1"; CONTAINER_ID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
|
||||
|
||||
eval "$(config_export app $APP)"
|
||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||
@@ -201,6 +261,36 @@ help_content
|
||||
esac
|
||||
```
|
||||
|
||||
### `config-get`
|
||||
|
||||
- Description: Fetches the app config value for a key
|
||||
- Invoked by:
|
||||
- Arguments: `$APP $KEY`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `config-get-global`
|
||||
|
||||
- Description: Fetches the global config value for a key
|
||||
- Invoked by:
|
||||
- Arguments: `$KEY`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `core-post-deploy`
|
||||
|
||||
> To avoid issues with community plugins, this plugin trigger should be used *only* for core plugins. Please avoid using this trigger in your own plugins.
|
||||
@@ -370,7 +460,7 @@ verify_app_name "$APP"
|
||||
|
||||
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker deploy options.
|
||||
- Invoked by: `dokku ps:rebuild`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
|
||||
- Arguments: `$APP $IMAGE_SOURCE_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -378,7 +468,8 @@ verify_app_name "$APP"
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$2"
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
@@ -388,7 +479,7 @@ verify_app_name "$APP"
|
||||
|
||||
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker deploy options.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE [$PROC_TYPE $CONTAINER_INDEX]`
|
||||
- Arguments: `$APP $IMAGE_SOURCE_TYPE $IMAGE_TAG [$PROC_TYPE $CONTAINER_INDEX]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -396,7 +487,7 @@ verify_app_name "$APP"
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
APP="$1"; $IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3"; PROC_TYPE="$4"; CONTAINER_INDEX="$5"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
@@ -406,7 +497,7 @@ verify_app_name "$APP"
|
||||
|
||||
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker run options.
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
|
||||
- Arguments: `$APP $IMAGE_SOURCE_TYPE $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -414,7 +505,7 @@ verify_app_name "$APP"
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$3"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
@@ -526,7 +617,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
### `network-clear-config`
|
||||
|
||||
- Description: Clears network configuration
|
||||
- Invoked by: `internally triggered by proxy-clear-config within proxy implementations`
|
||||
- Invoked by: `internally triggered within proxy implementations`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
@@ -587,7 +678,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Return the listeners (host:port combinations) for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $PROCESS_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -741,11 +832,27 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-app-rename-setup`
|
||||
|
||||
- Description: Allows you to run commands after an app is setup, and before it is rebuild. This is useful for cleaning up tasks, or ensuring configuration from an old app is copied to the new app
|
||||
- Invoked by: `dokku apps:rename`
|
||||
- Arguments: `$OLD_APP_NAME $NEW_APP_NAME`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
|
||||
```
|
||||
|
||||
### `post-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -820,6 +927,20 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-container-create`
|
||||
|
||||
- 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`
|
||||
- Arguments "app|service" "$CONTAINER_ID" "$APP|$SERVICE" "$PHASE"
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-create`
|
||||
|
||||
- Description: Can be used to run commands after an app is created.
|
||||
@@ -915,6 +1036,7 @@ REV="$3" # optional, may not be sent for tar-based builds
|
||||
pushd "$TMP_WORK_DIR" >/dev/null
|
||||
touch Procfile
|
||||
echo "clock: some-command" >> Procfile
|
||||
popd >/dev/null
|
||||
```
|
||||
|
||||
### `post-proxy-ports-update`
|
||||
@@ -939,6 +1061,8 @@ haproxy-build-config "$APP"
|
||||
|
||||
### `post-release-buildpack`
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
@@ -946,27 +1070,19 @@ haproxy-build-config "$APP"
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Installs a package specified by the `CONTAINER_PACKAGE` env var
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Installing $CONTAINER_PACKAGE..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s CONTAINER_PACKAGE >/dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
|
||||
|
||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $CID) -eq 0
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-dockerfile`
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using a dockerfile.
|
||||
- Invoked by: `internal function dokku_release() (release phase)`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
@@ -1005,7 +1121,7 @@ dokku config:set --no-restart $APP MANUALLY_STOPPED=1
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1151,9 +1267,9 @@ CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick >/dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
|
||||
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $CID) -eq 0
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
@@ -1269,6 +1385,36 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-is-enabled`
|
||||
|
||||
- Description: Checks if there is a proxy enabled for the app
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-type`
|
||||
|
||||
- Description: Returns the proxy type for an app
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `receive-app`
|
||||
|
||||
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an app build.
|
||||
@@ -1511,6 +1657,25 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-post-run`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands after a `dokku run` invocation is called
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $CONTAINER_ID`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; CONTAINER_ID="$3";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-retire`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.18.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.20.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -9,11 +9,11 @@ We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 14.04.
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 16.04.
|
||||
|
||||
If you wish to skip tests for a particular commit, e.g. documentation changes, you may add the `[ci skip]` designator to your commit message. Commits that _should_ be tested but have the above designator will not be merged.
|
||||
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 14.04, we only provide official installation support for that platform.
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 16.04, we only provide official installation support for that platform and the latest LTS release of Ubuntu (currently 18.04).
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
# install dokku
|
||||
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "trusty")"
|
||||
echo "trusty utopic vivid wily xenial yakkety zesty artful bionic" | grep -q "$OS_ID" || OS_ID="trusty"
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
echo "xenial bionic" | grep -q "$OS_ID" || OS_ID="bionic"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get install -qq -y dokku
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
1. Login to your [DigitalOcean](https://m.do.co/c/fe06b043a083) account.
|
||||
2. Click **Create a Droplet**.
|
||||
3. Under **Choose an image > One-click apps**, choose the latest **Dokku** release for 16.04 _(version numbers may vary)_.
|
||||
3. Under **Choose an image > One-click apps**, choose the latest **Dokku** release for 18.04 _(version numbers may vary)_.
|
||||
4. Under **Choose a size**, select your machine spec.
|
||||
5. Under **Choose a datacenter region**, select your region.
|
||||
6. Add an SSH Key.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:v0.17.7
|
||||
docker pull dokku/dokku:0.20.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -17,7 +17,7 @@ docker run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:v0.17.7
|
||||
dokku/dokku:0.20.2
|
||||
```
|
||||
|
||||
Dokku is run with the following options:
|
||||
|
||||
@@ -19,7 +19,7 @@ source openrc.sh # Set the environment variables for DreamHost Cloud
|
||||
|
||||
This allows OpenStack client to connect to DreamHost API endpoints.
|
||||
The command below creates a new server instance named `my-dokku-instance`
|
||||
based on Ubuntu 14.04, with 2 GB RAM and 1 CPU (the flavor called
|
||||
based on Ubuntu 18.04, with 2 GB RAM and 1 CPU (the flavor called
|
||||
`supersonic`), opening network port access to HTTP and SSH (the
|
||||
`default` security group), and the name of the chosen SSH key. This
|
||||
key will be automatically added to the new server in the
|
||||
@@ -28,7 +28,7 @@ be reused by Dokku.
|
||||
|
||||
```sh
|
||||
openstack server create \
|
||||
--image Ubuntu-14.04 \
|
||||
--image Ubuntu-18.04 \
|
||||
--flavor gp1.supersonic \
|
||||
--security-group default \
|
||||
--key-name $YOUR_SSH_KEYNAME \
|
||||
@@ -46,7 +46,7 @@ server:
|
||||
apt_upgrade: true
|
||||
|
||||
apt_sources:
|
||||
- source: "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main"
|
||||
- source: "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
@@ -107,7 +107,7 @@ apt_sources:
|
||||
=H60S
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
filename: dokku.list
|
||||
- source: "deb https://apt.dockerproject.org/repo ubuntu-trusty main"
|
||||
- source: "deb https://apt.dockerproject.org/repo ubuntu-bionic main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
|
||||
@@ -6,7 +6,7 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
|
||||
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of [Ubuntu x64 - Any currently supported release](https://www.ubuntu.com/download), [Debian 8.2 x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- A fresh installation of [Ubuntu 16.04/18.04 x64](https://www.ubuntu.com/download), [Debian 9+ x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- At least 1 GB of system memory <sup>[2]</sup>
|
||||
|
||||
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
|
||||
@@ -21,13 +21,13 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.0/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.18.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.20.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
If you're using Debian 8 or Ubuntu 14.04, make sure your package manager is configured to install a sufficiently recent version of nginx<sup>[3]</sup>, otherwise, the installation may fail due to `unmet dependencies` relating nginx.
|
||||
If you're using Debian 9+ or Ubuntu 18.04, make sure your package manager is configured to install a sufficiently recent version of nginx<sup>[3]</sup>, otherwise, the installation may fail due to `unmet dependencies` relating nginx.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
|
||||
@@ -54,6 +54,7 @@ For various reasons, certain hosting providers may have other steps that should
|
||||
As well, you may wish to customize your installation in some other fashion. or experiment with Vagrant. The guides below should get you started:
|
||||
|
||||
- [Debian Package Installation Notes](/docs/getting-started/install/debian.md)
|
||||
- [Docker-based Installation Notes](/docs/getting-started/install/docker.md)
|
||||
- [RPM Package Installation Notes](/docs/getting-started/install/rpm.md)
|
||||
- [Vagrant Installation Notes](/docs/getting-started/install/vagrant.md)
|
||||
- [Advanced Install Customization](/docs/getting-started/advanced-installation.md)
|
||||
|
||||
@@ -198,7 +198,7 @@ __Symptom:__ I successfully deployed my application with no deployment errors bu
|
||||
|
||||
__Solution:__
|
||||
|
||||
This can occur if Dokku is running on a system with a firewall like UFW enabled (some OS versions like Ubuntu 16.04 have this enabled by default). You can check if this is your case by running the following script:
|
||||
This can occur if Dokku is running on a system with a firewall like UFW enabled (some OS versions like Ubuntu have this enabled by default). You can check if this is your case by running the following script:
|
||||
|
||||
```shell
|
||||
sudo ufw status
|
||||
|
||||
@@ -51,6 +51,10 @@ Before upgrading, check the migration guides to get comfortable with new feature
|
||||
|
||||
- [0.10 Migration Guide](/docs/appendices/0.10.0-migration-guide.md)
|
||||
|
||||
### 0.20 Migration Guide
|
||||
|
||||
- [0.20 Migration Guide](/docs/appendices/0.20.0-migration-guide.md)
|
||||
|
||||
## Upgrade Instructions
|
||||
|
||||
If Dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
|
||||
@@ -68,7 +72,7 @@ dokku --quiet apps:list | xargs -L1 dokku ps:stop
|
||||
dokku --quiet apps | xargs -L1 dokku ps:stop
|
||||
|
||||
# update dokku and its dependencies
|
||||
sudo apt-get install -qq -y dokku herokuish sshcommand plugn
|
||||
sudo apt-get install -qq -y dokku herokuish sshcommand plugn gliderlabs-sigil
|
||||
|
||||
# rebuild all of your applications
|
||||
dokku ps:rebuildall # rebuilds all applications
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<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.18.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.18.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.18.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.18.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.18.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.18.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.18.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.18.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.18.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.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.18.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.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.20.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
@@ -127,12 +127,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.18.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.20.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.18.0 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.20.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -164,12 +164,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">export OS_ID="$(lsb_release -cs 2>/dev/null || echo "trusty")"</span>
|
||||
<span class="command">export OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "utopicvividwilyxenialyakketyzestyartfulbionic" | grep -q "$OS_ID" || OS_ID="trusty"</span>
|
||||
<span class="command">echo "xenial bionic" | grep -q "$OS_ID" || OS_ID="bionic"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
@@ -312,7 +312,7 @@
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p>© 2013-2019 Dokku</p>
|
||||
<p>© 2013-2020 Dokku</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
# Network Management
|
||||
|
||||
> New as of 0.11.0
|
||||
> New as of 0.11.0, Enhanced in 0.20.0
|
||||
|
||||
```
|
||||
network:create <network> # Creates an attachable docker network
|
||||
network:destroy <network> # Destroys a docker network
|
||||
network:exists <network> # Checks if a docker network exists
|
||||
network:info <network> # Outputs information about a docker network
|
||||
network:list # Lists all docker networks
|
||||
network:report [<app>] [<flag>] # Displays a network report for one or more apps
|
||||
network:rebuild <app> # Rebuilds network settings for an app
|
||||
network:rebuildall # Rebuild network settings for all apps
|
||||
@@ -13,6 +18,161 @@ The Network plugin allows developers to abstract the concept of container networ
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing networks
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
You can easily list all available networks using the `network:list` command:
|
||||
|
||||
```shell
|
||||
dokku network:list
|
||||
```
|
||||
|
||||
```
|
||||
=====> Networks
|
||||
bridge
|
||||
host
|
||||
none
|
||||
test-network
|
||||
```
|
||||
|
||||
Note that you can easily hide extra output from Dokku commands by using the `--quiet` flag, which makes it easier to parse on the command line.
|
||||
|
||||
```shell
|
||||
dokku --quiet network:list
|
||||
```
|
||||
|
||||
```
|
||||
bridge
|
||||
host
|
||||
none
|
||||
test-network
|
||||
```
|
||||
|
||||
### Creating a network
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
Docker networks can be created via the `network:create` command. Executing this command will create an attachable `bridge` network. This can be used to route requests between containers without going through any public network.
|
||||
|
||||
```shell
|
||||
dokku network:create test-network
|
||||
```
|
||||
|
||||
```
|
||||
-----> Creating network test-network
|
||||
```
|
||||
|
||||
Specifying other additional flags or other types of networks can be created directly via the `docker` command.
|
||||
|
||||
### Destroying a network
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
A Docker network without any associated containers may be destroyed via the `network:destroy` command. Docker will refuse to destroy networks that have containers attached.
|
||||
|
||||
```shell
|
||||
dokku network:destroy test-network
|
||||
```
|
||||
|
||||
```shell
|
||||
! WARNING: Potentially Destructive Action
|
||||
! This command will destroy network test.
|
||||
! To proceed, type "test"
|
||||
> test
|
||||
-----> Destroying network test
|
||||
```
|
||||
|
||||
As the command is destructive, it will default to asking for confirmation before executing the removal of the network. This may be avoided by providing the `--force` flag:
|
||||
|
||||
```shell
|
||||
dokku --force network:destroy test-network
|
||||
```
|
||||
|
||||
```shell
|
||||
-----> Destroying network test
|
||||
```
|
||||
|
||||
### Checking if a network exists
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
For CI/CD pipelines, it may be useful to see if an network exists before creating a new network. You can do so via the `network:exists` command:
|
||||
|
||||
```shell
|
||||
dokku network:exists nonexistent-network
|
||||
```
|
||||
|
||||
```
|
||||
Network does not exist
|
||||
```
|
||||
|
||||
The `network:exists` command will return non-zero if the network does not exist, and zero if it does.
|
||||
|
||||
### Checking network info
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
Network information can be retrieved via the `network:info` command. This is a slightly different version of the `docker network` command.
|
||||
|
||||
```shell
|
||||
dokku network:info test-network
|
||||
```
|
||||
|
||||
```
|
||||
// TODO
|
||||
```
|
||||
|
||||
### Attaching an app to a network
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
Apps will default to being associated with the `bridge` network, but can be attached to `attachable` networks by changing the `attach-post-create` or `attach-post-deploy` network properties when using the [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md). A change in these values will require an app deploy or rebuild.
|
||||
|
||||
```shell
|
||||
# associates the network after a container is created but before it is started
|
||||
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
|
||||
dokku network:set node-js-app attach-post-deploy other-test-network
|
||||
```
|
||||
|
||||
Setting the `attach` network property to an empty value will de-associate the container with the network.
|
||||
|
||||
```shell
|
||||
dokku network:set node-js-app attach-post-create
|
||||
dokku network:set node-js-app attach-post-deploy
|
||||
```
|
||||
|
||||
When a container created for a deployment is being attached to a network - regardless of which `attach` property was used - a network alias of the pattern `APP.PROC_TYPE` will be added to all containers. This can be used to load-balance requests between containers.
|
||||
|
||||
#### When to attach containers to a network
|
||||
|
||||
Containers can be attached to a network for a variety of reasons:
|
||||
|
||||
- A background process in one app needs to communicate to a webservice in another app
|
||||
- An app needs to talk to a container not managed by Dokku in a secure manner
|
||||
- A custom network that allows transparent access to another host exists and is necessary for an app to run
|
||||
|
||||
Whatever the reason, the semantics of the two network hooks are important and are outlined before.
|
||||
|
||||
- `attach-post-create`:
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created` but not `running`
|
||||
- Use case: When the container needs to access a resource on the network.
|
||||
- Example: The app needs to talk to a database on the same network when it first boots.
|
||||
- `attach-post-deploy`
|
||||
- Phase it applies to:
|
||||
- `deploy`: Deployed app containers.
|
||||
- Container state on attach: `running`
|
||||
- Use case: When another container on the network needs to access _this_ container.
|
||||
- Example: A background process needs to communicate with the web process exposed by this container.
|
||||
|
||||
> Warning: If the attachment fails at this stage, this may result in your application failing to respond to proxied requests once older containers are removed.
|
||||
|
||||
### Rebuilding network settings
|
||||
|
||||
There are cases where you may need to rebuild the network configuration for an app, such as on app boot or container restart. In these cases, you can use the `network:rebuild` command:
|
||||
@@ -37,7 +197,7 @@ dokku network:rebuildall
|
||||
|
||||
> This functionality does not control the `--network` docker flag. Please use the [docker-options plugin](docs/advanced-usage/docker-options.md) to manage this flag.
|
||||
|
||||
By default, an application will only bind to the internal interface. This behavior can be modified per app by changing the `bind-all-interfaces` network property.
|
||||
By default, an app will only bind to the internal interface. This behavior can be modified per app by changing the `bind-all-interfaces` network property.
|
||||
|
||||
```shell
|
||||
# bind to the default docker interface (`docker0`) with a random internal ip
|
||||
|
||||
@@ -16,12 +16,16 @@ In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into
|
||||
|
||||
> 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.
|
||||
|
||||
### Proxy port mapping
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
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.
|
||||
|
||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` commands detailed below.
|
||||
|
||||
### Listing port mappings
|
||||
|
||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
||||
|
||||
```shell
|
||||
@@ -44,6 +48,8 @@ curl http://node-js-app.dokku.me
|
||||
Hello World!
|
||||
```
|
||||
|
||||
### Adding a custom port mapping
|
||||
|
||||
There are cases where we may wish for the service to be listening on more than one port, such as port 8080. Normally, this would not be possible:
|
||||
|
||||
```shell
|
||||
@@ -65,7 +71,6 @@ dokku proxy:ports-add node-js-app http:8080:5000
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
@@ -89,6 +94,8 @@ curl http://node-js-app.dokku.me:8080
|
||||
Hello World!
|
||||
```
|
||||
|
||||
### Setting all port mappings at once
|
||||
|
||||
Port mappings can also be force set using the `proxy:ports-set` command.
|
||||
|
||||
```shell
|
||||
@@ -100,19 +107,22 @@ dokku proxy:ports-set node-js-app http:8080:5000
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
### Removing a port mapping
|
||||
|
||||
A port mapping can be removed using the `proxy:ports-remove` command if it no longer necessary:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80:5000
|
||||
```
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80
|
||||
```
|
||||
|
||||
## Port management by Deployment Method
|
||||
|
||||
@@ -126,7 +136,7 @@ For buildpack deployments, your application *must* respect the `PORT` environmen
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku's default proxy implementation - nginx - only supports HTTP request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/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`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
|
||||
#### Applications using EXPOSE
|
||||
|
||||
@@ -135,7 +145,7 @@ Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port
|
||||
For example, if the Dokku installation is configured with the domain `dokku.me` and an application named `node-js-app` is deployed with following Dockerfile:
|
||||
|
||||
```
|
||||
FROM ubuntu:14.04
|
||||
FROM ubuntu:18.04
|
||||
EXPOSE 1234
|
||||
RUN python -m SimpleHTTPServer 1234
|
||||
```
|
||||
|
||||
@@ -69,7 +69,8 @@ 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 both the `http` and `https` schemes.
|
||||
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.
|
||||
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.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.18.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.18.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.18.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.18.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.18.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.18.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.18.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.18.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.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.18.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.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.20.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/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">
|
||||
<style>
|
||||
|
||||
19
dokku
19
dokku
@@ -56,6 +56,7 @@ export DOKKU_SYSTEM_USER=${DOKKU_SYSTEM_USER:="dokku"}
|
||||
export DOKKU_API_VERSION=1
|
||||
export DOKKU_NOT_IMPLEMENTED_EXIT=10
|
||||
export DOKKU_VALID_EXIT=0
|
||||
export DOKKU_PID="$BASHPID"
|
||||
|
||||
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
|
||||
@@ -86,13 +87,13 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||
fi
|
||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:add" ]]; then
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]]; then
|
||||
export SSH_USER=$(id -un)
|
||||
sudo -u dokku -E -H "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]]; then
|
||||
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]] || [[ $1 == "ssh-keys:remove" ]]; then
|
||||
if [[ $(id -un) != "root" ]]; then
|
||||
dokku_log_fail "This command must be run as root"
|
||||
else
|
||||
@@ -135,10 +136,7 @@ execute_dokku_cmd() {
|
||||
nginx | nginx:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
|
||||
;;
|
||||
deploy | delete | ls | run | cleanup)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
url | urls | report)
|
||||
deploy | run | cleanup | url | urls | report)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
esac
|
||||
@@ -243,8 +241,13 @@ case "$1" in
|
||||
;;
|
||||
|
||||
version | -v | --version)
|
||||
test -f "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
||||
DOKKU_VERSION=$(cat "${DOKKU_ROOT}/VERSION")
|
||||
if [[ -f "$DOKKU_LIB_ROOT/STABLE_VERSION" ]]; then
|
||||
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/STABLE_VERSION")
|
||||
elif [[ -f "$DOKKU_LIB_ROOT/VERSION" ]]; then
|
||||
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/VERSION")
|
||||
else
|
||||
dokku_log_fail "Unable to determine dokku's version"
|
||||
fi
|
||||
echo "dokku version ${DOKKU_VERSION}"
|
||||
;;
|
||||
|
||||
|
||||
@@ -1,27 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help help:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
[[ " help help:help cleanup:help run:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/00_dokku-standard/help-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | run:help | trace:help | url:help | urls:help | version:help)
|
||||
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
|
||||
help_content_func() {
|
||||
declare desc="return standard plugin help content"
|
||||
cat <<help_content
|
||||
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
version , Print dokku's version
|
||||
help , Print the list of commands
|
||||
help_content
|
||||
}
|
||||
|
||||
if [[ $help_topic ]]; then
|
||||
help_content_func | sed "/^\s*$help_topic\s/!d" | sort | sed '/^.*:/d' | column -c2 -t -s,
|
||||
else
|
||||
help_content_func
|
||||
fi
|
||||
help | cleanup:help | run:help | url:help | urls:help | version:help)
|
||||
cmd-standard-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
27
plugins/00_dokku-standard/help-functions
Executable file
27
plugins/00_dokku-standard/help-functions
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-standard-help() {
|
||||
declare desc="help command"
|
||||
declare CMD="$1"
|
||||
|
||||
[[ $(echo "$CMD" | sed '/.*:help/!d') ]] && help_topic="${CMD%\:help}"
|
||||
if [[ $help_topic ]]; then
|
||||
fn-help-content | sed "/^\s*$help_topic\s/!d" | sort | sed '/^.*:/d' | column -c2 -t -s,
|
||||
else
|
||||
fn-help-content
|
||||
fi
|
||||
}
|
||||
|
||||
fn-help-content() {
|
||||
declare desc="return help content"
|
||||
cat <<help_content
|
||||
cleanup [<app>], Cleans up exited/dead Docker containers and removes dangling images
|
||||
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
version , Print dokku's version
|
||||
help , Print the list of commands
|
||||
help_content
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.18.0"
|
||||
version = "0.20.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_cleanup_cmd() {
|
||||
cmd-cleanup() {
|
||||
declare desc="cleans up old deployment cruft"
|
||||
declare cmd="cleanup"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -16,4 +16,4 @@ dokku_cleanup_cmd() {
|
||||
docker_cleanup "$APP" "true"
|
||||
}
|
||||
|
||||
dokku_cleanup_cmd "$@"
|
||||
cmd-cleanup "$@"
|
||||
|
||||
@@ -4,4 +4,4 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
shift 1
|
||||
dokku_deploy_cmd "$@"
|
||||
cmd-deploy "$@"
|
||||
|
||||
@@ -3,10 +3,11 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_report_cmd() {
|
||||
cmd-report() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
local cmd="report"
|
||||
declare APP="$2"
|
||||
declare cmd="report"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
dokku_log_info1 "uname: $(uname -a)"
|
||||
dokku_log_info1 "memory: "
|
||||
@@ -14,10 +15,10 @@ dokku_report_cmd() {
|
||||
dokku_log_info1 "docker version: "
|
||||
"$DOCKER_BIN" version | sed "s/^/ /"
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
"$DOCKER_BIN" -D info | sed "s/^/ /"
|
||||
"$DOCKER_BIN" -D system info | sed "s/^/ /"
|
||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||
dokku_log_info1 "herokuish version: "
|
||||
"$DOCKER_BIN" 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/^/ /"
|
||||
dokku_log_info1 "dokku version: $(dokku version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
dokku plugin:list | sed "s/^/ /"
|
||||
@@ -31,4 +32,4 @@ dokku_report_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_report_cmd "$@"
|
||||
cmd-report "$@"
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
dokku_run_cmd() {
|
||||
cmd-run() {
|
||||
declare desc="runs command in container based on app image"
|
||||
declare cmd="run" APP=""
|
||||
shift
|
||||
declare cmd="run"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP=""
|
||||
|
||||
declare -a RUN_ENV
|
||||
RUN_ENV=()
|
||||
@@ -40,4 +40,4 @@ dokku_run_cmd() {
|
||||
plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "${#RUN_ENV[@]}" "${RUN_ENV[@]}" "$@"
|
||||
}
|
||||
|
||||
dokku_run_cmd "$@"
|
||||
cmd-run "$@"
|
||||
|
||||
@@ -3,11 +3,14 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_urls_cmd() {
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"
|
||||
cmd-urls() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
declare cmd="url"
|
||||
declare APP="$2"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
dokku_urls_cmd "$@"
|
||||
cmd-urls "$@"
|
||||
|
||||
1
plugins/20_events/app-create
Symbolic link
1
plugins/20_events/app-create
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/app-destroy
Symbolic link
1
plugins/20_events/app-destroy
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/app-exists
Symbolic link
1
plugins/20_events/app-exists
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/app-maybe-create
Symbolic link
1
plugins/20_events/app-maybe-create
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/builder-create-dokku-image
Symbolic link
1
plugins/20_events/builder-create-dokku-image
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/builder-dokku-image
Symbolic link
1
plugins/20_events/builder-dokku-image
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,30 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help events:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/20_events/help-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | events:help)
|
||||
help_content_func() {
|
||||
declare desc="return events plugin help content"
|
||||
cat <<help_content
|
||||
events [-t], Show the last events (-t follows)
|
||||
events:list, List logged events
|
||||
events:on, Enable events logger
|
||||
events:off, Disable events logger
|
||||
help_content
|
||||
}
|
||||
|
||||
if [[ $1 == "events:help" ]]; then
|
||||
echo 'Usage: dokku events:COMMAND [-t]'
|
||||
echo ''
|
||||
echo 'Interact with Dokku event logger.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
help_content_func | sort | column -c2 -t -s,
|
||||
else
|
||||
help_content_func
|
||||
fi
|
||||
cmd-events-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
1
plugins/20_events/config-get
Symbolic link
1
plugins/20_events/config-get
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/config-get-global
Symbolic link
1
plugins/20_events/config-get-global
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
35
plugins/20_events/help-functions
Executable file
35
plugins/20_events/help-functions
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-events-help() {
|
||||
declare desc="help command"
|
||||
declare CMD="$1"
|
||||
local plugin_name="events"
|
||||
local plugin_description="Manage event logging"
|
||||
|
||||
if [[ "$CMD" == "$plugin_name:help" ]]; then
|
||||
echo -e "Usage: dokku $plugin_name[:COMMAND]"
|
||||
echo ''
|
||||
echo "$plugin_description"
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
fn-help-content | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
fn-help-content
|
||||
else
|
||||
cat <<help_desc
|
||||
$plugin_name, $plugin_description
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
fn-help-content() {
|
||||
declare desc="return help content"
|
||||
cat <<help_content
|
||||
events [-t], Show the last events (-t follows)
|
||||
events:list, List logged events
|
||||
events:on, Enable events logger
|
||||
events:off, Disable events logger
|
||||
help_content
|
||||
}
|
||||
@@ -3,55 +3,58 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
DOKKU_RSYSLOG_FILTER_DIR=/etc/rsyslog.d
|
||||
DOKKU_RSYSLOG_FILTER=$DOKKU_RSYSLOG_FILTER_DIR/99-dokku.conf
|
||||
DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
|
||||
trigger-events-install() {
|
||||
declare desc="20_events install plugin trigger"
|
||||
declare trigger="install"
|
||||
DOKKU_RSYSLOG_FILTER_DIR=/etc/rsyslog.d
|
||||
DOKKU_RSYSLOG_FILTER=$DOKKU_RSYSLOG_FILTER_DIR/99-dokku.conf
|
||||
DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
|
||||
|
||||
flag_rsyslog_needs_restart=n
|
||||
flag_rsyslog_needs_restart=n
|
||||
|
||||
# This can be done unconditionally as mkdir -p
|
||||
# exits gracefully if the path already exists
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | rhel)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
chown syslog:dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
# This can be done unconditionally as mkdir -p
|
||||
# exits gracefully if the path already exists
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | rhel)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
# chown syslog:root might not work on SUSE
|
||||
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
chown syslog:dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
esac
|
||||
chmod 664 "$DOKKU_EVENTS_LOGFILE"
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_RSYSLOG_FILTER_DIR" && ! -f "$DOKKU_RSYSLOG_FILTER" ]]; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch | debian | centos | rhel)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
# chown syslog:root might not work on SUSE
|
||||
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
esac
|
||||
chmod 664 "$DOKKU_EVENTS_LOGFILE"
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_RSYSLOG_FILTER_DIR" && ! -f "$DOKKU_RSYSLOG_FILTER" ]]; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
:syslogtag, contains, "dokku-event" $DOKKU_EVENTS_LOGFILE
|
||||
EOF
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_RSYSLOG_FILTER" ]] && ! grep -q "dokku-event" "$DOKKU_RSYSLOG_FILTER"; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
if [[ -f "$DOKKU_RSYSLOG_FILTER" ]] && ! grep -q "dokku-event" "$DOKKU_RSYSLOG_FILTER"; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
:syslogtag, contains, "dokku-event" $DOKKU_EVENTS_LOGFILE
|
||||
EOF
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
if [[ ! -f "$DOKKU_LOGROTATE_FILE" ]]; then
|
||||
cat >"$DOKKU_LOGROTATE_FILE" <<EOF
|
||||
if [[ ! -f "$DOKKU_LOGROTATE_FILE" ]]; then
|
||||
cat >"$DOKKU_LOGROTATE_FILE" <<EOF
|
||||
$DOKKU_LOGS_DIR/*.log {
|
||||
daily
|
||||
rotate 7
|
||||
@@ -67,17 +70,20 @@ $DOKKU_LOGS_DIR/*.log {
|
||||
}
|
||||
EOF
|
||||
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
if [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
fi
|
||||
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
if [[ -f "$DOKKU_RSYSLOG_FILTER" && "$flag_rsyslog_needs_restart" == "y" ]]; then
|
||||
service rsyslog restart
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_RSYSLOG_FILTER" && "$flag_rsyslog_needs_restart" == "y" ]]; then
|
||||
service rsyslog restart
|
||||
fi
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename "$0")" "$@"
|
||||
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename "$0")" "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
exit 0
|
||||
trigger-events-install "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.18.0"
|
||||
version = "0.20.2"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/post-app-rename-setup
Symbolic link
1
plugins/20_events/post-app-rename-setup
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/post-container-create
Symbolic link
1
plugins/20_events/post-container-create
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/proxy-is-enabled
Symbolic link
1
plugins/20_events/proxy-is-enabled
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/proxy-type
Symbolic link
1
plugins/20_events/proxy-type
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-post-run
Symbolic link
1
plugins/20_events/scheduler-post-run
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -3,11 +3,14 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_main_cmd() {
|
||||
cmd-events-default() {
|
||||
declare desc="shows contents of dokku events log"
|
||||
local cmd="events"
|
||||
declare cmd="events"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare TAIL="$1"
|
||||
|
||||
if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then
|
||||
if [[ $2 == "-t" ]]; then
|
||||
if [[ "$TAIL" == "-t" ]]; then
|
||||
tail -F "$DOKKU_EVENTS_LOGFILE"
|
||||
else
|
||||
tail -n 100 "$DOKKU_EVENTS_LOGFILE"
|
||||
@@ -15,4 +18,4 @@ events_main_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
events_main_cmd "$@"
|
||||
cmd-events-default "$@"
|
||||
|
||||
@@ -3,9 +3,11 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_list_cmd() {
|
||||
cmd-events-list() {
|
||||
declare desc="lists enabled events"
|
||||
local cmd="events:list"
|
||||
declare cmd="events:list"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
|
||||
local PLUGIN_DIR="$(dirname "$0")/.."
|
||||
local logged hook
|
||||
|
||||
@@ -14,6 +16,9 @@ events_list_cmd() {
|
||||
dokku_col_log_info2_quiet "Events currently logged"
|
||||
|
||||
for hook in $logged; do
|
||||
if [[ "$hook" == "help-functions" ]]; then
|
||||
continue
|
||||
fi
|
||||
dokku_col_log_msg "$hook"
|
||||
done
|
||||
else
|
||||
@@ -21,4 +26,4 @@ events_list_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
events_list_cmd "$@"
|
||||
cmd-events-list "$@"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user