Compare commits
1585 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d21efd90b4 | ||
|
|
d82a259bab | ||
|
|
6f64a59f49 | ||
|
|
d67aa94709 | ||
|
|
f8376c8845 | ||
|
|
52f3cf2af0 | ||
|
|
0997fd3347 | ||
|
|
2c4fec77bb | ||
|
|
2a04ed70b6 | ||
|
|
1ea821a6c3 | ||
|
|
3358254212 | ||
|
|
dbde0b2719 | ||
|
|
9ead92a490 | ||
|
|
feb6f2fed6 | ||
|
|
128c442b17 | ||
|
|
162db40370 | ||
|
|
5855fd069f | ||
|
|
c045b1ca6b | ||
|
|
d1319977d6 | ||
|
|
9c073364f5 | ||
|
|
e9554447d6 | ||
|
|
f3f9d37d59 | ||
|
|
0454f3bc8f | ||
|
|
aa81bc0589 | ||
|
|
3f70ee3e54 | ||
|
|
e922615cc7 | ||
|
|
d6a70c7e7b | ||
|
|
c725506d63 | ||
|
|
cafcf5cb7c | ||
|
|
54e6dd59f1 | ||
|
|
bd89c31cb7 | ||
|
|
4136c2682f | ||
|
|
5b8c93fd29 | ||
|
|
0337a21f66 | ||
|
|
407c54757d | ||
|
|
5dbefcbd9c | ||
|
|
70e552535b | ||
|
|
8e6b19c36e | ||
|
|
c379b3e477 | ||
|
|
2271c476e9 | ||
|
|
c70be7a386 | ||
|
|
6c7217b873 | ||
|
|
aa276f0b18 | ||
|
|
c43149f4c9 | ||
|
|
3d4252f43c | ||
|
|
d0219ced67 | ||
|
|
2bc7b7e2cc | ||
|
|
8c42e85fcc | ||
|
|
257abfaee8 | ||
|
|
faf53aa479 | ||
|
|
d9204083f7 | ||
|
|
775e78bd08 | ||
|
|
997cc4f466 | ||
|
|
a825e2678c | ||
|
|
6c6e26712d | ||
|
|
c4985bca67 | ||
|
|
620a36be82 | ||
|
|
7bf61b401f | ||
|
|
10f6d00e04 | ||
|
|
dfae840ace | ||
|
|
f6ec744a1f | ||
|
|
8f1b142949 | ||
|
|
94c298a1e3 | ||
|
|
6e7e69b19d | ||
|
|
e34e36c390 | ||
|
|
5103ee21aa | ||
|
|
c58cb02689 | ||
|
|
72eb61d1fc | ||
|
|
9e18736475 | ||
|
|
7a564f3185 | ||
|
|
e8d9982330 | ||
|
|
e1f1531d42 | ||
|
|
5e6b27a63f | ||
|
|
9f326b3f28 | ||
|
|
66bded4910 | ||
|
|
9c96394369 | ||
|
|
df02a1c1cc | ||
|
|
f0ca3fef54 | ||
|
|
ca680c3aeb | ||
|
|
a1c768b9b3 | ||
|
|
857850b4c6 | ||
|
|
da92be3030 | ||
|
|
e290965acf | ||
|
|
d1b67f1fff | ||
|
|
7c4381bfd5 | ||
|
|
bc410b4111 | ||
|
|
534a5f0898 | ||
|
|
1a2153585e | ||
|
|
547c14d18e | ||
|
|
d0c0543659 | ||
|
|
e0a513650e | ||
|
|
9ecfa843f0 | ||
|
|
afd64c3e04 | ||
|
|
9b3ed8d614 | ||
|
|
79f181cd55 | ||
|
|
d5b14769dd | ||
|
|
bdc89e5907 | ||
|
|
a68234bdf4 | ||
|
|
3f2079b4ea | ||
|
|
ecb8a02356 | ||
|
|
39d8465938 | ||
|
|
b15244e672 | ||
|
|
a9905d3508 | ||
|
|
77340011bd | ||
|
|
5c1d99a04c | ||
|
|
b02f8ba88b | ||
|
|
f973239379 | ||
|
|
f0a125f070 | ||
|
|
5a19cebfd7 | ||
|
|
d5697b9399 | ||
|
|
8f98bbc66f | ||
|
|
d4ec8d3ab5 | ||
|
|
0a08911800 | ||
|
|
30a15aaa7a | ||
|
|
d727dd76ce | ||
|
|
39af6359be | ||
|
|
d1728a4653 | ||
|
|
13608df0ef | ||
|
|
c07b3161fc | ||
|
|
1f2e2ba61d | ||
|
|
93bd3cd9e3 | ||
|
|
9930c0493d | ||
|
|
455a80e09d | ||
|
|
9a845664e1 | ||
|
|
36c96be091 | ||
|
|
1a99271fa8 | ||
|
|
dc04ab912d | ||
|
|
93f819609e | ||
|
|
6480957c4f | ||
|
|
b33cd266e7 | ||
|
|
88cbae2a6d | ||
|
|
3848b467a2 | ||
|
|
e68c04b9a6 | ||
|
|
5d8340d305 | ||
|
|
336e901c1e | ||
|
|
a6e4949264 | ||
|
|
1b325435b8 | ||
|
|
f8edf6b07a | ||
|
|
9e6091e665 | ||
|
|
a755f69e92 | ||
|
|
518337812f | ||
|
|
324e1ad1b5 | ||
|
|
e95384f76b | ||
|
|
111d5c68bf | ||
|
|
25ecbcdbbd | ||
|
|
ca75d4162d | ||
|
|
a8a43812a0 | ||
|
|
7058989941 | ||
|
|
0decb386d5 | ||
|
|
4967cc1d1c | ||
|
|
06cb7a0d55 | ||
|
|
fcd16e849d | ||
|
|
eb55ba5dd0 | ||
|
|
a7593db0c3 | ||
|
|
7502cbd13d | ||
|
|
823629d332 | ||
|
|
401683a305 | ||
|
|
8fc0cb67ec | ||
|
|
a1dcc2c173 | ||
|
|
bd4621070c | ||
|
|
70eb751868 | ||
|
|
ef262c26e8 | ||
|
|
5ad5a29a00 | ||
|
|
46d333df4b | ||
|
|
247698fea6 | ||
|
|
302537efd2 | ||
|
|
a62f04fa7e | ||
|
|
1c98b48e5d | ||
|
|
33bf6f59b3 | ||
|
|
550a0bd07b | ||
|
|
213f7d224c | ||
|
|
c62bff3002 | ||
|
|
31f3c429ab | ||
|
|
fee6773ef3 | ||
|
|
bc49a2e124 | ||
|
|
3fe10efd09 | ||
|
|
772e4286f2 | ||
|
|
b9e30e7e19 | ||
|
|
67317f88df | ||
|
|
c6d99722eb | ||
|
|
bd2aa1bd43 | ||
|
|
6d9520e599 | ||
|
|
9d0bc930a6 | ||
|
|
f63c2d18a3 | ||
|
|
1bdedf1e28 | ||
|
|
14b511d673 | ||
|
|
86a2b7d2e3 | ||
|
|
a91a0f8abb | ||
|
|
5a1a30efeb | ||
|
|
3d913d89f6 | ||
|
|
e0453dbc15 | ||
|
|
1c6f847c55 | ||
|
|
61d4b478ce | ||
|
|
350a84d253 | ||
|
|
618158a0f3 | ||
|
|
dbc3d82017 | ||
|
|
bd3f753d85 | ||
|
|
864562221d | ||
|
|
52f2ce35f6 | ||
|
|
623aa737e0 | ||
|
|
e8c3472581 | ||
|
|
730af2e552 | ||
|
|
04ee7a7020 | ||
|
|
8612f1a926 | ||
|
|
69135ff37e | ||
|
|
0edb027a53 | ||
|
|
18b0c90d0e | ||
|
|
26a3a8fd0a | ||
|
|
97b0aa3eb8 | ||
|
|
745473322a | ||
|
|
0066de604e | ||
|
|
6797dc7df1 | ||
|
|
f9247a9c42 | ||
|
|
20f9fae613 | ||
|
|
84b34b2221 | ||
|
|
69ec927fd7 | ||
|
|
19f9648b40 | ||
|
|
be6c4dc6df | ||
|
|
7292eaefc3 | ||
|
|
84ca9ff7e5 | ||
|
|
24905e74a5 | ||
|
|
4022ebd31c | ||
|
|
135e78c868 | ||
|
|
a22391b7ad | ||
|
|
a4b024d6f9 | ||
|
|
d4016223d5 | ||
|
|
2580ad305c | ||
|
|
377ca5ca22 | ||
|
|
fda75cbaa5 | ||
|
|
441d1c2676 | ||
|
|
0ab135b034 | ||
|
|
5901c57bde | ||
|
|
0bd6970b4b | ||
|
|
bdfb1ee549 | ||
|
|
f62373c3fa | ||
|
|
79cd7e4cab | ||
|
|
326031d289 | ||
|
|
d68473bfc2 | ||
|
|
cb16e11cf5 | ||
|
|
5c04328081 | ||
|
|
913f709c39 | ||
|
|
41f6480834 | ||
|
|
ae6b0b07aa | ||
|
|
a6113f88e7 | ||
|
|
c3ece32145 | ||
|
|
9082c51074 | ||
|
|
da2b54823b | ||
|
|
6d40d52d7d | ||
|
|
fbdb76e705 | ||
|
|
847a405712 | ||
|
|
7cce5b1b79 | ||
|
|
b75dc20a7d | ||
|
|
0c7562c6f8 | ||
|
|
539f08f627 | ||
|
|
4448399e71 | ||
|
|
c50f39b4fa | ||
|
|
4469b7428a | ||
|
|
a108856a98 | ||
|
|
1b216841a8 | ||
|
|
db421c97dc | ||
|
|
93f1a8e59d | ||
|
|
d72c3ac6bf | ||
|
|
a3d9db0e00 | ||
|
|
e8a4a4c89e | ||
|
|
50361505db | ||
|
|
267cc3fd54 | ||
|
|
a086302fc5 | ||
|
|
bd894ceaaf | ||
|
|
3ed019d708 | ||
|
|
012040d5c7 | ||
|
|
8d26d06f5e | ||
|
|
84907be0cd | ||
|
|
21aef2eef1 | ||
|
|
017037586c | ||
|
|
1bb4e4920b | ||
|
|
1ff3b57f88 | ||
|
|
d473352f7f | ||
|
|
bf0d7bc23a | ||
|
|
7fe94596cd | ||
|
|
6135b762af | ||
|
|
cd35f7e545 | ||
|
|
acfdbd5d4d | ||
|
|
37a048d201 | ||
|
|
506ebc3f23 | ||
|
|
6c20d29e55 | ||
|
|
88244b2918 | ||
|
|
30dac07817 | ||
|
|
40e50c9a2f | ||
|
|
5894c334b9 | ||
|
|
9c05854928 | ||
|
|
d666d67877 | ||
|
|
c09444ae39 | ||
|
|
2f10d04452 | ||
|
|
1caa12a526 | ||
|
|
1d7354f8a3 | ||
|
|
8f56787bf1 | ||
|
|
01f90374b7 | ||
|
|
b34ec89871 | ||
|
|
c345882a2a | ||
|
|
b16e5516bf | ||
|
|
5fdae7dc1e | ||
|
|
2757f4157e | ||
|
|
ae8a12a4b4 | ||
|
|
a585b07522 | ||
|
|
3b655fb6a1 | ||
|
|
62ef52a4cd | ||
|
|
135c7d4b2c | ||
|
|
88606e272f | ||
|
|
b00061fa0f | ||
|
|
9562a75351 | ||
|
|
d633f4be06 | ||
|
|
2577233ff0 | ||
|
|
a15797ce6c | ||
|
|
c7700e8cc2 | ||
|
|
248577d4f4 | ||
|
|
46746babd5 | ||
|
|
0759c055d3 | ||
|
|
06eb9e5b02 | ||
|
|
bf7d6f40ce | ||
|
|
49c18e94e8 | ||
|
|
efa34d4bcf | ||
|
|
8f2c1ea389 | ||
|
|
c1df31b106 | ||
|
|
b3d0dfb704 | ||
|
|
28a132ba33 | ||
|
|
29d2113f64 | ||
|
|
6d505fc75a | ||
|
|
8d016faf90 | ||
|
|
f099681e3d | ||
|
|
634c8b48d1 | ||
|
|
244651dcba | ||
|
|
edb5d067b8 | ||
|
|
3687c1800e | ||
|
|
33d6133f49 | ||
|
|
8ac63b9f65 | ||
|
|
8bbeb90f6f | ||
|
|
c969a1a742 | ||
|
|
3d745b7c12 | ||
|
|
e38905765b | ||
|
|
765bc82028 | ||
|
|
c5d329db70 | ||
|
|
6e0dec7aa2 | ||
|
|
f6bc8c7f5b | ||
|
|
5214a3518c | ||
|
|
8b836a4743 | ||
|
|
de3167c146 | ||
|
|
c6404f813d | ||
|
|
8d0977f015 | ||
|
|
f9deab94f9 | ||
|
|
a54b49362d | ||
|
|
360c10d90e | ||
|
|
9201860aa8 | ||
|
|
3a5942b75d | ||
|
|
5bf4c41c1d | ||
|
|
0f1682a9b7 | ||
|
|
1222ff9c92 | ||
|
|
410c3dd103 | ||
|
|
3028dc4182 | ||
|
|
69e449788d | ||
|
|
c3d23103e2 | ||
|
|
e5d626574c | ||
|
|
cce61f52ad | ||
|
|
bfe21844ea | ||
|
|
0532cae666 | ||
|
|
a6b36ae62f | ||
|
|
8766820974 | ||
|
|
85b09e11cf | ||
|
|
5d1d466edb | ||
|
|
a9930fb167 | ||
|
|
b628b68aef | ||
|
|
a1e7f19580 | ||
|
|
f4b4752e20 | ||
|
|
b3d547db30 | ||
|
|
23a54f58b0 | ||
|
|
e16ec3ab9d | ||
|
|
9e8f6a36f5 | ||
|
|
496ea86840 | ||
|
|
b3854eb2c3 | ||
|
|
2be6c8b86d | ||
|
|
3db6dbfcb3 | ||
|
|
dfd55d0eb0 | ||
|
|
ca6ac610a2 | ||
|
|
b943edcd24 | ||
|
|
03ff6e9824 | ||
|
|
7847c8b99c | ||
|
|
8660d58eb0 | ||
|
|
9de027167d | ||
|
|
65095fa4f7 | ||
|
|
f07f489ef6 | ||
|
|
15f4e94b4f | ||
|
|
6d66590fd4 | ||
|
|
cc1e9562b0 | ||
|
|
ecad66bf22 | ||
|
|
d8ae1bd06c | ||
|
|
1679024926 | ||
|
|
690233c02b | ||
|
|
4cccaebac5 | ||
|
|
42e9164050 | ||
|
|
4af837b987 | ||
|
|
a23a7c4488 | ||
|
|
46c4a93468 | ||
|
|
84daf1ae52 | ||
|
|
be01d2f7ec | ||
|
|
9273e634ce | ||
|
|
dd9d5d67a1 | ||
|
|
f5dda60e5b | ||
|
|
578f6e7ba5 | ||
|
|
22464734da | ||
|
|
ee1f7fb6b9 | ||
|
|
fc3cdd06af | ||
|
|
1668e4bc57 | ||
|
|
f4a0dca15b | ||
|
|
45417753a2 | ||
|
|
0967dc2130 | ||
|
|
d48936eb79 | ||
|
|
f5ff9f0997 | ||
|
|
56324bc71e | ||
|
|
c5c3b3928e | ||
|
|
7f38a80bb8 | ||
|
|
ed9f1c6d6f | ||
|
|
f7f4446755 | ||
|
|
e183b95195 | ||
|
|
2bd289fa79 | ||
|
|
298bb3b3be | ||
|
|
de2f3af3df | ||
|
|
11505e0473 | ||
|
|
dfe4fde66e | ||
|
|
d849a20325 | ||
|
|
a6aec6d6a0 | ||
|
|
fd7029fe34 | ||
|
|
e67a4024a2 | ||
|
|
d7617f296b | ||
|
|
4387ae2bb3 | ||
|
|
2551c361eb | ||
|
|
78e430221f | ||
|
|
ae42f6d9f4 | ||
|
|
3880122ef7 | ||
|
|
5a0823baed | ||
|
|
8083ff6584 | ||
|
|
1599afa74f | ||
|
|
356ed6f9eb | ||
|
|
38910c7c48 | ||
|
|
97aa934343 | ||
|
|
376d7bdac6 | ||
|
|
f3934a1732 | ||
|
|
efbbded715 | ||
|
|
d49aee6dd7 | ||
|
|
38497482b5 | ||
|
|
75c049d7ea | ||
|
|
2904cc07e2 | ||
|
|
71e7e697ae | ||
|
|
89d2f9c5c9 | ||
|
|
7dd7ebbb94 | ||
|
|
6787b82ec0 | ||
|
|
3a048d515a | ||
|
|
7316b1d14c | ||
|
|
07b16a6f5f | ||
|
|
66acde1c66 | ||
|
|
11ae74fbac | ||
|
|
57386b905c | ||
|
|
49405316ff | ||
|
|
66282e7ac9 | ||
|
|
06bc6b9012 | ||
|
|
915c3e6455 | ||
|
|
260997781a | ||
|
|
8755ba31b2 | ||
|
|
75ab1f8dab | ||
|
|
e0ffebecdc | ||
|
|
8cece0f92f | ||
|
|
cf1eaae7e5 | ||
|
|
6a93ca2f9f | ||
|
|
ae6452e6e4 | ||
|
|
7cb7d2aebf | ||
|
|
affc954047 | ||
|
|
4662ac2774 | ||
|
|
dd4d66fcb6 | ||
|
|
3ab23dde07 | ||
|
|
18a6ba90f9 | ||
|
|
a901661e91 | ||
|
|
9781a905a7 | ||
|
|
4cd064f76c | ||
|
|
f9be3dd974 | ||
|
|
4e50214b80 | ||
|
|
5c27ec31b7 | ||
|
|
b061843eb1 | ||
|
|
76d9b37b22 | ||
|
|
dff21e1d36 | ||
|
|
888f45254a | ||
|
|
ebcacdb5af | ||
|
|
5a002f9007 | ||
|
|
8d11789566 | ||
|
|
b0677fefa7 | ||
|
|
76d36f0758 | ||
|
|
5ae531ca25 | ||
|
|
5debadfde1 | ||
|
|
642dc83702 | ||
|
|
99bc51f106 | ||
|
|
c05f220d14 | ||
|
|
741ea68cac | ||
|
|
58dca68fb4 | ||
|
|
b1db1e3e6f | ||
|
|
e4c7e3eb74 | ||
|
|
0c9a98ce18 | ||
|
|
30d71d4a0e | ||
|
|
239391540f | ||
|
|
8f37b0f409 | ||
|
|
13d69a13f1 | ||
|
|
f734fb34f8 | ||
|
|
f186f6cc79 | ||
|
|
16f0a0dcfb | ||
|
|
a6729a562b | ||
|
|
b875def7de | ||
|
|
828ba13eec | ||
|
|
9bec66d5d6 | ||
|
|
30e09b8a07 | ||
|
|
5c1a1baf08 | ||
|
|
ade2cc8a7c | ||
|
|
0a31f6fe3a | ||
|
|
54f9fcf856 | ||
|
|
720d37dc5d | ||
|
|
5804cd11bc | ||
|
|
3254c52d7c | ||
|
|
090e243438 | ||
|
|
d697004889 | ||
|
|
2392c69a28 | ||
|
|
6ea57dafe7 | ||
|
|
8c34cfe64e | ||
|
|
1ec71cd509 | ||
|
|
43b9d9d4b6 | ||
|
|
6462dd891c | ||
|
|
353438dbd3 | ||
|
|
a9821decca | ||
|
|
548ca90e57 | ||
|
|
d55e34a55f | ||
|
|
d09a7506df | ||
|
|
ccdbaa84f9 | ||
|
|
7aa1334af9 | ||
|
|
66e66c9d18 | ||
|
|
57fe5f472f | ||
|
|
5612b0e7d2 | ||
|
|
52a88d63ad | ||
|
|
f98e7702fb | ||
|
|
7a710005a1 | ||
|
|
4d13e0c2f6 | ||
|
|
ffcf2215de | ||
|
|
70576f9ca7 | ||
|
|
8e954d99df | ||
|
|
5c1a6a68af | ||
|
|
aea8581b09 | ||
|
|
3511ae53f4 | ||
|
|
335143fca3 | ||
|
|
75b7ae94e1 | ||
|
|
c4270ca950 | ||
|
|
8a4b0e16e4 | ||
|
|
ebe7c82fb9 | ||
|
|
fbdf77ab38 | ||
|
|
9352e7a594 | ||
|
|
28de1b3fba | ||
|
|
64b1a54cad | ||
|
|
3c47971c61 | ||
|
|
6b90dc70b1 | ||
|
|
859ea13b0a | ||
|
|
51a3b0312a | ||
|
|
1d5699a67f | ||
|
|
eb7fde9c12 | ||
|
|
c8b86508eb | ||
|
|
61503b7b17 | ||
|
|
f918efa8f9 | ||
|
|
dba2246d7a | ||
|
|
d09cfb82f8 | ||
|
|
d02efdcc05 | ||
|
|
06bdee37ff | ||
|
|
e4c0c6b9d9 | ||
|
|
72c5172873 | ||
|
|
36e02c74fd | ||
|
|
3ae9feba8f | ||
|
|
757a829137 | ||
|
|
f7e218637e | ||
|
|
04a96125cc | ||
|
|
5141360b48 | ||
|
|
dbe80de925 | ||
|
|
4de1937e41 | ||
|
|
d4a634d24e | ||
|
|
2480b773a1 | ||
|
|
7f0b43c18f | ||
|
|
68efb73be6 | ||
|
|
2b76903bf3 | ||
|
|
6a4a94e236 | ||
|
|
9139c81db9 | ||
|
|
14249de8e5 | ||
|
|
b4db0c1a6c | ||
|
|
cd97ac3388 | ||
|
|
73f3ce7579 | ||
|
|
da67ebed5d | ||
|
|
36c2266196 | ||
|
|
6b357fdcb4 | ||
|
|
2ed3c6c356 | ||
|
|
528bd744e0 | ||
|
|
4ab42e846d | ||
|
|
d2cbb02342 | ||
|
|
e2e18cc0fc | ||
|
|
a31a7a231c | ||
|
|
669259eace | ||
|
|
45c543adde | ||
|
|
627a6bf8a5 | ||
|
|
f5e55540e9 | ||
|
|
d7f3a2b003 | ||
|
|
9ce309bed9 | ||
|
|
b62264c275 | ||
|
|
d4e832c27b | ||
|
|
59c45ea1d6 | ||
|
|
f64a754211 | ||
|
|
d8895bb64b | ||
|
|
882889a962 | ||
|
|
7338a77285 | ||
|
|
af014750aa | ||
|
|
02a8409114 | ||
|
|
3681c17aa2 | ||
|
|
f56023bb74 | ||
|
|
5ef41861d3 | ||
|
|
a679e80187 | ||
|
|
85c841da88 | ||
|
|
7cabb4dd9a | ||
|
|
286be7f3df | ||
|
|
1e915968b5 | ||
|
|
3dfb84048c | ||
|
|
78a3570bb2 | ||
|
|
9733bf9fa1 | ||
|
|
effaa8e81c | ||
|
|
7558a9898e | ||
|
|
eca6cde934 | ||
|
|
197f0c7c95 | ||
|
|
ef2682945c | ||
|
|
5e7ea4217f | ||
|
|
123fbea7c0 | ||
|
|
0673fdff2d | ||
|
|
e07befb93c | ||
|
|
8e1f890322 | ||
|
|
8ca713f6bb | ||
|
|
da1ddee0ba | ||
|
|
d48cf24c4d | ||
|
|
5614475521 | ||
|
|
b826770687 | ||
|
|
34807028db | ||
|
|
0405b36ab4 | ||
|
|
291f59999c | ||
|
|
1568fc7827 | ||
|
|
681fd6abf6 | ||
|
|
031159c1b9 | ||
|
|
812e34c6f5 | ||
|
|
5921692f83 | ||
|
|
33d5dd44d9 | ||
|
|
d7562d36e6 | ||
|
|
49a2f8ab82 | ||
|
|
82afae6447 | ||
|
|
25ab915883 | ||
|
|
0963c403ab | ||
|
|
9c1852fcdb | ||
|
|
a6aef82236 | ||
|
|
8b4e31bb22 | ||
|
|
7c923a0fa1 | ||
|
|
169f202994 | ||
|
|
4448e60a8b | ||
|
|
c744c25d35 | ||
|
|
f9ebdae66d | ||
|
|
767ba96186 | ||
|
|
55213e1045 | ||
|
|
1843d42e0b | ||
|
|
065f5e5922 | ||
|
|
f7beb3d95d | ||
|
|
c09dfb8ec8 | ||
|
|
87b90e96b6 | ||
|
|
e556be1a0d | ||
|
|
88fddf2a6d | ||
|
|
97fe71a829 | ||
|
|
988cdbd6bb | ||
|
|
be84325de1 | ||
|
|
e7d9d6b19e | ||
|
|
bd378e8a44 | ||
|
|
82da43cfba | ||
|
|
a96ad0c10c | ||
|
|
670e679a09 | ||
|
|
b03485a85b | ||
|
|
aac0408f76 | ||
|
|
5b9ed4f373 | ||
|
|
033b0952dd | ||
|
|
12e2686e3f | ||
|
|
cc2f054e6a | ||
|
|
a799630fac | ||
|
|
77f0f55ee7 | ||
|
|
48428ed777 | ||
|
|
0c7afb26b0 | ||
|
|
4f2c968daa | ||
|
|
411f0550e0 | ||
|
|
f9fcad257e | ||
|
|
b0d699f281 | ||
|
|
4e8242fe5e | ||
|
|
5ceccbdf68 | ||
|
|
324c08a8a2 | ||
|
|
103e47b6dd | ||
|
|
09831c3b93 | ||
|
|
99336870b8 | ||
|
|
c81e980fcf | ||
|
|
dbdf2ad55d | ||
|
|
9306011f70 | ||
|
|
162abcee4f | ||
|
|
c1ff3d4652 | ||
|
|
f9693e78c8 | ||
|
|
fe549f2fb5 | ||
|
|
d9300ad210 | ||
|
|
8ddf4888db | ||
|
|
bf5fbf4412 | ||
|
|
dfc98ecc0f | ||
|
|
86e53f96a9 | ||
|
|
3d4205b206 | ||
|
|
f81c802ecc | ||
|
|
5d9157bc40 | ||
|
|
6a85d6a58b | ||
|
|
8ddb214b0e | ||
|
|
308927adce | ||
|
|
7caa95b3f3 | ||
|
|
b5c85ad5be | ||
|
|
bad90b2b1d | ||
|
|
4c74e0dfba | ||
|
|
46933051b9 | ||
|
|
aeb9241d3b | ||
|
|
0d9b6b9852 | ||
|
|
5cac43fe55 | ||
|
|
8cc92680c5 | ||
|
|
b583f80221 | ||
|
|
6ab9f28d77 | ||
|
|
67c8af3869 | ||
|
|
12a9bdbf6e | ||
|
|
8c3fd77cfd | ||
|
|
9137be814c | ||
|
|
aad7f67f7c | ||
|
|
815b839eeb | ||
|
|
608f9d0333 | ||
|
|
ccbe2c719a | ||
|
|
76b36aa3f6 | ||
|
|
8c81d520f6 | ||
|
|
afe1e8b33c | ||
|
|
6eb0bd8c87 | ||
|
|
f3d53fbba4 | ||
|
|
b7ff627368 | ||
|
|
9ffddf3561 | ||
|
|
56ff76584d | ||
|
|
324d98d231 | ||
|
|
277e9691e1 | ||
|
|
bce0671057 | ||
|
|
ff10ef2c26 | ||
|
|
1d8a98e5ce | ||
|
|
cb43d0cc64 | ||
|
|
065bba5851 | ||
|
|
8efac2923b | ||
|
|
fc8c58a1e6 | ||
|
|
20b2773ea2 | ||
|
|
0bd7613da4 | ||
|
|
f7ef14d737 | ||
|
|
e00e498e50 | ||
|
|
17fb2ace91 | ||
|
|
2deb575961 | ||
|
|
a7465f9d81 | ||
|
|
9d55e37687 | ||
|
|
3c5a3fdd7c | ||
|
|
4477c92df9 | ||
|
|
a6062d4ab4 | ||
|
|
41f24a58b1 | ||
|
|
352900fcff | ||
|
|
62424633fc | ||
|
|
e2184a6f12 | ||
|
|
755cd909ed | ||
|
|
6338b368d4 | ||
|
|
ca56fa1b8b | ||
|
|
7c818eda47 | ||
|
|
bdb160bec1 | ||
|
|
25b90d62d2 | ||
|
|
7cd6f7666c | ||
|
|
2cdfa1cae1 | ||
|
|
17d2866153 | ||
|
|
d459b4171d | ||
|
|
e4ec973a6e | ||
|
|
3df9a5629f | ||
|
|
02b98e4736 | ||
|
|
f45b5bfd5e | ||
|
|
e39a5663bf | ||
|
|
89cc896c27 | ||
|
|
be95a619bc | ||
|
|
cafbf44e2f | ||
|
|
e64b69248a | ||
|
|
441ac29c7c | ||
|
|
ed84f21c08 | ||
|
|
5884576fc2 | ||
|
|
922b6e3722 | ||
|
|
cca507da6a | ||
|
|
d58fe853d6 | ||
|
|
03dc90b4fd | ||
|
|
2a4918c7ce | ||
|
|
7bb130edb7 | ||
|
|
3af1342a9b | ||
|
|
d16ff7fa12 | ||
|
|
d5dbd456ea | ||
|
|
3f25514e1a | ||
|
|
e3d0f693a7 | ||
|
|
97b33a9138 | ||
|
|
f73c927512 | ||
|
|
97750f8b28 | ||
|
|
827dbbc740 | ||
|
|
89e92749a6 | ||
|
|
e877a996be | ||
|
|
6bfbe0bb66 | ||
|
|
d728237697 | ||
|
|
279a706f78 | ||
|
|
dbd48356f5 | ||
|
|
6dc55624bd | ||
|
|
5e645e1489 | ||
|
|
87a786fec5 | ||
|
|
c9fc203596 | ||
|
|
f87525d8cf | ||
|
|
df4dbe5d88 | ||
|
|
31332a5061 | ||
|
|
1a66102e30 | ||
|
|
8c0380beec | ||
|
|
a7ef06028e | ||
|
|
c80fcf7b8e | ||
|
|
db5630eb32 | ||
|
|
1dc63eecbd | ||
|
|
530066875d | ||
|
|
59aef9a408 | ||
|
|
7b51bcd4ac | ||
|
|
80b782e6ed | ||
|
|
c179958afc | ||
|
|
a3ab4d1b68 | ||
|
|
575ae84e68 | ||
|
|
102c3b3007 | ||
|
|
18f3b940c3 | ||
|
|
baa15d7437 | ||
|
|
9804d42e67 | ||
|
|
0c182415a7 | ||
|
|
1599120c3e | ||
|
|
a53b5953ea | ||
|
|
0d7c4cd036 | ||
|
|
e42e26e16b | ||
|
|
b35a89c5a9 | ||
|
|
a1f4a9a386 | ||
|
|
12531dfb3e | ||
|
|
652b90a074 | ||
|
|
bdd7c58a62 | ||
|
|
3419f18c9f | ||
|
|
87ce52ded1 | ||
|
|
1db1411331 | ||
|
|
e435d01258 | ||
|
|
793e9d377e | ||
|
|
a57680fbbf | ||
|
|
eda71e3ffe | ||
|
|
b186d9d66c | ||
|
|
f16a211b48 | ||
|
|
d70a9be97e | ||
|
|
666bb9dfee | ||
|
|
081a44755e | ||
|
|
2eae6c25af | ||
|
|
4bbee232d8 | ||
|
|
441f7ab22a | ||
|
|
714b27f8a4 | ||
|
|
2d841f47eb | ||
|
|
4c98cd922f | ||
|
|
1c3c712629 | ||
|
|
84ec74e97f | ||
|
|
57cc1c7f8e | ||
|
|
0e67ffc41e | ||
|
|
f4e0d19d43 | ||
|
|
07e7988cdf | ||
|
|
d21aca2c59 | ||
|
|
540e066acf | ||
|
|
a49de4e473 | ||
|
|
4c28ae2630 | ||
|
|
2d07d89d60 | ||
|
|
83d8c8448b | ||
|
|
8eccd50ecb | ||
|
|
09ed45534d | ||
|
|
711945147b | ||
|
|
0b3a6687f6 | ||
|
|
1aec869f9e | ||
|
|
6f9a6eb294 | ||
|
|
96ed840d17 | ||
|
|
5acdf4a43c | ||
|
|
6b4c545592 | ||
|
|
dd6cbcf242 | ||
|
|
d6acf5530e | ||
|
|
94696e81fa | ||
|
|
43d6a2ad94 | ||
|
|
e1425a85e4 | ||
|
|
f5fa94cc9c | ||
|
|
fd85b1f605 | ||
|
|
b386783ec8 | ||
|
|
3b76b81edf | ||
|
|
2eb159b0c3 | ||
|
|
596e7b6f24 | ||
|
|
aa0437bb23 | ||
|
|
a6c22a292d | ||
|
|
0635edba17 | ||
|
|
a0491a5ef2 | ||
|
|
38d172c477 | ||
|
|
5e4c918d40 | ||
|
|
e8aaacff5e | ||
|
|
21d4d640c2 | ||
|
|
b927c1b84d | ||
|
|
d456a96cb5 | ||
|
|
1964fc6b65 | ||
|
|
26e270a49f | ||
|
|
3323623289 | ||
|
|
7a43321d1c | ||
|
|
4a5cc71c3e | ||
|
|
660ccf876e | ||
|
|
69dd81860f | ||
|
|
b1c2c026aa | ||
|
|
b7fa97bf9e | ||
|
|
1bdaab6d72 | ||
|
|
3edc14fc97 | ||
|
|
940d258c5e | ||
|
|
2500ca5106 | ||
|
|
c5a7fd6d43 | ||
|
|
d424af5b1e | ||
|
|
ca383739ab | ||
|
|
0176e888af | ||
|
|
0e320d2832 | ||
|
|
38b96c1e27 | ||
|
|
5da5a6fe5f | ||
|
|
28c9f42a25 | ||
|
|
44461e21df | ||
|
|
164c4eefa7 | ||
|
|
ee6c034baa | ||
|
|
4b399df541 | ||
|
|
f1c7e1113f | ||
|
|
90c68ba02f | ||
|
|
7f2180b47b | ||
|
|
21ff68f624 | ||
|
|
fd162f8895 | ||
|
|
03e80a76b6 | ||
|
|
08fdfd1e38 | ||
|
|
2a6c411edf | ||
|
|
65d7fd9cce | ||
|
|
e0570be562 | ||
|
|
ffa303092f | ||
|
|
382dc01b33 | ||
|
|
7f02155ce1 | ||
|
|
8c17a70dc1 | ||
|
|
b39623ab2b | ||
|
|
98e57287e3 | ||
|
|
68047866be | ||
|
|
bacc5cbcab | ||
|
|
549280e2b6 | ||
|
|
61af5971d5 | ||
|
|
acc206fca7 | ||
|
|
59a81ad3be | ||
|
|
d7b23b84f0 | ||
|
|
3d77de20cc | ||
|
|
365356eb5f | ||
|
|
044cc4a618 | ||
|
|
09541f8aac | ||
|
|
4d0979bbcd | ||
|
|
dba4bb9c2c | ||
|
|
2e4c886ab2 | ||
|
|
dd1962f92d | ||
|
|
1439e8b30b | ||
|
|
8240790381 | ||
|
|
0050aa6b92 | ||
|
|
f53b26f3f0 | ||
|
|
57a9a11ab3 | ||
|
|
a6a0e033a7 | ||
|
|
18492ac83c | ||
|
|
13dd8aa224 | ||
|
|
574304486a | ||
|
|
90feb8dc96 | ||
|
|
7bc241dd48 | ||
|
|
57b884e7c7 | ||
|
|
3ba775d4b3 | ||
|
|
89d6f0eb6e | ||
|
|
465e220315 | ||
|
|
1b767e7632 | ||
|
|
b3304337ca | ||
|
|
40e7f6d15b | ||
|
|
c95659d57d | ||
|
|
a1e7b99b26 | ||
|
|
52f1f2495c | ||
|
|
112ee88fe9 | ||
|
|
2ff06ff4c7 | ||
|
|
df289be994 | ||
|
|
ae76e8784c | ||
|
|
d537cb70cd | ||
|
|
4a70f0bea2 | ||
|
|
e51165d915 | ||
|
|
d10d4cc55c | ||
|
|
2301efa460 | ||
|
|
d00284166f | ||
|
|
f279ce44b2 | ||
|
|
36215828f1 | ||
|
|
0623af86d6 | ||
|
|
c6976499ad | ||
|
|
01bd69100c | ||
|
|
541d73ad93 | ||
|
|
6b159c32cf | ||
|
|
5f2968d1b0 | ||
|
|
0e768d107a | ||
|
|
3557ff16dc | ||
|
|
30131ef363 | ||
|
|
946c424734 | ||
|
|
f42b293836 | ||
|
|
b691c0affc | ||
|
|
48fa04a05b | ||
|
|
8c14bb9aeb | ||
|
|
ca2de6a4a3 | ||
|
|
755499797e | ||
|
|
f2a3cfc0b4 | ||
|
|
a42786a465 | ||
|
|
de0a467c97 | ||
|
|
ab23a4b6f1 | ||
|
|
87aed0eadf | ||
|
|
9a86549359 | ||
|
|
2eeb0069d5 | ||
|
|
f536a05e06 | ||
|
|
26b95854d4 | ||
|
|
775432c73f | ||
|
|
84ee5995f4 | ||
|
|
91e9bb9670 | ||
|
|
c6a8bd669f | ||
|
|
d9d0a932b0 | ||
|
|
a91d45c397 | ||
|
|
98c81513aa | ||
|
|
a7e5f2abdc | ||
|
|
0aa0c884d3 | ||
|
|
dfa39fc590 | ||
|
|
cbd442fc2e | ||
|
|
ebd2778f5b | ||
|
|
5887d4ddfa | ||
|
|
36e9b4b2ae | ||
|
|
81d31c9934 | ||
|
|
4aaefb0c4c | ||
|
|
6aac1ea0d1 | ||
|
|
bd275d9b5d | ||
|
|
8c0dbc7d6a | ||
|
|
07194ca17f | ||
|
|
325c6d44dd | ||
|
|
168ed1716c | ||
|
|
3de8c3002a | ||
|
|
1cbbfb195f | ||
|
|
dceaef20ed | ||
|
|
ebbbcb99f2 | ||
|
|
3e70dbb836 | ||
|
|
f1c74b08cb | ||
|
|
451abcf8f3 | ||
|
|
98f03c249b | ||
|
|
4c4248d65b | ||
|
|
889c11d84b | ||
|
|
c0581a0e37 | ||
|
|
7e45f1173f | ||
|
|
21a94b6dca | ||
|
|
6cd50cb372 | ||
|
|
bde77dbf78 | ||
|
|
bd261e6847 | ||
|
|
f7863c8391 | ||
|
|
e8a532645f | ||
|
|
af0d2e6f7a | ||
|
|
0786954d34 | ||
|
|
a662046f95 | ||
|
|
77d7f63857 | ||
|
|
73814a5b65 | ||
|
|
4ba7d4ea10 | ||
|
|
c343316864 | ||
|
|
aa6abe0fd3 | ||
|
|
bf17023639 | ||
|
|
97513dee91 | ||
|
|
fceb412fb1 | ||
|
|
ef490f0a05 | ||
|
|
e0127250ae | ||
|
|
fcebbd67df | ||
|
|
d97fc1cfb8 | ||
|
|
9dba48fc19 | ||
|
|
b6db484393 | ||
|
|
7cdc68a007 | ||
|
|
1d93246af8 | ||
|
|
abce952d0f | ||
|
|
0b30bc8034 | ||
|
|
9882c94eec | ||
|
|
9a02f3f1dc | ||
|
|
5f1dc46392 | ||
|
|
c4462c4da4 | ||
|
|
f708964c5f | ||
|
|
d514ca0bb5 | ||
|
|
5b21cabff3 | ||
|
|
6e36f95bab | ||
|
|
ae1b1c7274 | ||
|
|
53a76b1353 | ||
|
|
5fd1772c3a | ||
|
|
ab0cc6c444 | ||
|
|
8ae597ad1d | ||
|
|
024ff6e489 | ||
|
|
246a50a592 | ||
|
|
6d514e72fa | ||
|
|
e6e5ede436 | ||
|
|
a19efc1cfa | ||
|
|
28a36c4908 | ||
|
|
ef083e6289 | ||
|
|
6e0c376b62 | ||
|
|
c9a0f88bf1 | ||
|
|
f558008574 | ||
|
|
b44bc686a1 | ||
|
|
037b99865d | ||
|
|
72ed9dbcce | ||
|
|
5d7b2a84f4 | ||
|
|
1b50b4ab0a | ||
|
|
bc9a60f696 | ||
|
|
44ce5c76ae | ||
|
|
702e9cf66c | ||
|
|
be26f45b5a | ||
|
|
f13ee16ab8 | ||
|
|
36dc98452d | ||
|
|
82f13af166 | ||
|
|
23ad4bb230 | ||
|
|
a8ccc7d2a7 | ||
|
|
0a533c754f | ||
|
|
f6efb53491 | ||
|
|
cf4a533f2f | ||
|
|
b4552237b6 | ||
|
|
e8d0965a33 | ||
|
|
bb9f764b9f | ||
|
|
9193b68854 | ||
|
|
db435c40e5 | ||
|
|
bf84405b43 | ||
|
|
833a64cc0e | ||
|
|
54fb2b5d75 | ||
|
|
85fafcf170 | ||
|
|
815cd530c8 | ||
|
|
ebdf38e136 | ||
|
|
a93f504d45 | ||
|
|
cae561f7b9 | ||
|
|
f9969a0e61 | ||
|
|
06ce3dfadb | ||
|
|
ab1d15216c | ||
|
|
e8cfbfad36 | ||
|
|
70de587f6c | ||
|
|
e7ee7a1781 | ||
|
|
c72bbf41ea | ||
|
|
34343a846d | ||
|
|
e0a70411dd | ||
|
|
947b2d4db6 | ||
|
|
3714a231a9 | ||
|
|
39984980fb | ||
|
|
c7becc6cad | ||
|
|
74f27480fc | ||
|
|
33d3722060 | ||
|
|
696df45306 | ||
|
|
1b4559c4a4 | ||
|
|
bd132ed7c6 | ||
|
|
66696d0b46 | ||
|
|
943e032d12 | ||
|
|
ff7429fd00 | ||
|
|
236a279793 | ||
|
|
7e206b3ba0 | ||
|
|
f612709d7d | ||
|
|
76412f6ade | ||
|
|
45c7cd6e8b | ||
|
|
67192cf664 | ||
|
|
3a77c38a2d | ||
|
|
810892bf40 | ||
|
|
4b7384fc98 | ||
|
|
1bdcdc397e | ||
|
|
61855fd14b | ||
|
|
4a9ac117e0 | ||
|
|
0d06903b89 | ||
|
|
a70217b791 | ||
|
|
71c698f6b1 | ||
|
|
eec0e5df01 | ||
|
|
f5020659f3 | ||
|
|
e26c5a7970 | ||
|
|
8b697920e2 | ||
|
|
415b38bd64 | ||
|
|
5eb69d33d1 | ||
|
|
7c44fb8d50 | ||
|
|
9a9aec31b7 | ||
|
|
26e77a693a | ||
|
|
29ff230084 | ||
|
|
21ed81d39e | ||
|
|
77d53b1009 | ||
|
|
664683c6e4 | ||
|
|
361ee01ab0 | ||
|
|
6889e65077 | ||
|
|
bd9d9fb5b9 | ||
|
|
231435001c | ||
|
|
05bf72e0d8 | ||
|
|
4b70aaa038 | ||
|
|
d52f676a84 | ||
|
|
4a1717e837 | ||
|
|
5aaa88f41e | ||
|
|
8300f433e9 | ||
|
|
bd2867b846 | ||
|
|
da1a47b57d | ||
|
|
75bb83bdec | ||
|
|
5bca600894 | ||
|
|
607b11ab6b | ||
|
|
6543647b3c | ||
|
|
57b317b0a4 | ||
|
|
d5cc136df2 | ||
|
|
0731616ebf | ||
|
|
6957a33ec7 | ||
|
|
46c274dcf2 | ||
|
|
ae21056401 | ||
|
|
30414cbd0c | ||
|
|
87574f7d76 | ||
|
|
30d8ebffb9 | ||
|
|
71876756a4 | ||
|
|
b1b85b4106 | ||
|
|
196b5d08eb | ||
|
|
2026a2731d | ||
|
|
c8d932f768 | ||
|
|
752a0cacd9 | ||
|
|
ecc6c9e01d | ||
|
|
7e9f98b513 | ||
|
|
0f514f300e | ||
|
|
017cfef6a2 | ||
|
|
81512504a7 | ||
|
|
becf7c1f86 | ||
|
|
9e6c89428e | ||
|
|
8d96be73b7 | ||
|
|
21c8639397 | ||
|
|
1699c6f3a3 | ||
|
|
70c947289f | ||
|
|
a4e54b6d00 | ||
|
|
ab9780d971 | ||
|
|
f5ba843cf3 | ||
|
|
052f2a5868 | ||
|
|
893df14c3e | ||
|
|
43c521c193 | ||
|
|
2a1d3877f1 | ||
|
|
4d735b4d88 | ||
|
|
b8b6d64f75 | ||
|
|
2b65def123 | ||
|
|
7fe69fa269 | ||
|
|
84367e1c16 | ||
|
|
0faf305f28 | ||
|
|
e64f7b34ff | ||
|
|
5ea4c9a73d | ||
|
|
7e7931f1ce | ||
|
|
428beb3413 | ||
|
|
9aab7dce7d | ||
|
|
2478556df1 | ||
|
|
a2d4ba4689 | ||
|
|
4ab9632526 | ||
|
|
baa819c2a5 | ||
|
|
aaf8bc811a | ||
|
|
53dabf7fd0 | ||
|
|
7ca4cba8ec | ||
|
|
5965b70b39 | ||
|
|
23db07ed4e | ||
|
|
53e75e7898 | ||
|
|
16d15ae9bf | ||
|
|
3def0ae036 | ||
|
|
31ab2f97f6 | ||
|
|
8126c63d6e | ||
|
|
beb42b53b2 | ||
|
|
6df38a56d1 | ||
|
|
68debb44f7 | ||
|
|
f27096f235 | ||
|
|
f2a623fde0 | ||
|
|
7ee26d41f7 | ||
|
|
55c77773ab | ||
|
|
147abc5c6b | ||
|
|
e6f2ee6499 | ||
|
|
8f671b43ae | ||
|
|
617ca885f1 | ||
|
|
1813317e86 | ||
|
|
9bf7ddc258 | ||
|
|
77f211c372 | ||
|
|
939cb67daa | ||
|
|
1ea60a16e5 | ||
|
|
98bc513336 | ||
|
|
b6d5d291b0 | ||
|
|
6f6fa709ec | ||
|
|
82a6dbf887 | ||
|
|
dee879538c | ||
|
|
0351bf73b0 | ||
|
|
5d08964699 | ||
|
|
96b4ffbf5b | ||
|
|
7ad723f23d | ||
|
|
a97f1d02cf | ||
|
|
fe8e97b7cb | ||
|
|
b13de85477 | ||
|
|
ced920eb74 | ||
|
|
eded6cffe0 | ||
|
|
9d7a67ae7f | ||
|
|
638807685a | ||
|
|
529289f364 | ||
|
|
2fdd261961 | ||
|
|
0bce73d690 | ||
|
|
0107909a85 | ||
|
|
d41a53d9db | ||
|
|
af0fb558f6 | ||
|
|
1452e88248 | ||
|
|
d1b848e3eb | ||
|
|
d6273b4751 | ||
|
|
5bd5e6249b | ||
|
|
4033266664 | ||
|
|
9cbe771123 | ||
|
|
a545585ea1 | ||
|
|
2efa8483e2 | ||
|
|
a3961e40ee | ||
|
|
f9b1a74edf | ||
|
|
e1753bbac4 | ||
|
|
13392dcf5b | ||
|
|
879d47b30d | ||
|
|
bb61aaa85c | ||
|
|
d5b2d0d98e | ||
|
|
1b7761ce8d | ||
|
|
8ab1342110 | ||
|
|
7c0eb20de8 | ||
|
|
c26258bd2b | ||
|
|
d04c04ac17 | ||
|
|
c5b53afd8b | ||
|
|
9ac7b00718 | ||
|
|
59f815962d | ||
|
|
bb33a2fe27 | ||
|
|
5e2bd55fb5 | ||
|
|
4b36e2f3b7 | ||
|
|
ed94d326d4 | ||
|
|
17be38e532 | ||
|
|
3f09c82379 | ||
|
|
c2cb0486f4 | ||
|
|
b1b5a7fa11 | ||
|
|
3a9d88d175 | ||
|
|
a422c64153 | ||
|
|
c01767fade | ||
|
|
f59dbe4f63 | ||
|
|
2160a8b64e | ||
|
|
c66c85429e | ||
|
|
520bc94357 | ||
|
|
dea4251b2c | ||
|
|
7f64bb1255 | ||
|
|
831600d8c9 | ||
|
|
d42b046177 | ||
|
|
738bfb7446 | ||
|
|
a72c04ed65 | ||
|
|
3921cab2df | ||
|
|
a52dbafc5f | ||
|
|
d26eadfa21 | ||
|
|
321a310fe5 | ||
|
|
772f9d1b6a | ||
|
|
613dd3d1c4 | ||
|
|
aba5d03632 | ||
|
|
0403978ade | ||
|
|
da12a8c835 | ||
|
|
fc24ad965e | ||
|
|
736aa4c48d | ||
|
|
1de3651774 | ||
|
|
c4c0488339 | ||
|
|
bb05787ea7 | ||
|
|
d92502107e | ||
|
|
9ab224f3ce | ||
|
|
8bf5f398b1 | ||
|
|
be0ba28570 | ||
|
|
dbd86ad7a2 | ||
|
|
5f312d7347 | ||
|
|
6e9f21b1d5 | ||
|
|
a631505cd6 | ||
|
|
f36701206c | ||
|
|
42122a7540 | ||
|
|
996e2c7d92 | ||
|
|
64993a57eb | ||
|
|
eaf0d9af55 | ||
|
|
0c44656acf | ||
|
|
0d749b3e7a | ||
|
|
90b3528f6b | ||
|
|
07f0bf3a50 | ||
|
|
bcfa530056 | ||
|
|
3f4b0eccd8 | ||
|
|
591ecff646 | ||
|
|
7481943a9b | ||
|
|
16241b4ce1 | ||
|
|
9dbc352006 | ||
|
|
1a0c123823 | ||
|
|
45e3623ffd | ||
|
|
1eaa98d3e6 | ||
|
|
e75aadff15 | ||
|
|
d8cd5250a2 | ||
|
|
9e7b31b4e8 | ||
|
|
726d55f771 | ||
|
|
a4c67d50ee | ||
|
|
564de7434b | ||
|
|
59f1ba20db | ||
|
|
5ad7ece8d3 | ||
|
|
dabe90a0de | ||
|
|
1ecb9585ef | ||
|
|
36ceca7a94 | ||
|
|
42a46df51f | ||
|
|
008b362751 | ||
|
|
81717f67f3 | ||
|
|
b6bf22812b | ||
|
|
8557ec1226 | ||
|
|
570fcce2ee | ||
|
|
ef5a4b08d6 | ||
|
|
5fd04001d8 | ||
|
|
fb7bac4652 | ||
|
|
ef46db5d6b | ||
|
|
a9e130b090 | ||
|
|
f23413742a | ||
|
|
7ffe0c3b58 | ||
|
|
62e0ba6952 | ||
|
|
59910749b7 | ||
|
|
a5d53711ee | ||
|
|
9d747b7c82 | ||
|
|
3084ac098e | ||
|
|
f083561ee7 | ||
|
|
ae67f14f9b | ||
|
|
9d6746001e | ||
|
|
c632b6b358 | ||
|
|
9c300dc14b | ||
|
|
02d9c53520 | ||
|
|
ca5c9d6c45 | ||
|
|
90a5391252 | ||
|
|
cf113ecda2 | ||
|
|
0b9cecef4d | ||
|
|
52ea598ba4 | ||
|
|
f4bec4a1c8 | ||
|
|
293d7efe07 | ||
|
|
c9e24a055c | ||
|
|
e9ecc98b3d | ||
|
|
0932fd7f7c | ||
|
|
9ded7e176f | ||
|
|
1738009f6b | ||
|
|
bd3d8a54ad | ||
|
|
c97fd92fcf | ||
|
|
6d4d8a89ed | ||
|
|
7f9f289bd6 | ||
|
|
3c56a0c323 | ||
|
|
401ec40566 | ||
|
|
edf5d29213 | ||
|
|
03f8922ffd | ||
|
|
b9cc89e4d2 | ||
|
|
fb4a232537 | ||
|
|
cf35cedd1e | ||
|
|
2919415d7e | ||
|
|
ee083eb3c3 | ||
|
|
ca1e188e9a | ||
|
|
ef4fe2dbf9 | ||
|
|
6e7e7d35cc | ||
|
|
88e01d8a4b | ||
|
|
a8fd8d1b19 | ||
|
|
f47a267917 | ||
|
|
bf7e86fb13 | ||
|
|
1cab6acf69 | ||
|
|
75a2d3a1ba | ||
|
|
ca248a62ec | ||
|
|
b50590e2ad | ||
|
|
db253c15cc | ||
|
|
d60140dad8 | ||
|
|
5c17bcc710 | ||
|
|
d682bd52ff | ||
|
|
1ba874ea62 | ||
|
|
614ba66450 | ||
|
|
9451216606 | ||
|
|
ef91685596 | ||
|
|
dfaa20e449 | ||
|
|
d7b0d2a4d9 | ||
|
|
2b9e5bbaea | ||
|
|
8e0d288b2e | ||
|
|
75cdc585b6 | ||
|
|
a9d2610e34 | ||
|
|
e2eceb49ca | ||
|
|
e8eba15e49 | ||
|
|
4a8ebd8dee | ||
|
|
9dcf17be69 | ||
|
|
4aae0f1a1d | ||
|
|
f6a193935d | ||
|
|
46d4de261c | ||
|
|
b4b2c4301f | ||
|
|
bb2265a3c9 | ||
|
|
484f61fdd5 | ||
|
|
5aae49f1a0 | ||
|
|
ee7abe3098 | ||
|
|
981c5e1dd6 | ||
|
|
d9868a3862 | ||
|
|
c8edeb01e6 | ||
|
|
12e2b22ea8 | ||
|
|
a8008b8d33 | ||
|
|
7d539e5b03 | ||
|
|
2e2320ec73 | ||
|
|
676027caf6 | ||
|
|
2588bedcfe | ||
|
|
272c96b171 | ||
|
|
a1935687a2 | ||
|
|
6b25ab16b7 | ||
|
|
6b6518c699 | ||
|
|
88f661b6e7 | ||
|
|
aff0c1fc40 | ||
|
|
aa63e79aec | ||
|
|
a0cb7c560e | ||
|
|
68d1a04215 | ||
|
|
a4da6f67cc | ||
|
|
a93cec63be | ||
|
|
c22f78c913 | ||
|
|
a60467cb2d | ||
|
|
91a668ee8f | ||
|
|
94aa67d494 | ||
|
|
6636c48838 | ||
|
|
ce154aff09 | ||
|
|
6a8783e357 | ||
|
|
914f695eab | ||
|
|
d6510ad936 | ||
|
|
c2c9671061 | ||
|
|
def0a2c0ee | ||
|
|
995ca5902f | ||
|
|
10d959501d | ||
|
|
d8cff6566e | ||
|
|
a5a06196b1 | ||
|
|
0f6d809aff | ||
|
|
2cbc850df3 | ||
|
|
7509c7adbf | ||
|
|
b1ac99c616 | ||
|
|
0c7ef180d0 | ||
|
|
4c59dcaea6 | ||
|
|
08b3a4b7a7 | ||
|
|
125c093ba5 | ||
|
|
891c3e5e59 | ||
|
|
ba9fa1d0b7 | ||
|
|
830c9006ca | ||
|
|
ec16aa92ac | ||
|
|
2dfb0ef3e6 | ||
|
|
03daa33d83 | ||
|
|
883bcd897f | ||
|
|
ba6cca4093 | ||
|
|
a1581bc963 | ||
|
|
2a26cd9d5a | ||
|
|
46eb092006 | ||
|
|
87dc7e39e6 | ||
|
|
9ed77ab6c1 | ||
|
|
46287cac0f | ||
|
|
b011a3a558 | ||
|
|
e3e430f4d7 | ||
|
|
b63a40d4fe | ||
|
|
41bc54879d | ||
|
|
269a254425 | ||
|
|
4c748f2b36 | ||
|
|
ee7d7f164f | ||
|
|
962aa66965 | ||
|
|
92621a3187 | ||
|
|
04b32efd54 | ||
|
|
0931d655f7 | ||
|
|
480425bfb9 | ||
|
|
49351227d1 | ||
|
|
d3263a45c3 | ||
|
|
4f77c88e0b | ||
|
|
722390475b | ||
|
|
3b248de306 | ||
|
|
7ff5e56dc7 | ||
|
|
67f113a818 | ||
|
|
4136f0274a | ||
|
|
61a306664f | ||
|
|
d35576302d | ||
|
|
cca008f140 | ||
|
|
5458d5b341 | ||
|
|
42db45d6f4 | ||
|
|
2c3cbc1708 | ||
|
|
5e065e71c7 | ||
|
|
50705890d8 | ||
|
|
c33b58a3e0 | ||
|
|
4d4971b171 | ||
|
|
05513ad75a | ||
|
|
ee69e1ee4a | ||
|
|
88bc04797f | ||
|
|
c06644af62 | ||
|
|
89787173af | ||
|
|
65403d1cf7 | ||
|
|
e56c69494a | ||
|
|
9e9aa75fbb | ||
|
|
14934a9479 | ||
|
|
9b48a386fc | ||
|
|
9d60b487e6 | ||
|
|
3e83b2836c | ||
|
|
72425cff84 | ||
|
|
3ae68213ff | ||
|
|
a9ff33f9a5 | ||
|
|
f6a6444e66 | ||
|
|
6901e9658f | ||
|
|
a8a6d0595b | ||
|
|
ee786e1962 | ||
|
|
7115839fd5 |
@@ -1,40 +1,14 @@
|
|||||||
version: 2
|
---
|
||||||
|
version: 2.1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
noop:
|
||||||
machine:
|
docker:
|
||||||
image: ubuntu-1604:201903-01
|
- image: cimg/base:2020.01
|
||||||
parallelism: 4
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- run: echo "this is a noop"
|
||||||
- run: |
|
|
||||||
make ci-dependencies
|
workflows:
|
||||||
- run: |
|
noop:
|
||||||
./tests/ci/setup.sh
|
jobs:
|
||||||
- run: |
|
- noop
|
||||||
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
|
|
||||||
- run: |
|
|
||||||
# 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 ;;
|
|
||||||
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
|
|
||||||
2) sudo -E make -e deploy-test-multi ;;
|
|
||||||
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
|
||||||
esac
|
|
||||||
- run:
|
|
||||||
shell: /bin/bash
|
|
||||||
command: sudo -E make -e test-ci
|
|
||||||
no_output_timeout: 60m
|
|
||||||
- run: |
|
|
||||||
if [ "${CIRCLE_NODE_INDEX}" == "0" ]; then
|
|
||||||
./tests/ci/setup.sh docker
|
|
||||||
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
|
|
||||||
fi
|
|
||||||
- store_artifacts:
|
|
||||||
path: ./coverage.out
|
|
||||||
- store_artifacts:
|
|
||||||
path: ./test-results
|
|
||||||
destination: test-results
|
|
||||||
- store_test_results:
|
|
||||||
path: test-results
|
|
||||||
|
|||||||
13
.codacy.yml
13
.codacy.yml
@@ -1,5 +1,10 @@
|
|||||||
|
---
|
||||||
|
engines:
|
||||||
|
duplication:
|
||||||
|
exclude_paths:
|
||||||
|
- "*"
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
- vendor/**/*
|
- vendor/**/*
|
||||||
- tests/**/*
|
- tests/**/*
|
||||||
- "**_test.go"
|
- "**_test.go"
|
||||||
- contrib/*
|
- contrib/*
|
||||||
|
|||||||
@@ -8,8 +8,6 @@ docs
|
|||||||
tests
|
tests
|
||||||
!build/dokku.deb
|
!build/dokku.deb
|
||||||
!tests/dhparam.pem
|
!tests/dhparam.pem
|
||||||
!contrib/dokku-installer.py
|
|
||||||
!contrib/dokku-update
|
|
||||||
!contrib/bash-completion
|
!contrib/bash-completion
|
||||||
!contrib/docker
|
!contrib/docker
|
||||||
vendor
|
vendor
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ insert_final_newline = true
|
|||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.go]
|
[*.{go,mod}]
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|||||||
51
.github/commands/bump-azure
vendored
Executable file
51
.github/commands/bump-azure
vendored
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
main() {
|
||||||
|
declare VERSION="$1" BOT_GITHUB_USERNAME="$2" BOT_GITHUB_API_TOKEN="$3"
|
||||||
|
local GH_VERSION=1.6.1
|
||||||
|
local DATE_UPDATED="$(date +"%Y-%m-%d")"
|
||||||
|
local GH_FOLDER="gh_${GH_VERSION}_linux_amd64"
|
||||||
|
|
||||||
|
echo "=====> Downloading gh"
|
||||||
|
wget -O gh.tar.gz "https://github.com/cli/cli/releases/download/v${GH_VERSION}/${GH_FOLDER}.tar.gz"
|
||||||
|
mkdir -p tmp
|
||||||
|
tar xzf gh.tar.gz -C tmp
|
||||||
|
if [[ ! -f tmp/$GH_FOLDER/bin/gh ]]; then
|
||||||
|
echo "Failed to extract gh"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd tmp
|
||||||
|
|
||||||
|
$GH_FOLDER/bin/gh auth login --with-token <<<"$BOT_GITHUB_API_TOKEN"
|
||||||
|
|
||||||
|
echo "=====> Cloning quickstart templates"
|
||||||
|
rm -rf azure-quickstart-templates >/dev/null
|
||||||
|
git clone https://github.com/Azure/azure-quickstart-templates.git azure-quickstart-templates
|
||||||
|
|
||||||
|
pushd azure-quickstart-templates >/dev/null
|
||||||
|
|
||||||
|
echo "=====> Updating values"
|
||||||
|
contents="$(jq '.githubUsername = "dokku"' application-workloads/dokku/dokku-vm/metadata.json)"
|
||||||
|
echo "${contents}" >application-workloads/dokku/dokku-vm/metadata.json
|
||||||
|
contents="$(jq --arg DATE_UPDATED "$DATE_UPDATED" '.dateUpdated = $DATE_UPDATED' application-workloads/dokku/dokku-vm/metadata.json)"
|
||||||
|
echo "${contents}" >application-workloads/dokku/dokku-vm/metadata.json
|
||||||
|
|
||||||
|
contents="$(jq --arg VERSION "$VERSION" '.parameters.dokkuVersion.defaultValue = $VERSION' application-workloads/dokku/dokku-vm/azuredeploy.json)"
|
||||||
|
echo "${contents}" >application-workloads/dokku/dokku-vm/azuredeploy.json
|
||||||
|
|
||||||
|
echo "=====> Updating remote repository"
|
||||||
|
git add application-workloads/dokku/dokku-vm
|
||||||
|
git checkout -b dokku-$VERSION
|
||||||
|
git commit -m "Update dokku-vm dokku version to $VERSION"
|
||||||
|
git remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/azure-quickstart-templates.git"
|
||||||
|
git push -f origin dokku-$VERSION
|
||||||
|
|
||||||
|
echo "=====> Creating upstream pull request"
|
||||||
|
../$GH_FOLDER/bin/gh pr create --head dokku:dokku-$VERSION --repo Azure/azure-quickstart-templates --title "Update dokku-vm dokku version to $VERSION" --body ''
|
||||||
|
|
||||||
|
popd &>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
15
.github/commands/ci-run
vendored
Executable file
15
.github/commands/ci-run
vendored
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
main() {
|
||||||
|
declare FILE_NAME="$1"
|
||||||
|
|
||||||
|
mkdir -p test-results/bats
|
||||||
|
pushd tests/unit >/dev/null
|
||||||
|
bats --report-formatter junit --output ../../test-results/bats "$FILE_NAME.bats"
|
||||||
|
popd &>/dev/null
|
||||||
|
|
||||||
|
ls -lah test-results/bats
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
29
.github/commands/ci-setup
vendored
Executable file
29
.github/commands/ci-setup
vendored
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
|
echo "=====> set hostname"
|
||||||
|
hostname
|
||||||
|
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
|
||||||
|
sudo hostname "dokku.me"
|
||||||
|
echo "dokku.me" | sudo tee /etc/hostname
|
||||||
|
hostname
|
||||||
|
sudo cat /etc/hostname
|
||||||
|
|
||||||
|
echo "=====> resolve dokku.me"
|
||||||
|
sudo apt -qq -y --no-install-recommends install net-tools
|
||||||
|
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||||
|
ifconfig
|
||||||
|
sudo ip addr add 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||||
|
|
||||||
|
echo "=====> install ci-dependencies"
|
||||||
|
make ci-dependencies
|
||||||
|
|
||||||
|
echo "=====> setup tests"
|
||||||
|
./tests/ci/setup.sh
|
||||||
|
|
||||||
|
echo "=====> dokku cleanup:skip"
|
||||||
|
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||||
|
|
||||||
|
echo "=====> dokku report"
|
||||||
|
dokku report
|
||||||
9
.github/commands/matrix
vendored
Executable file
9
.github/commands/matrix
vendored
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
keys = ["index"]
|
||||||
|
values = [[s.replace(".bats", "") for s in os.listdir("tests/unit/") if s.endswith(".bats")]]
|
||||||
|
zi = zip(keys, values)
|
||||||
|
data = json.dumps(dict(zi))
|
||||||
|
print(data.replace(" ", ""))
|
||||||
107
.github/dependabot.yml
vendored
Normal file
107
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
---
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: bundler
|
||||||
|
directory: "/tests/apps/ruby"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: bundler
|
||||||
|
directory: "/tests/apps/multi"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/checks-root"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/config"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/dockerfile-dokku-scale"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/dockerfile-noexpose"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/dockerfile-procfile-bad"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/dockerfile-procfile"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/dockerfile"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/gitsubmodules"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: gomod
|
||||||
|
directory: "/tests/apps/gogrpc"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
ignore:
|
||||||
|
- dependency-name: google.golang.org/grpc
|
||||||
|
versions:
|
||||||
|
- "> 1.29.1"
|
||||||
|
- package-ecosystem: pip
|
||||||
|
directory: "/tests/apps/multi"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: maven
|
||||||
|
directory: "/tests/apps/java"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/nodejs-express"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/nodejs-worker"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/nodejs-express-noappjson"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/nodejs-express-noprocfile"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: composer
|
||||||
|
directory: "/tests/apps/php"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: pip
|
||||||
|
directory: "/tests/apps/python-flask"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
- package-ecosystem: npm
|
||||||
|
directory: "/tests/apps/.websocket.disabled"
|
||||||
|
schedule:
|
||||||
|
interval: daily
|
||||||
|
open-pull-requests-limit: 10
|
||||||
10
.github/linters/.markdown-lint.yml
vendored
Normal file
10
.github/linters/.markdown-lint.yml
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
default: true
|
||||||
|
|
||||||
|
# Line length
|
||||||
|
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md013
|
||||||
|
MD013: false
|
||||||
|
|
||||||
|
# Inline HTML
|
||||||
|
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#md033
|
||||||
|
MD033: false
|
||||||
5
.github/linters/.yamllint.yml
vendored
Normal file
5
.github/linters/.yamllint.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
line-length: disable
|
||||||
164
.github/workflows/ci.yml
vendored
Normal file
164
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,164 @@
|
|||||||
|
---
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
outputs:
|
||||||
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: build package
|
||||||
|
run: ./tests/ci/setup.sh build
|
||||||
|
|
||||||
|
- name: set matrix for build
|
||||||
|
id: set-matrix
|
||||||
|
run: |
|
||||||
|
json=$(python .github/commands/matrix)
|
||||||
|
echo $json
|
||||||
|
echo "::set-output name=matrix::$(echo "$json")"
|
||||||
|
|
||||||
|
- name: upload packages
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: build
|
||||||
|
|
||||||
|
unit-tests:
|
||||||
|
name: unit.${{ matrix.index }}
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix: ${{fromJson(needs.build.outputs.matrix)}}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: download packages
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
|
||||||
|
- name: ci-setup
|
||||||
|
run: ./.github/commands/ci-setup
|
||||||
|
|
||||||
|
# - name: start ssh session
|
||||||
|
# uses: luchihoratiu/debug-via-ssh@main
|
||||||
|
# with:
|
||||||
|
# NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
|
||||||
|
# SSH_PASS: ${{ secrets.SSH_PASS }}
|
||||||
|
|
||||||
|
- name: run ci
|
||||||
|
timeout-minutes: 30
|
||||||
|
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
|
||||||
|
env:
|
||||||
|
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
SYNC_GITHUB_PASSWORD: ${{ secrets.SYNC_GITHUB_PASSWORD }}
|
||||||
|
SYNC_GITHUB_USERNAME: ${{ secrets.SYNC_GITHUB_USERNAME }}
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: test-results-${{ matrix.index }}
|
||||||
|
path: test-results
|
||||||
|
|
||||||
|
docker-deploy-tests:
|
||||||
|
name: docker
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: download packages
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
|
||||||
|
- name: ci-setup
|
||||||
|
run: ./.github/commands/ci-setup
|
||||||
|
|
||||||
|
- name: test docker deploys
|
||||||
|
shell: bash
|
||||||
|
timeout-minutes: 20
|
||||||
|
run: |
|
||||||
|
./tests/ci/setup.sh docker
|
||||||
|
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
|
||||||
|
|
||||||
|
go-tests:
|
||||||
|
name: go.${{ matrix.index }}
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
index: [0, 1, 2, 3]
|
||||||
|
env:
|
||||||
|
GITHUB_NODE_INDEX: ${{ matrix.index }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: download packages
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
|
||||||
|
- name: ci-setup
|
||||||
|
run: ./.github/commands/ci-setup
|
||||||
|
|
||||||
|
- name: run go tests
|
||||||
|
run: |
|
||||||
|
export CIRCLE_SHA1=$GITHUB_SHA
|
||||||
|
echo "CODACY_TOKEN=$CODACY_TOKEN"
|
||||||
|
if [ "$CODACY_TOKEN" != "" ]; then
|
||||||
|
echo "Detected value for CODACY_TOKEN"
|
||||||
|
fi
|
||||||
|
case $GITHUB_NODE_INDEX in
|
||||||
|
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
|
||||||
|
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
|
||||||
|
2) sudo -E make -e deploy-test-multi ;;
|
||||||
|
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||||
|
esac
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: coverage.${{ matrix.index }}
|
||||||
|
path: test-results/coverage
|
||||||
|
|
||||||
|
publish-test-results:
|
||||||
|
name: publish-test-results
|
||||||
|
needs: unit-tests
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
# the build-and-test job might be skipped, we don't need to run this job then
|
||||||
|
if: success() || failure()
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: download test-results
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
path: test-results
|
||||||
|
|
||||||
|
- name: Publish Unit Test Results
|
||||||
|
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1
|
||||||
|
with:
|
||||||
|
check_name: Unit Test Results
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: test-results/**/*.xml
|
||||||
|
comment_on_pr: false
|
||||||
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
70
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
# ******** NOTE ********
|
||||||
|
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [master]
|
||||||
|
schedule:
|
||||||
|
- cron: '18 22 * * 2'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: ['go']
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
# - run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
||||||
74
.github/workflows/lint.yml
vendored
Normal file
74
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
---
|
||||||
|
name: 'lint'
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
hadolint:
|
||||||
|
name: hadolint
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run hadolint
|
||||||
|
uses: brpaz/hadolint-action@1623ba61710b974b55ba455930e6f2c8ef919778
|
||||||
|
# v1.3.1 => 1623ba61710b974b55ba455930e6f2c8ef919778
|
||||||
|
|
||||||
|
markdown-lint:
|
||||||
|
name: markdown-lint
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run markdown-lint
|
||||||
|
uses: avto-dev/markdown-lint@04d43ee9191307b50935a753da3b775ab695eceb
|
||||||
|
# v1.5.0 => 04d43ee9191307b50935a753da3b775ab695eceb
|
||||||
|
with:
|
||||||
|
config: '.github/linters/.markdown-lint.yml'
|
||||||
|
args: './README.md'
|
||||||
|
|
||||||
|
shellcheck:
|
||||||
|
name: shellcheck
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run shellcheck
|
||||||
|
uses: ludeeus/action-shellcheck@d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||||
|
# 1.0.0 => d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||||
|
env:
|
||||||
|
# keep in sync with tests/shellcheck-exclude
|
||||||
|
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2030 -e SC2031 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235 -e SC2267
|
||||||
|
|
||||||
|
shfmt:
|
||||||
|
name: shfmt
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run shfmt
|
||||||
|
uses: luizm/action-sh-checker@442951059cb22d260c6e69309ae59cb7bb2334b8
|
||||||
|
# v0.1.12 => 442951059cb22d260c6e69309ae59cb7bb2334b8
|
||||||
|
env:
|
||||||
|
SHFMT_OPTS: -l -bn -ci -i 2 -d
|
||||||
|
with:
|
||||||
|
sh_checker_shellcheck_disable: true
|
||||||
|
|
||||||
|
yamllint:
|
||||||
|
name: yamllint
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Clone
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Run yamllint
|
||||||
|
uses: ibiqlik/action-yamllint@b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee
|
||||||
|
# v3.0.0 => b2aeacc1b7eeb8c23e84bba320d04fb5d6a323ee
|
||||||
|
with:
|
||||||
|
config_file: '.github/linters/.yamllint.yml'
|
||||||
87
.github/workflows/release.yml
vendored
Normal file
87
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
---
|
||||||
|
name: 'release'
|
||||||
|
|
||||||
|
# yamllint disable-line rule:truthy
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
release_type:
|
||||||
|
description: 'Release type [build, betafish, patch, minor, major]'
|
||||||
|
required: true
|
||||||
|
default: 'build'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: release
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.version.outputs.version }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: ruby/setup-ruby@v1
|
||||||
|
with:
|
||||||
|
ruby-version: 2.6
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: install package_cloud
|
||||||
|
run: gem install package_cloud
|
||||||
|
|
||||||
|
- name: configure git
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'Dokku Bot'
|
||||||
|
git config --global user.email no-reply@dokku.com
|
||||||
|
|
||||||
|
- name: build package
|
||||||
|
run: contrib/release-dokku ${{ github.event.inputs.release_type }}
|
||||||
|
|
||||||
|
- name: output version
|
||||||
|
id: version
|
||||||
|
run: echo "::set-output name=version::$(cat build/next-version)"
|
||||||
|
|
||||||
|
- name: upload packages
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: build
|
||||||
|
|
||||||
|
bump-azure:
|
||||||
|
name: bump-azure
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: release
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Bump Azure Template
|
||||||
|
env:
|
||||||
|
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||||
|
BOT_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
|
run: |
|
||||||
|
VERSION=${{ needs.release.outputs.version }}
|
||||||
|
git config --global user.name 'Dokku Bot'
|
||||||
|
git config --global user.email no-reply@dokku.com
|
||||||
|
.github/commands/bump-azure "${VERSION:1}" "$BOT_GITHUB_USERNAME" "$BOT_GITHUB_API_TOKEN"
|
||||||
|
|
||||||
|
bump-formula:
|
||||||
|
name: bump-formula
|
||||||
|
runs-on: macos-latest
|
||||||
|
needs: release
|
||||||
|
steps:
|
||||||
|
- name: Bump Homebrew Formula
|
||||||
|
env:
|
||||||
|
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||||
|
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'Dokku Bot'
|
||||||
|
git config --global user.email no-reply@dokku.com
|
||||||
|
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||||
|
brew bump-formula-pr -f --no-browse --no-audit --no-fork --debug --verbose --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,3 @@ test-results/
|
|||||||
stack.tgz
|
stack.tgz
|
||||||
tmp
|
tmp
|
||||||
coverage.out
|
coverage.out
|
||||||
contrib/dokku-update-version
|
|
||||||
|
|||||||
106
CONTRIBUTING.md
106
CONTRIBUTING.md
@@ -3,30 +3,28 @@
|
|||||||
The Dokku project would love to welcome your contributions. There are
|
The Dokku project would love to welcome your contributions. There are
|
||||||
several ways to help out:
|
several ways to help out:
|
||||||
|
|
||||||
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
|
- Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you have found a bug
|
||||||
have found a bug
|
- Write [test cases](https://dokku.com/docs/development/testing/) for open bug issues
|
||||||
* Write test cases for open bug issues
|
- Write patches for open bug/feature issues, preferably with test cases included
|
||||||
* Write patches for open bug/feature issues, preferably with test cases
|
- Contribute to the [documentation](https://dokku.com/docs/)
|
||||||
included
|
- Come up with new ways, non-commercial to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
- Blog about different ways you are using dokku
|
||||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
- Sponsor the Dokku project financially on [Github](https://github.com/sponsors/dokku), [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||||
* Blog about different ways you are using dokku
|
|
||||||
* Sponsor the Dokku project financially on [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
|
||||||
|
|
||||||
There are a few guidelines that we need contributors to follow so that we have
|
There are a few guidelines that we need contributors to follow so that we have
|
||||||
a chance of keeping on top of things.
|
a chance of keeping on top of things.
|
||||||
|
|
||||||
## Topics
|
## Topics
|
||||||
|
|
||||||
* [Reporting Security Issues](#reporting-security-issues)
|
- [Reporting Security Issues](#reporting-security-issues)
|
||||||
* [Reporting Issues](#reporting-other-issues)
|
- [Reporting Issues](#reporting-other-issues)
|
||||||
* [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
* [Making Changes](#making-changes)
|
- [Making Changes](#making-changes)
|
||||||
* [Which branch to base the work](#which-branch-to-base-the-work)
|
- [Which branch to base the work](#which-branch-to-base-the-work)
|
||||||
* [Submitting Changes](#submitting-changes)
|
- [Submitting Changes](#submitting-changes)
|
||||||
* [When will my change be merged?](#when-will-my-change-be-merged)
|
- [When will my change be merged?](#when-will-my-change-be-merged)
|
||||||
* [Test cases and codesniffs](#test-cases-and-codesniffs)
|
- [Running tests locally](#running-tests-locally)
|
||||||
* [Additional Resources](#additional-resources)
|
- [Additional Resources](#additional-resources)
|
||||||
|
|
||||||
## Reporting security issues
|
## Reporting security issues
|
||||||
|
|
||||||
@@ -45,7 +43,7 @@ encounter an issue. We always appreciate a well-written, thorough bug report,
|
|||||||
and will thank you for it!
|
and will thank you for it!
|
||||||
|
|
||||||
Sometimes Dokku is missing a feature you need. In some cases, those features can
|
Sometimes Dokku is missing a feature you need. In some cases, those features can
|
||||||
be found in pre-existing [plugins](http://dokku.viewdocs.io/dokku/plugins/),
|
be found in pre-existing [plugins](https://dokku.com/docs/plugins/),
|
||||||
and we encourage our users to create and contribute such packages. From time to
|
and we encourage our users to create and contribute such packages. From time to
|
||||||
time, we will also pull plugins into the Dokku core when the task they solve is
|
time, we will also pull plugins into the Dokku core when the task they solve is
|
||||||
a common one for our users.
|
a common one for our users.
|
||||||
@@ -65,37 +63,36 @@ you.
|
|||||||
Before you contribute to the Dokku project, there are a few things that you'll
|
Before you contribute to the Dokku project, there are a few things that you'll
|
||||||
need to do
|
need to do
|
||||||
|
|
||||||
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
- Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||||
* Submit an [issue](https://github.com/dokku/dokku/issues), assuming one
|
- Submit an [issue](https://github.com/dokku/dokku/issues), assuming one does not already exist.
|
||||||
does not already exist.
|
- Clearly describe the issue including steps to reproduce when it is a bug.
|
||||||
* Clearly describe the issue including steps to reproduce when it is a bug.
|
- Make sure you fill in the earliest version that you know has the issue.
|
||||||
* Make sure you fill in the earliest version that you know has the issue.
|
- Fork the repository on GitHub.
|
||||||
* Fork the repository on GitHub.
|
|
||||||
|
|
||||||
### Making Changes
|
### Making Changes
|
||||||
|
|
||||||
* Create a topic branch from where you want to base your work.
|
- Create a topic branch from where you want to base your work.
|
||||||
* This is usually the master branch.
|
- This is usually the master branch.
|
||||||
* Only target an existing branch if you are certain your fix must be on that
|
- Only target an existing branch if you are certain your fix must be on that
|
||||||
branch.
|
branch.
|
||||||
* To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master`.
|
- To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master`.
|
||||||
It is best to avoid working directly on the `master` branch. Doing so will
|
It is best to avoid working directly on the `master` branch. Doing so will
|
||||||
help avoid conflicts if you pull in updates from origin.
|
help avoid conflicts if you pull in updates from origin.
|
||||||
* Make commits of logical units. Implementing a new function and calling it in
|
- Make commits of logical units. Implementing a new function and calling it in
|
||||||
another file constitute a single logical unit of work.
|
another file constitute a single logical unit of work.
|
||||||
* Before you make a pull request, squash your commits into logical units of work
|
- Before you make a pull request, squash your commits into logical units of work
|
||||||
using `git rebase -i` and `git push -f`.
|
using `git rebase -i` and `git push -f`.
|
||||||
* A majority of submissions should have a single commit, so if in doubt,
|
- A majority of submissions should have a single commit, so if in doubt,
|
||||||
squash your commits down to one commit.
|
squash your commits down to one commit.
|
||||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||||
* Use descriptive commit messages and reference the #issue number.
|
- Use descriptive commit messages and reference the #issue number.
|
||||||
* Core test cases should continue to pass. You can run tests locally or enable
|
- Core test cases should continue to pass. You can run tests locally or enable
|
||||||
[circle-ci](https://circleci.com/gh/dokku/dokku) for your fork, so all
|
[circle-ci](https://circleci.com/gh/dokku/dokku) for your fork, so all
|
||||||
tests and codesniffs will be executed.
|
tests and codesniffs will be executed.
|
||||||
* Your work should apply the [Dokku coding standards](https://github.com/progrium/bashstyle)
|
- Your work should apply the [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||||
* Pull requests must be cleanly rebased on top of master without multiple branches
|
- Pull requests must be cleanly rebased on top of master without multiple branches
|
||||||
mixed into the PR.
|
mixed into the PR.
|
||||||
* **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
|
- **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
|
||||||
feature branch to update your pull request rather than `merge master`.
|
feature branch to update your pull request rather than `merge master`.
|
||||||
|
|
||||||
### Which branch to base the work
|
### Which branch to base the work
|
||||||
@@ -104,8 +101,8 @@ All changes should be be based on the latest master commit.
|
|||||||
|
|
||||||
### Submitting Changes
|
### Submitting Changes
|
||||||
|
|
||||||
* Push your changes to a topic branch in your fork of the repository.
|
- Push your changes to a topic branch in your fork of the repository.
|
||||||
* Submit a pull request to the repository on github, with the correct target
|
- Submit a pull request to the repository on github, with the correct target
|
||||||
branch.
|
branch.
|
||||||
|
|
||||||
### When will my change be merged?
|
### When will my change be merged?
|
||||||
@@ -127,26 +124,15 @@ requests:
|
|||||||
- backwards incompatible change (minor)
|
- backwards incompatible change (minor)
|
||||||
- major feature (minor)
|
- major feature (minor)
|
||||||
|
|
||||||
### Test cases and codesniffs
|
### Running tests locally
|
||||||
|
|
||||||
Dokku tests require [bats](https://github.com/sstephenson/bats).
|
Please read the [testing docs](https://dokku.com/docs/development/testing/),
|
||||||
To run the test cases locally use the following command:
|
which contains test setup information as well as tips for running tests.
|
||||||
|
|
||||||
make ci-dependencies
|
## Additional Resources
|
||||||
make unit-tests deploy-tests
|
|
||||||
|
|
||||||
To run the shellcheck sniffs for Dokku coding standards:
|
- [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||||
|
- [Existing issues](https://github.com/dokku/dokku/issues)
|
||||||
make ci-dependencies
|
- [General GitHub documentation](https://help.github.com/)
|
||||||
make lint
|
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||||
|
- [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/)
|
||||||
The [testing docs](http://dokku.viewdocs.io/dokku/development/testing/)
|
|
||||||
contains installation info for bats and shellcheck.
|
|
||||||
|
|
||||||
# Additional Resources
|
|
||||||
|
|
||||||
* [Dokku coding standards](https://github.com/progrium/bashstyle)
|
|
||||||
* [Existing issues](https://github.com/dokku/dokku/issues)
|
|
||||||
* [General GitHub documentation](https://help.github.com/)
|
|
||||||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
|
||||||
* [#dokku IRC channel on freenode.org](https://webchat.freenode.net/?channels=dokku)
|
|
||||||
|
|||||||
70
Dockerfile
70
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM phusion/baseimage:0.11
|
FROM phusion/baseimage:bionic-1.0.0
|
||||||
|
|
||||||
CMD ["/sbin/my_init"]
|
CMD ["/sbin/my_init"]
|
||||||
|
|
||||||
@@ -11,46 +11,48 @@ ARG DOKKU_VHOST_ENABLE=false
|
|||||||
ARG DOKKU_WEB_CONFIG=false
|
ARG DOKKU_WEB_CONFIG=false
|
||||||
|
|
||||||
RUN addgroup --gid $DOKKU_GID dokku \
|
RUN addgroup --gid $DOKKU_GID dokku \
|
||||||
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
|
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
|
||||||
|
|
||||||
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
||||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
# hadolint ignore=DL3005,DL3008
|
||||||
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
|
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/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/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 - \
|
||||||
&& 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 \
|
||||||
&& echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/dokku.list \
|
&& mkdir -p /etc/nginx/ \
|
||||||
&& mkdir -p /etc/nginx/ \
|
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
||||||
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
&& apt-get update -qq \
|
||||||
&& apt-get update -qq \
|
&& apt-get upgrade -qq -y \
|
||||||
&& apt-get upgrade -qq -y \
|
&& apt-get -qq -y --no-install-recommends --only-upgrade install openssl openssh-server \
|
||||||
&& apt-get install --no-install-recommends --only-upgrade -qq -y openssl openssh-server \
|
&& apt-get -qq -y --no-install-recommends install rsync /tmp/dokku.deb \
|
||||||
&& apt install --no-install-recommends -qq -y rsync /tmp/dokku.deb \
|
&& apt-get purge -qq -y syslog-ng-core \
|
||||||
&& apt-get purge -qq -y syslog-ng-core \
|
&& apt-get autoremove -qq -y \
|
||||||
&& apt-get autoremove -qq -y \
|
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
|
||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
|
|
||||||
COPY ./docker .
|
COPY ./docker .
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
rsync -a /tmp/ / \
|
rsync -a /tmp/ / \
|
||||||
&& rm -rf /tmp/* \
|
&& rm -rf /tmp/* \
|
||||||
&& rm /etc/runit/runsvdir/default/sshd/down \
|
&& rm /etc/runit/runsvdir/default/sshd/down \
|
||||||
&& chown -R dokku:dokku /home/dokku/ \
|
&& chown -R dokku:dokku /home/dokku/ \
|
||||||
&& mkdir -p /skel/etc /skel/home /skel/var/lib/dokku /var/log/services \
|
&& mkdir -p /skel/etc /skel/home /skel/var/lib/dokku /var/log/services \
|
||||||
&& mv /etc/ssh /skel/etc/ssh \
|
&& mv /etc/ssh /skel/etc/ssh \
|
||||||
&& mv /home/dokku /skel/home/dokku \
|
&& mv /home/dokku /skel/home/dokku \
|
||||||
&& mv /var/lib/dokku/config /skel/var/lib/dokku/config \
|
&& mv /var/lib/dokku/config /skel/var/lib/dokku/config \
|
||||||
&& mv /var/lib/dokku/data /skel/var/lib/dokku/data \
|
&& mv /var/lib/dokku/data /skel/var/lib/dokku/data \
|
||||||
&& ln -sf /mnt/dokku/etc/ssh /etc/ssh \
|
&& ln -sf /mnt/dokku/etc/ssh /etc/ssh \
|
||||||
&& ln -sf /mnt/dokku/home/dokku /home/dokku \
|
&& ln -sf /mnt/dokku/home/dokku /home/dokku \
|
||||||
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
||||||
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
|
&& 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 \
|
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
|
||||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
&& rm -f /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 \
|
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||||
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
||||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/* /var/log/openresty/*
|
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/*.log /var/log/nginx/* /var/log/openresty/*
|
||||||
|
|||||||
1288
HISTORY.md
1288
HISTORY.md
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
>
|
>
|
||||||
> 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'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 help figuring out how to use a specific buildpack, are seeing an issue in during the buildpack process, or are having issues using multiple buildpacks, please see our [slack channels or github discussion board](https://dokku.com/docs/getting-started/where-to-get-help/#monitored-locations). 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.
|
> 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.
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
> For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
> For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
||||||
> In these cases, you may 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?:
|
### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?
|
||||||
|
|
||||||
### Additional information
|
### Additional information
|
||||||
|
|
||||||
|
|||||||
58
Makefile
58
Makefile
@@ -1,14 +1,20 @@
|
|||||||
DOKKU_VERSION ?= master
|
DOKKU_VERSION ?= master
|
||||||
|
|
||||||
PROCFILE_VERSION ?= 0.6.0
|
DOCKER_IMAGE_LABELER_VERSION ?= 0.2.2
|
||||||
PLUGN_VERSION ?= 0.3.2
|
HEROKUISH_VERSION ?= 0.5.25
|
||||||
SSHCOMMAND_VERSION ?= 0.10.0
|
NETRC_VERSION ?= 0.3.0
|
||||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
PLUGN_VERSION ?= 0.6.1
|
||||||
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
PROCFILE_VERSION ?= 0.11.0
|
||||||
|
SIGIL_VERSION ?= 0.6.0
|
||||||
|
SSHCOMMAND_VERSION ?= 0.12.0
|
||||||
|
DOCKER_IMAGE_LABELER_URL ?= https://github.com/dokku/docker-image-labeler/releases/download/v${DOCKER_IMAGE_LABELER_VERSION}/docker-image-labeler_${DOCKER_IMAGE_LABELER_VERSION}_linux_x86_64.tgz
|
||||||
|
NETRC_URL ?= https://github.com/dokku/netrc/releases/download/v${NETRC_VERSION}/netrc_${NETRC_VERSION}_linux_x86_64.tgz
|
||||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_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
|
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
||||||
|
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/sigil_${SIGIL_VERSION}_Linux_x86_64.tgz
|
||||||
|
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
|
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest-20
|
||||||
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
||||||
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
||||||
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
||||||
@@ -30,7 +36,7 @@ endif
|
|||||||
|
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies sshcommand procfile-util plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
|
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler netrc sshcommand procfile-util plugn docker aufs stack count vagrant-acl-add vagrant-dokku go-build
|
||||||
|
|
||||||
include tests.mk
|
include tests.mk
|
||||||
include package.mk
|
include package.mk
|
||||||
@@ -121,28 +127,31 @@ plugin-dependencies: plugn procfile-util
|
|||||||
plugins: plugn procfile-util docker
|
plugins: plugn procfile-util docker
|
||||||
sudo -E dokku plugin:install --core
|
sudo -E dokku plugin:install --core
|
||||||
|
|
||||||
dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
dependencies: apt-update docker-image-labeler netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
||||||
$(MAKE) -e stack
|
$(MAKE) -e stack
|
||||||
|
|
||||||
apt-update:
|
apt-update:
|
||||||
apt-get update -qq
|
apt-get update -qq
|
||||||
|
|
||||||
jq:
|
jq:
|
||||||
apt-get install -qq -y jq
|
apt-get -qq -y --no-install-recommends install jq
|
||||||
|
|
||||||
dos2unix:
|
dos2unix:
|
||||||
apt-get install -qq -y dos2unix
|
apt-get -qq -y --no-install-recommends install dos2unix
|
||||||
|
|
||||||
help2man:
|
help2man:
|
||||||
apt-get install -qq -y help2man
|
apt-get -qq -y --no-install-recommends install help2man
|
||||||
|
|
||||||
man-db:
|
man-db:
|
||||||
apt-get install -qq -y man-db
|
apt-get -qq -y --no-install-recommends install man-db
|
||||||
|
|
||||||
sshcommand:
|
docker-image-labeler:
|
||||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
wget -qO /tmp/docker-image-labeler_latest.tgz ${DOCKER_IMAGE_LABELER_URL}
|
||||||
tar xzf /tmp/sshcommand_latest.tgz -C /usr/local/bin
|
tar xzf /tmp/docker-image-labeler_latest.tgz -C /usr/local/bin
|
||||||
sshcommand create dokku /usr/local/bin/dokku
|
|
||||||
|
netrc:
|
||||||
|
wget -qO /tmp/netrc_latest.tgz ${NETRC_URL}
|
||||||
|
tar xzf /tmp/netrc_latest.tgz -C /usr/local/bin
|
||||||
|
|
||||||
procfile-util:
|
procfile-util:
|
||||||
wget -qO /tmp/procfile-util_latest.tgz ${PROCFILE_UTIL_URL}
|
wget -qO /tmp/procfile-util_latest.tgz ${PROCFILE_UTIL_URL}
|
||||||
@@ -156,14 +165,19 @@ sigil:
|
|||||||
wget -qO /tmp/sigil_latest.tgz ${SIGIL_URL}
|
wget -qO /tmp/sigil_latest.tgz ${SIGIL_URL}
|
||||||
tar xzf /tmp/sigil_latest.tgz -C /usr/local/bin
|
tar xzf /tmp/sigil_latest.tgz -C /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
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
apt-get install -qq -y curl
|
apt-get -qq -y --no-install-recommends install curl
|
||||||
grep -i -E "^docker" /etc/group || groupadd docker
|
grep -i -E "^docker" /etc/group || groupadd docker
|
||||||
usermod -aG docker dokku
|
usermod -aG docker dokku
|
||||||
ifndef CI
|
ifndef CI
|
||||||
wget -nv -O - https://get.docker.com/ | sh
|
wget -nv -O - https://get.docker.com/ | sh
|
||||||
ifdef DOCKER_VERSION
|
ifdef DOCKER_VERSION
|
||||||
apt-get install -qq -y docker-engine=${DOCKER_VERSION} || (apt-cache madison docker-engine ; exit 1)
|
apt-get -qq -y --no-install-recommends install docker-engine=${DOCKER_VERSION} || (apt-cache madison docker-engine ; exit 1)
|
||||||
endif
|
endif
|
||||||
sleep 2 # give docker a moment i guess
|
sleep 2 # give docker a moment i guess
|
||||||
endif
|
endif
|
||||||
@@ -192,12 +206,6 @@ count:
|
|||||||
@echo "Test lines:"
|
@echo "Test lines:"
|
||||||
@find tests -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
|
@find tests -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
|
||||||
|
|
||||||
dokku-installer:
|
|
||||||
test -f /var/lib/dokku/.dokku-installer-created || python contrib/dokku-installer.py onboot
|
|
||||||
test -f /var/lib/dokku/.dokku-installer-created || service dokku-installer start
|
|
||||||
test -f /var/lib/dokku/.dokku-installer-created || service nginx reload
|
|
||||||
test -f /var/lib/dokku/.dokku-installer-created || touch /var/lib/dokku/.dokku-installer-created
|
|
||||||
|
|
||||||
vagrant-acl-add:
|
vagrant-acl-add:
|
||||||
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
|
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
**Note:** If this PR is just doc changes, please put [ci skip] in the body that way tests do not run.
|
|
||||||
27
README.md
27
README.md
@@ -1,10 +1,10 @@
|
|||||||
# Dokku
|
# Dokku
|
||||||
[](https://circleci.com/gh/dokku/dokku/tree/master)
|
|
||||||
|
[](https://github.com/dokku/dokku/actions?query=workflow%3ACI)
|
||||||
[](https://packagecloud.io/dokku/dokku)
|
[](https://packagecloud.io/dokku/dokku)
|
||||||
[](https://aur.archlinux.org/packages/dokku/)
|
[](https://aur.archlinux.org/packages/dokku/)
|
||||||
[](https://webchat.freenode.net/?channels=dokku)
|
|
||||||
[](https://glider-slackin.herokuapp.com/)
|
[](https://glider-slackin.herokuapp.com/)
|
||||||
[](http://dokku.viewdocs.io/dokku/)
|
[](https://dokku.com/docs/getting-started/installation/)
|
||||||
[](#sponsors)
|
[](#sponsors)
|
||||||
[](#backers)
|
[](#backers)
|
||||||
[](https://www.patreon.com/dokku/)
|
[](https://www.patreon.com/dokku/)
|
||||||
@@ -13,7 +13,7 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
|||||||
|
|
||||||
## Sponsors
|
## Sponsors
|
||||||
|
|
||||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||||
|
|
||||||
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
|
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
|
||||||
@@ -46,7 +46,6 @@ Become a sponsor and get your logo on our README on Github with a link to your s
|
|||||||
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
|
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
|
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
|
||||||
|
|
||||||
|
|
||||||
## Backers
|
## Backers
|
||||||
|
|
||||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
|
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
|
||||||
@@ -86,7 +85,7 @@ Support us with a monthly donation and help us continue our activities. [[Become
|
|||||||
|
|
||||||
A fresh VM running any of the following operating systems:
|
A fresh VM running any of the following operating systems:
|
||||||
|
|
||||||
- Ubuntu 16.04/18.04 x64 - Any currently supported release
|
- Ubuntu 18.04/20.04 x64 - Any currently supported release
|
||||||
- Debian 9+ x64
|
- Debian 9+ x64
|
||||||
- CentOS 7 x64 *(experimental)*
|
- CentOS 7 x64 *(experimental)*
|
||||||
- Arch Linux x64 *(experimental)*
|
- Arch Linux x64 *(experimental)*
|
||||||
@@ -99,29 +98,29 @@ Otherwise, you will need to import the keypair manually after installation using
|
|||||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.20.4/bootstrap.sh
|
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.4/bootstrap.sh
|
||||||
sudo DOKKU_TAG=v0.20.4 bash bootstrap.sh
|
sudo DOKKU_TAG=v0.25.4 bash bootstrap.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||||
|
|
||||||
If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs.
|
If you wish for a more unattended installation method, see [these](https://dokku.com/docs/getting-started/install/debian/#unattended-installation) docs.
|
||||||
|
|
||||||
### Upgrade
|
### Upgrade
|
||||||
|
|
||||||
[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku.
|
[View the docs](https://dokku.com/docs/getting-started/upgrading/) for upgrading from an older version of Dokku.
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Full documentation - including advanced installation docs - are available online at [http://dokku.viewdocs.io/dokku/](http://dokku.viewdocs.io/dokku/).
|
Full documentation - including advanced installation docs - are available online at [https://dokku.com/docs/getting-started/installation/](https://dokku.com/docs/getting-started/installation/).
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku).
|
You can use [GitHub Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](https://dokku.com/docs/getting-started/troubleshooting/) in the documentation, or join us on [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/).
|
||||||
|
|
||||||
## Contribution
|
## Contribution
|
||||||
|
|
||||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
After checking [GitHub Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](https://dokku.com/docs/getting-started/troubleshooting/) or having a chat with us on [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/), feel free to fork and create a Pull Request.
|
||||||
|
|
||||||
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
|
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
|
||||||
|
|
||||||
|
|||||||
19
Vagrantfile
vendored
19
Vagrantfile
vendored
@@ -31,10 +31,12 @@ Vagrant::configure("2") do |config|
|
|||||||
|
|
||||||
config.vm.provider :vmware_fusion do |v, override|
|
config.vm.provider :vmware_fusion do |v, override|
|
||||||
v.vmx["memsize"] = BOX_MEMORY
|
v.vmx["memsize"] = BOX_MEMORY
|
||||||
|
v.ssh_info_public = true
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provider :vmware_desktop do |v, override|
|
config.vm.provider :vmware_desktop do |v, override|
|
||||||
v.vmx["memsize"] = BOX_MEMORY
|
v.vmx["memsize"] = BOX_MEMORY
|
||||||
|
v.ssh_info_public = true
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "empty", autostart: false
|
config.vm.define "empty", autostart: false
|
||||||
@@ -53,8 +55,7 @@ Vagrant::configure("2") do |config|
|
|||||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||||
end
|
end
|
||||||
|
|
||||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git >/dev/null && cd /root/dokku && #{make_cmd}"
|
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git build-essential >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
|
||||||
vm.vm.provision :shell do |s|
|
vm.vm.provision :shell do |s|
|
||||||
s.inline = <<-EOT
|
s.inline = <<-EOT
|
||||||
echo '"\e[5~": history-search-backward' > /root/.inputrc
|
echo '"\e[5~": history-search-backward' > /root/.inputrc
|
||||||
@@ -63,6 +64,10 @@ Vagrant::configure("2") do |config|
|
|||||||
echo 'set completion-ignore-case on' >> /root/.inputrc
|
echo 'set completion-ignore-case on' >> /root/.inputrc
|
||||||
EOT
|
EOT
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||||
|
vm.vm.provision :shell, :inline => "echo 'Importing ssh key into dokku' && cat /root/.ssh/authorized_keys | dokku ssh-keys:add admin"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# For windows users. Sharing folder from windows creates problem with sym links and so, sync the repo instead from GOS.
|
# For windows users. Sharing folder from windows creates problem with sym links and so, sync the repo instead from GOS.
|
||||||
@@ -70,7 +75,7 @@ Vagrant::configure("2") do |config|
|
|||||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||||
vm.vm.network :private_network, ip: DOKKU_IP
|
vm.vm.network :private_network, ip: DOKKU_IP
|
||||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git dos2unix >/dev/null"
|
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git dos2unix >/dev/null"
|
||||||
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && dos2unix bootstrap.sh && bash bootstrap.sh"
|
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && dos2unix bootstrap.sh && bash bootstrap.sh"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -96,14 +101,16 @@ Vagrant::configure("2") do |config|
|
|||||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||||
vm.vm.network :private_network, ip: DOKKU_IP
|
vm.vm.network :private_network, ip: DOKKU_IP
|
||||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git >/dev/null && cd /root/dokku && #{make_cmd}"
|
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||||
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all rpm-all"
|
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all rpm-all"
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "build-arch", autostart: false do |vm|
|
config.vm.define "build-arch", autostart: false do |vm|
|
||||||
vm.vm.box = "bugyt/archlinux"
|
vm.vm.box = "bugyt/archlinux"
|
||||||
vm.vm.synced_folder File.dirname(__FILE__), "/dokku"
|
vm.vm.synced_folder File.dirname(__FILE__), "/dokku"
|
||||||
vm.vm.synced_folder "#{File.dirname(__FILE__)}/../dokku-arch", "/dokku-arch"
|
if Pathname.new("#{File.dirname(__FILE__)}/../dokku-arch").exist?
|
||||||
|
vm.vm.synced_folder "#{File.dirname(__FILE__)}/../dokku-arch", "/dokku-arch"
|
||||||
|
end
|
||||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||||
vm.vm.network :private_network, ip: DOKKU_IP
|
vm.vm.network :private_network, ip: DOKKU_IP
|
||||||
@@ -112,6 +119,6 @@ Vagrant::configure("2") do |config|
|
|||||||
|
|
||||||
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||||
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
|
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
|
||||||
config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
|
config.vm.provision :shell, :inline => "echo 'Copying ssh key into vm' && rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
60
bootstrap.sh
60
bootstrap.sh
@@ -3,16 +3,16 @@ set -eo pipefail
|
|||||||
[[ $TRACE ]] && set -x
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
# A script to bootstrap dokku.
|
# A script to bootstrap dokku.
|
||||||
# It expects to be run on Ubuntu 16.04/18.04, or CentOS 7 via 'sudo'
|
# It expects to be run on Ubuntu 18.04/20.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)
|
# 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.
|
# It checks out the dokku source code from GitHub into ~/dokku and then runs 'make install' from dokku source.
|
||||||
|
|
||||||
# We wrap this whole script in functions, so that we won't execute
|
# We wrap this whole script in functions, so that we won't execute
|
||||||
# until the entire script is downloaded.
|
# until the entire script is downloaded.
|
||||||
# That's good because it prevents our output overlapping with wget's.
|
# That's good because it prevents our output overlapping with wget's.
|
||||||
# It also means that we can't run a partially downloaded script.
|
# It also means that we can't run a partially downloaded script.
|
||||||
|
|
||||||
SUPPORTED_VERSIONS="Debian [9, 10], CentOS [7], Ubuntu [16.04, 18.04]"
|
SUPPORTED_VERSIONS="Debian [9, 10, 11], CentOS [7], Fedora (partial) [33, 34], Ubuntu [18.04, 20.04]"
|
||||||
|
|
||||||
log-fail() {
|
log-fail() {
|
||||||
declare desc="log fail formatter"
|
declare desc="log fail formatter"
|
||||||
@@ -22,7 +22,11 @@ log-fail() {
|
|||||||
|
|
||||||
ensure-environment() {
|
ensure-environment() {
|
||||||
local FREE_MEMORY
|
local FREE_MEMORY
|
||||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
if [[ -z "$DOKKU_TAG" ]]; then
|
||||||
|
echo "Preparing to install $DOKKU_REPO..."
|
||||||
|
else
|
||||||
|
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||||
|
fi
|
||||||
|
|
||||||
hostname -f >/dev/null 2>&1 || {
|
hostname -f >/dev/null 2>&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"
|
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"
|
||||||
@@ -31,7 +35,7 @@ ensure-environment() {
|
|||||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||||
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
||||||
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
||||||
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory"
|
echo "If necessary, please consult this document to setup swap: https://dokku.com/docs/getting-started/advanced-installation/#vms-with-less-than-1-gb-of-memory"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,15 +44,23 @@ install-requirements() {
|
|||||||
|
|
||||||
case "$DOKKU_DISTRO" in
|
case "$DOKKU_DISTRO" in
|
||||||
debian)
|
debian)
|
||||||
|
if ! dpkg -l | grep -q gpg-agent; then
|
||||||
|
apt-get update -qq >/dev/null
|
||||||
|
apt-get -qq -y --no-install-recommends install gpg-agent
|
||||||
|
fi
|
||||||
if ! dpkg -l | grep -q software-properties-common; then
|
if ! dpkg -l | grep -q software-properties-common; then
|
||||||
apt-get update -qq >/dev/null
|
apt-get update -qq >/dev/null
|
||||||
apt-get -qq -y install software-properties-common
|
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
ubuntu)
|
ubuntu)
|
||||||
|
if ! dpkg -l | grep -q gpg-agent; then
|
||||||
|
apt-get update -qq >/dev/null
|
||||||
|
apt-get -qq -y --no-install-recommends install gpg-agent
|
||||||
|
fi
|
||||||
if ! dpkg -l | grep -q software-properties-common; then
|
if ! dpkg -l | grep -q software-properties-common; then
|
||||||
apt-get update -qq >/dev/null
|
apt-get update -qq >/dev/null
|
||||||
apt-get -qq -y install software-properties-common
|
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add-apt-repository universe >/dev/null
|
add-apt-repository universe >/dev/null
|
||||||
@@ -58,6 +70,16 @@ install-requirements() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install-dokku() {
|
install-dokku() {
|
||||||
|
if ! command -v dokku &>/dev/null; then
|
||||||
|
echo "--> Note: Installing dokku for the first time will result in removal of"
|
||||||
|
echo " files in the nginx 'sites-enabled' directory. Please manually"
|
||||||
|
echo " restore any files that may be removed after the installation and"
|
||||||
|
echo " web setup is complete."
|
||||||
|
echo ""
|
||||||
|
echo " Installation will continue in 10 seconds."
|
||||||
|
sleep 10
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $DOKKU_BRANCH ]]; then
|
if [[ -n $DOKKU_BRANCH ]]; then
|
||||||
install-dokku-from-source "origin/$DOKKU_BRANCH"
|
install-dokku-from-source "origin/$DOKKU_BRANCH"
|
||||||
elif [[ -n $DOKKU_TAG ]]; then
|
elif [[ -n $DOKKU_TAG ]]; then
|
||||||
@@ -97,10 +119,10 @@ install-dokku-from-source() {
|
|||||||
local DOKKU_CHECKOUT="$1"
|
local DOKKU_CHECKOUT="$1"
|
||||||
|
|
||||||
if ! command -v apt-get &>/dev/null; then
|
if ! command -v apt-get &>/dev/null; then
|
||||||
log-fail "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
log-fail "This installation script requires apt-get. For manual installation instructions, consult https://dokku.com/docs/getting-started/advanced-installation/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get -qq -y install git make software-properties-common
|
apt-get -qq -y --no-install-recommends install sudo git make software-properties-common
|
||||||
cd /root
|
cd /root
|
||||||
if [[ ! -d /root/dokku ]]; then
|
if [[ ! -d /root/dokku ]]; then
|
||||||
git clone "$DOKKU_REPO" /root/dokku
|
git clone "$DOKKU_REPO" /root/dokku
|
||||||
@@ -117,11 +139,11 @@ install-dokku-from-package() {
|
|||||||
debian | ubuntu)
|
debian | ubuntu)
|
||||||
install-dokku-from-deb-package "$@"
|
install-dokku-from-deb-package "$@"
|
||||||
;;
|
;;
|
||||||
centos | rhel)
|
centos | fedora | rhel)
|
||||||
install-dokku-from-rpm-package "$@"
|
install-dokku-from-rpm-package "$@"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
log-fail "Unsupported Linux distribution. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
log-fail "Unsupported Linux distribution. For manual installation instructions, consult https://dokku.com/docs/getting-started/advanced-installation/"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -141,7 +163,7 @@ install-dokku-from-deb-package() {
|
|||||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||||
local OS_ID
|
local OS_ID
|
||||||
|
|
||||||
if ! in-array "$DOKKU_DISTRO_VERSION" "16.04" "18.04" "9" "10"; then
|
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "9" "10" "11"; then
|
||||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -151,13 +173,14 @@ install-dokku-from-deb-package() {
|
|||||||
|
|
||||||
echo "--> Initial apt-get update"
|
echo "--> Initial apt-get update"
|
||||||
apt-get update -qq >/dev/null
|
apt-get update -qq >/dev/null
|
||||||
apt-get -qq -y install apt-transport-https
|
apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||||
|
|
||||||
if ! command -v docker &>/dev/null; then
|
if ! command -v docker &>/dev/null; then
|
||||||
echo "--> Installing docker"
|
echo "--> Installing docker"
|
||||||
if uname -r | grep -q linode; then
|
if uname -r | grep -q linode; then
|
||||||
echo "--> NOTE: Using Linode? Docker may complain about missing AUFS support."
|
echo "--> NOTE: Using Linode? Docker may complain about missing AUFS support."
|
||||||
echo " You can safely ignore this warning."
|
echo " You can safely ignore this warning."
|
||||||
|
echo ""
|
||||||
echo " Installation will continue in 10 seconds."
|
echo " Installation will continue in 10 seconds."
|
||||||
sleep 10
|
sleep 10
|
||||||
fi
|
fi
|
||||||
@@ -172,14 +195,14 @@ install-dokku-from-deb-package() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$DOKKU_DISTRO" == "ubuntu" ]]; then
|
if [[ "$DOKKU_DISTRO" == "ubuntu" ]]; then
|
||||||
OS_IDS=("xenial" "bionic")
|
OS_IDS=("bionic" "focal")
|
||||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||||
OS_ID="bionic"
|
OS_ID="bionic"
|
||||||
fi
|
fi
|
||||||
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||||
OS_IDS=("stretch" "buster")
|
OS_IDS=("stretch" "buster" "bullseye")
|
||||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||||
OS_ID="buster"
|
OS_ID="bullseye"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -189,7 +212,6 @@ install-dokku-from-deb-package() {
|
|||||||
apt-get update -qq >/dev/null
|
apt-get update -qq >/dev/null
|
||||||
|
|
||||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
|
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
|
||||||
[[ -n $DOKKU_WEB_CONFIG ]] && echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | sudo debconf-set-selections
|
|
||||||
[[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections
|
[[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections
|
||||||
[[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections
|
[[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections
|
||||||
[[ -n $DOKKU_KEY_FILE ]] && echo "dokku dokku/key_file string $DOKKU_KEY_FILE" | sudo debconf-set-selections
|
[[ -n $DOKKU_KEY_FILE ]] && echo "dokku dokku/key_file string $DOKKU_KEY_FILE" | sudo debconf-set-selections
|
||||||
@@ -246,6 +268,10 @@ main() {
|
|||||||
ensure-environment
|
ensure-environment
|
||||||
install-requirements
|
install-requirements
|
||||||
install-dokku
|
install-dokku
|
||||||
|
|
||||||
|
if [[ -f /etc/update-motd.d/99-dokku ]]; then
|
||||||
|
/etc/update-motd.d/99-dokku || true
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
17
common.mk
17
common.mk
@@ -1,6 +1,9 @@
|
|||||||
GO_ARGS ?= -a
|
GO_ARGS ?=
|
||||||
|
GO_PLUGIN_MAKE_TARGET ?= build
|
||||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||||
BUILD_IMAGE := golang:1.12
|
BUILD_IMAGE := golang:1.15.6
|
||||||
|
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
||||||
|
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||||
|
|
||||||
.PHONY: build-in-docker build clean src-clean
|
.PHONY: build-in-docker build clean src-clean
|
||||||
|
|
||||||
@@ -10,14 +13,16 @@ build-in-docker: clean
|
|||||||
mkdir -p /tmp/dokku-go-build-cache
|
mkdir -p /tmp/dokku-go-build-cache
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
||||||
-v /tmp/dokku-go-build-cache:/root/.cache/go-build \
|
-v $(GO_BUILD_CACHE):/root/.cache \
|
||||||
|
-v $(GO_MOD_CACHE):/go/pkg/mod \
|
||||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||||
|
-e GO111MODULE=on \
|
||||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||||
$(BUILD_IMAGE) \
|
$(BUILD_IMAGE) \
|
||||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
|
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf commands subcommands triggers prop
|
rm -rf $(BUILD)
|
||||||
find . -xtype l -delete
|
find . -xtype l -delete
|
||||||
|
|
||||||
commands: **/**/commands.go
|
commands: **/**/commands.go
|
||||||
@@ -31,7 +36,7 @@ subcommands/%:
|
|||||||
ln -sf subcommands $@
|
ln -sf subcommands $@
|
||||||
|
|
||||||
src-clean:
|
src-clean:
|
||||||
rm -rf .gitignore src vendor Makefile *.go glide.*
|
rm -rf .gitignore src vendor Makefile *.go glide.* go.sum go.mod
|
||||||
|
|
||||||
triggers:
|
triggers:
|
||||||
go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
|
go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
|
||||||
|
|||||||
@@ -2,5 +2,5 @@ FROM ubuntu:18.04
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM dokku/build-base:0.0.1
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
|
||||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
|
||||||
|
|
||||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
|
||||||
|
|
||||||
WORKDIR ${WORKDIR}
|
|
||||||
|
|
||||||
COPY . ${WORKDIR}
|
|
||||||
|
|
||||||
RUN make deb-dokku-update rpm-dokku-update
|
|
||||||
|
|
||||||
RUN ls -lha /tmp/
|
|
||||||
@@ -2,7 +2,7 @@ FROM dokku/build-base:0.0.1
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||||
|
|
||||||
ARG GOLANG_VERSION
|
ARG GOLANG_VERSION
|
||||||
@@ -35,7 +35,6 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
|||||||
IS_RELEASE=${IS_RELEASE} \
|
IS_RELEASE=${IS_RELEASE} \
|
||||||
SKIP_GO_CLEAN=true \
|
SKIP_GO_CLEAN=true \
|
||||||
make version copyfiles \
|
make version copyfiles \
|
||||||
&& make deb-dokku deb-sigil \
|
&& make deb-dokku rpm-dokku
|
||||||
rpm-dokku rpm-sigil
|
|
||||||
|
|
||||||
RUN ls -lha /tmp/
|
RUN ls -lha /tmp/
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
FROM dokku/build-base:0.0.1
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
|
||||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
|
||||||
|
|
||||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
|
||||||
|
|
||||||
WORKDIR ${WORKDIR}
|
|
||||||
|
|
||||||
COPY . ${WORKDIR}
|
|
||||||
|
|
||||||
RUN make deb-herokuish rpm-herokuish
|
|
||||||
|
|
||||||
RUN ls -lha /tmp/
|
|
||||||
@@ -16,7 +16,7 @@ def download_file(filename, url):
|
|||||||
|
|
||||||
def upload_file(filename):
|
def upload_file(filename):
|
||||||
versions = [
|
versions = [
|
||||||
"xenial"
|
"focal"
|
||||||
]
|
]
|
||||||
cmd_template = "package_cloud push dokku/dokku/ubuntu/{0} {1}"
|
cmd_template = "package_cloud push dokku/dokku/ubuntu/{0} {1}"
|
||||||
for version in versions:
|
for version in versions:
|
||||||
|
|||||||
@@ -1,426 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import cgi
|
|
||||||
import json
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
try:
|
|
||||||
import SimpleHTTPServer
|
|
||||||
import SocketServer
|
|
||||||
except ImportError:
|
|
||||||
import http.server as SimpleHTTPServer
|
|
||||||
import socketserver as SocketServer
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
import threading
|
|
||||||
|
|
||||||
VERSION = 'v0.20.4'
|
|
||||||
|
|
||||||
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 = bytes_to_string(subprocess.check_output(command, shell=True))
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
key_file = os.getenv('KEY_FILE', None)
|
|
||||||
if os.path.isfile('/home/ec2-user/.ssh/authorized_keys'):
|
|
||||||
key_file = '/home/ec2-user/.ssh/authorized_keys'
|
|
||||||
elif os.path.isfile('/home/ubuntu/.ssh/authorized_keys'):
|
|
||||||
key_file = '/home/ubuntu/.ssh/authorized_keys'
|
|
||||||
else:
|
|
||||||
key_file = '/root/.ssh/authorized_keys'
|
|
||||||
|
|
||||||
admin_keys = []
|
|
||||||
if os.path.isfile(key_file):
|
|
||||||
try:
|
|
||||||
command = "cat {0}".format(key_file)
|
|
||||||
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 = 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_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:
|
|
||||||
f.write("start on runlevel [2345]\n")
|
|
||||||
f.write("exec {0} selfdestruct\n".format(os.path.abspath(__file__)))
|
|
||||||
if os.path.exists(systemd_dir):
|
|
||||||
with open('{0}/dokku-installer.service'.format(systemd_dir), 'w') as f:
|
|
||||||
f.write("[Unit]\n")
|
|
||||||
f.write("Description=Dokku web-installer\n")
|
|
||||||
f.write("\n")
|
|
||||||
f.write("[Service]\n")
|
|
||||||
f.write("ExecStart={0} selfdestruct\n".format(os.path.abspath(__file__)))
|
|
||||||
f.write("\n")
|
|
||||||
f.write("[Install]\n")
|
|
||||||
f.write("WantedBy=multi-user.target\n")
|
|
||||||
f.write("WantedBy=graphical.target\n")
|
|
||||||
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")
|
|
||||||
f.write(" location / {\n")
|
|
||||||
f.write(" proxy_pass http://dokku-installer;\n")
|
|
||||||
f.write(" }\n")
|
|
||||||
f.write("}\n")
|
|
||||||
|
|
||||||
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)
|
|
||||||
content = content.replace('{HOSTNAME}', hostname)
|
|
||||||
content = content.replace('{AUTHORIZED_KEYS_LOCATION}', key_file)
|
|
||||||
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
|
|
||||||
self.send_response(200)
|
|
||||||
self.end_headers()
|
|
||||||
self.write_content(content)
|
|
||||||
|
|
||||||
def do_POST(self):
|
|
||||||
if self.path not in ['/setup', '/setup/']:
|
|
||||||
return
|
|
||||||
|
|
||||||
params = cgi.FieldStorage(fp=self.rfile,
|
|
||||||
headers=self.headers,
|
|
||||||
environ={
|
|
||||||
'REQUEST_METHOD': 'POST',
|
|
||||||
'CONTENT_TYPE': self.headers['Content-Type']})
|
|
||||||
|
|
||||||
vhost_enable = 'false'
|
|
||||||
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
|
|
||||||
if 'vhost' in params and params['vhost'].value == 'true':
|
|
||||||
vhost_enable = 'true'
|
|
||||||
with open('{0}/VHOST'.format(dokku_root), 'w') as f:
|
|
||||||
f.write(params['hostname'].value)
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
os.remove('{0}/VHOST'.format(dokku_root))
|
|
||||||
except OSError:
|
|
||||||
pass
|
|
||||||
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
|
|
||||||
f.write(params['hostname'].value)
|
|
||||||
|
|
||||||
for (index, key) in enumerate(params['keys'].value.splitlines(), 1):
|
|
||||||
user = 'admin'
|
|
||||||
if self.admin_user_exists() is not None:
|
|
||||||
user = 'web-admin'
|
|
||||||
if self.web_admin_user_exists() is not None:
|
|
||||||
index = int(self.web_admin_user_exists()) + 1
|
|
||||||
elif self.web_admin_user_exists() is None:
|
|
||||||
index = 1
|
|
||||||
elif self.admin_user_exists() is None:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
index = int(self.admin_user_exists()) + 1
|
|
||||||
user = user + str(index)
|
|
||||||
command = ['sshcommand', 'acl-add', 'dokku', user]
|
|
||||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
|
||||||
try:
|
|
||||||
proc.stdin.write(key)
|
|
||||||
except TypeError:
|
|
||||||
proc.stdin.write(string_to_bytes(key))
|
|
||||||
proc.stdin.close()
|
|
||||||
proc.wait()
|
|
||||||
|
|
||||||
set_debconf_selection('boolean', 'nginx_enable', 'true')
|
|
||||||
set_debconf_selection('boolean', 'skip_key_file', 'true')
|
|
||||||
set_debconf_selection('boolean', 'vhost_enable', vhost_enable)
|
|
||||||
set_debconf_selection('boolean', 'web_config', 'false')
|
|
||||||
set_debconf_selection('string', 'hostname', params['hostname'].value)
|
|
||||||
|
|
||||||
if 'selfdestruct' in sys.argv:
|
|
||||||
DeleteInstallerThread()
|
|
||||||
|
|
||||||
content = json.dumps({'status': 'ok'})
|
|
||||||
|
|
||||||
self.send_response(200)
|
|
||||||
self.end_headers()
|
|
||||||
self.write_content(content)
|
|
||||||
|
|
||||||
def web_admin_user_exists(self):
|
|
||||||
return self.user_exists('web-admin(\d+)')
|
|
||||||
|
|
||||||
def admin_user_exists(self):
|
|
||||||
return self.user_exists('admin(\d+)')
|
|
||||||
|
|
||||||
def user_exists(self, name):
|
|
||||||
command = 'dokku ssh-keys:list'
|
|
||||||
pattern = re.compile(r'NAME="' + name + '"')
|
|
||||||
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
|
|
||||||
max_num = 0
|
|
||||||
exists = False
|
|
||||||
for line in proc.stdout:
|
|
||||||
m = pattern.search(bytes_to_string(line))
|
|
||||||
if m:
|
|
||||||
# User of the form `user` or `user#` exists
|
|
||||||
exists = True
|
|
||||||
max_num = max(max_num, int(m.group(1)))
|
|
||||||
if exists:
|
|
||||||
return max_num
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def set_debconf_selection(debconf_type, key, value):
|
|
||||||
found = False
|
|
||||||
with open('/etc/os-release', 'r') as f:
|
|
||||||
for line in f:
|
|
||||||
if 'debian' in line:
|
|
||||||
found = True
|
|
||||||
|
|
||||||
if not found:
|
|
||||||
return
|
|
||||||
|
|
||||||
ps = subprocess.Popen(['echo', 'dokku dokku/{0} {1} {2}'.format(
|
|
||||||
key, debconf_type, value
|
|
||||||
)], stdout=subprocess.PIPE)
|
|
||||||
|
|
||||||
try:
|
|
||||||
subprocess.check_output(['debconf-set-selections'], stdin=ps.stdout)
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
ps.wait()
|
|
||||||
|
|
||||||
|
|
||||||
class DeleteInstallerThread(object):
|
|
||||||
def __init__(self, interval=1):
|
|
||||||
thread = threading.Thread(target=self.run, args=())
|
|
||||||
thread.daemon = True
|
|
||||||
thread.start()
|
|
||||||
|
|
||||||
def run(self):
|
|
||||||
command = "rm {0}/conf.d/dokku-installer.conf && {1} stop && {1} start".format(nginx_dir, nginx_init)
|
|
||||||
try:
|
|
||||||
subprocess.call(command, shell=True)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && (stop dokku-installer || systemctl stop dokku-installer.service)"
|
|
||||||
try:
|
|
||||||
subprocess.call(command, shell=True)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
check_boot()
|
|
||||||
|
|
||||||
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))
|
|
||||||
httpd.serve_forever()
|
|
||||||
|
|
||||||
|
|
||||||
PAGE = """
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title>Dokku Setup</title>
|
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
|
||||||
<style>
|
|
||||||
.bd-callout {
|
|
||||||
padding: 1.25rem;
|
|
||||||
margin-top: 1.25rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
border: 1px solid #eee;
|
|
||||||
border-left-width: .25rem;
|
|
||||||
border-radius: .25rem;
|
|
||||||
}
|
|
||||||
.bd-callout p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.bd-callout-info {
|
|
||||||
border-left-color: #5bc0de;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
font-size: 80%;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
h1 small {
|
|
||||||
font-size: 50%;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
.container {
|
|
||||||
width: 640px;
|
|
||||||
}
|
|
||||||
.result {
|
|
||||||
padding-left: 20px;
|
|
||||||
}
|
|
||||||
input.form-control, textarea.form-control {
|
|
||||||
background-color: #fafbfc;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
input.form-control::placeholder, textarea.form-control::placeholder {
|
|
||||||
color: #adb2b8
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
|
||||||
<form id="form" role="form">
|
|
||||||
<h1 class="pt-3">Dokku Setup <small class="text-muted">{VERSION}</small></h1>
|
|
||||||
<div class="alert alert-warning small" role="alert">
|
|
||||||
<strong>Warning:</strong> The SSH key filled out here can grant root access to the server. Please complete the setup as soon as possible.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<h3>Admin Access</h3>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="key">Public SSH Keys</label><br />
|
|
||||||
<textarea class="form-control" name="keys" rows="5" id="key" placeholder="Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'">{ADMIN_KEYS}</textarea>
|
|
||||||
<small class="form-text text-muted">Public keys allow users to ssh onto the server as the <code>dokku</code> user, as well as remotely execute Dokku commands. They are currently auto-populated from: <code>{AUTHORIZED_KEYS_LOCATION}</code>, and can be changed later via the <a href="http://dokku.viewdocs.io/dokku/deployment/user-management/" target="_blank"><code>dokku ssh-keys</code></a> plugin.</small>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<h3>Hostname Configuration</h3>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="hostname">Hostname</label>
|
|
||||||
<input class="form-control" type="text" id="hostname" name="hostname" value="{HOSTNAME}" placeholder="A hostname or ip address such as {HOSTNAME}" />
|
|
||||||
<small class="form-text text-muted">This will be used as the default host for all applications, and can be changed later via the <a href="http://dokku.viewdocs.io/dokku/configuration/domains/" target="_blank"><code>dokku domains:set-global</code></a> command.</small>
|
|
||||||
</div>
|
|
||||||
<div class="form-check">
|
|
||||||
<input class="form-check-input" type="checkbox" id="vhost" name="vhost" value="true">
|
|
||||||
<label class="form-check-label" for="vhost">Use virtualhost naming for apps</label>
|
|
||||||
<small class="form-text text-muted">When enabled, Nginx will be run on port 80 and proxy requests to apps based on hostname.</small>
|
|
||||||
<small class="form-text text-muted">When disabled, a specific port will be setup for each application on first deploy, and requests to that port will be proxied to the relevant app.</small>
|
|
||||||
</div>
|
|
||||||
<div class="alert alert-warning small mt-3 d-{UFW_DISPLAY}" role="alert">
|
|
||||||
<strong>Warning:</strong> UFW is active. To allow traffic to specific ports, run <code>sudo ufw allow PORT</code> for the port in question.
|
|
||||||
</div>
|
|
||||||
<div class="bd-callout bd-callout-info">
|
|
||||||
<h5>What will app URLs look like?</h5>
|
|
||||||
<pre><code id="example">http://hostname:port</code></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span class="result"></span>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="error-output"></div>
|
|
||||||
<script>
|
|
||||||
var $ = document.querySelector.bind(document)
|
|
||||||
|
|
||||||
function setup() {
|
|
||||||
if ($("#key").value.trim() == "") {
|
|
||||||
alert("Your admin public key cannot be blank.")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ($("#hostname").value.trim() == "") {
|
|
||||||
alert("Your hostname cannot be blank.")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
var data = new FormData($("#form"))
|
|
||||||
|
|
||||||
var inputs = [].slice.call(document.querySelectorAll("input, textarea, button"))
|
|
||||||
inputs.forEach(function (input) {
|
|
||||||
input.disabled = true
|
|
||||||
})
|
|
||||||
|
|
||||||
var result = $(".result")
|
|
||||||
fetch("/setup", {method: "POST", body: data})
|
|
||||||
.then(function(response) {
|
|
||||||
if (response.ok) {
|
|
||||||
return response.json()
|
|
||||||
} else {
|
|
||||||
throw new Error('Server returned error')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.then(function(response) {
|
|
||||||
result.classList.add("text-success");
|
|
||||||
result.textContent = "Success! Redirecting in 3 seconds. .."
|
|
||||||
setTimeout(function() {
|
|
||||||
window.location.href = "http://dokku.viewdocs.io/dokku~{VERSION}/deployment/application-deployment/";
|
|
||||||
}, 3000);
|
|
||||||
})
|
|
||||||
.catch(function (error) {
|
|
||||||
result.classList.add("text-danger");
|
|
||||||
result.textContent = "Could not send the request"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function update() {
|
|
||||||
if ($("#vhost").matches(":checked") && $("#hostname").value.match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
|
|
||||||
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
|
||||||
$("#vhost").checked = false;
|
|
||||||
}
|
|
||||||
if ($("#vhost").matches(':checked')) {
|
|
||||||
$("#example").textContent = "http://<app-name>."+$("#hostname").value
|
|
||||||
} else {
|
|
||||||
$("#example").textContent = "http://"+$("#hostname").value+":<app-port>"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$("#vhost").addEventListener("change", update);
|
|
||||||
$("#hostname").addEventListener("input", update);
|
|
||||||
update();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
"""
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
main()
|
|
||||||
@@ -1,112 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -eo pipefail
|
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
if [[ -r /etc/default/dokku ]]; then
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
source /etc/default/dokku
|
|
||||||
fi
|
|
||||||
|
|
||||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
|
||||||
if [[ -f "$DOKKU_ROOT/dokkurc" ]]; then
|
|
||||||
if [[ -r $DOKKU_ROOT/dokkurc ]]; then
|
|
||||||
source "$DOKKU_ROOT/dokkurc"
|
|
||||||
else
|
|
||||||
echo "Unable to read $DOKKU_ROOT/dokkurc for sourcing" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [[ -d $DOKKU_ROOT/.dokkurc ]]; then
|
|
||||||
for f in $DOKKU_ROOT/.dokkurc/*; do
|
|
||||||
if [[ -r "$f" ]]; then
|
|
||||||
source "$f"
|
|
||||||
else
|
|
||||||
echo "Unable to read $f for sourcing" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
|
||||||
|
|
||||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
|
||||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
|
||||||
export PLUGIN_ENABLED_PATH=${PLUGIN_ENABLED_PATH:="$PLUGIN_PATH/enabled"}
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
dokku-log-info() {
|
|
||||||
declare desc="log info formatter"
|
|
||||||
echo "-----> $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
dokku-log-verbose() {
|
|
||||||
declare desc="log verbose formatter"
|
|
||||||
echo " $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
dokku-log-warn() {
|
|
||||||
declare desc="log warning formatter"
|
|
||||||
echo " ! $*" 1>&2
|
|
||||||
}
|
|
||||||
|
|
||||||
dokku-update-plugin() {
|
|
||||||
declare PLUGIN_NAME="$1"
|
|
||||||
if [[ -d "$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/.git" ]]; then
|
|
||||||
dokku-log-verbose "Updating $PLUGIN_NAME"
|
|
||||||
dokku plugin:update "$PLUGIN_NAME"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
declare COMMAND="$1"
|
|
||||||
local DOKKU_DISTRO PLUGIN_NAME VERSION
|
|
||||||
|
|
||||||
if [[ -f "/etc/os-release" ]]; then
|
|
||||||
# shellcheck disable=SC1091
|
|
||||||
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$COMMAND" == "version" ]] || [[ "$COMMAND" == "-v" ]]; then
|
|
||||||
VERSION=UNRELEASED
|
|
||||||
if [[ -f "/var/lib/dokku-update/VERSION" ]]; then
|
|
||||||
VERSION="$(cat /var/lib/dokku-update/VERSION)"
|
|
||||||
fi
|
|
||||||
echo "dokku-update ${VERSION}"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
dokku-log-info "Running system updates"
|
|
||||||
case "$DOKKU_DISTRO" in
|
|
||||||
arch)
|
|
||||||
yaourt -Syyua
|
|
||||||
;;
|
|
||||||
debian | ubuntu)
|
|
||||||
apt-get update -qq >/dev/null
|
|
||||||
apt-get -qq -y --force-yes dist-upgrade
|
|
||||||
;;
|
|
||||||
centos | opensuse | rhel)
|
|
||||||
dokku-log-warn "Updating this operating system is not supported"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
dokku-log-warn "Updating this operating system is not supported"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# update all plugins
|
|
||||||
dokku-log-info "Updating all plugins"
|
|
||||||
for PLUGIN_NAME in $(dokku plugin:list | grep enabled | awk '$1=$1' | cut -d' ' -f1); do
|
|
||||||
dokku-update-plugin "$PLUGIN_NAME"
|
|
||||||
done
|
|
||||||
dokku plugin:install
|
|
||||||
|
|
||||||
# rebuild all applications
|
|
||||||
dokku-log-info "Rebuilding all applications"
|
|
||||||
dokku ps:rebuildall
|
|
||||||
|
|
||||||
dokku-log-info "Waiting for old containers to stop"
|
|
||||||
sleep 120
|
|
||||||
dokku-log-info "Cleaning up"
|
|
||||||
dokku cleanup --global
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -32,8 +32,8 @@ fn-random-name() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn-client-help-msg() {
|
fn-client-help-msg() {
|
||||||
echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" 1>&2
|
echo "=====> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku"
|
||||||
echo "--> i.e. git remote add dokku dokku@<dokku-host>:<app-name>" 1>&2
|
echo " i.e. git remote add dokku dokku@<dokku-host>:<app-name>"
|
||||||
exit 20 # exit with specific status. only used in units tests for now
|
exit 20 # exit with specific status. only used in units tests for now
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,6 +72,9 @@ main() {
|
|||||||
skip=false
|
skip=false
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
is_flag=false
|
||||||
|
|
||||||
|
[[ "$arg" =~ ^--.* ]] && is_flag=true
|
||||||
|
|
||||||
if [[ "$arg" == "--app" ]]; then
|
if [[ "$arg" == "--app" ]]; then
|
||||||
APP=${args[$next_index]}
|
APP=${args[$next_index]}
|
||||||
@@ -82,10 +85,10 @@ main() {
|
|||||||
skip=true
|
skip=true
|
||||||
shift 2
|
shift 2
|
||||||
elif [[ "$arg" =~ ^--.* ]]; then
|
elif [[ "$arg" =~ ^--.* ]]; then
|
||||||
[[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break
|
[[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]] && APP_ARG="$arg" && break
|
||||||
[[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x
|
[[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x
|
||||||
else
|
else
|
||||||
if [[ "$cmd_set" == "true" ]]; then
|
if [[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]]; then
|
||||||
APP_ARG="$arg"
|
APP_ARG="$arg"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@@ -104,18 +107,18 @@ main() {
|
|||||||
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||||
set -e
|
set -e
|
||||||
else
|
else
|
||||||
echo "This is not a git repository"
|
echo " ! This is not a git repository" 1>&2
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$CMD" in
|
case "$CMD" in
|
||||||
apps:create)
|
apps:create)
|
||||||
if [[ -z "$APP_ARG" ]]; then
|
if [[ -z "$APP" ]] && [[ -z "$APP_ARG" ]]; then
|
||||||
APP=$(fn-random-name)
|
APP=$(fn-random-name)
|
||||||
counter=0
|
counter=0
|
||||||
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null | grep -q "$APP"; do
|
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null | grep -q "$APP"; do
|
||||||
if [[ $counter -ge 100 ]]; then
|
if [[ $counter -ge 100 ]]; then
|
||||||
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
|
echo " ! Could not reasonably generate a new app name. Try cleaning up some apps..." 1>&2
|
||||||
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps
|
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
@@ -123,14 +126,14 @@ main() {
|
|||||||
counter=$((counter + 1))
|
counter=$((counter + 1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
else
|
elif [[ -z "$APP" ]]; then
|
||||||
APP="$APP_ARG"
|
APP="$APP_ARG"
|
||||||
fi
|
fi
|
||||||
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then
|
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then
|
||||||
echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}"
|
echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}"
|
||||||
echo "-----> Application name is ${APP}"
|
echo "-----> Application name is ${APP}"
|
||||||
else
|
else
|
||||||
echo "! Dokku remote not added! Do you already have a dokku remote?"
|
echo " ! Dokku remote not added! Do you already have a dokku remote?" 1>&2
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
@@ -140,13 +143,18 @@ main() {
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
[[ " apps certs help ls nginx shell storage trace version " == *" $CMD "* ]] && unset APP
|
[[ " apps certs help ls nginx shell storage trace version " == *" $CMD "* ]] && unset APP
|
||||||
[[ " certs:chain domains:add-global domains:remove-global domains:set-global ps:rebuildall ps:restartall ps:restore ps:startall ps:stopall " == *" $CMD "* ]] && unset APP
|
[[ " certs:chain domains:add-global domains:remove-global domains:set-global ps:restore " == *" $CMD "* ]] && unset APP
|
||||||
[[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP
|
[[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP
|
||||||
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
|
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
|
||||||
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
||||||
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
||||||
# shellcheck disable=SC2068,SC2086
|
# shellcheck disable=SC2068,SC2086
|
||||||
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@
|
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ || {
|
||||||
|
ssh_exit_code="$?"
|
||||||
|
echo " ! Failed to execute dokku command over ssh: exit code $?" 1>&2
|
||||||
|
echo " ! If there was no output from Dokku, ensure your configured SSH Key can connect to the remote server" 1>&2
|
||||||
|
return $ssh_exit_code
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
"sudo apt-get update -qq >/dev/null",
|
"sudo apt-get update -qq >/dev/null",
|
||||||
|
|
||||||
"echo '--> Installing make requirement'",
|
"echo '--> Installing make requirement'",
|
||||||
"sudo apt-get -qq -y install build-essential",
|
"sudo apt-get -qq -y --no-install-recommends install build-essential",
|
||||||
|
|
||||||
"cd /tmp && make install-from-deb",
|
"cd /tmp && make install-from-deb",
|
||||||
"rm /root/.ssh/authorized_keys"
|
"rm /root/.ssh/authorized_keys"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
|||||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||||
|
|
||||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||||
|
|
||||||
log-info() {
|
log-info() {
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
@@ -136,7 +136,7 @@ fn-publish-package() {
|
|||||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||||
|
|
||||||
if [[ "$DIST" == "ubuntu" ]]; then
|
if [[ "$DIST" == "ubuntu" ]]; then
|
||||||
OS_IDS=("xenial" "bionic")
|
OS_IDS=("bionic" "focal")
|
||||||
for OS_ID in "${OS_IDS[@]}"; do
|
for OS_ID in "${OS_IDS[@]}"; do
|
||||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||||
@@ -147,7 +147,7 @@ fn-publish-package() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
DIST=debian
|
DIST=debian
|
||||||
OS_IDS=("stretch" "buster")
|
OS_IDS=("stretch" "buster" "bullseye")
|
||||||
for OS_ID in "${OS_IDS[@]}"; do
|
for OS_ID in "${OS_IDS[@]}"; do
|
||||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||||
@@ -204,7 +204,6 @@ fn-repo-update() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" contrib/dokku-installer.py
|
|
||||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" debian/control
|
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" debian/control
|
||||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" Dockerfile
|
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" Dockerfile
|
||||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/advanced-usage/plugin-management.md
|
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/advanced-usage/plugin-management.md
|
||||||
@@ -239,7 +238,7 @@ fn-repo-update-history-and-commit() {
|
|||||||
declare desc="Updates the history file and commits the changes"
|
declare desc="Updates the history file and commits the changes"
|
||||||
declare CURRENT_VERSION="$1" NEXT_VERSION="$2"
|
declare CURRENT_VERSION="$1" NEXT_VERSION="$2"
|
||||||
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
|
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
|
||||||
local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BUG HISTORY_OTHER HISTORY_TESTS ISSUE_FILE
|
local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BC_BREAK HISTORY_REFACTOR HISTORY_BUG HISTORY_OTHER HISTORY_TESTS ISSUE_FILE
|
||||||
|
|
||||||
pushd "$ROOT_DIR" >/dev/null
|
pushd "$ROOT_DIR" >/dev/null
|
||||||
|
|
||||||
@@ -256,12 +255,16 @@ fn-repo-update-history-and-commit() {
|
|||||||
TYPE="$(jq -r '.labels[] | select( .name | contains("type") ) | .name' "$ISSUE_FILE" | cut -d' ' -f2)"
|
TYPE="$(jq -r '.labels[] | select( .name | contains("type") ) | .name' "$ISSUE_FILE" | cut -d' ' -f2)"
|
||||||
CHANGELOG_TEXT="- #${PULL_REQUEST_ID}: @${AUTHOR} ${TITLE}"
|
CHANGELOG_TEXT="- #${PULL_REQUEST_ID}: @${AUTHOR} ${TITLE}"
|
||||||
|
|
||||||
if [[ "$TYPE" == "bug" ]]; then
|
if [[ "$TYPE" == "bc-break" ]]; then
|
||||||
|
HISTORY_BC_BREAK="${HISTORY_BC_BREAK}"$'\n'"$CHANGELOG_TEXT"
|
||||||
|
elif [[ "$TYPE" == "bug" ]]; then
|
||||||
HISTORY_BUG="${HISTORY_BUG}"$'\n'"$CHANGELOG_TEXT"
|
HISTORY_BUG="${HISTORY_BUG}"$'\n'"$CHANGELOG_TEXT"
|
||||||
elif [[ "$TYPE" == "documentation" ]]; then
|
elif [[ "$TYPE" == "documentation" ]]; then
|
||||||
HISTORY_DOCUMENTATION="${HISTORY_DOCUMENTATION}"$'\n'"$CHANGELOG_TEXT"
|
HISTORY_DOCUMENTATION="${HISTORY_DOCUMENTATION}"$'\n'"$CHANGELOG_TEXT"
|
||||||
elif [[ "$TYPE" == "enhancement" ]] || [[ "$TYPE" == "refactor" ]]; then
|
elif [[ "$TYPE" == "enhancement" ]]; then
|
||||||
HISTORY_ENHANCEMENT="${HISTORY_ENHANCEMENT}"$'\n'"$CHANGELOG_TEXT"
|
HISTORY_ENHANCEMENT="${HISTORY_ENHANCEMENT}"$'\n'"$CHANGELOG_TEXT"
|
||||||
|
elif [[ "$TYPE" == "refactor" ]]; then
|
||||||
|
HISTORY_REFACTOR="${HISTORY_REFACTOR}"$'\n'"$CHANGELOG_TEXT"
|
||||||
elif [[ "$TYPE" == "tests" ]]; then
|
elif [[ "$TYPE" == "tests" ]]; then
|
||||||
HISTORY_TESTS="${HISTORY_TESTS}"$'\n'"$CHANGELOG_TEXT"
|
HISTORY_TESTS="${HISTORY_TESTS}"$'\n'"$CHANGELOG_TEXT"
|
||||||
else
|
else
|
||||||
@@ -277,6 +280,15 @@ fn-repo-update-history-and-commit() {
|
|||||||
HISTORY="${HISTORY}"$'\n'"sudo DOKKU_TAG=v${NEXT_VERSION} bash bootstrap.sh"
|
HISTORY="${HISTORY}"$'\n'"sudo DOKKU_TAG=v${NEXT_VERSION} bash bootstrap.sh"
|
||||||
HISTORY="${HISTORY}"$'\n'"\`\`\`"
|
HISTORY="${HISTORY}"$'\n'"\`\`\`"
|
||||||
|
|
||||||
|
if [[ -f "docs/appendices/${NEXT_VERSION}-migration-guide.md" ]]; then
|
||||||
|
HISTORY="${HISTORY}"$'\n\n'"See the [${NEXT_VERSION} migration guide](/docs/appendices/${NEXT_VERSION}-migration-guide.md) for more information on migrating to ${NEXT_VERSION}."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$HISTORY_BC_BREAK" ]]; then
|
||||||
|
HISTORY="${HISTORY}"$'\n\n'"### Backwards Compatibility Breaks"
|
||||||
|
HISTORY="${HISTORY}"$'\n'"$HISTORY_BC_BREAK"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$HISTORY_BUG" ]]; then
|
if [[ "$HISTORY_BUG" ]]; then
|
||||||
HISTORY="${HISTORY}"$'\n\n'"### Bug Fixes"
|
HISTORY="${HISTORY}"$'\n\n'"### Bug Fixes"
|
||||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_BUG"
|
HISTORY="${HISTORY}"$'\n'"$HISTORY_BUG"
|
||||||
@@ -287,6 +299,11 @@ fn-repo-update-history-and-commit() {
|
|||||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_ENHANCEMENT"
|
HISTORY="${HISTORY}"$'\n'"$HISTORY_ENHANCEMENT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$HISTORY_REFACTOR" ]]; then
|
||||||
|
HISTORY="${HISTORY}"$'\n\n'"### Refactors"
|
||||||
|
HISTORY="${HISTORY}"$'\n'"$HISTORY_REFACTOR"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "$HISTORY_DOCUMENTATION" ]]; then
|
if [[ "$HISTORY_DOCUMENTATION" ]]; then
|
||||||
HISTORY="${HISTORY}"$'\n\n'"### Documentation"
|
HISTORY="${HISTORY}"$'\n\n'"### Documentation"
|
||||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_DOCUMENTATION"
|
HISTORY="${HISTORY}"$'\n'"$HISTORY_DOCUMENTATION"
|
||||||
@@ -358,15 +375,15 @@ main() {
|
|||||||
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
||||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||||
|
|
||||||
|
echo "v${NEXT_VERSION}" >build/next-version
|
||||||
|
|
||||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb 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"
|
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
|
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" "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-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"
|
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
|
||||||
|
|||||||
@@ -1,160 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
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.XXXXXX")"
|
|
||||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
|
||||||
|
|
||||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
|
||||||
|
|
||||||
log-info() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log info formatter"
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
log-error() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log error formatter"
|
|
||||||
echo "! $*" 1>&2
|
|
||||||
}
|
|
||||||
|
|
||||||
log-fail() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log fail formatter"
|
|
||||||
log-error "$*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-build-dokku() {
|
|
||||||
declare desc="Builds dokku packages within a docker container"
|
|
||||||
|
|
||||||
pushd "$ROOT_DIR" >/dev/null
|
|
||||||
docker build \
|
|
||||||
-f "contrib/build-dokku-update.Dockerfile" \
|
|
||||||
-t dokku-update:build .
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-extract-package() {
|
|
||||||
declare desc="Extract packages from a docker container to the root directory"
|
|
||||||
declare PACKAGE_NAME="$1"
|
|
||||||
|
|
||||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
|
||||||
log-error "Invalid deb file specified"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
|
||||||
docker run --rm --entrypoint cat dokku-update:build "/tmp/${PACKAGE_NAME}" >"${ROOT_DIR}/build/${PACKAGE_NAME}"
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-publish-package() {
|
|
||||||
declare desc="Publishes a package to packagecloud"
|
|
||||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
|
||||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu
|
|
||||||
local OS_ID ex EXIT_CODE=0
|
|
||||||
|
|
||||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
|
||||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
|
||||||
|
|
||||||
if [[ "$DIST" == "ubuntu" ]]; then
|
|
||||||
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"
|
|
||||||
ex="$?"
|
|
||||||
if [[ "$ex" -ne "0" ]]; then
|
|
||||||
EXIT_CODE="$ex"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
DIST=debian
|
|
||||||
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"
|
|
||||||
ex="$?"
|
|
||||||
if [[ "$ex" -ne "0" ]]; then
|
|
||||||
EXIT_CODE="$ex"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
log-info "(release-dokku-update) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
|
||||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
|
||||||
EXIT_CODE="$?"
|
|
||||||
fi
|
|
||||||
return "$EXIT_CODE"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-in-array() {
|
|
||||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
|
||||||
|
|
||||||
local e
|
|
||||||
for e in "${@:2}"; do
|
|
||||||
[[ "$e" == "$1" ]] && return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-is-release() {
|
|
||||||
declare desc="Checks if a given run is a release run"
|
|
||||||
declare RELEASE="$1"
|
|
||||||
local IS_RELEASE=false
|
|
||||||
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
|
|
||||||
IS_RELEASE=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$IS_RELEASE"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-require-bin() {
|
|
||||||
declare desc="Checks that a binary exists"
|
|
||||||
declare BINARY="$1"
|
|
||||||
if ! command -v "$BINARY" &>/dev/null; then
|
|
||||||
log-fail "Missing ${BINARY}, please install it"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
declare RELEASE="$1"
|
|
||||||
local NEXT_VERSION
|
|
||||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish" "build")
|
|
||||||
|
|
||||||
if [[ "$RELEASE" == '--trace' ]]; then
|
|
||||||
shift 1
|
|
||||||
RELEASE="$1"
|
|
||||||
TRACE=1 && set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$RELEASE" ]]; then
|
|
||||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], none given"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
|
||||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], '${RELEASE}' given"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "build"
|
|
||||||
fn-require-bin "docker"
|
|
||||||
if [[ "$RELEASE" != "build" ]]; then
|
|
||||||
fn-require-bin "package_cloud"
|
|
||||||
[[ -n "$PACKAGECLOUD_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_TOKEN environment variable"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NEXT_VERSION="$(grep DOKKU_UPDATE_VERSION deb.mk | head -n1 | cut -d'=' -f2 | xargs)"
|
|
||||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
|
||||||
|
|
||||||
fn-build-dokku || log-fail "Error building package"
|
|
||||||
fn-extract-package "dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
|
||||||
fn-extract-package "dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
|
||||||
|
|
||||||
if [[ "$RELEASE" != "build" ]]; then
|
|
||||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
|
||||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,160 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
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.XXXXXX")"
|
|
||||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
|
||||||
|
|
||||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
|
||||||
|
|
||||||
log-info() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log info formatter"
|
|
||||||
echo "$*"
|
|
||||||
}
|
|
||||||
|
|
||||||
log-error() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log error formatter"
|
|
||||||
echo "! $*" 1>&2
|
|
||||||
}
|
|
||||||
|
|
||||||
log-fail() {
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
declare desc="Log fail formatter"
|
|
||||||
log-error "$*"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-build-dokku() {
|
|
||||||
declare desc="Builds dokku packages within a docker container"
|
|
||||||
|
|
||||||
pushd "$ROOT_DIR" >/dev/null
|
|
||||||
docker build \
|
|
||||||
-f "contrib/build-herokuish.Dockerfile" \
|
|
||||||
-t herokuish:build .
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-extract-package() {
|
|
||||||
declare desc="Extract packages from a docker container to the root directory"
|
|
||||||
declare PACKAGE_NAME="$1"
|
|
||||||
|
|
||||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
|
||||||
log-error "Invalid deb file specified"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
|
||||||
docker run --rm --entrypoint cat herokuish:build "/tmp/${PACKAGE_NAME}" >"${ROOT_DIR}/build/${PACKAGE_NAME}"
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-publish-package() {
|
|
||||||
declare desc="Publishes a package to packagecloud"
|
|
||||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
|
||||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu
|
|
||||||
local OS_ID ex EXIT_CODE=0
|
|
||||||
|
|
||||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
|
||||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
|
||||||
|
|
||||||
if [[ "$DIST" == "ubuntu" ]]; then
|
|
||||||
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"
|
|
||||||
ex="$?"
|
|
||||||
if [[ "$ex" -ne "0" ]]; then
|
|
||||||
EXIT_CODE="$ex"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
DIST=debian
|
|
||||||
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"
|
|
||||||
ex="$?"
|
|
||||||
if [[ "$ex" -ne "0" ]]; then
|
|
||||||
EXIT_CODE="$ex"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
else
|
|
||||||
log-info "(release-herokuish) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
|
||||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
|
||||||
EXIT_CODE="$?"
|
|
||||||
fi
|
|
||||||
return "$EXIT_CODE"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-in-array() {
|
|
||||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
|
||||||
|
|
||||||
local e
|
|
||||||
for e in "${@:2}"; do
|
|
||||||
[[ "$e" == "$1" ]] && return 0
|
|
||||||
done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-is-release() {
|
|
||||||
declare desc="Checks if a given run is a release run"
|
|
||||||
declare RELEASE="$1"
|
|
||||||
local IS_RELEASE=false
|
|
||||||
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
|
|
||||||
IS_RELEASE=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$IS_RELEASE"
|
|
||||||
}
|
|
||||||
|
|
||||||
fn-require-bin() {
|
|
||||||
declare desc="Checks that a binary exists"
|
|
||||||
declare BINARY="$1"
|
|
||||||
if ! command -v "$BINARY" &>/dev/null; then
|
|
||||||
log-fail "Missing ${BINARY}, please install it"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
declare RELEASE="$1"
|
|
||||||
local NEXT_VERSION
|
|
||||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish" "build")
|
|
||||||
|
|
||||||
if [[ "$RELEASE" == '--trace' ]]; then
|
|
||||||
shift 1
|
|
||||||
RELEASE="$1"
|
|
||||||
TRACE=1 && set -x
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$RELEASE" ]]; then
|
|
||||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], none given"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
|
||||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish, build], '${RELEASE}' given"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "build"
|
|
||||||
fn-require-bin "docker"
|
|
||||||
if [[ "$RELEASE" != "build" ]]; then
|
|
||||||
fn-require-bin "package_cloud"
|
|
||||||
[[ -n "$PACKAGECLOUD_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_TOKEN environment variable"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NEXT_VERSION="$(grep HEROKUISH_VERSION deb.mk | head -n1 | cut -d'=' -f2 | xargs)"
|
|
||||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
|
||||||
|
|
||||||
fn-build-dokku || log-fail "Error building package"
|
|
||||||
fn-extract-package "herokuish_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
|
||||||
fn-extract-package "herokuish-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
|
||||||
|
|
||||||
if [[ "$RELEASE" != "build" ]]; then
|
|
||||||
fn-publish-package "$IS_RELEASE" "deb" "build/herokuish_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
|
||||||
fn-publish-package "$IS_RELEASE" "rpm" "build/herokuish-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
|||||||
|
|
||||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
||||||
|
|
||||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||||
|
|
||||||
log-info() {
|
log-info() {
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
@@ -95,7 +95,7 @@ EOF
|
|||||||
local AWS_RELEASE=true
|
local AWS_RELEASE=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$CI" != "true" ]] && [[ -z "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
if [[ "$AWS_RELEASE" == "true" ]] && [[ -z "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||||
log-info "You are running this without a DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN environment variable."
|
log-info "You are running this without a DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN environment variable."
|
||||||
log-info "Doing so disables uploading releases to S3, which may be necessary for installing private plugins."
|
log-info "Doing so disables uploading releases to S3, which may be necessary for installing private plugins."
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
98
deb.mk
98
deb.mk
@@ -1,46 +1,20 @@
|
|||||||
BUILD_DIRECTORY ?= /tmp
|
BUILD_DIRECTORY ?= /tmp
|
||||||
|
|
||||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
|
||||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
|
||||||
HEROKUISH_VERSION ?= 0.5.11
|
|
||||||
HEROKUISH_ARCHITECTURE = amd64
|
|
||||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
|
||||||
|
|
||||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||||
DOKKU_REPO_NAME ?= dokku/dokku
|
DOKKU_REPO_NAME ?= dokku/dokku
|
||||||
DOKKU_ARCHITECTURE = amd64
|
DOKKU_ARCHITECTURE = amd64
|
||||||
|
|
||||||
DOKKU_UPDATE_DESCRIPTION = 'Binary that handles updating Dokku and related systems'
|
|
||||||
DOKKU_UPDATE_REPO_NAME ?= dokku/dokku
|
|
||||||
DOKKU_UPDATE_VERSION ?= 0.1.0
|
|
||||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
|
||||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
|
||||||
|
|
||||||
define SIGIL_DESCRIPTION
|
|
||||||
Standalone string interpolator and template processor
|
|
||||||
Sigil is a command line tool for template processing
|
|
||||||
and POSIX-compliant variable expansion. It was created
|
|
||||||
for configuration templating, but can be used for any
|
|
||||||
text processing.
|
|
||||||
endef
|
|
||||||
SIGIL_REPO_NAME ?= gliderlabs/sigil
|
|
||||||
SIGIL_VERSION ?= 0.4.0
|
|
||||||
SIGIL_ARCHITECTURE = amd64
|
|
||||||
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
|
||||||
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
|
|
||||||
|
|
||||||
ifndef IS_RELEASE
|
ifndef IS_RELEASE
|
||||||
IS_RELEASE = true
|
IS_RELEASE = true
|
||||||
endif
|
endif
|
||||||
|
|
||||||
export SIGIL_DESCRIPTION
|
|
||||||
|
|
||||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-setup deb-sigil
|
.PHONY: install-from-deb deb-all deb-dokku deb-setup
|
||||||
|
|
||||||
install-from-deb:
|
install-from-deb:
|
||||||
@echo "--> Initial apt-get update"
|
@echo "--> Initial apt-get update"
|
||||||
sudo apt-get update -qq >/dev/null
|
sudo apt-get update -qq >/dev/null
|
||||||
sudo apt-get install -qq -y apt-transport-https
|
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||||
|
|
||||||
@echo "--> Installing docker"
|
@echo "--> Installing docker"
|
||||||
wget -nv -O - https://get.docker.com/ | sh
|
wget -nv -O - https://get.docker.com/ | sh
|
||||||
@@ -49,45 +23,19 @@ install-from-deb:
|
|||||||
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
|
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 "bionic") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "bionic") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||||
sudo apt-get update -qq >/dev/null
|
sudo apt-get update -qq >/dev/null
|
||||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku
|
||||||
|
|
||||||
deb-all: deb-setup deb-herokuish deb-dokku deb-sigil deb-dokku-update
|
deb-all: deb-setup deb-dokku
|
||||||
mv $(BUILD_DIRECTORY)/*.deb .
|
mv $(BUILD_DIRECTORY)/*.deb .
|
||||||
@echo "Done"
|
@echo "Done"
|
||||||
|
|
||||||
deb-setup:
|
deb-setup:
|
||||||
@echo "-> Updating deb repository and installing build requirements"
|
@echo "-> Updating deb repository and installing build requirements"
|
||||||
@sudo apt-get update -qq >/dev/null
|
@sudo apt-get update -qq >/dev/null
|
||||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git build-essential wget ruby-dev ruby1.9.1 lintian >/dev/null 2>&1
|
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian >/dev/null 2>&1
|
||||||
@command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
@command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||||
@ssh -o StrictHostKeyChecking=no git@github.com || true
|
@ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||||
|
|
||||||
deb-herokuish:
|
|
||||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
|
|
||||||
mkdir -p /tmp/tmp /tmp/build
|
|
||||||
|
|
||||||
@echo "-> Creating deb files"
|
|
||||||
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
|
||||||
@echo "sleep 5" >> /tmp/tmp/post-install
|
|
||||||
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
|
||||||
@echo 'if [[ -n $${http_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
|
|
||||||
@echo 'if [[ -n $${https_proxy+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
|
|
||||||
@echo 'if [[ -n $${BUILDARGS+x} ]]; then echo "See the docker pull docs for proxy configuration"; fi' >> /tmp/tmp/post-install
|
|
||||||
@echo "sudo docker pull gliderlabs/herokuish:v${HEROKUISH_VERSION} && sudo docker tag gliderlabs/herokuish:v${HEROKUISH_VERSION} gliderlabs/herokuish:latest" >> /tmp/tmp/post-install
|
|
||||||
|
|
||||||
@echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
|
|
||||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish \
|
|
||||||
--version $(HEROKUISH_VERSION) \
|
|
||||||
--architecture $(HEROKUISH_ARCHITECTURE) \
|
|
||||||
--package $(BUILD_DIRECTORY)/$(HEROKUISH_PACKAGE_NAME) \
|
|
||||||
--deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee' \
|
|
||||||
--deb-pre-depends sudo \
|
|
||||||
--after-install /tmp/tmp/post-install \
|
|
||||||
--url "https://github.com/$(HEROKUISH_REPO_NAME)" \
|
|
||||||
--description $(HEROKUISH_DESCRIPTION) \
|
|
||||||
--license 'MIT License' \
|
|
||||||
.
|
|
||||||
|
|
||||||
deb-dokku: /tmp/build-dokku/var/lib/dokku/GIT_REV
|
deb-dokku: /tmp/build-dokku/var/lib/dokku/GIT_REV
|
||||||
rm -f $(BUILD_DIRECTORY)/dokku_*_$(DOKKU_ARCHITECTURE).deb
|
rm -f $(BUILD_DIRECTORY)/dokku_*_$(DOKKU_ARCHITECTURE).deb
|
||||||
|
|
||||||
@@ -103,39 +51,3 @@ endif
|
|||||||
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||||
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||||
|
|
||||||
deb-dokku-update:
|
|
||||||
rm -rf /tmp/dokku-update*.deb dokku-update*.deb
|
|
||||||
echo "${DOKKU_UPDATE_VERSION}" > contrib/dokku-update-version
|
|
||||||
sudo fpm -t deb -s dir -n dokku-update \
|
|
||||||
--version $(DOKKU_UPDATE_VERSION) \
|
|
||||||
--architecture $(DOKKU_UPDATE_ARCHITECTURE) \
|
|
||||||
--package $(BUILD_DIRECTORY)/$(DOKKU_UPDATE_PACKAGE_NAME) \
|
|
||||||
--depends 'dokku' \
|
|
||||||
--url "https://github.com/$(DOKKU_UPDATE_REPO_NAME)" \
|
|
||||||
--description $(DOKKU_UPDATE_DESCRIPTION) \
|
|
||||||
--license 'MIT License' \
|
|
||||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
|
||||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
|
||||||
|
|
||||||
deb-sigil:
|
|
||||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
|
||||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
|
||||||
|
|
||||||
@echo "-> Downloading package"
|
|
||||||
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
|
|
||||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
|
|
||||||
|
|
||||||
@echo "-> Copying files into place"
|
|
||||||
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil
|
|
||||||
|
|
||||||
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
|
|
||||||
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
|
|
||||||
--version $(SIGIL_VERSION) \
|
|
||||||
--architecture $(SIGIL_ARCHITECTURE) \
|
|
||||||
--package $(BUILD_DIRECTORY)/$(SIGIL_PACKAGE_NAME) \
|
|
||||||
--url "https://github.com/$(SIGIL_REPO_NAME)" \
|
|
||||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
|
||||||
--category utils \
|
|
||||||
--description "$$SIGIL_DESCRIPTION" \
|
|
||||||
--license 'MIT License' \
|
|
||||||
.
|
|
||||||
|
|||||||
8
debian/config
vendored
8
debian/config
vendored
@@ -10,14 +10,6 @@ fi
|
|||||||
readonly ACTION="${1:-configure}"
|
readonly ACTION="${1:-configure}"
|
||||||
readonly VERSION="${2:-dev}"
|
readonly VERSION="${2:-dev}"
|
||||||
|
|
||||||
db_input "high" "dokku/web_config" || true
|
|
||||||
db_go || true
|
|
||||||
|
|
||||||
db_get "dokku/web_config"
|
|
||||||
if [ $RET = "true" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
db_input "high" "dokku/nginx_enable" || true
|
db_input "high" "dokku/nginx_enable" || true
|
||||||
db_input "high" "dokku/hostname" || true
|
db_input "high" "dokku/hostname" || true
|
||||||
db_input "high" "dokku/vhost_enable" || true
|
db_input "high" "dokku/vhost_enable" || true
|
||||||
|
|||||||
8
debian/control
vendored
8
debian/control
vendored
@@ -1,11 +1,11 @@
|
|||||||
Package: dokku
|
Package: dokku
|
||||||
Version: 0.20.4
|
Version: 0.25.4
|
||||||
Section: web
|
Section: web
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
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
|
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
||||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
Recommends: herokuish (>= 0.3.4), bash-completion, 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
|
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||||
Dokku is an extensible, open source Platform as a Service
|
Dokku is an extensible, open source Platform as a Service
|
||||||
|
|||||||
3
debian/lintian-overrides
vendored
3
debian/lintian-overrides
vendored
@@ -10,6 +10,3 @@ dokku: hardening-no-relro
|
|||||||
|
|
||||||
# Built golang binaries link to libc
|
# Built golang binaries link to libc
|
||||||
dokku: missing-dependency-on-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
|
|
||||||
|
|||||||
54
debian/postinst
vendored
54
debian/postinst
vendored
@@ -43,6 +43,20 @@ setup-storage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup-plugins() {
|
setup-plugins() {
|
||||||
|
echo "Deleting invalid plugins"
|
||||||
|
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/available/" ]; then
|
||||||
|
find "${DOKKU_LIB_ROOT}/core-plugins/available/" -type d -empty -delete
|
||||||
|
fi
|
||||||
|
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/enabled/" ]; then
|
||||||
|
find "${DOKKU_LIB_ROOT}/core-plugins/enabled/" -type d -empty -delete
|
||||||
|
fi
|
||||||
|
if [ -f "${DOKKU_LIB_ROOT}/plugins/available/" ]; then
|
||||||
|
find "${DOKKU_LIB_ROOT}/plugins/available/" -type d -empty -delete
|
||||||
|
fi
|
||||||
|
if [ -f "${DOKKU_LIB_ROOT}/plugins/enabled/" ]; then
|
||||||
|
find "${DOKKU_LIB_ROOT}/plugins/enabled/" -type d -empty -delete
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Setting up plugin directories"
|
echo "Setting up plugin directories"
|
||||||
# should be replaced by `plugn init`
|
# 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/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||||
@@ -88,40 +102,7 @@ setup-sshcommand() {
|
|||||||
fi
|
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() {
|
dpkg-handling() {
|
||||||
db_get "dokku/web_config"
|
|
||||||
if [ "$RET" = "true" ]; then
|
|
||||||
db_stop
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||||
echo "VHOST file detected, skipping modification"
|
echo "VHOST file detected, skipping modification"
|
||||||
else
|
else
|
||||||
@@ -133,9 +114,6 @@ dpkg-handling() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
db_get "dokku/hostname"
|
|
||||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
|
||||||
|
|
||||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||||
db_get "dokku/key_file"
|
db_get "dokku/key_file"
|
||||||
if [ -f "$RET" ]; then
|
if [ -f "$RET" ]; then
|
||||||
@@ -157,10 +135,10 @@ case "$1" in
|
|||||||
|
|
||||||
setup-user
|
setup-user
|
||||||
setup-storage
|
setup-storage
|
||||||
|
|
||||||
|
dpkg-handling
|
||||||
setup-plugins
|
setup-plugins
|
||||||
setup-sshcommand
|
setup-sshcommand
|
||||||
setup-dokku-installer
|
|
||||||
dpkg-handling
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|||||||
2
debian/postrm
vendored
2
debian/postrm
vendored
@@ -32,7 +32,7 @@ main() {
|
|||||||
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku-installer.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.conf
|
||||||
rm -f /etc/nginx/conf.d/dokku-installer.conf
|
rm -f /etc/nginx/conf.d/dokku-installer.conf
|
||||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
rm -rf ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||||
rm -f ${DOKKU_ROOT}/.ssh/authorized_keys ${DOKKU_ROOT}/.sshcommand
|
rm -f ${DOKKU_ROOT}/.ssh/authorized_keys ${DOKKU_ROOT}/.sshcommand
|
||||||
rm -f ${DOKKU_ROOT}/ENV ${DOKKU_ROOT}/HOSTNAME ${DOKKU_ROOT}/VERSION
|
rm -f ${DOKKU_ROOT}/ENV ${DOKKU_ROOT}/HOSTNAME ${DOKKU_ROOT}/VERSION
|
||||||
rm -rf ${DOKKU_ROOT}/.cache
|
rm -rf ${DOKKU_ROOT}/.cache
|
||||||
|
|||||||
47
debian/preinst
vendored
47
debian/preinst
vendored
@@ -7,55 +7,8 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
|
|||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
fi
|
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
|
case "$1" in
|
||||||
install)
|
install)
|
||||||
db_get "dokku/web_config"
|
|
||||||
if [ "$RET" = "true" ]; then
|
|
||||||
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"
|
db_get "dokku/skip_key_file"
|
||||||
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
||||||
db_get "dokku/key_file"
|
db_get "dokku/key_file"
|
||||||
|
|||||||
2
debian/prerm
vendored
2
debian/prerm
vendored
@@ -33,7 +33,7 @@ main() {
|
|||||||
echo "Processing purge"
|
echo "Processing purge"
|
||||||
|
|
||||||
echo "Destroying deployed applications"
|
echo "Destroying deployed applications"
|
||||||
for app in $(DOKKU_QUIET_OUTPUT=1 dokku apps); do
|
for app in $(DOKKU_QUIET_OUTPUT=1 dokku apps:list); do
|
||||||
dokku --force apps:destroy $app
|
dokku --force apps:destroy $app
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
5
debian/templates
vendored
5
debian/templates
vendored
@@ -1,8 +1,3 @@
|
|||||||
Template: dokku/web_config
|
|
||||||
Description: Enable the web-based config page?
|
|
||||||
Type: boolean
|
|
||||||
Default: true
|
|
||||||
|
|
||||||
Template: dokku/vhost_enable
|
Template: dokku/vhost_enable
|
||||||
Description: Enable vhost-based deployments?
|
Description: Enable vhost-based deployments?
|
||||||
Type: boolean
|
Type: boolean
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/var/log/services/* {
|
/var/log/services/*[!0-9z] {
|
||||||
daily
|
daily
|
||||||
missingok
|
missingok
|
||||||
rotate 7
|
rotate 7
|
||||||
|
|||||||
@@ -12,9 +12,20 @@ log-fail() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
support-userns() {
|
||||||
|
chown 0:0 /usr/bin/sudo
|
||||||
|
chmod 4755 /usr/bin/sudo
|
||||||
|
chown 0:0 /usr/lib/sudo/sudoers.so
|
||||||
|
chown -R 0:0 /etc/sudoers
|
||||||
|
chown -R 0:0 /etc/sudoers.d
|
||||||
|
chown -R 0:0 /run/sshd
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local NGINX_ROOT
|
local NGINX_ROOT
|
||||||
|
|
||||||
|
support-userns
|
||||||
|
|
||||||
if [[ ! -d /mnt/dokku ]]; then
|
if [[ ! -d /mnt/dokku ]]; then
|
||||||
log-info "Creating missing /mnt/dokku"
|
log-info "Creating missing /mnt/dokku"
|
||||||
mkdir -p /mnt/dokku
|
mkdir -p /mnt/dokku
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker
|
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler
|
||||||
|
|||||||
20
docker/usr/local/bin/docker-image-labeler
Executable file
20
docker/usr/local/bin/docker-image-labeler
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eo pipefail
|
||||||
|
[[ $TRACE ]] && set -x
|
||||||
|
|
||||||
|
main() {
|
||||||
|
declare desc="re-runs docker-image-labeler commands as sudo"
|
||||||
|
local DOCKER_IMAGE_LABELER_BIN=""
|
||||||
|
if [[ -x "/usr/bin/docker-image-labeler" ]]; then
|
||||||
|
DOCKER_IMAGE_LABELER_BIN="/usr/bin/docker-image-labeler"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$DOCKER_IMAGE_LABELER_BIN" ]]; then
|
||||||
|
echo "! No docker-image-labeler binary found" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo -E "$DOCKER_IMAGE_LABELER_BIN" "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
@@ -2,7 +2,51 @@
|
|||||||
|
|
||||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||||
|
|
||||||
## Backup and Migration Tutorial
|
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. Backups should be regularly tested for data integrity and completeness.
|
||||||
|
|
||||||
|
## TLDR
|
||||||
|
|
||||||
|
> Warning: This method has many caveats. Please read this entire document before assuming these backups work as expected, and test your backups on a regular basis.
|
||||||
|
|
||||||
|
### Creating a backup
|
||||||
|
|
||||||
|
To create a backup, run the following command at a time when not executing any Dokku commands or app deployments:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
export BACKUP_TIME=$(date +%Y-%m-%d-%H-%M)
|
||||||
|
sudo mkdir -p /var/lib/dokku/services
|
||||||
|
sudo chown dokku:dokku /var/lib/dokku/services
|
||||||
|
mkdir -p /tmp/dokku-backups/
|
||||||
|
sudo tar -czvf "/tmp/dokku-backups/${BACKUP_TIME}.tar.gz" /home/dokku /var/lib/dokku/config /var/lib/dokku/data /var/lib/dokku/services /var/lib/dokku/plugins
|
||||||
|
```
|
||||||
|
|
||||||
|
This will create a point-in-time backup of your entire Dokku installation in the `/tmp/dokku-backups` directory. This backup may be moved offsite to another location via rsync, sftp, or some other protocol.
|
||||||
|
|
||||||
|
It is recommended that backups are regularly cleaned from the originating server and tested as necessary.
|
||||||
|
|
||||||
|
### Restoring a backup
|
||||||
|
|
||||||
|
To extract the backup onto another server, copy the backup to the server and extract it using the following command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
sudo tar -xzvf path/to/dokku/backup.tar.gz -C /
|
||||||
|
```
|
||||||
|
|
||||||
|
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual apps can be rebuilt. Please consult the [process management documentation](/docs/processes/process-management.md#rebuilding-apps) for more information on how to rebuild apps.
|
||||||
|
|
||||||
|
## Caveats
|
||||||
|
|
||||||
|
### App config
|
||||||
|
|
||||||
|
Application config is largely held in a small number of places:
|
||||||
|
|
||||||
|
- `/var/lib/dokku/config`: Properties set and managed by plugins
|
||||||
|
- `/var/lib/dokku/data`: Files generated or extracted by various plugins
|
||||||
|
- `/home/dokku`: Certain parts of Dokku core store data in this location
|
||||||
|
|
||||||
|
Compressing these directories when no Dokku commands are running is enough to ensure a complete backup of the system.
|
||||||
|
|
||||||
|
### Code Repositories
|
||||||
|
|
||||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the `dokku` remote in you local app's repo.
|
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the `dokku` remote in you local app's repo.
|
||||||
|
|
||||||
@@ -11,7 +55,20 @@ git remote rm dokku
|
|||||||
git remote add dokku dokku@[dokku.me:dokku.me]
|
git remote add dokku dokku@[dokku.me:dokku.me]
|
||||||
git push dokku [master]
|
git push dokku [master]
|
||||||
```
|
```
|
||||||
## Databases
|
|
||||||
|
### Docker Networks
|
||||||
|
|
||||||
|
Docker networks generated by Dokku should be recreated. Running `dokku network:report` will output all networks in use by various apps, which can then be used to recreate them via `dokku network:create $NETWORK`.
|
||||||
|
|
||||||
|
Networks created by tools other than Dokku may be created as they initially were.
|
||||||
|
|
||||||
|
### Docker Image and Tar-based Apps
|
||||||
|
|
||||||
|
These apps may fail to rebuild via the normal `ps:rebuild` method. Redeploy these apps by running the original commands used to deploy them
|
||||||
|
|
||||||
|
### Datastores
|
||||||
|
|
||||||
|
> Please note that point-in-time backups of the `/var/lib/dokku/services` directory may contain partially written data due to how various datastores work. Consult the official datastore documentation for the best documentation surrounding proper backup and restore procedures.
|
||||||
|
|
||||||
Some plugins, like the official [dokku-postgres](https://github.com/dokku/dokku-postgres) plugin, have built-in commands that allow non-volatile data be exported and imported.
|
Some plugins, like the official [dokku-postgres](https://github.com/dokku/dokku-postgres) plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||||
|
|
||||||
@@ -22,16 +79,25 @@ dokku postgres:export [db_name] > [db_name].dump
|
|||||||
dokku postgres:import [db_name] < [db_name].dump
|
dokku postgres:import [db_name] < [db_name].dump
|
||||||
```
|
```
|
||||||
|
|
||||||
## Volumes and Static Assets
|
Additionally, data for official datastores is located in the `/var/lib/dokku/services` directory. If the directory is restored and the plugin is available, a `dokku $SERVICE:start` may be enough to restart the service with the underlying data, so long as the datastore version does not change and the underlying data is not corrupt. If this is the case, it may be necessary to re-import all the data onto a fresh version of the datastore service.
|
||||||
|
|
||||||
|
### Plugins
|
||||||
|
|
||||||
|
The plugin directory is contained at the `/var/lib/dokku/plugins` directory. Core plugins will automatically be included in new installs, but custom plugins may not. The aforementioned `tar` creation command will back all plugins up, and the `tar` extract command will restore the plugins.
|
||||||
|
|
||||||
|
Note that restoring a plugin will not trigger any `install` or `dependencies` triggers. You will need to run these manually. See the [plugin management documentation](/docs/advanced-usage/plugin-management.md#installing-a-plugin) for more information on how to trigger these two hooks.
|
||||||
|
|
||||||
|
### Volumes and Static Assets
|
||||||
|
|
||||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||||
|
|
||||||
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more details.
|
System administrators are highly encouraged to store persistent data in app-specific subdirectories of the path `/var/lib/dokku/data/storage`. This will help ensure restores of the aforementioned primary Dokku directories will restore service to all apps.
|
||||||
|
|
||||||
|
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more information on how to attach persistent storage to your app.
|
||||||
|
|
||||||
## Disaster Recovery
|
## Recovering app code
|
||||||
|
|
||||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
|
In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir [app-name] ; cd !$
|
mkdir [app-name] ; cd !$
|
||||||
|
|||||||
@@ -2,46 +2,140 @@
|
|||||||
|
|
||||||
> New as of 0.5.0
|
> New as of 0.5.0
|
||||||
|
|
||||||
Sometimes you need to run a command on at deployment time, but before an app is completely deployed. Common use cases include:
|
## Usage
|
||||||
|
|
||||||
* Checking a database is initialized
|
### Overview
|
||||||
* Running database migrations
|
|
||||||
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
Sometimes you need to run a command on deployment time, but before an app is completely deployed. Common use cases include:
|
||||||
|
|
||||||
|
- Checking a database is initialized
|
||||||
|
- Running database migrations
|
||||||
|
- Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
||||||
|
|
||||||
To support this, Dokku provides support for a special `release` command within your app's `Procfile`, as well as a special `scripts.dokku` key inside of your app's `app.json` file. Be aware that all commands are run within the context of the built docker image - no commands affect the host unless there are volume mounts attached to your app.
|
To support this, Dokku provides support for a special `release` command within your app's `Procfile`, as well as a special `scripts.dokku` key inside of your app's `app.json` file. Be aware that all commands are run within the context of the built docker image - no commands affect the host unless there are volume mounts attached to your app.
|
||||||
|
|
||||||
Each "phase" has different expectations and limitations:
|
Each "phase" has different expectations and limitations:
|
||||||
|
|
||||||
- `app.json`: `scripts.dokku.predeploy`
|
- `app.json`: `scripts.dokku.predeploy`
|
||||||
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
|
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
|
||||||
- Are changes committed to the image at this phase: Yes
|
- Are changes committed to the image at this phase: Yes
|
||||||
- Example use-cases
|
- Example use-cases
|
||||||
- Bundling assets in a slightly different way
|
- Bundling assets in a slightly different way
|
||||||
- Installing a custom package from source or copying a binary into place
|
- Installing a custom package from source or copying a binary into place
|
||||||
- `app.json`: `scripts.dokku.postdeploy`
|
- `app.json`: `scripts.dokku.postdeploy`
|
||||||
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
|
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
|
||||||
- Are changes committed to the image at this phase: No
|
- Are changes committed to the image at this phase: No
|
||||||
- Example use-cases
|
- Example use-cases
|
||||||
- Notifying slack that your app is deployed
|
- Notifying slack that your app is deployed
|
||||||
- Coordinating traffic routing with a central load balancer
|
- Coordinating traffic routing with a central load balancer
|
||||||
|
- `app.json`: `scripts.postdeploy`
|
||||||
|
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
|
||||||
|
- Are changes committed to the image at this phase: No
|
||||||
|
- Example use-cases
|
||||||
|
- Setting up OAuth clients and DNS
|
||||||
|
- Loading seed/test data into the app’s test database
|
||||||
- `Procfile`: `release`
|
- `Procfile`: `release`
|
||||||
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
|
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
|
||||||
- Are changes committed to the image at this phase: No
|
- Are changes committed to the image at this phase: No
|
||||||
- Example use-cases
|
- Example use-cases
|
||||||
- Sending CSS, JS, and other assets from your app’s slug to a CDN or S3 bucket
|
- Sending CSS, JS, and other assets from your app’s slug to a CDN or S3 bucket
|
||||||
- Priming or invalidating cache stores
|
- Priming or invalidating cache stores
|
||||||
- Running database migrations
|
- Running database migrations
|
||||||
|
|
||||||
|
Additionally, if using a Dockerfile with an `ENTRYPOINT`, the deployment task is passed to that entrypoint as is. The exceptions are if the entrypoint is one of the following:
|
||||||
|
|
||||||
|
- `["/tini", "--"]`
|
||||||
|
- `["/bin/tini", "--"]`
|
||||||
|
- `["/usr/bin/tini", "--"]`
|
||||||
|
- `["/usr/local/bin/tini", "--"]`
|
||||||
|
|
||||||
Please keep the above in mind when utilizing deployment tasks.
|
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.md) 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
|
### Changing the `app.json` location
|
||||||
|
|
||||||
|
When deploying a monorepo, it may be desirable to specify the specific path of the `app.json` file to use for a given app. This can be done via the `app-json:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json` file.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:set node-js-app appjson-path second-app.json
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:set node-js-app appjson-path
|
||||||
|
```
|
||||||
|
|
||||||
|
The `appjson-path` property can also be set globally. The global default is `app.json`, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:set --global appjson-path global-app.json
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:set --global appjson-path
|
||||||
|
```
|
||||||
|
|
||||||
|
### Displaying app-json reports for an app
|
||||||
|
|
||||||
|
> New as of 0.25.0
|
||||||
|
|
||||||
|
You can get a report about the app's storage status using the `app-json:report` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:report
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app app-json information
|
||||||
|
App-json computed appjson path: app2.json
|
||||||
|
App-json global appjson path: app.json
|
||||||
|
App-json appjson path: app2.json
|
||||||
|
=====> python-sample app-json information
|
||||||
|
App-json computed appjson path: app.json
|
||||||
|
App-json global appjson path: app.json
|
||||||
|
App-json appjson path:
|
||||||
|
=====> ruby-sample app-json information
|
||||||
|
App-json computed appjson path: app.json
|
||||||
|
App-json global appjson path: app.json
|
||||||
|
App-json appjson path:
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:report node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app app-json information
|
||||||
|
App-json computed appjson path: app2.json
|
||||||
|
App-json global appjson path: app.json
|
||||||
|
App-json appjson path: app2.json
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:report node-js-app --app-json-appjson-path
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
app2.json
|
||||||
|
```
|
||||||
|
|
||||||
|
### Deployment tasks
|
||||||
|
|
||||||
|
#### `app.json` deployment tasks
|
||||||
|
|
||||||
Dokku provides limited support for the `app.json` manifest from Heroku (documentation available [here](https://devcenter.heroku.com/articles/app-json-schema)). The keys available for use with Deployment Tasks are:
|
Dokku provides limited support for the `app.json` manifest from Heroku (documentation available [here](https://devcenter.heroku.com/articles/app-json-schema)). The keys available for use with Deployment Tasks are:
|
||||||
|
|
||||||
- `scripts.dokku.predeploy`: This is run _after_ an app's docker image is built, but _before_ any containers are scheduled. Changes made to your image are committed at this phase.
|
- `scripts.dokku.predeploy`: This is run _after_ an app's docker image is built, but _before_ any containers are scheduled. Changes made to your image are committed at this phase.
|
||||||
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
|
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||||
|
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||||
|
|
||||||
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
||||||
|
|
||||||
@@ -55,12 +149,13 @@ The following is an example `app.json` file. Please note that only the `scripts.
|
|||||||
"dokku": {
|
"dokku": {
|
||||||
"predeploy": "touch /app/predeploy.test",
|
"predeploy": "touch /app/predeploy.test",
|
||||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
||||||
}
|
},
|
||||||
|
"postdeploy": "curl https://some.external.api.service.com/created?state=success"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Procfile Release command
|
#### Procfile Release command
|
||||||
|
|
||||||
> New as of 0.14.0
|
> New as of 0.14.0
|
||||||
|
|
||||||
@@ -72,6 +167,6 @@ To use the `release` command, simply add a `release` stanza to your Procfile.
|
|||||||
release: curl https://some.external.api.service.com/deployment?state=built
|
release: curl https://some.external.api.service.com/deployment?state=built
|
||||||
```
|
```
|
||||||
|
|
||||||
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are *not* persisted to disk.
|
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are _not_ persisted to disk.
|
||||||
|
|
||||||
> Warning: scaling the release command up will likely result in unspecified issues within your deployment, and is highly discouraged.
|
> Warning: scaling the release command up will likely result in unspecified issues within your deployment, and is highly discouraged.
|
||||||
|
|||||||
@@ -25,11 +25,15 @@ Dokku deploys your application in multiple "phases" and the `docker-options` plu
|
|||||||
- `deploy`: the container that executes your running/deployed application
|
- `deploy`: the container that executes your running/deployed application
|
||||||
- `run`: the container that executes any arbitrary command via `dokku run`
|
- `run`: the container that executes any arbitrary command via `dokku run`
|
||||||
|
|
||||||
|
Manipulation of docker options will not restart running containers. This enables multiple options to be set/unset before final application. As such, changing an app's docker options must be followed by a `dokku ps:rebuild` in order to take effect.
|
||||||
|
|
||||||
|
More information on supported Docker options can be found here: https://docs.docker.com/engine/reference/commandline/run/.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Add Docker options
|
### Add Docker options
|
||||||
|
|
||||||
Add some options for the deployed/running app and when executing [`dokku run`](/docs/deployment/one-off-processes.md):
|
Add some options for the deployed/running app and when executing [`dokku run`](/docs/processes/one-off-tasks.md):
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||||
@@ -119,25 +123,3 @@ You can pass flags which will output only the value of the specific information
|
|||||||
```shell
|
```shell
|
||||||
dokku docker-options:report node-js-app --docker-options-build
|
dokku docker-options:report node-js-app --docker-options-build
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced usage
|
|
||||||
|
|
||||||
In your applications folder `/home/dokku/app_name` create a file called `DOCKER_OPTIONS_RUN` (or `DOCKER_OPTIONS_BUILD` or `DOCKER_OPTIONS_DEPLOY`).
|
|
||||||
|
|
||||||
Inside this file list one Docker option per line. For example:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
--link container_name:alias
|
|
||||||
-v /host/path:/container/path
|
|
||||||
-v /another/container/path
|
|
||||||
```
|
|
||||||
|
|
||||||
The above example will result in the following options being passed to Docker during `dokku run`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
--link container_name:alias -v /host/path:/container/path -v /another/container/path
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also include comments (lines beginning with a #) and blank lines in the DOCKER_OPTIONS file.
|
|
||||||
|
|
||||||
More information on Docker options can be found here: https://docs.docker.com/engine/reference/commandline/run/.
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
|
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||||
@@ -19,44 +18,34 @@ The storage plugin supports the following mount points:
|
|||||||
- explicit paths that exist on the host
|
- explicit paths that exist on the host
|
||||||
- docker volumes
|
- docker volumes
|
||||||
|
|
||||||
There are a few caveats to using the persistent storage plugin:
|
|
||||||
|
|
||||||
- Using implicit paths that do not exist are no longer supported, and actually deprecated in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0). When you specify a persistent storage mount, the host directory is **not** autocreated by either Dokku or Docker.
|
|
||||||
- We recommend using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts, and we create this on Dokku installation.
|
|
||||||
- Mounts are only available at run and deploy times, and you **must** redeploy (restart) an app to mount or unmount to an existing app's container.
|
|
||||||
- When a directory is mounted, any existing files within the container will be overwritten. If you are writing assets during the build process and then replace the directory with a mount, those files will no longer exist. This is a Docker limitation.
|
|
||||||
- Paths are mounted within the container at the root of the disk - `/` - and are **not** relative to `/app` (for buildpacks deploys) or the `WORKDIR` (for Dockerfile/Docker images).
|
|
||||||
- For applications using buildpack deploys, the host directory should be owned by the user and group id `32767`. This is due to how permissions within Herokuish - which builds the Docker images - works. For Dockerfile or Docker image deployments, please use the user and group id which corresponds to the one running the process within the container.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`:
|
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`. For simplicity, the Dokku project recommends using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts. This directory is created on Dokku installation.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# we use a subdirectory inside of the host directory to scope it to just the app
|
# we use a subdirectory inside of the host directory to scope it to just the app
|
||||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||||
```
|
```
|
||||||
|
|
||||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container. Mounts are only available for containers crated via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||||
|
|
||||||
|
> If the `/storage` path within the container had pre-existing content, the container files will be overrwritten. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||||
|
|
||||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||||
[process scaling documentation](/docs/deployment/process-management.md) for more information.
|
[process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku ps:restart app-name
|
dokku ps:restart app-name
|
||||||
```
|
```
|
||||||
|
|
||||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
|
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root (`/`) of the container.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# creating storage for the app 'node-js-app'
|
# creating storage for the app 'node-js-app'
|
||||||
mkdir -p /var/lib/dokku/data/storage/node-js-app
|
mkdir -p /var/lib/dokku/data/storage/node-js-app
|
||||||
|
|
||||||
# ensure the proper user has access to this directory
|
# set the directory ownership. Below is an example for herokuish
|
||||||
chown -R dokku:dokku /var/lib/dokku/data/storage/node-js-app
|
# but see the `Directory Permissions` section for more details
|
||||||
|
|
||||||
# as of 0.7.x, you should chown using the `32767` user and group id for buildpack deploys
|
|
||||||
# For dockerfile deploys, substitute the user and group id in use within the image
|
|
||||||
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
||||||
|
|
||||||
# mount the directory into your container's /app/storage directory, relative to root
|
# mount the directory into your container's /app/storage directory, relative to root
|
||||||
@@ -65,6 +54,17 @@ dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storag
|
|||||||
|
|
||||||
You can mount one or more directories as desired by following the above pattern.
|
You can mount one or more directories as desired by following the above pattern.
|
||||||
|
|
||||||
|
### Directory Permissions
|
||||||
|
|
||||||
|
The host directory should always be owned by the container user and group id. If this is not the case, files may not persist when written to mounted storage.
|
||||||
|
|
||||||
|
- Buildpacks via Herokuish: Use `32767:32767` as the file permissions
|
||||||
|
- For Cloud Native Buildpacks: This will depend on the builder in question, but can be retrieved via the `CNB_USER_ID` and `CNB_GROUP_ID` environment variables on the builder image. Common builders are as follows:
|
||||||
|
- heroku/buildpacks: `1000:1000`
|
||||||
|
- cloudfoundry/cnb: `2000:2000`
|
||||||
|
- packeto: `2000:2000`
|
||||||
|
- Dockerfile and Docker Image: Use the user and group id which corresponds to the one running the process within the container.
|
||||||
|
|
||||||
### Displaying storage reports for an app
|
### Displaying storage reports for an app
|
||||||
|
|
||||||
> New as of 0.8.1
|
> New as of 0.8.1
|
||||||
@@ -111,7 +111,7 @@ dokku storage:report node-js-app --storage-deploy-mounts
|
|||||||
|
|
||||||
## Use Cases
|
## Use Cases
|
||||||
|
|
||||||
### Persistent storage
|
### Sharing storage across deploys
|
||||||
|
|
||||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ dokku plugins-install
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
You can list all installed plugins using the `plugin:list` command:
|
### Listing Plugins
|
||||||
|
|
||||||
|
Installed plugins can be listed via the `plugin:list` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:list
|
dokku plugin:list
|
||||||
@@ -33,45 +35,60 @@ dokku plugin:list
|
|||||||
|
|
||||||
```
|
```
|
||||||
plugn: dev
|
plugn: dev
|
||||||
00_dokku-standard 0.20.4 enabled dokku core standard plugin
|
00_dokku-standard 0.25.4 enabled dokku core standard plugin
|
||||||
20_events 0.20.4 enabled dokku core events logging plugin
|
20_events 0.25.4 enabled dokku core events logging plugin
|
||||||
app-json 0.20.4 enabled dokku core app-json plugin
|
app-json 0.25.4 enabled dokku core app-json plugin
|
||||||
apps 0.20.4 enabled dokku core apps plugin
|
apps 0.25.4 enabled dokku core apps plugin
|
||||||
build-env 0.20.4 enabled dokku core build-env plugin
|
build-env 0.25.4 enabled dokku core build-env plugin
|
||||||
buildpacks 0.20.4 enabled dokku core buildpacks plugin
|
buildpacks 0.25.4 enabled dokku core buildpacks plugin
|
||||||
certs 0.20.4 enabled dokku core certificate management plugin
|
certs 0.25.4 enabled dokku core certificate management plugin
|
||||||
checks 0.20.4 enabled dokku core checks plugin
|
checks 0.25.4 enabled dokku core checks plugin
|
||||||
common 0.20.4 enabled dokku core common plugin
|
common 0.25.4 enabled dokku core common plugin
|
||||||
config 0.20.4 enabled dokku core config plugin
|
config 0.25.4 enabled dokku core config plugin
|
||||||
docker-options 0.20.4 enabled dokku core docker-options plugin
|
docker-options 0.25.4 enabled dokku core docker-options plugin
|
||||||
domains 0.20.4 enabled dokku core domains plugin
|
domains 0.25.4 enabled dokku core domains plugin
|
||||||
enter 0.20.4 enabled dokku core enter plugin
|
enter 0.25.4 enabled dokku core enter plugin
|
||||||
git 0.20.4 enabled dokku core git plugin
|
git 0.25.4 enabled dokku core git plugin
|
||||||
logs 0.20.4 enabled dokku core logs plugin
|
logs 0.25.4 enabled dokku core logs plugin
|
||||||
network 0.20.4 enabled dokku core network plugin
|
network 0.25.4 enabled dokku core network plugin
|
||||||
nginx-vhosts 0.20.4 enabled dokku core nginx-vhosts plugin
|
nginx-vhosts 0.25.4 enabled dokku core nginx-vhosts plugin
|
||||||
plugin 0.20.4 enabled dokku core plugin plugin
|
plugin 0.25.4 enabled dokku core plugin plugin
|
||||||
proxy 0.20.4 enabled dokku core proxy plugin
|
proxy 0.25.4 enabled dokku core proxy plugin
|
||||||
ps 0.20.4 enabled dokku core ps plugin
|
ps 0.25.4 enabled dokku core ps plugin
|
||||||
repo 0.20.4 enabled dokku core repo plugin
|
repo 0.25.4 enabled dokku core repo plugin
|
||||||
resource 0.20.4 enabled dokku core resource plugin
|
resource 0.25.4 enabled dokku core resource plugin
|
||||||
scheduler-docker-local 0.20.4 enabled dokku core scheduler-docker-local plugin
|
scheduler-docker-local 0.25.4 enabled dokku core scheduler-docker-local plugin
|
||||||
shell 0.20.4 enabled dokku core shell plugin
|
shell 0.25.4 enabled dokku core shell plugin
|
||||||
ssh-keys 0.20.4 enabled dokku core ssh-keys plugin
|
ssh-keys 0.25.4 enabled dokku core ssh-keys plugin
|
||||||
storage 0.20.4 enabled dokku core storage plugin
|
storage 0.25.4 enabled dokku core storage plugin
|
||||||
tags 0.20.4 enabled dokku core tags plugin
|
tags 0.25.4 enabled dokku core tags plugin
|
||||||
tar 0.20.4 enabled dokku core tar plugin
|
tar 0.25.4 enabled dokku core tar plugin
|
||||||
trace 0.20.4 enabled dokku core trace plugin
|
trace 0.25.4 enabled dokku core trace plugin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||||
|
|
||||||
|
### Checking if a plugin is installed
|
||||||
|
|
||||||
You can check if a plugin has been installed via the `plugin:installed` command:
|
You can check if a plugin has been installed via the `plugin:installed` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:installed postgres
|
dokku plugin:installed postgres
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Installing a plugin
|
||||||
|
|
||||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||||
|
|
||||||
|
The most common usage is to install a plugin from a url. This url may be any of the following:
|
||||||
|
|
||||||
|
- `git`: For git+ssh based plugin repository clones.
|
||||||
|
- `ssh`: For git+ssh based plugin repository clones.
|
||||||
|
- `file`: For copying plugins from a path on disk.
|
||||||
|
- `https`: For http based plugin repository clones.
|
||||||
|
|
||||||
|
Additionally, any urls with the extensions `.tar.gz` or `.tgz` are treated as Gzipped Tarballs for installation purposes and will be downloaded and extracted into place.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||||
```
|
```
|
||||||
@@ -87,7 +104,68 @@ Checking connectivity... done.
|
|||||||
-----> Plugin postgres enabled
|
-----> Plugin postgres enabled
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also uninstall a third-party plugin using the `plugin:uninstall` command:
|
For git-based plugin installation, a commit SHA-like object may be specified (tag/branch/commit sha) via the `--committish` argument and Dokku will attempt to install the specified commit object.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# where 2.0.0 is a potential git tag
|
||||||
|
dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 2.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Plugin names are interpolated based on the repository name minus the `dokku-` prefix. If the plugin being installed has a name other than what matches the repository name - or another name is desired - the `--name` flag can be used to override this interpolation.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:install https://github.com/dokku/smoke-test-plugin.git --name smoke-test-plugin
|
||||||
|
```
|
||||||
|
|
||||||
|
The `--core` flag may also be indicated as the sole argument, though it is only for installation of core plugins, and thus not useful for end-user installations.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:install --core
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, all flags may be omitted to trigger the `install` procedures for both core and third-party plugins:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installing plugin dependencies
|
||||||
|
|
||||||
|
In some cases, plugins will have system-level dependencies. These are not automatically installed via `plugin:install`, and must be separately via the `plugin:install-dependencies` command. This will run through all the `dependencies` trigger for all plugins.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:install-dependencies
|
||||||
|
```
|
||||||
|
|
||||||
|
This command may also target _just_ core plugins via the `--core` flag. This is usually only useful for source-based installs of Dokku.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:install-dependencies --core
|
||||||
|
```
|
||||||
|
|
||||||
|
### Updating a plugin
|
||||||
|
|
||||||
|
An installed, third-party plugin can be updated can updated via the `plugin:update` command. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
|
||||||
|
|
||||||
|
Please note that this command is only valid for plugin installs that were backed by a git-repository.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:update postgres
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Plugin (postgres) updated
|
||||||
|
```
|
||||||
|
|
||||||
|
An optional commit SHA-like object may be specified.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku plugin:update postgres 2.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Uninstalling a plugin
|
||||||
|
|
||||||
|
Third party plugins can be uninstalled using the `plugin:uninstall` command:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:uninstall postgres
|
dokku plugin:uninstall postgres
|
||||||
@@ -97,7 +175,9 @@ dokku plugin:uninstall postgres
|
|||||||
-----> Plugin postgres uninstalled
|
-----> Plugin postgres uninstalled
|
||||||
```
|
```
|
||||||
|
|
||||||
Enabling or disabling a plugin can also be useful in cases where you are debugging whether a third-party plugin is causing issues in your Dokku installation:
|
### Disabling a plugin
|
||||||
|
|
||||||
|
Disabling a plugin can also be useful for debugging whether a third-party plugin is causing issues in a Dokku installation. Another common use case is for disabling core functionality for replacement with a third-party plugin.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:disable postgres
|
dokku plugin:disable postgres
|
||||||
@@ -107,6 +187,10 @@ dokku plugin:disable postgres
|
|||||||
-----> Plugin postgres disabled
|
-----> Plugin postgres disabled
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Enabling a plugin
|
||||||
|
|
||||||
|
Disabled plugins can be re-enabled via the `plugin:enable` command.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:enable postgres
|
dokku plugin:enable postgres
|
||||||
```
|
```
|
||||||
@@ -115,12 +199,10 @@ dokku plugin:enable postgres
|
|||||||
-----> Plugin postgres enabled
|
-----> Plugin postgres enabled
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, you can update an installed third-party plugin. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
|
### Triggering a plugin trigger
|
||||||
|
|
||||||
|
The `plugin:trigger` can be used to call any internal plugin trigger. This may have unintended consequences, and thus should only be called for development or debugging purposes.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku plugin:update postgres
|
dokku plugin:trigger some-internal-trigger args-go-here
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
Plugin (postgres) updated
|
|
||||||
```
|
```
|
||||||
|
|||||||
126
docs/advanced-usage/registry-management.md
Normal file
126
docs/advanced-usage/registry-management.md
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# Registry Management
|
||||||
|
|
||||||
|
> New as of 0.25.0
|
||||||
|
|
||||||
|
```
|
||||||
|
registry:login [--password-stdin] <server> <username> [<password>] # Login to a docker registry
|
||||||
|
registry:report [<app>] [<flag>] # Displays a registry report for one or more apps
|
||||||
|
registry:set <app> <key> (<value>) # Set or clear a registry property for an app
|
||||||
|
```
|
||||||
|
|
||||||
|
The registry plugin enables interacting with remote registries, which is useful when either deploying images via `git:from-image` or when interacting with custom schedulers to deploy built image artifacts.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Logging into a registry
|
||||||
|
|
||||||
|
The `registry:login` command can be used to log into a docker registry. The following are examples for logging into various common registries:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# hub.docker.com
|
||||||
|
dokku registry:login docker.io $USERNAME $PASSWORD
|
||||||
|
|
||||||
|
# digitalocean
|
||||||
|
# the username and password are both defined as the same api token
|
||||||
|
dokku registry:login registry.digitalocean.com $DIGITALOCEAN_API_TOKEN $DIGITALOCEAN_API_TOKEN
|
||||||
|
|
||||||
|
# github container registry
|
||||||
|
# see the following link for information on retrieving a personal access token
|
||||||
|
# https://docs.github.com/en/packages/guides/pushing-and-pulling-docker-images#authenticating-to-github-container-registry
|
||||||
|
dokku registry:login ghcr.io $USERNAME $REGISTRY_PAT_TOKEN
|
||||||
|
|
||||||
|
# quay
|
||||||
|
# a robot user may be used to login
|
||||||
|
dokku registry:login quay.io $USERNAME $PASSWORD
|
||||||
|
```
|
||||||
|
|
||||||
|
For security reasons, the password may also be specified as stdin by specifying the `--password-stdin` flag. This is supported regardless of the registry being logged into.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
echo "$PASSWORD" | dokku registry:login --password-stdin docker.io $USERNAME
|
||||||
|
```
|
||||||
|
|
||||||
|
For certain Docker registries - such as Amazon ECR or Google's GCR registries - users may instead wish to use a docker credential helper to automatically authenticate against a server; please see the documentation regarding the credential helper in question for further setup instructions.
|
||||||
|
|
||||||
|
### Setting a remote server
|
||||||
|
|
||||||
|
To specify a remote server registry for pushes, set the `server` property via the `registry:set` command. The default value for this property is empty string. Setting the value to `docker.io` or `hub.docker.com` will result in the computed value being empty string (as that is the default, implicit registry), while any non-zero length value will have a `/` appended to it if there is not one already.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku registry:set node-js-app server docker.io
|
||||||
|
```
|
||||||
|
|
||||||
|
This property can be set for a single app or globally via the `--global` flag. When set globally, the app-specific value will always overide the global value. The default global value for this property is empty string.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku registry:set --global server docker.io
|
||||||
|
```
|
||||||
|
|
||||||
|
Setting the property value to an empty string will reset the value to the system default. Resetting the value can be done per app or globally.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# per-app
|
||||||
|
dokku registry:set node-js-app server
|
||||||
|
|
||||||
|
# globally
|
||||||
|
dokku registry:set --global server
|
||||||
|
```
|
||||||
|
|
||||||
|
The following are the values that should be used for common remote servers:
|
||||||
|
|
||||||
|
- Amazon Elastic Container Registry:
|
||||||
|
- value: `$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/`
|
||||||
|
- notes: The `$AWS_ACCOUNT_ID` and `$AWS_REGION` should match the values for your account and region, respectively. Additionally, an IAM profile that allows `push` access to the repository specified by `image-repo` should be attached to your Dokku server.
|
||||||
|
- Azure Container Registry:
|
||||||
|
- value `$REGISTRY_NAME.azurecr.io/`
|
||||||
|
- notes: The `$AKS_REGISTRY_NAME` should match the name of the registry created on your account.
|
||||||
|
- Docker Hub:
|
||||||
|
- value: `docker.io/`
|
||||||
|
- notes: Requires owning the namespace used in the `image-repo` value.
|
||||||
|
- Digitalocean:
|
||||||
|
- value: `registry.digitalocean.com/`
|
||||||
|
- notes: Requires setting the correct `image-repo` value for your registry.
|
||||||
|
- Github Container Registry:
|
||||||
|
- value: `ghcr.io/`
|
||||||
|
- notes: Requires that the authenticated user has access to the namespace used in the `image-repo` value.
|
||||||
|
- Quay.io:
|
||||||
|
- value: `quay.io/`
|
||||||
|
|
||||||
|
### Specifying an image repository name
|
||||||
|
|
||||||
|
By default, Dokku uses the value `dokku/$APP_NAME` as the image repository that is pushed and deployed. For certain registries, the `dokku` namespace may not be available to your user. In these cases, the value can be set by changing the value of the `image-repo` property via the `registry:set` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku registry:set node-js-app image-repo my-awesome-prefix/node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
Setting the property value to an empty string will reset the value to the system default. Resetting the value has to be done per-app.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# per-app
|
||||||
|
dokku registry:set node-js-app push-on-release
|
||||||
|
```
|
||||||
|
|
||||||
|
### Pushing images on build
|
||||||
|
|
||||||
|
To push the image on release, set the `push-on-release` property to `true` via the `registry:set` command. The default value for this property is `false`. Setting the property to `true` will result in the imag being tagged with an ID that is incremented with every release. This tag will be what is used for running app code.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku registry:set node-js-app push-on-release true
|
||||||
|
```
|
||||||
|
|
||||||
|
This property can be set for a single app or globally via the `--global` flag. When set globally, the app-specific value will always overide the global value. The default global value for this property is `false`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku registry:set --global push-on-release true
|
||||||
|
```
|
||||||
|
|
||||||
|
Setting the property value to an empty string will reset the value to the system default. Resetting the value can be done per app or globally.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# per-app
|
||||||
|
dokku registry:set node-js-app push-on-release
|
||||||
|
|
||||||
|
# globally
|
||||||
|
dokku registry:set --global push-on-release
|
||||||
|
```
|
||||||
@@ -16,7 +16,7 @@ The resource plugin is meant to allow users to limit or reserve resources for a
|
|||||||
|
|
||||||
By default, Dokku allows unlimited resource access to apps deployed on a server. In some cases, it may be desirable to limit this on a per-app or per-process-type basis. The `resource` plugin allows management of both resource "limits" and resource "reservations", where each resource request type has specific meaning to the scheduler in use for a given app.
|
By default, Dokku allows unlimited resource access to apps deployed on a server. In some cases, it may be desirable to limit this on a per-app or per-process-type basis. The `resource` plugin allows management of both resource "limits" and resource "reservations", where each resource request type has specific meaning to the scheduler in use for a given app.
|
||||||
|
|
||||||
> The meaning of a values and it's units are specific to the scheduler in use for a given app. If a scheduler does not support a given resource type combination, it will be ignored. All resource commands require an app rebuild or deploy in order to take effect.
|
> Warning: The meaning of a values and it's units are specific to the scheduler in use for a given app. If a value is incorrect for a scheduler, this may result in containers failing to start correctly. If a scheduler does not support a given resource type combination, it will be ignored. All resource commands require an app rebuild or deploy in order to take effect.
|
||||||
|
|
||||||
Valid resource options include:
|
Valid resource options include:
|
||||||
|
|
||||||
@@ -71,6 +71,17 @@ dokku resource:limit --cpu 100 --memory 100 --process-type worker node-js-app
|
|||||||
memory: 100
|
memory: 100
|
||||||
```
|
```
|
||||||
|
|
||||||
|
A resource value can be individually cleared by setting the value to the special value `clear`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku resource:limit --cpu clear node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> Setting resource limits for node-js-app
|
||||||
|
cpu: cleared
|
||||||
|
```
|
||||||
|
|
||||||
#### Displaying Resource Limits
|
#### Displaying Resource Limits
|
||||||
|
|
||||||
Running the `resource:limit` command without any flags will display the currently configured default app limits.
|
Running the `resource:limit` command without any flags will display the currently configured default app limits.
|
||||||
@@ -92,7 +103,6 @@ dokku resource:limit node-js-app
|
|||||||
|
|
||||||
This may also be combined with the `--process-type` flag to see app limits on a process-type level. Note that the displayed values are not merged with the defaults.
|
This may also be combined with the `--process-type` flag to see app limits on a process-type level. Note that the displayed values are not merged with the defaults.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku resource:limit --process-type web node-js-app
|
dokku resource:limit --process-type web node-js-app
|
||||||
```
|
```
|
||||||
@@ -169,6 +179,17 @@ dokku resource:reserve --cpu 100 --memory 100 --process-type worker node-js-app
|
|||||||
memory: 100
|
memory: 100
|
||||||
```
|
```
|
||||||
|
|
||||||
|
A resource value can be individually cleared by setting the value to the special value `clear`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku resource:reserve --cpu clear node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> Setting resource reservation for node-js-app
|
||||||
|
cpu: cleared
|
||||||
|
```
|
||||||
|
|
||||||
#### Displaying Resource Reservations
|
#### Displaying Resource Reservations
|
||||||
|
|
||||||
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
|
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ The refactor of the proxy plugin removes the following functions from being sour
|
|||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
### Function renames
|
||||||
|
|
||||||
|
- `tar#tar_in_cmd` was renamed to `tar#cmd-tar-in`. Users should avoid using `cmd-*` commands directly, and instead file an issue to have them exposed via a plugin trigger.
|
||||||
|
- `tar#tar_from_cmd` was renamed to `tar#cmd-tar-from`. Users should avoid using `cmd-*` commands directly, and instead file an issue to have them exposed via a plugin trigger.
|
||||||
|
|
||||||
### Remove support for Unsupported Operating Systems
|
### 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:
|
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:
|
||||||
@@ -45,10 +50,14 @@ Dokku will no longer distribute packages for Debian versions that are not `stabl
|
|||||||
- Debian 7 (wheezy)
|
- Debian 7 (wheezy)
|
||||||
- Debian 8 (jessie)
|
- Debian 8 (jessie)
|
||||||
|
|
||||||
### App report flags
|
### Removed App report flags
|
||||||
|
|
||||||
The `--git-sha` flag was moved from the `apps:report` command to the `git:report` command.
|
The `--git-sha` flag was moved from the `apps:report` command to the `git:report` command.
|
||||||
|
|
||||||
|
## App report output
|
||||||
|
|
||||||
|
When an app is not deployed, the `apps:report` command no longer shows the message `not deployed`. Please use the `--deployed` flag on `ps:report` instead to see if the app has been deployed.
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
### App report flags
|
### App report flags
|
||||||
|
|||||||
18
docs/appendices/0.21.0-migration-guide.md
Normal file
18
docs/appendices/0.21.0-migration-guide.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# 0.21.0 Migration Guide
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
The `tls` name is no longer a reserved app name, and can be used by applications. This was previously a reserved app name due to it's use as a place for global SSL certificate files; Dokku has not supported global SSL certificates for many releases, and thus there is no need to reserve the name.
|
||||||
|
|
||||||
|
## Deprecations
|
||||||
|
|
||||||
|
- `git#git_deploy_branch()` is deprecated in favor of `plugn trigger git-deploy-branch`.
|
||||||
|
- The `config` command is deprecated in favor of `config:show`.
|
||||||
|
- Usage of this command in conjunction with either the `--export` or `--shell` flag is deprecated in favor of `config:export --format` with the correct format value (`exports` or `shell`, respectively).
|
||||||
|
- The `nginx:build-config` command is deprecated in favor of `proxy:build-config`.
|
||||||
|
|
||||||
|
## Removals
|
||||||
|
|
||||||
|
The `apps:destroy` command no longer takes a second argument `force`. Instead, this can be passed as the `--force` flag, either globally or as a flag to the command itself.
|
||||||
|
|
||||||
|
The `proxy:enable` and `proxy:disable` no longer restart apps when setting the `DOKKU_DISABLE_PROXY` environment variable. A future release will disable usage of `DOKKU_DISABLE_PROXY` altogether.
|
||||||
27
docs/appendices/0.22.0-migration-guide.md
Normal file
27
docs/appendices/0.22.0-migration-guide.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# 0.22.0 Migration Guide
|
||||||
|
|
||||||
|
## Deprecations
|
||||||
|
|
||||||
|
- Calling `logs:failed` without either a `<name>` or the `--all` flag is deprecated.
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- Underscores are no longer valid characters in app names. Please rename applications before upgrading.
|
||||||
|
- Process type names specified in Procfile may no longer use characters not valid in DNS Label Names ([RFC 1123](https://tools.ietf.org/html/rfc1123)).
|
||||||
|
- The minimum Docker version is now 17.05.0.
|
||||||
|
- The `common.GetDeployingAppImageName()` function now returns an `error` as the second return argument instead of calling `common.LogFail()` internally.
|
||||||
|
- Setting `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` is deprecated; Dokku 0.23.0 will avoid removing the `remote:` ansi prefix entirely. No warning will be added in this release.
|
||||||
|
|
||||||
|
## Removals
|
||||||
|
|
||||||
|
The `ps` command has had a few removals as a result of a rewrite to Golang:
|
||||||
|
|
||||||
|
- The `ps:set-restart-policy` command has been removed in favor the `ps:set` command.
|
||||||
|
- The `ps:restart-policy` command has been removed in favor of the `ps:report` command.
|
||||||
|
- The `ps:rebuildall` command has been removed in favor of calling the `ps:rebuild` with the `--all` flag instead of an app name.
|
||||||
|
- The `ps:restartall` command has been removed in favor of calling the `ps:restart` with the `--all` flag instead of an app name.
|
||||||
|
- The `ps:stopall` command has been removed in favor of calling the `ps:stop` with the `--all` flag instead of an app name.
|
||||||
|
- The `ps:startall` command has been removed in favor of calling the `ps:start` with the `--all` flag instead of an app name.
|
||||||
|
- The `DOKKU_PROCFILE` file is no longer located in the git directory for a given app on the server. It's location is currently not exposed.
|
||||||
|
- The `procfile-get-command` plugin trigger no longer takes a `procfile path` as the final argument.
|
||||||
|
- All `ps` functions have been removed. Please us a trigger as appropriate or file a PR to have a new trigger/wrapper function added.
|
||||||
8
docs/appendices/0.23.0-migration-guide.md
Normal file
8
docs/appendices/0.23.0-migration-guide.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# 0.23.0 Migration Guide
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- The `plugin:list` command no longer outputs the version for the `plugn` binary.
|
||||||
|
- Users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory. This should only impact platform developers, and users of our Docker image will already have the file available.
|
||||||
|
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron entry in `/etc/cron.d/dokku` to avoid this issue.
|
||||||
|
- As of 0.23.0, Dokku will now inject the `max-size` log driver option for applications. This is restricted to app-configured log driver values empty, `local` or `json-file` in 0.23.1 to increase setup compatibility. Users who configure alternative log drivers at the system level will need to either set the global `max-size` property to `unlimited` or switch to the built-in `vector` logging support.
|
||||||
12
docs/appendices/0.24.0-migration-guide.md
Normal file
12
docs/appendices/0.24.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# 0.24.0 Migration Guide
|
||||||
|
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
- The commands `proxy:enable`, `proxy:disable` and `proxy:build-config` now support the `--all` flag in addition to general parallelism.
|
||||||
|
- The `builder-cnb` plugin has been renamed `builder-pack`, and all related plugin triggers have had the suffix `-cnb` changed to `-pack`.
|
||||||
|
|
||||||
|
## Deprecations
|
||||||
|
|
||||||
|
- The 1.0.0 release of Dokku will no longer select buildpack builders over dockerfile builders if both builders match. Instead, Dokku will choose the first builder that responds to the `builder-detect` trigger. Users that wish to use a specific builder may set a builder using the `builder:set` command, which will force Dokku to use the specified builder regardless of what might be auto-detected.
|
||||||
|
- The `tags` plugin is deprecated in favor of the [`git:from-image`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) command. It will be removed in the next minor release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||||
|
- The `tar` plugin is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in the next minor release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||||
34
docs/appendices/0.25.0-migration-guide.md
Normal file
34
docs/appendices/0.25.0-migration-guide.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# 0.25.0 Migration Guide
|
||||||
|
|
||||||
|
## Registry Plugin
|
||||||
|
|
||||||
|
The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now built-in. This comes with a few changes:
|
||||||
|
|
||||||
|
- Builder plugins should call `post-release-builder` at the end of the build.
|
||||||
|
- The `push` and `pull` command are not implemented. Users wishing to deploy a remote image should use `git:from-image`. Image pushing is not available at this time.
|
||||||
|
- At this time, remote docker repositories are not automatically created for AWS, and users must create those repositories for their applications as necessary. This may be implemented in the future.
|
||||||
|
- Docker images are only pushed when configured to do so. See the [registry management documentation](/docs/deployment/registry-management.md) for more details.
|
||||||
|
|
||||||
|
## Other
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
|
||||||
|
- The network plugin can now set an `initial-network` for all containers on creation. This is a replacement for specifying the `--network` flag via the `docker-options` plugin. Please see the [network documentation](/docs/networking/network.md#attaching-an-app-to-a-network) for more information.
|
||||||
|
- The `dokku run` command now always removes the ephemeral container on exit. Users that need a persistent container should instead specify a `console` process type in their `Procfile` specifying an available shell (usually either `bash` or `sh`) and scale that container appropriately.
|
||||||
|
- The `pre-deploy` plugin trigger is now called internally by Dokku. Scheduler plugins should avoid calling this trigger, as any image changes introduced by subsequent trigger calls will be ignored.
|
||||||
|
- The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-20`, and is based on both the `heroku-20` stack as well as Ubuntu 20.04. Users that wish to stick with the old, `heroku-18`/Ubuntu 18.04 builder may specify `gliderlabs/herokuish:latest-18` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
|
||||||
|
- This change does not impact any users of Cloud Native Buildpacks.
|
||||||
|
|
||||||
|
### Deprecations
|
||||||
|
|
||||||
|
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
|
||||||
|
- The `--rm` and `--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||||
|
- The `--detach` flag is deprecated in favor of the `run:detached` command.
|
||||||
|
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formations` key of the `app.json` file.
|
||||||
|
- The hooks `post-release-buildpack`, `post-release-dockerfile`, and `post-release-pack` are deprecated in favor of `post-release-builder`. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
|
||||||
|
|
||||||
|
## Removals
|
||||||
|
|
||||||
|
- As of April 2021, Ubuntu 16.04 is no longer an LTS release, and support has been removed. Packages may still install on older versions of Ubuntu, but are no longer tested, and therefore no support will be provided.
|
||||||
|
- The web installer has been removed. Users are now required to setup Dokku via cli commands. This change was made to combat potential security issues where users ignored the web installer, allowing unauthorized users to add their keys to the host.
|
||||||
|
- The `scheduler-docker-cleanup` plugin trigger has been removed from the scheduler interface, and is no longer invoked.
|
||||||
@@ -20,6 +20,6 @@
|
|||||||
|
|
||||||
## Dockerfile apps with exposed ports
|
## Dockerfile apps with exposed ports
|
||||||
|
|
||||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/docs/deployment/methods/dockerfiles.md#exposed-ports)
|
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/docs/deployment/builders/dockerfiles.md#exposed-ports)
|
||||||
- Note that nginx will proxy the same port numbers to listen publicly
|
- Note that nginx will proxy the same port numbers to listen publicly
|
||||||
- UDP ports can be exposed by disabling the [nginx proxy](/docs/advanced-usage/proxy-management.md) with `dokku proxy:disable node-js-app`
|
- UDP ports can be exposed by disabling the [nginx proxy](/docs/networking/proxy-management.md) with `dokku proxy:disable node-js-app`
|
||||||
|
|||||||
@@ -12,21 +12,21 @@
|
|||||||
## Proxy port mapping
|
## Proxy port mapping
|
||||||
|
|
||||||
- You can now configure host -> container proxy port mappings
|
- You can now configure host -> container proxy port mappings
|
||||||
- The UI is handled by the [proxy](/docs/advanced-usage/proxy-management.md) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
- The UI is handled by the [proxy](/docs/networking/proxy-management.md) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||||
- Default port mappings
|
- Default port mappings
|
||||||
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
||||||
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
||||||
- You may override this behavior with the [`proxy:ports-*` commands](/docs/advanced-usage/proxy-management.md) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
- You may override this behavior with the [`proxy:ports-*` commands](/docs/networking/proxy-management.md) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||||
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
||||||
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
||||||
|
|
||||||
## Calling the `dokku` binary
|
## Calling the `dokku` binary
|
||||||
|
|
||||||
- Plugins should *not* call the `dokku` binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions. As a result, the following Dokku commands are no longer publicly exposed:
|
- Plugins should *not* call the `dokku` binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions. As a result, the following Dokku commands are no longer publicly exposed:
|
||||||
- `dokku build`
|
- `dokku build`
|
||||||
- `dokku receive`
|
- `dokku receive`
|
||||||
- `dokku release`
|
- `dokku release`
|
||||||
- `dokku tar:build`
|
- `dokku tar:build`
|
||||||
- `dokku tar:build-locked`
|
- `dokku tar:build-locked`
|
||||||
- `dokku git:build`
|
- `dokku git:build`
|
||||||
- `dokku git:build-locked`
|
- `dokku git:build-locked`
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ We should now properly handle file ownership for mounted directories. This was e
|
|||||||
|
|
||||||
## Restart Policies
|
## Restart Policies
|
||||||
|
|
||||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/deployment/process-management.md#restart-policies) for more details.
|
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/processes/process-management.md#restart-policies) for more details.
|
||||||
|
|
||||||
## SSH Keys
|
## SSH Keys
|
||||||
|
|
||||||
|
|||||||
BIN
docs/assets/dokku-large.png
Normal file
BIN
docs/assets/dokku-large.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
3006
docs/assets/dokku.ai
Normal file
3006
docs/assets/dokku.ai
Normal file
File diff suppressed because one or more lines are too long
@@ -2,10 +2,10 @@
|
|||||||
<browserconfig>
|
<browserconfig>
|
||||||
<msapplication>
|
<msapplication>
|
||||||
<tile>
|
<tile>
|
||||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/favicons/mstile-70x70.png"/>
|
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/favicons/mstile-150x150.png"/>
|
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/favicons/mstile-310x310.png"/>
|
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/favicons/mstile-310x150.png"/>
|
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||||
<TileColor>#da532c</TileColor>
|
<TileColor>#da532c</TileColor>
|
||||||
</tile>
|
</tile>
|
||||||
</msapplication>
|
</msapplication>
|
||||||
|
|||||||
@@ -2,37 +2,37 @@
|
|||||||
"name": "Dokku",
|
"name": "Dokku",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||||
"sizes": "36x36",
|
"sizes": "36x36",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "0.75"
|
"density": "0.75"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||||
"sizes": "48x48",
|
"sizes": "48x48",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.0"
|
"density": "1.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||||
"sizes": "72x72",
|
"sizes": "72x72",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "1.5"
|
"density": "1.5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||||
"sizes": "96x96",
|
"sizes": "96x96",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "2.0"
|
"density": "2.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "3.0"
|
"density": "3.0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.20.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.25.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image\/png",
|
"type": "image\/png",
|
||||||
"density": "4.0"
|
"density": "4.0"
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
:root {
|
||||||
|
color-scheme: light dark;
|
||||||
|
}
|
||||||
body {
|
body {
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
font-size: 62.5%;
|
font-size: 62.5%;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
padding-bottom: 40px;
|
padding-bottom: 40px;
|
||||||
color: #5a5a5a;
|
color: #5a5a5a;
|
||||||
@@ -39,13 +42,13 @@ h1 {
|
|||||||
font-size: 1.6em;
|
font-size: 1.6em;
|
||||||
}
|
}
|
||||||
.header .navbar-brand a {
|
.header .navbar-brand a {
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/dokku.png);
|
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/dokku.png);
|
||||||
text-indent: 40px;
|
text-indent: 40px;
|
||||||
}
|
}
|
||||||
.blurb {
|
.blurb {
|
||||||
color: #424242;
|
color: #424242;
|
||||||
background-color: #ededed;
|
background-color: #ededed;
|
||||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.20.4/docs/assets/gplaypattern.png);
|
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.25.4/docs/assets/gplaypattern.png);
|
||||||
padding: 45px 0;
|
padding: 45px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -231,7 +234,7 @@ h1 {
|
|||||||
}
|
}
|
||||||
.list-group-item {
|
.list-group-item {
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 1.1em;
|
font-size: 14px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
padding: .2rem .5rem;
|
padding: .2rem .5rem;
|
||||||
color: #157577;
|
color: #157577;
|
||||||
@@ -317,7 +320,7 @@ a.list-group-item {
|
|||||||
right: 0;
|
right: 0;
|
||||||
width: auto;
|
width: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
font-size: 1.2em;
|
font-size: 1em;
|
||||||
border-radius: 0 0 0 5px;
|
border-radius: 0 0 0 5px;
|
||||||
padding: 0 0.5em;
|
padding: 0 0.5em;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
@@ -654,3 +657,75 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body {
|
||||||
|
background-color: rgb(13, 17, 23);
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
background-color: #0b1f4c;
|
||||||
|
}
|
||||||
|
.blurb {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
.slack-channel {
|
||||||
|
background-color: #110e09;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background-color: rgb(22, 27, 34);
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
pre {
|
||||||
|
background-color: rgb(22, 27, 34);
|
||||||
|
color: #bbb;
|
||||||
|
border: 1px solid #555;
|
||||||
|
box-shadow: 0 0 0 3px #111;
|
||||||
|
}
|
||||||
|
.highlight-show-language-label {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
|
.list-group-item {
|
||||||
|
background-color: rgb(13, 17, 23);
|
||||||
|
}
|
||||||
|
blockquote {
|
||||||
|
background-color: rgba(0, 82, 204, 0.18);
|
||||||
|
border-left: 4px solid rgba(108, 169, 255, 0.3);;
|
||||||
|
color: rgb(108, 169, 255);
|
||||||
|
}
|
||||||
|
blockquote.warning {
|
||||||
|
border-left: 4px solid rgba(239, 136, 84, 0.3);
|
||||||
|
background-color: rgba(235, 100, 32, 0.18);
|
||||||
|
color: rgb(239, 136, 84);
|
||||||
|
}
|
||||||
|
blockquote.new-as-of {
|
||||||
|
border-left: 4px solid rgba(11, 216, 73, 0.3);
|
||||||
|
background-color: rgba(9, 171, 60, 0.18);
|
||||||
|
color: rgb(11, 216, 73);
|
||||||
|
}
|
||||||
|
.dev-warning, .outdated-warning {
|
||||||
|
background-color: #4e440d;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.table-striped tbody tr:nth-of-type(odd) {
|
||||||
|
background-color: #080808
|
||||||
|
}
|
||||||
|
.table-hover tbody tr:hover {
|
||||||
|
background-color: #3b3b3b;
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
.table td, .table th {
|
||||||
|
border-top: 1px solid #131110;
|
||||||
|
}
|
||||||
|
.table thead th {
|
||||||
|
border-bottom: 2px solid #131110;
|
||||||
|
}
|
||||||
|
.markdown-body {
|
||||||
|
color: rgb(184, 181, 171);
|
||||||
|
}
|
||||||
|
.markdown-body h1 {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
.markdown-body h2, .markdown-body h3, .markdown-body h4 {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,6 +17,11 @@
|
|||||||
"0.17.9",
|
"0.17.9",
|
||||||
"0.18.5",
|
"0.18.5",
|
||||||
"0.19.13",
|
"0.19.13",
|
||||||
"0.20.4"
|
"0.20.4",
|
||||||
|
"0.21.4",
|
||||||
|
"0.22.9",
|
||||||
|
"0.23.9",
|
||||||
|
"0.24.10",
|
||||||
|
"0.25.4"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,56 +2,11 @@
|
|||||||
|
|
||||||
Given the constraints, running Dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
|
Given the constraints, running Dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
|
||||||
|
|
||||||
While Dokku does not yet have an official client, there are a multitude of ways in which you can interact with your Dokku installation. The easiest is to use the **bash** client, though you may wish to use another.
|
The easiest way to interact with Dokku remotely is by using the official client. Documented below are the various clients that you may wish to use.
|
||||||
|
|
||||||
## (bash, zsh, etc.) `dokku_client.sh`
|
## Official Client
|
||||||
|
|
||||||
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.
|
See the [remote commands documentation](/docs/deployment/remote-commands.md) for more information on how to install and use the official client.
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
# optional: make sure that the dokku_client.sh version matches your Dokku version
|
|
||||||
cd ~/.dokku
|
|
||||||
git checkout <tag/branch>
|
|
||||||
|
|
||||||
# add the following to either your
|
|
||||||
# .bashrc, .bash_profile, or .profile file
|
|
||||||
alias dokku='$HOME/.dokku/contrib/dokku_client.sh'
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, if using another shell such as **zsh**, create an alias command which invokes the script using **bash**:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# zsh: add the following to either .zshenv or .zshrc
|
|
||||||
alias dokku='bash $HOME/.dokku/contrib/dokku_client.sh'
|
|
||||||
|
|
||||||
# fish: add the following to ~/.config/fish/config.fish
|
|
||||||
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
|
||||||
|
|
||||||
# csh: add the following to .cshrc
|
|
||||||
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`.
|
|
||||||
|
|
||||||
## (nodejs) dokku-toolbelt
|
## (nodejs) dokku-toolbelt
|
||||||
|
|
||||||
|
|||||||
@@ -18,138 +18,55 @@ Let's take a quick look at the current Dokku nginx plugin that's shipped with Do
|
|||||||
|
|
||||||
[See the full documentation](/docs/development/plugin-creation.md).
|
[See the full documentation](/docs/development/plugin-creation.md).
|
||||||
|
|
||||||
## Official Plugins (Beta)
|
## Official Plugins
|
||||||
|
|
||||||
The following plugins are available and provided by Dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
|
The following plugins are available and provided by Dokku maintainers. Please file issues against their respective issue trackers.
|
||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
| [CouchDB (beta)](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
| [CouchDB](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
||||||
| [Elasticsearch (beta)](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
| [Elasticsearch](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Grafana/Graphite/Statsd (beta)](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
|
| [Grafana/Graphite/Statsd](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
|
||||||
| [MariaDB (beta)](https://github.com/dokku/dokku-mariadb-plugin) | [dokku][] | 0.4.0+ |
|
| [MariaDB](https://github.com/dokku/dokku-mariadb-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Memcached (beta)](https://github.com/dokku/dokku-memcached-plugin) | [dokku][] | 0.4.0+ |
|
| [Memcached](https://github.com/dokku/dokku-memcached-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Mongo (beta)](https://github.com/dokku/dokku-mongo-plugin) | [dokku][] | 0.4.0+ |
|
| [Mongo](https://github.com/dokku/dokku-mongo-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [MySQL (beta)](https://github.com/dokku/dokku-mysql-plugin) | [dokku][] | 0.4.0+ |
|
| [MySQL](https://github.com/dokku/dokku-mysql-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Nats (beta)](https://github.com/dokku/dokku-nats) | [dokku][] | 0.4.0+ |
|
| [Nats](https://github.com/dokku/dokku-nats) | [dokku][] | 0.4.0+ |
|
||||||
| [Postgres (beta)](https://github.com/dokku/dokku-postgres-plugin) | [dokku][] | 0.4.0+ |
|
| [Postgres](https://github.com/dokku/dokku-postgres-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [RabbitMQ (beta)](https://github.com/dokku/dokku-rabbitmq-plugin) | [dokku][] | 0.4.0+ |
|
| [RabbitMQ](https://github.com/dokku/dokku-rabbitmq-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Redis (beta)](https://github.com/dokku/dokku-redis-plugin) | [dokku][] | 0.4.0+ |
|
| [Redis](https://github.com/dokku/dokku-redis-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [RethinkDB (beta)](https://github.com/dokku/dokku-rethinkdb-plugin) | [dokku][] | 0.4.0+ |
|
| [RethinkDB](https://github.com/dokku/dokku-rethinkdb-plugin) | [dokku][] | 0.4.0+ |
|
||||||
| [Copy Files to Image](https://github.com/dokku/dokku-copyfiles-to-image) | [dokku][] | 0.4.0+ |
|
| [Copy Files to Image](https://github.com/dokku/dokku-copyfiles-to-image) | [dokku][] | 0.4.0+ |
|
||||||
| [HTTP Auth (beta)](https://github.com/dokku/dokku-http-auth) | [dokku][] | 0.4.0+ |
|
| [HTTP Auth](https://github.com/dokku/dokku-http-auth) | [dokku][] | 0.4.0+ |
|
||||||
| [Let's Encrypt (beta)](https://github.com/dokku/dokku-letsencrypt) | [dokku][] | 0.4.0+ |
|
| [Let's Encrypt](https://github.com/dokku/dokku-letsencrypt) | [dokku][] | 0.4.0+ |
|
||||||
| [Maintenance mode (beta)](https://github.com/dokku/dokku-maintenance) | [dokku][] | 0.4.0+ |
|
| [Maintenance mode](https://github.com/dokku/dokku-maintenance) | [dokku][] | 0.4.0+ |
|
||||||
| [Redirect (beta)](https://github.com/dokku/dokku-redirect) | [dokku][] | 0.4.0+ |
|
| [Redirect](https://github.com/dokku/dokku-redirect) | [dokku][] | 0.4.0+ |
|
||||||
|
| [Registry](https://github.com/dokku/dokku-registry) | [dokku][] | 0.12.0+
|
||||||
|
|
||||||
## Community plugins
|
## Community plugins
|
||||||
|
|
||||||
> Warning: The following plugins have been supplied by our community and may not have been tested by Dokku maintainers.
|
> Warning: The following plugins have been supplied by our community and may not have been tested by Dokku maintainers.
|
||||||
|
|
||||||
[256dpi]: https://github.com/256dpi
|
|
||||||
[abossard]: https://github.com/dudagroup
|
|
||||||
[ademuk]: https://github.com/ademuk
|
|
||||||
[agco-adm]: https://github.com/agco-adm
|
|
||||||
[alessio]: https://github.com/alessio
|
|
||||||
[alex-sherwin]: https://github.com/alex-sherwin
|
|
||||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
|
||||||
[alexkruegger]: https://github.com/alexkruegger
|
|
||||||
[Aluxian]: https://github.com/Aluxian
|
|
||||||
[Aomitayo]: https://github.com/Aomitayo
|
|
||||||
[apmorton]: https://github.com/apmorton
|
|
||||||
[artofrawr]: https://github.com/artofrawr
|
|
||||||
[basgys]: https://github.com/basgys
|
|
||||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
|
||||||
[blag]: https://github.com/blag
|
|
||||||
[cameron-martin]: https://github.com/cameron-martin
|
|
||||||
[candlewaster]: https://notabug.org/candlewaster
|
|
||||||
[cedricziel]: https://github.com/cedricziel
|
|
||||||
[cef]: https://github.com/cef
|
|
||||||
[cjblomqvist]: https://github.com/cjblomqvist
|
|
||||||
[crisward]: https://github.com/crisward
|
|
||||||
[cu12]: https://github.com/cu12
|
|
||||||
[darkpixel]: https://github.com/darkpixel
|
|
||||||
[dokku]: https://github.com/dokku
|
|
||||||
[dokku-community]: https://github.com/dokku-community
|
|
||||||
[dyson]: https://github.com/dyson
|
|
||||||
[fermuch]: https://github.com/fermuch
|
|
||||||
[fgrehm]: https://github.com/fgrehm
|
|
||||||
[Flink]: https://github.com/Flink
|
|
||||||
[gdi2290]: https://github.com/gdi2290
|
|
||||||
[hughfletcher]: https://github.com/hughfletcher
|
|
||||||
[iamale]: https://github.com/iamale
|
|
||||||
[ignlg]: https://github.com/ignlg
|
|
||||||
[iloveitaly]: https://github.com/iloveitaly
|
|
||||||
[investtools]: https://github.com/investtools
|
|
||||||
[iskandar]: https://github.com/iskandar
|
|
||||||
[jagandecapri]: https://github.com/jagandecapri
|
|
||||||
[jeffutter]: https://github.com/jeffutter
|
|
||||||
[jlachowski]: https://github.com/jlachowski
|
|
||||||
[josegonzalez]: https://github.com/josegonzalez
|
|
||||||
[Kloadut]: https://github.com/Kloadut
|
|
||||||
[krisrang]: https://github.com/krisrang
|
|
||||||
[luxifer]: https://github.com/luxifer
|
|
||||||
[m0rth1um]: https://github.com/m0rth1um
|
|
||||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
|
||||||
[matto1990]: https://github.com/matto1990
|
|
||||||
[mbreit]: https://github.com/mbreit
|
|
||||||
[mbriskar]: https://github.com/mbriskar
|
|
||||||
[michaelshobbs]: https://github.com/michaelshobbs
|
|
||||||
[mikecsh]: https://github.com/mikecsh
|
|
||||||
[mikexstudios]: https://github.com/mikexstudios
|
|
||||||
[mimischi]: https://github.com/mimischi
|
|
||||||
[mixxorz]: https://github.com/mixxorz
|
|
||||||
[mlebkowski]: https://github.com/mlebkowski
|
|
||||||
[motin]: https://github.com/motin
|
|
||||||
[mrname]: https://github.com/mrname
|
|
||||||
[musicglue]: https://github.com/musicglue
|
|
||||||
[neam]: https://github.com/neam
|
|
||||||
[nickcharlton]: https://github.com/nickcharlton
|
|
||||||
[nickstenning]: https://github.com/nickstenning
|
|
||||||
[nornagon]: https://github.com/nornagon
|
|
||||||
[ohardy]: https://github.com/ohardy
|
|
||||||
[pauldub]: https://github.com/pauldub
|
|
||||||
[pnegahdar]: https://github.com/pnegahdar
|
|
||||||
[RaceHub]: https://github.com/racehub
|
|
||||||
[ribot]: https://github.com/ribot
|
|
||||||
[rlaneve]: https://github.com/rlaneve
|
|
||||||
[robv]: https://github.com/robv
|
|
||||||
[scottatron]: https://github.com/scottatron
|
|
||||||
[sehrope]: https://github.com/sehrope
|
|
||||||
[sekjun9878]: https://github.com/sekjun9878
|
|
||||||
[sgulseth]: https://github.com/sgulseth
|
|
||||||
[sseemayer]: https://github.com/sseemayer
|
|
||||||
[statianzo]: https://github.com/statianzo
|
|
||||||
[stuartpb]: https://github.com/stuartpb
|
|
||||||
[thrashr888]: https://github.com/thrashr888
|
|
||||||
[wmluke]: https://github.com/wmluke
|
|
||||||
[Zenedith]: https://github.com/Zenedith
|
|
||||||
[fteychene]: https://github.com/fteychene
|
|
||||||
[sarendsen]: https://github.com/sarendsen
|
|
||||||
[baikunz]: https://github.com/baikunz
|
|
||||||
[lazyatom]: https://github.com/lazyatom
|
|
||||||
[ollej]: https://github.com/ollej
|
|
||||||
|
|
||||||
### Datastores
|
### Datastores
|
||||||
|
|
||||||
#### Relational
|
#### Relational
|
||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
|
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [kloadut][] | 0.3.x |
|
||||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
||||||
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
||||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
||||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
||||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
|
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [flink][] | 0.3.26+ |
|
||||||
|
|
||||||
#### Caching
|
#### Caching
|
||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.0+ |
|
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [aluxian][] | 0.5.0+ |
|
||||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
|
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||||
|
|
||||||
#### Queuing
|
#### Queuing
|
||||||
|
|
||||||
@@ -170,10 +87,6 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
|||||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||||
| [Headless Chrome](https://github.com/lazyatom/dokku-chrome) | [lazyatom][] | 0.8.1+ |
|
| [Headless Chrome](https://github.com/lazyatom/dokku-chrome) | [lazyatom][] | 0.8.1+ |
|
||||||
|
|
||||||
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
|
|
||||||
[c77cbf1]: https://github.com/dokku/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
|
|
||||||
[28de3ec]: https://github.com/dokku/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
|
|
||||||
|
|
||||||
### Plugins Implementing New Dokku Functionality
|
### Plugins Implementing New Dokku Functionality
|
||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
@@ -183,10 +96,9 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
|||||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||||
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
|
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
|
||||||
| [Dockerfile custom path](https://github.com/mimischi/dokku-dockerfile) | [mimischi][] | 0.8.0+ |
|
| [Dockerfile custom path](https://github.com/mimischi/dokku-dockerfile) | [mimischi][] | 0.8.0+ |
|
||||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>1</sup> | [crisward][] | 0.4.0+ |
|
||||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
|
|
||||||
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
|
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
|
||||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.4.0+ |
|
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [benjamin-dobell][] | 0.4.0+ |
|
||||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||||
@@ -195,26 +107,28 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
|||||||
| [Open App Ports](https://github.com/josegonzalez/dokku-ports) | [josegonzalez][] | 0.3.x |
|
| [Open App Ports](https://github.com/josegonzalez/dokku-ports) | [josegonzalez][] | 0.3.x |
|
||||||
| [Proctype Filter](https://github.com/michaelshobbs/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
| [Proctype Filter](https://github.com/michaelshobbs/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
||||||
| [robots.txt](https://notabug.org/candlewaster/dokku-robots.txt) | [candlewaster][] | 0.4.x |
|
| [robots.txt](https://notabug.org/candlewaster/dokku-robots.txt) | [candlewaster][] | 0.4.x |
|
||||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.4.0+ |
|
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.4.0+ |
|
||||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>4</sup> | [cedricziel][] | 0.3.x |
|
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||||
| [Application build hook](https://github.com/fteychene/dokku-build-hook) | [fteychene][] | 0.4.0+ |
|
| [Application build hook](https://github.com/fteychene/dokku-build-hook) | [fteychene][] | 0.4.0+ |
|
||||||
| [Post Deploy Script](https://github.com/baikunz/dokku-post-deploy-script) | [baikunz][] | 0.4.0+ |
|
| [Post Deploy Script](https://github.com/baikunz/dokku-post-deploy-script) | [baikunz][] | 0.4.0+ |
|
||||||
|
| [Auto Sync](https://github.com/IdeaSynthesis/dokku-autosync)<sup>4</sup> | [fomojola][] | 0.8.1+ |
|
||||||
|
| [Deploy Webhook](https://github.com/IdeaSynthesis/dokku-deploy-webhook)<sup>5</sup> | [fomojola][] | 0.8.1+ |
|
||||||
|
|
||||||
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
|
<sup>1</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
||||||
|
|
||||||
<sup>1</sup> On Heroku similar functionality is offered by the [heroku-labs pipeline feature](https://devcenter.heroku.com/articles/labs-pipelines), which allows you to promote builds across multiple environments (staging -> production)
|
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||||
|
|
||||||
<sup>2</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
<sup>3</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
||||||
|
|
||||||
<sup>3</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
<sup>4</sup> Adds the ability to sync an application repo with a remote GitHub repo (useful for automated rebuilds without needing a git push from an external system
|
||||||
|
|
||||||
<sup>4</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
<sup>5</sup> Adds the ability to invoke a post-deploy webhook with the IP, port and app name, all with a single config:set).
|
||||||
|
|
||||||
### Other Plugins
|
### Other Plugins
|
||||||
|
|
||||||
| Plugin | Author | Compatibility |
|
| Plugin | Author | Compatibility |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | 0.4.0+ |
|
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [flink][] | 0.4.0+ |
|
||||||
| [APT](https://github.com/dokku-community/dokku-apt) | [dokku-community][] | 0.18.x+ |
|
| [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 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/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | 0.3.x |
|
||||||
@@ -222,7 +136,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
|||||||
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | 0.3.x |
|
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | 0.3.x |
|
||||||
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
|
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
|
||||||
| [Chef cookbook](https://github.com/nickcharlton/dokku-cookbook) | [nickcharlton][] | |
|
| [Chef cookbook](https://github.com/nickcharlton/dokku-cookbook) | [nickcharlton][] | |
|
||||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
|
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [flink][] | 0.4.0+ |
|
||||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||||
| [Limit (Resource management)](https://github.com/sarendsen/dokku-limit) | [sarendsen][] | 0.9.0+ |
|
| [Limit (Resource management)](https://github.com/sarendsen/dokku-limit) | [sarendsen][] | 0.9.0+ |
|
||||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
|
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
|
||||||
@@ -237,14 +151,14 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
|||||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||||
| [Telegram Notifications](https://github.com/m0rth1um/dokku-telegram) | [m0rth1um][] | 0.4.0+ |
|
| [Telegram Notifications](https://github.com/m0rth1um/dokku-telegram) | [m0rth1um][] | 0.4.0+ |
|
||||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
||||||
| [User ACL](https://github.com/dokku-community/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
| [User ACL](https://github.com/dokku-community/dokku-acl) | [maciej łebkowski][] | 0.4.0+ |
|
||||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
|
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
|
||||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | 0.4.0+ |
|
| [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+ |
|
| [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+ |
|
| [Access](https://github.com/mainto/dokku-access) | [mainto][] | 0.4.0+ |
|
||||||
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare](https://github.com/kingsquare) | 0.4.0+ |
|
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare][] | 0.4.0+ |
|
||||||
| [Fonts](https://github.com/ollej/dokku-fonts) | [ollej] | 0.19.11+ |
|
| [Fonts](https://github.com/ollej/dokku-fonts) | [ollej][] | 0.19.11+ |
|
||||||
|
| [Discourse](https://github.com/badsyntax/dokku-discourse) | [badsyntax][] | 0.21.4+ |
|
||||||
|
|
||||||
### Deprecated Plugins
|
### Deprecated Plugins
|
||||||
|
|
||||||
@@ -253,7 +167,7 @@ The following plugins have been removed as their functionality is now in Dokku C
|
|||||||
| Plugin | Author | In Dokku Since |
|
| Plugin | Author | In Dokku Since |
|
||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------- |
|
||||||
| [App User](https://github.com/michaelshobbs/dokku-app-user) | [michaelshobbs][] | v0.7.1 (herokuish 0.3.18) |
|
| [App User](https://github.com/michaelshobbs/dokku-app-user) | [michaelshobbs][] | v0.7.1 (herokuish 0.3.18) |
|
||||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
|
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [neam][] | v0.3.10 (domains plugin) |
|
||||||
| [Debug](https://github.com/josegonzalez/dokku-debug) | [josegonzalez][] | v0.3.9 (trace command) |
|
| [Debug](https://github.com/josegonzalez/dokku-debug) | [josegonzalez][] | v0.3.9 (trace command) |
|
||||||
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | v0.4.2 (named containers plugin) |
|
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | v0.4.2 (named containers plugin) |
|
||||||
@@ -264,31 +178,27 @@ The following plugins have been removed as their functionality is now in Dokku C
|
|||||||
| [List Containers](https://github.com/josegonzalez/dokku-list) | [josegonzalez][] | v0.3.14 (ps plugin) |
|
| [List Containers](https://github.com/josegonzalez/dokku-list) | [josegonzalez][] | v0.3.14 (ps plugin) |
|
||||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | v0.4.0 (herokuish) |
|
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | v0.4.0 (herokuish) |
|
||||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
|
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [flink][] | v0.4.2 (named-containers plugin) |
|
||||||
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
|
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
|
||||||
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
|
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | v0.5.0 (deployment tasks) |
|
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | v0.5.0 (deployment tasks) |
|
||||||
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
||||||
| [Process Manager: Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | v0.3.14/0.7.0 (ps/restart policy plugin) |
|
| [Process Manager: Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | v0.3.14/0.7.0 (ps/restart policy plugin) |
|
||||||
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [Flink][] | v0.3.14/0.7.0 (ps plugin) |
|
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [flink][] | v0.3.14/0.7.0 (ps plugin) |
|
||||||
| [Process Manager: Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | v0.3.14/0.7.0 (ps plugin) |
|
| [Process Manager: Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | v0.3.14/0.7.0 (ps plugin) |
|
||||||
| [Process Manager: Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | v0.3.14/0.7.0 (ps plugin) |
|
| [Process Manager: Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | v0.3.14/0.7.0 (ps plugin) |
|
||||||
| [Process Manager: Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
| [Process Manager: Shoreman](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||||
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
|
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
|
||||||
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
|
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
|
||||||
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
|
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
|
||||||
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
|
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
|
||||||
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
|
|
||||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | v0.5.0 (storage plugin) |
|
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | v0.5.0 (storage plugin) |
|
||||||
|
|
||||||
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
|
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
|
||||||
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
|
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
|
||||||
|
|
||||||
[a043e98]: https://github.com/stuartpb/dokku-bind-port/commit/a043e9892f4815b6525c850131e09fd64db5c1fa
|
|
||||||
|
|
||||||
|
|
||||||
### Unmaintained Plugins
|
### Unmaintained Plugins
|
||||||
|
|
||||||
The following plugins are no longer maintained by their developers.
|
The following plugins are no longer maintained by their developers.
|
||||||
@@ -297,21 +207,105 @@ The following plugins are no longer maintained by their developers.
|
|||||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||||
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
|
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
|
||||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [flink][] | 0.4.0+ |
|
||||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [raceHub][] | Compatible with 0.2.0 |
|
||||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||||
|
| [Dokku Registry](https://github.com/agco-adm/dokku-registry) | [agco-adm][] | 0.4.0+
|
||||||
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
||||||
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
||||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | < 0.4.0 |
|
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | < 0.4.0 |
|
||||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [flink][] | 0.4.0+ |
|
||||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
|
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [aomitayo][] | |
|
||||||
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
|
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
|
||||||
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
|
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
|
||||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
|
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 |
|
||||||
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
||||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||||
|
|
||||||
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
||||||
|
|
||||||
|
[256dpi]: https://github.com/256dpi
|
||||||
|
[ademuk]: https://github.com/ademuk
|
||||||
|
[agco-adm]: https://github.com/agco-adm
|
||||||
|
[alessio]: https://github.com/alessio
|
||||||
|
[alex-sherwin]: https://github.com/alex-sherwin
|
||||||
|
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||||
|
[alexkruegger]: https://github.com/alexkruegger
|
||||||
|
[aluxian]: https://github.com/aluxian
|
||||||
|
[aomitayo]: https://github.com/aomitayo
|
||||||
|
[apmorton]: https://github.com/apmorton
|
||||||
|
[artofrawr]: https://github.com/artofrawr
|
||||||
|
[badsyntax]: https://github.com/badsyntax
|
||||||
|
[basgys]: https://github.com/basgys
|
||||||
|
[benjamin-dobell]: https://github.com/benjamin-dobell
|
||||||
|
[blag]: https://github.com/blag
|
||||||
|
[cameron-martin]: https://github.com/cameron-martin
|
||||||
|
[candlewaster]: https://notabug.org/candlewaster
|
||||||
|
[cedricziel]: https://github.com/cedricziel
|
||||||
|
[cef]: https://github.com/cef
|
||||||
|
[cjblomqvist]: https://github.com/cjblomqvist
|
||||||
|
[crisward]: https://github.com/crisward
|
||||||
|
[cu12]: https://github.com/cu12
|
||||||
|
[darkpixel]: https://github.com/darkpixel
|
||||||
|
[dokku]: https://github.com/dokku
|
||||||
|
[dokku-community]: https://github.com/dokku-community
|
||||||
|
[dyson]: https://github.com/dyson
|
||||||
|
[fermuch]: https://github.com/fermuch
|
||||||
|
[fgrehm]: https://github.com/fgrehm
|
||||||
|
[flink]: https://github.com/flink
|
||||||
|
[fomojola]: https://github.com/fomojola
|
||||||
|
[gdi2290]: https://github.com/gdi2290
|
||||||
|
[hughfletcher]: https://github.com/hughfletcher
|
||||||
|
[iamale]: https://github.com/iamale
|
||||||
|
[ignlg]: https://github.com/ignlg
|
||||||
|
[iloveitaly]: https://github.com/iloveitaly
|
||||||
|
[investtools]: https://github.com/investtools
|
||||||
|
[iskandar]: https://github.com/iskandar
|
||||||
|
[jagandecapri]: https://github.com/jagandecapri
|
||||||
|
[jeffutter]: https://github.com/jeffutter
|
||||||
|
[jlachowski]: https://github.com/jlachowski
|
||||||
|
[josegonzalez]: https://github.com/josegonzalez
|
||||||
|
[kingsquare]: https://github.com/kingsquare
|
||||||
|
[kloadut]: https://github.com/kloadut
|
||||||
|
[krisrang]: https://github.com/krisrang
|
||||||
|
[luxifer]: https://github.com/luxifer
|
||||||
|
[m0rth1um]: https://github.com/m0rth1um
|
||||||
|
[maciej łebkowski]: https://github.com/mlebkowski
|
||||||
|
[mainto]: https://github.com/mainto
|
||||||
|
[matto1990]: https://github.com/matto1990
|
||||||
|
[mbreit]: https://github.com/mbreit
|
||||||
|
[mbriskar]: https://github.com/mbriskar
|
||||||
|
[michaelshobbs]: https://github.com/michaelshobbs
|
||||||
|
[mikecsh]: https://github.com/mikecsh
|
||||||
|
[mikexstudios]: https://github.com/mikexstudios
|
||||||
|
[mimischi]: https://github.com/mimischi
|
||||||
|
[mixxorz]: https://github.com/mixxorz
|
||||||
|
[motin]: https://github.com/motin
|
||||||
|
[mrname]: https://github.com/mrname
|
||||||
|
[musicglue]: https://github.com/musicglue
|
||||||
|
[neam]: https://github.com/neam
|
||||||
|
[nickcharlton]: https://github.com/nickcharlton
|
||||||
|
[nickstenning]: https://github.com/nickstenning
|
||||||
|
[ohardy]: https://github.com/ohardy
|
||||||
|
[pauldub]: https://github.com/pauldub
|
||||||
|
[pnegahdar]: https://github.com/pnegahdar
|
||||||
|
[racehub]: https://github.com/racehub
|
||||||
|
[ribot]: https://github.com/ribot
|
||||||
|
[rlaneve]: https://github.com/rlaneve
|
||||||
|
[robv]: https://github.com/robv
|
||||||
|
[scottatron]: https://github.com/scottatron
|
||||||
|
[sehrope]: https://github.com/sehrope
|
||||||
|
[sekjun9878]: https://github.com/sekjun9878
|
||||||
|
[statianzo]: https://github.com/statianzo
|
||||||
|
[stuartpb]: https://github.com/stuartpb
|
||||||
|
[thrashr888]: https://github.com/thrashr888
|
||||||
|
[wmluke]: https://github.com/wmluke
|
||||||
|
[zenedith]: https://github.com/zenedith
|
||||||
|
[fteychene]: https://github.com/fteychene
|
||||||
|
[sarendsen]: https://github.com/sarendsen
|
||||||
|
[baikunz]: https://github.com/baikunz
|
||||||
|
[lazyatom]: https://github.com/lazyatom
|
||||||
|
[ollej]: https://github.com/ollej
|
||||||
|
|||||||
@@ -1,108 +0,0 @@
|
|||||||
# Deploying with Gitlab CI
|
|
||||||
|
|
||||||
Gitlab-CI can be used to automatically deploy a Dokku application using the [ilyasemenov/gitlab-ci-git-push image](https://github.com/IlyaSemenov/gitlab-ci-git-push) docker image.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
Make sure you have a Gitlab account and a Dokku project hosted on Gitlab. This method works whether if you are using buildpacks or Dockerfile.
|
|
||||||
|
|
||||||
Make sure you have set up an app on the remote machine following [these instructions](http://dokku.viewdocs.io/dokku/deployment/application-deployment/) and can successfully deploy to it from the local machine.
|
|
||||||
|
|
||||||
## Deploy automatically to production
|
|
||||||
|
|
||||||
### Add a secret variable
|
|
||||||
|
|
||||||
Browse to the repository in question and visit the following path: `the Gitlab project > Settings > CI/CD.`
|
|
||||||
|
|
||||||
Click on `Secret variables > Expand` and fill in the blanks.
|
|
||||||
|
|
||||||
- Key: `SSH_PRIVATE_KEY`
|
|
||||||
- Value: paste in an SSH private key registered in Dokku:
|
|
||||||
|
|
||||||
-----BEGIN RSA PRIVATE KEY-----
|
|
||||||
...
|
|
||||||
-----END RSA PRIVATE KEY-----
|
|
||||||
|
|
||||||
- Environment scope: `production` (This make sure that `SSH_PRIVATE_KEY` is not available on merge requests or tests)
|
|
||||||
- Protected: Do not check this checkbox unless you know what you are doing
|
|
||||||
|
|
||||||
### Add CI script
|
|
||||||
|
|
||||||
Create a file named `.gitlab-ci.yml` at the root directory of the repository with the following contents:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
stages:
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
APP_NAME: node-js-app
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
image: ilyasemenov/gitlab-ci-git-push
|
|
||||||
stage: deploy
|
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
url: https://$APP_NAME.dokku.me/
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- git-push ssh://dokku@dokku.me:22/$APP_NAME
|
|
||||||
```
|
|
||||||
|
|
||||||
You will need to modify the `APP_NAME` variable to the correct value for your application name.
|
|
||||||
|
|
||||||
Running `git push origin master` will now trigger a gitlab-ci pipeline that will automatically deploy your application to your Dokku server. Go to your project on Gitlab and visit "Project > Pipelines" to see the deployment log.
|
|
||||||
|
|
||||||
|
|
||||||
## Review Applications
|
|
||||||
|
|
||||||
One useful feature of gitlab is to be able to create review applications for non-production branches. This allows teams to review changes _before_ they are pushed to production. First, recreate the `SSH_PRIVATE_KEY` secret - do not delete the existing secret - but scoped to the `review/*` environment. This will allow non-production gitlab environments access to the secret.
|
|
||||||
|
|
||||||
Next, we'll need to create the `review_app` gitlab job in our `.gitlab-ci.yaml`.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
review_app:
|
|
||||||
image: ilyasemenov/gitlab-ci-git-push
|
|
||||||
stage: deploy
|
|
||||||
environment:
|
|
||||||
name: review/$CI_COMMIT_REF_NAME
|
|
||||||
url: https://$CI_ENVIRONMENT_SLUG.dokku.me/
|
|
||||||
on_stop: stop_review_app
|
|
||||||
only:
|
|
||||||
- branches
|
|
||||||
except:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- mkdir -p ~/.ssh && echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
|
||||||
- ssh-keyscan -H 22 "dokku.me" >> ~/.ssh/known_hosts
|
|
||||||
- ssh -t dokku@dokku.me -- apps:clone --ignore-existing --skip-deploy "$APP_NAME" "$CI_ENVIRONMENT_SLUG"
|
|
||||||
- git-push ssh://dokku@dokku.me:22/$CI_ENVIRONMENT_SLUG
|
|
||||||
```
|
|
||||||
|
|
||||||
The first two lines ensure that Gitlab can talk to the Dokku server. Next, we take advantage of the `apps:clone` command, and clone the existing application and all of it's configuration to a new location. If the new application already exists, the third line of the `script` step will be ignored. We also ignore the first deploy script to speed up the cloning process. Finally, the fourth line of the `script` step will deploy the code as normal.
|
|
||||||
|
|
||||||
The above only runs for non-master branches, and will _also_ trigger an `on_stop` job called `stop_review_app`. When the branch is deleted or the code is merged, the `stop_review_app` job will be triggered.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
stop_review_app:
|
|
||||||
image: ilyasemenov/gitlab-ci-git-push
|
|
||||||
stage: deploy
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
environment:
|
|
||||||
name: review/$CI_COMMIT_REF_NAME
|
|
||||||
action: stop
|
|
||||||
when: manual
|
|
||||||
script:
|
|
||||||
- mkdir -p ~/.ssh && echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
|
||||||
- ssh-keyscan -H 22 "dokku.me" >> ~/.ssh/known_hosts
|
|
||||||
- ssh -t dokku@dokku.me -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
|
|
||||||
```
|
|
||||||
|
|
||||||
The `stop_review_app` step will delete the temporary application, cleaning up now unused server resources.
|
|
||||||
|
|
||||||
Going further, the following modifications can be done:
|
|
||||||
|
|
||||||
- Notify via chat whenever a review application is created/destroyed.
|
|
||||||
- Push to a separate, staging server as opposed to a production server.
|
|
||||||
- Clone a "staging" application so that review applications do not affect production datasets.
|
|
||||||
@@ -36,7 +36,7 @@ Move the data on the volume
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir /mnt/volume/home/
|
mkdir /mnt/volume/home/
|
||||||
mkdir /mnt/volume/var/lib/
|
mkdir -p /mnt/volume/var/lib/
|
||||||
mv /home/dokku.OLD /mnt/volume/home/dokku
|
mv /home/dokku.OLD /mnt/volume/home/dokku
|
||||||
mv /var/lib/dokku.OLD /mnt/volume/var/lib/dokku
|
mv /var/lib/dokku.OLD /mnt/volume/var/lib/dokku
|
||||||
mv /var/lib/docker.OLD /mnt/volume/var/lib/docker
|
mv /var/lib/docker.OLD /mnt/volume/var/lib/docker
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ If an FQDN such as `dokku.org` is used as the application name, the global virtu
|
|||||||
|
|
||||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed. See the [plugin trigger documentation](/docs/development/plugin-triggers.md#nginx-hostname) for more information.
|
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed. See the [plugin trigger documentation](/docs/development/plugin-triggers.md#nginx-hostname) for more information.
|
||||||
|
|
||||||
|
|
||||||
## Disabling VHOSTS
|
## Disabling VHOSTS
|
||||||
|
|
||||||
If desired, it is possible to disable vhosts with the domains plugin.
|
If desired, it is possible to disable vhosts with the domains plugin.
|
||||||
@@ -43,7 +42,6 @@ dokku domains:disable node-js-app
|
|||||||
|
|
||||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_PROXY_PORT` and/or `DOKKU_PROXY_SSL_PORT` (for services configured to use SSL.)
|
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_PROXY_PORT` and/or `DOKKU_PROXY_SSL_PORT` (for services configured to use SSL.)
|
||||||
|
|
||||||
|
|
||||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -115,44 +113,4 @@ dokku domains:report node-js-app --domains-app-enabled
|
|||||||
|
|
||||||
## Default site
|
## Default site
|
||||||
|
|
||||||
By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration.
|
This is specific to your proxy plugin of choice. See the [nginx documentation](/docs/configuration/nginx.md#default-site) for more information on how to configure this for the default nginx proxy implementation.
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
# To handle HTTPS requests, you can uncomment the following section.
|
|
||||||
#
|
|
||||||
# Please note that in order to let this work as expected, you need a valid
|
|
||||||
# SSL certificate for any domains being served. Browsers will show SSL
|
|
||||||
# errors in all other cases.
|
|
||||||
#
|
|
||||||
# Note that the key and certificate files in the below example need to
|
|
||||||
# be copied into /etc/nginx/ssl/ folder.
|
|
||||||
#
|
|
||||||
# server {
|
|
||||||
# listen 443 ssl;
|
|
||||||
# listen [::]:443 ssl;
|
|
||||||
# server_name _;
|
|
||||||
# ssl_certificate /etc/nginx/ssl/cert.crt;
|
|
||||||
# ssl_certificate_key /etc/nginx/ssl/cert.key;
|
|
||||||
# access_log off;
|
|
||||||
# return 410;
|
|
||||||
# }
|
|
||||||
```
|
|
||||||
|
|
||||||
Make sure to reload nginx after creating this file by running `service nginx reload`.
|
|
||||||
|
|
||||||
This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
|
||||||
|
|
||||||
The configuration file must be loaded before `/etc/nginx/conf.d/dokku.conf`, so it can not be arranged as a vhost in `/etc/nginx/sites-enabled` that is only processed afterwards.
|
|
||||||
|
|
||||||
Alternatively, you may push an app to your Dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Typically an application will require some configuration to run properly. Dokku
|
|||||||
The `config` plugin provides the following commands to manage your variables:
|
The `config` plugin provides the following commands to manage your variables:
|
||||||
|
|
||||||
```
|
```
|
||||||
config (<app>|--global) Pretty-print an app or global environment
|
config:show (<app>|--global) Pretty-print an app or global environment
|
||||||
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
||||||
config:clear (<app>|--global) Clears environment variables
|
config:clear (<app>|--global) Clears environment variables
|
||||||
config:export (<app>|--global) [--envfile] Export a global or app environment
|
config:export (<app>|--global) [--envfile] Export a global or app environment
|
||||||
@@ -14,11 +14,11 @@ config:keys (<app>|--global) [--merged]
|
|||||||
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||||
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||||
```
|
```
|
||||||
> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available _only_ during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||||
|
|
||||||
Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys.
|
Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys.
|
||||||
|
|
||||||
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is _not_ updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
||||||
|
|
||||||
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
|
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
|
||||||
|
|
||||||
@@ -71,14 +71,14 @@ dokku config:export --format shell node-js-app
|
|||||||
|
|
||||||
## Special Config Variables
|
## Special Config Variables
|
||||||
|
|
||||||
The following list config variables have special meaning and can be set in a variety of ways.
|
The following config variables have special meanings and can be set in a variety of ways. Unless specified via global app config, the values may not be passed into applications. Usage of these values within applications should be considered unsafe, as they are an internal configuration values that may be moved to the internal properties system in the future.
|
||||||
|
|
||||||
> Warning: This list is not exhaustive, and may vary from version to version.
|
> Warning: This list is not exhaustive, and may vary from version to version.
|
||||||
|
|
||||||
| Name | Default | How to modify | Description |
|
| Name | Default | How to modify | Description |
|
||||||
| ------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
| ------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
||||||
| `DOKKU_ROOT` | `~dokku` | `/etc/environment` | The root directory where dokku will store application repositories, as well as certain configuration files. |
|
| `DOKKU_ROOT` | `~dokku` | `/etc/environment` | The root directory where dokku will store application repositories, as well as certain configuration files. |
|
||||||
| `DOKKU_IMAGE` | `gliderlabs/herokuish` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The default image to use when building herokuish containers. |
|
| `DOKKU_IMAGE` | `gliderlabs/herokuish` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The default image to use when building herokuish containers. Deprecated in favor of using `buildpacks:set-property` |
|
||||||
| `DOKKU_LIB_ROOT` | `/var/lib/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory where plugins, certain data, and general configuration is stored. |
|
| `DOKKU_LIB_ROOT` | `/var/lib/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory where plugins, certain data, and general configuration is stored. |
|
||||||
| `PLUGIN_PATH` | `$DOKKU_LIB_ROOT/plugins"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The top-level directory where plugins are stored. |
|
| `PLUGIN_PATH` | `$DOKKU_LIB_ROOT/plugins"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The top-level directory where plugins are stored. |
|
||||||
| `PLUGIN_AVAILABLE_PATH` | `$PLUGIN_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that holds all available plugins, including core. |
|
| `PLUGIN_AVAILABLE_PATH` | `$PLUGIN_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that holds all available plugins, including core. |
|
||||||
@@ -87,14 +87,15 @@ The following list config variables have special meaning and can be set in a var
|
|||||||
| `PLUGIN_CORE_AVAILABLE_PATH` | `$PLUGIN_CORE_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all available core plugins. |
|
| `PLUGIN_CORE_AVAILABLE_PATH` | `$PLUGIN_CORE_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all available core plugins. |
|
||||||
| `PLUGIN_CORE_ENABLED_PATH` | `$PLUGIN_CORE_PATH/enabled"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all enabled core plugins. |
|
| `PLUGIN_CORE_ENABLED_PATH` | `$PLUGIN_CORE_PATH/enabled"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all enabled core plugins. |
|
||||||
| `DOKKU_LOGS_DIR` | `/var/log/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where dokku logs should be written to. |
|
| `DOKKU_LOGS_DIR` | `/var/log/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where dokku logs should be written to. |
|
||||||
|
| `DOKKU_LOGS_HOST_DIR` | `$DOKKU_LOGS_DIR` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | A path on the host that will be mounted into the vector logging container. |
|
||||||
| `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_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_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_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_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Deprecated: Whether to detach a container started via `dokku run`. |
|
||||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
| `DOKKU_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. |
|
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> | Deprecated: Whether to keep `dokku run` containers around or not. |
|
||||||
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||||
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
|
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
|
||||||
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
|
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
|
||||||
| `DOKKU_APP_SHELL` | `/bin/bash` | `dokku config:set` | Allows users to change the default shell used by Dokku for `dokku enter` and execution of deployment tasks. |
|
| `DOKKU_APP_SHELL` | `/bin/bash` | `dokku config:set` | Allows users to change the default shell used by Dokku for `dokku enter` and execution of deployment tasks. |
|
||||||
@@ -110,9 +111,7 @@ The following list config variables have special meaning and can be set in a var
|
|||||||
| `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` | none | `dokku config:set` <br /> `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Disables removal of the ANSI prefix during deploys. Can be used in cases where the client deployer does not understand ansi escape codes. |
|
| `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` | none | `dokku config:set` <br /> `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Disables removal of the ANSI prefix during deploys. Can be used in cases where the client deployer does not understand ansi escape codes. |
|
||||||
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
||||||
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
||||||
| `DOKKU_DOCKERFILE_CMD` | dockerfile cmd | `dokku config:set` | |
|
|
||||||
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
|
|
||||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
||||||
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
||||||
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ 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: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:error-logs <app> [-t] # Show the nginx error logs for an application (-t follows)
|
||||||
nginx:report [<app>] [<flag>] # Displays a nginx report for one or more apps
|
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:set <app> <property> (<value>) # Set or clear an nginx property for an app
|
||||||
@@ -12,7 +11,15 @@ nginx:show-config <app> # Display app nginx config
|
|||||||
nginx:validate-config [<app>] [--clean] # Validates and optionally cleans up invalid nginx configurations
|
nginx:validate-config [<app>] [--clean] # Validates and optionally cleans up invalid nginx configurations
|
||||||
```
|
```
|
||||||
|
|
||||||
## Binding to specific addresses
|
## Usage
|
||||||
|
|
||||||
|
### Request Proxying
|
||||||
|
|
||||||
|
By default, the `web` process is the only process proxied by the nginx proxy implementation. Proxying to other process types may be handled by a custom `nginx.conf.sigil` file, as generally described [below](/docs/configuration/nginx.md#customizing-the-nginx-configuration)
|
||||||
|
|
||||||
|
Nginx will proxy the requests in a [round-robin balancing fashion](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream) to the different deployed (scaled) containers running the `web` proctype. This way, the host's resources can be fully leveraged for single-threaded applications (e.g. `dokku ps:scale node-js-app web=4` on a 4-core machine)
|
||||||
|
|
||||||
|
### Binding to specific addresses
|
||||||
|
|
||||||
> New as of 0.19.2
|
> New as of 0.19.2
|
||||||
|
|
||||||
@@ -34,7 +41,7 @@ dokku nginx:set node-js-app bind-address-ipv6
|
|||||||
|
|
||||||
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.
|
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
|
### HSTS Header
|
||||||
|
|
||||||
> New as of 0.20.0
|
> New as of 0.20.0
|
||||||
|
|
||||||
@@ -54,7 +61,21 @@ The following options are also available via the `nginx:set` command:
|
|||||||
|
|
||||||
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.
|
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
|
#### Globally disabling the HSTS Header
|
||||||
|
|
||||||
|
HSTS Header can be disabled for all apps by setting the `hsts` property to false after passing the `--global` flag to `nginx:set`. Changing this value globally or on a per-app basis will require rebuilding the nginx config via the `proxy:build-config` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set --global hsts false
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the HSTS setting is disabled globally, it can be re-enabled on a per-app basis by setting the `hsts` property as normal.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app hsts true
|
||||||
|
```
|
||||||
|
|
||||||
|
### 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`.
|
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`.
|
||||||
|
|
||||||
@@ -68,9 +89,9 @@ You may also follow the logs by specifying the `-t` flag.
|
|||||||
dokku nginx:access-logs node-js-app -t
|
dokku nginx:access-logs node-js-app -t
|
||||||
```
|
```
|
||||||
|
|
||||||
## Checking error logs
|
### Checking error logs
|
||||||
|
|
||||||
You may check nginx error logs via the `nginx:access-logs` command. This assumes that app error logs are being stored in `/var/log/nginx/$APP-error.log`, as is the default in the generated `nginx.conf`.
|
You may check nginx error logs via the `nginx:error-logs` command. This assumes that app error logs are being stored in `/var/log/nginx/$APP-error.log`, as is the default in the generated `nginx.conf`.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku nginx:error-logs node-js-app
|
dokku nginx:error-logs node-js-app
|
||||||
@@ -82,7 +103,7 @@ You may also follow the logs by specifying the `-t` flag.
|
|||||||
dokku nginx:error-logs node-js-app -t
|
dokku nginx:error-logs node-js-app -t
|
||||||
```
|
```
|
||||||
|
|
||||||
## Changing log path
|
### Changing log path
|
||||||
|
|
||||||
> New as of 0.20.1
|
> New as of 0.20.1
|
||||||
|
|
||||||
@@ -107,15 +128,90 @@ dokku nginx:set node-js-app error-log-path
|
|||||||
|
|
||||||
In all cases, the nginx config must be regenerated after setting the above values.
|
In all cases, the nginx config must be regenerated after setting the above values.
|
||||||
|
|
||||||
## Regenerating nginx config
|
### Changing log format
|
||||||
|
|
||||||
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.
|
> New as of 0.22.0
|
||||||
|
|
||||||
|
The format of the access log can be changed by calling the `nginx:set` command as follows:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku nginx:build-config node-js-app
|
dokku nginx:set node-js-app access-log-format custom-format
|
||||||
```
|
```
|
||||||
|
|
||||||
## Showing the nginx config
|
Prior to changing the log-format, log formats should be specified at a file such as `/etc/nginx/conf.d/00-log-formats.conf`. This will ensure they are available within your app's nginx context. For instance, the following may be added to the above file. It only needs to be specified once to be used for all apps.
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
# /etc/nginx/conf.d/00-log-formats.conf
|
||||||
|
# escape=json was added in nginx 1.11.8
|
||||||
|
log_format json_combined escape=json
|
||||||
|
'{'
|
||||||
|
'"time_local":"$time_local",'
|
||||||
|
'"remote_addr":"$remote_addr",'
|
||||||
|
'"remote_user":"$remote_user",'
|
||||||
|
'"request":"$request",'
|
||||||
|
'"status":"$status",'
|
||||||
|
'"body_bytes_sent":"$body_bytes_sent",'
|
||||||
|
'"request_time":"$request_time",'
|
||||||
|
'"http_referrer":"$http_referer",'
|
||||||
|
'"http_user_agent":"$http_user_agent"'
|
||||||
|
'}';
|
||||||
|
```
|
||||||
|
|
||||||
|
Next, the format should be set for the given app.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app access-log-format json_combined
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, a proxy rebuild will change the format as desired.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku proxy:build-config node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
### Specifying a read timeout
|
||||||
|
|
||||||
|
> New as of 0.21.0
|
||||||
|
|
||||||
|
When proxying requests to your applications, it may be useful to specify a proxy read timeout. This can be done via the `nginx:set` command as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app proxy-read-timeout 120s
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value is `60s`, and all numeric values _must_ have a trailing time value specified (`s` for seconds, `m` for minutes).
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app proxy-read-timeout
|
||||||
|
```
|
||||||
|
|
||||||
|
In all cases, the nginx config must be regenerated after setting the above value.
|
||||||
|
|
||||||
|
### Specifying a custom client_max_body_size
|
||||||
|
|
||||||
|
> New as of 0.23.0
|
||||||
|
|
||||||
|
Users can override the default `client_max_body_size` value - which limits file uploads - via `nginx:set`. Changing this value will only apply to every `server` stanza of the default `nginx.conf.sigil`; users of custom `nginx.conf.sigil` files must update their templates to support the new value.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app client-max-body-size 50m
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value is empty string, which will result in nginx falling back to any configured, higher-level defaults (or `1m` if unconfigued; all numerical values _must_ have a size unit specified (`k` for kilobytes, `m` for megabytes).
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku nginx:set node-js-app client-max-body-size
|
||||||
|
```
|
||||||
|
|
||||||
|
In all cases, the nginx config must be regenerated after setting the above value.
|
||||||
|
|
||||||
|
Changing this value when using the PHP buildpack (or any other buildpack that uses an intermediary server) will require changing the value in the server config shipped with that buildpack. Consult your buildpack documentation for further details.
|
||||||
|
|
||||||
|
### Showing the nginx config
|
||||||
|
|
||||||
For debugging purposes, it may be useful to show the nginx config. This can be achieved via the `nginx:show-config` command.
|
For debugging purposes, it may be useful to show the nginx config. This can be achieved via the `nginx:show-config` command.
|
||||||
|
|
||||||
@@ -123,7 +219,7 @@ For debugging purposes, it may be useful to show the nginx config. This can be a
|
|||||||
dokku nginx:show-config node-js-app
|
dokku nginx:show-config node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
## Validating nginx configs
|
### Validating nginx configs
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
@@ -147,7 +243,7 @@ The `--clean` flag may also be specified for a given app:
|
|||||||
dokku nginx:validate-config node-js-app --clean
|
dokku nginx:validate-config node-js-app --clean
|
||||||
```
|
```
|
||||||
|
|
||||||
## Customizing the nginx configuration
|
### Customizing the nginx configuration
|
||||||
|
|
||||||
> New as of 0.5.0
|
> New as of 0.5.0
|
||||||
|
|
||||||
@@ -155,14 +251,27 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
|||||||
|
|
||||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||||
- If using a buildpack application, you __must__ check it into the root of your app repo.
|
- If using a buildpack application, you __must__ check it into the root of your app repo.
|
||||||
- `ADD` it to your dockerfile `WORKDIR`
|
- If using a dockerfile or docker image for deploys, either:
|
||||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
- If `WORKDIR` is specified, add the file to the `WORKDIR` specified in the last Dockerfile stage (example: `WORKDIR /app` and `ADD nginx.conf.sigil /app`).
|
||||||
|
- If no `WORKDIR` is specified, add the file to the root (`/`) of the docker image (example: `ADD nginx.conf.sigil /`).
|
||||||
|
|
||||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you _may_ be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||||
|
|
||||||
> The default template is available [here](https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil), and can be used as a guide for your own, custom `nginx.conf.sigil` file. Please refer to the appropriate template file version for your Dokku version.
|
> The default template is available [here](https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil), and can be used as a guide for your own, custom `nginx.conf.sigil` file. Please refer to the appropriate template file version for your Dokku version.
|
||||||
|
|
||||||
### Available template variables
|
While enabled by default, using a custom nginx config can be disabled via `nginx:set`. This may be useful in cases where you do not want to allow users to override any higher-level customization of app nginx config.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# enable fetching custom config (default)
|
||||||
|
dokku nginx:set node-js-app disable-custom-config false
|
||||||
|
|
||||||
|
# disable fetching custom config
|
||||||
|
dokku nginx:set node-js-app disable-custom-config true
|
||||||
|
```
|
||||||
|
|
||||||
|
Unsetting this value is the same as enabling custom nginx config usage.
|
||||||
|
|
||||||
|
#### Available template variables
|
||||||
|
|
||||||
```
|
```
|
||||||
{{ .APP }} Application name
|
{{ .APP }} Application name
|
||||||
@@ -182,7 +291,7 @@ Finally, each process type has it's network listeners - a list of IP:PORT pairs
|
|||||||
|
|
||||||
> 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`.
|
> 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
|
#### Customizing via configuration files included by the default templates
|
||||||
|
|
||||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||||
|
|
||||||
@@ -190,32 +299,36 @@ The default nginx.conf template will include everything from your apps `nginx.co
|
|||||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||||
```
|
```
|
||||||
|
|
||||||
That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabytes, do
|
That means you can put additional configuration in separate files. To increase the client request header timeout, the following can be performed:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
mkdir /home/dokku/node-js-app/nginx.conf.d/
|
mkdir /home/dokku/node-js-app/nginx.conf.d/
|
||||||
echo 'client_max_body_size 50m;' > /home/dokku/node-js-app/nginx.conf.d/upload.conf
|
echo 'client_header_timeout 50s;' > /home/dokku/node-js-app/nginx.conf.d/timeout.conf
|
||||||
chown dokku:dokku /home/dokku/node-js-app/nginx.conf.d/upload.conf
|
chown dokku:dokku /home/dokku/node-js-app/nginx.conf.d/upload.conf
|
||||||
service nginx reload
|
service nginx reload
|
||||||
```
|
```
|
||||||
|
|
||||||
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/node-js-app/nginx.conf.d/` directory manually.
|
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/node-js-app/nginx.conf.d/` directory manually.
|
||||||
|
|
||||||
For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config *within* the container. The following are example contents for your `Procfile`
|
For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config _within_ the container. The following are example contents for your `Procfile`
|
||||||
|
|
||||||
|
```
|
||||||
|
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
|
||||||
|
```
|
||||||
|
|
||||||
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
|
|
||||||
|
|
||||||
Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - would also need to be configured as shown in this example:
|
Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - would also need to be configured as shown in this example:
|
||||||
|
|
||||||
client_max_body_size 50m;
|
```
|
||||||
location / {
|
client_header_timeout 50s;
|
||||||
index index.php;
|
location / {
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
index index.php;
|
||||||
}
|
try_files $uri $uri/ /index.php$is_args$args;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Please adjust the `Procfile` and `nginx.conf` file as appropriate.
|
Please adjust the `Procfile` and `nginx.conf` file as appropriate.
|
||||||
|
|
||||||
## Custom Error Pages
|
### Custom Error Pages
|
||||||
|
|
||||||
By default, Dokku provides custom error pages for the following three categories of errors:
|
By default, Dokku provides custom error pages for the following three categories of errors:
|
||||||
|
|
||||||
@@ -225,34 +338,80 @@ By default, Dokku provides custom error pages for the following three categories
|
|||||||
|
|
||||||
These are provided as an alternative to the generic Nginx error page, are shared for _all_ applications, and their contents are located on disk at `/var/lib/dokku/data/nginx-vhosts/dokku-errors`. To customize them for a specific app, create a custom `nginx.conf.sigil` as described above and change the paths to point elsewhere.
|
These are provided as an alternative to the generic Nginx error page, are shared for _all_ applications, and their contents are located on disk at `/var/lib/dokku/data/nginx-vhosts/dokku-errors`. To customize them for a specific app, create a custom `nginx.conf.sigil` as described above and change the paths to point elsewhere.
|
||||||
|
|
||||||
## Domains plugin
|
### Default site
|
||||||
|
|
||||||
See the [domain configuration documentation](/docs/configuration/domains.md).
|
By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration.
|
||||||
|
|
||||||
## Customizing hostnames
|
Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
|
||||||
|
|
||||||
See the [customizing hostnames documentation](/docs/configuration/domains.md#customizing-hostnames).
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
listen [::]:80 default_server;
|
||||||
|
|
||||||
## Disabling VHOSTS
|
server_name _;
|
||||||
|
access_log off;
|
||||||
|
return 410;
|
||||||
|
}
|
||||||
|
|
||||||
See the [disabling vhosts documentation](/docs/configuration/domains.md#disabling-vhosts).
|
# To handle HTTPS requests, you can uncomment the following section.
|
||||||
|
#
|
||||||
|
# Please note that in order to let this work as expected, you need a valid
|
||||||
|
# SSL certificate for any domains being served. Browsers will show SSL
|
||||||
|
# errors in all other cases.
|
||||||
|
#
|
||||||
|
# Note that the key and certificate files in the below example need to
|
||||||
|
# be copied into /etc/nginx/ssl/ folder.
|
||||||
|
#
|
||||||
|
# server {
|
||||||
|
# listen 443 ssl;
|
||||||
|
# listen [::]:443 ssl;
|
||||||
|
# server_name _;
|
||||||
|
# ssl_certificate /etc/nginx/ssl/cert.crt;
|
||||||
|
# ssl_certificate_key /etc/nginx/ssl/cert.key;
|
||||||
|
# access_log off;
|
||||||
|
# return 410;
|
||||||
|
# }
|
||||||
|
```
|
||||||
|
|
||||||
## Default site
|
Make sure to reload nginx after creating this file by running `service nginx reload`.
|
||||||
|
|
||||||
See the [default site documentation](/docs/configuration/domains.md#default-site).
|
This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||||
|
|
||||||
## Running behind a load balancer
|
The configuration file must be loaded before `/etc/nginx/conf.d/dokku.conf`, so it can not be arranged as a vhost in `/etc/nginx/sites-enabled` that is only processed afterwards.
|
||||||
|
|
||||||
See the [load balancer documentation](/docs/configuration/ssl.md#running-behind-a-load-balancer).
|
Alternatively, you may push an app to your Dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
||||||
|
|
||||||
## SSL Configuration
|
## Other
|
||||||
|
|
||||||
See the [ssl documentation](/docs/configuration/ssl.md).
|
### Domains plugin
|
||||||
|
|
||||||
## Disabling Nginx
|
See the [domain configuration documentation](/docs/configuration/domains.md) for more information on how to configure domains for your app.
|
||||||
|
|
||||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md).
|
### Customizing hostnames
|
||||||
|
|
||||||
## Managing Proxy Port mappings
|
See the [customizing hostnames documentation](/docs/configuration/domains.md#customizing-hostnames) for more information on how to configure domains for your app.
|
||||||
|
|
||||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md#proxy-port-mapping).
|
### Disabling VHOSTS
|
||||||
|
|
||||||
|
See the [disabling vhosts documentation](/docs/configuration/domains.md#disabling-vhosts) for more information on how to disable domain usage for your app.
|
||||||
|
|
||||||
|
### Running behind a load balancer
|
||||||
|
|
||||||
|
See the [load balancer documentation](/docs/configuration/ssl.md#running-behind-a-load-balancer) for more information on how to configure your nginx config for running behind a network load balancer.
|
||||||
|
|
||||||
|
### SSL Configuration
|
||||||
|
|
||||||
|
See the [ssl documentation](/docs/configuration/ssl.md) for more information on how to configure SSL certificates for your application.
|
||||||
|
|
||||||
|
### Disabling Nginx
|
||||||
|
|
||||||
|
See the [proxy documentation](/docs/networking/proxy-management.md) for more information on how to disable nginx as the proxy implementation for your app.
|
||||||
|
|
||||||
|
### Managing Proxy Port mappings
|
||||||
|
|
||||||
|
See the [proxy documentation](/docs/networking/proxy-management.md#proxy-port-mapping) for more information on how to manage ports proxied for your app.
|
||||||
|
|
||||||
|
### Regenerating nginx config
|
||||||
|
|
||||||
|
See the [proxy documentation](/docs/networking/proxy-management.md#regenerating-proxy-config) for more information on how to rebuild the nginx proxy configuration for your app.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ certs:add <app> CRT KEY # Add an ssl endpoint to an app. Can al
|
|||||||
certs:generate <app> DOMAIN # Generate a key and certificate signing request (and self-signed certificate)
|
certs:generate <app> DOMAIN # Generate a key and certificate signing request (and self-signed certificate)
|
||||||
certs:remove <app> # Remove an SSL Endpoint from an app.
|
certs:remove <app> # Remove an SSL Endpoint from an app.
|
||||||
certs:report [<app>] [<flag>] # Displays an ssl report for one or more apps
|
certs:report [<app>] [<flag>] # Displays an ssl report for one or more apps
|
||||||
|
certs:show <app> <crt|key> # Show the server.crt or server.key on stdout
|
||||||
certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can
|
|||||||
dokku nginx:import-ssl <app> < certs.tar
|
dokku nginx:import-ssl <app> < certs.tar
|
||||||
```
|
```
|
||||||
|
|
||||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/docs/advanced-usage/proxy-management.md) for information as to how to reconfigure the mappings.
|
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/docs/networking/proxy-management.md) for information as to how to reconfigure the mappings.
|
||||||
|
|
||||||
## Per-application certificate management
|
## Per-application certificate management
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
|||||||
|
|
||||||
#### SSL and Multiple Domains
|
#### SSL and Multiple Domains
|
||||||
|
|
||||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/docs/configuration/domains.md).
|
When an SSL certificate is associated to an application, the certificate will be associated with _all_ domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/docs/configuration/domains.md).
|
||||||
|
|
||||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/docs/configuration/nginx.md).
|
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/docs/configuration/nginx.md).
|
||||||
|
|
||||||
@@ -56,6 +57,16 @@ If you decide to obtain a CA signed certificate, you can import that certificate
|
|||||||
|
|
||||||
The `certs:remove` command only works on app-specific certificates. It will `rm` the app-specific tls directory, rebuild the nginx configuration, and reload nginx.
|
The `certs:remove` command only works on app-specific certificates. It will `rm` the app-specific tls directory, rebuild the nginx configuration, and reload nginx.
|
||||||
|
|
||||||
|
### Showing the certificate
|
||||||
|
|
||||||
|
The `certs:show` command can be used to show your configured certs for an app. The show command can be used for example to export Let's Encrypt certificates
|
||||||
|
after they've been generated. You can export it as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku certs:show node-js-app crt > server.crt
|
||||||
|
dokku certs:show node-js-app key > server.key
|
||||||
|
```
|
||||||
|
|
||||||
### Displaying certificate reports for an app
|
### Displaying certificate reports for an app
|
||||||
|
|
||||||
> New as of 0.8.1
|
> New as of 0.8.1
|
||||||
@@ -113,9 +124,9 @@ dokku certs:report node-js-app --ssl-enabled
|
|||||||
|
|
||||||
## HSTS Header
|
## 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 enables this header by default
|
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 enables this header by default for HTTPS requests.
|
||||||
|
|
||||||
See the [NGINX HSTS documentation](/docs/configuration/nginx.md#hsts-header) for more information.
|
See the [NGINX HSTS documentation](/docs/configuration/nginx.md#hsts-header) for more information on how the HSTS configuration can be managed for your application.
|
||||||
|
|
||||||
## HTTP/2 support
|
## HTTP/2 support
|
||||||
|
|
||||||
@@ -125,35 +136,12 @@ 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.
|
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 a [custom nginx template](/docs/configuration/nginx.md#customizing-the-nginx-configuration). The following is a simple example of how to do so.
|
If your server runs behind an HTTP(S) load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application via `nginx:set`:
|
||||||
|
|
||||||
```go
|
```shell
|
||||||
server {
|
dokku nginx:set node-js-app x-forwarded-for-value "\$http_x_forwarded_for"
|
||||||
listen [::]:{{ .PROXY_PORT }};
|
dokku nginx:set node-js-app x-forwarded-port-value "\$http_x_forwarded_port"
|
||||||
listen {{ .PROXY_PORT }};
|
dokku nginx:set node-js-app x-forwarded-proto-value "\$http_x_forwarded_proto"
|
||||||
server_name {{ .NOSSL_SERVER_NAME }};
|
|
||||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
|
||||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://{{ .APP }};
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection $http_connection;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
|
||||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
|
|
||||||
proxy_set_header X-Request-Start $msec;
|
|
||||||
}
|
|
||||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream {{ .APP }} {
|
|
||||||
{{ range .DOKKU_APP_WEB_LISTENERS | split " " }}
|
|
||||||
server {{ . }};
|
|
||||||
{{ end }}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Only use this option if:
|
Only use this option if:
|
||||||
@@ -162,7 +150,18 @@ Only use this option if:
|
|||||||
|
|
||||||
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.
|
The `x-forwarded-ssl` property may also be set for application frameworks that require this value. Note that this is a non-standard version of setting `x-forwarded-proto` to `https`, and should only be done as a last resort.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# force-setting value to `on`
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl on
|
||||||
|
|
||||||
|
# force-setting value to `off`
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl on
|
||||||
|
|
||||||
|
# removing the value from nginx.conf (default)
|
||||||
|
dokku nginx:set node-js-app x-forwarded-ssl
|
||||||
|
```
|
||||||
|
|
||||||
### SSL Port Exposure
|
### SSL Port Exposure
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Deploying to Dokku
|
# Deploying to Dokku
|
||||||
|
|
||||||
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should set the `DOKKU_DOMAIN` value in the `Vagrantfile` before you initialize the Vagrant VM.
|
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should substitute the domain `dokku.me` for the domain name or IP address associated with your server. Users of the Vagrant VM included with Dokku can use `dokku.me` which points to the IP of the VM.
|
||||||
|
|
||||||
## Deploy tutorial
|
## Deploy tutorial
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ Now you can deploy the `ruby-getting-started` app to your Dokku server. All you
|
|||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
cd ruby-getting-started
|
cd ruby-getting-started
|
||||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||||
git push dokku master
|
git push dokku main:master
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
||||||
@@ -71,7 +71,7 @@ git push dokku master
|
|||||||
|
|
||||||
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
||||||
|
|
||||||
After running `git push dokku master`, you should have output similar to this in your terminal:
|
After running `git push dokku main:master`, you should have output similar to this in your terminal:
|
||||||
|
|
||||||
```
|
```
|
||||||
Counting objects: 231, done.
|
Counting objects: 231, done.
|
||||||
@@ -100,8 +100,43 @@ Total 231 (delta 93), reused 147 (delta 53)
|
|||||||
|
|
||||||
Once the deploy is complete, the application's web URL will be generated as above.
|
Once the deploy is complete, the application's web URL will be generated as above.
|
||||||
|
|
||||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks), as well as by using a project's [Dockerfile](https://docs.docker.com/reference/builder/).
|
Dokku supports deploying applications in a few ways:
|
||||||
|
|
||||||
|
- [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack.
|
||||||
|
- This is the default method used by Dokku.
|
||||||
|
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||||
|
- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image.
|
||||||
|
|
||||||
|
### Setting up SSL
|
||||||
|
|
||||||
|
> While SSL certificates can be imported, automated SSL via Letsencrypt requires that all domains on an app correctly point at your server's public ip address. Please keep this in mind when using Letsencrypt.
|
||||||
|
|
||||||
|
For many users, responding to requests via `https` will be desirable. Dokku has a complete [ssl plugin](/docs/configuration/ssl.md) built in that can be used to import SSL certificates (below is a short example, please refer to the [ssl documentation](/docs/configuration/ssl.md) for more information):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku certs:add ruby-getting-started server.crt server.key
|
||||||
|
```
|
||||||
|
|
||||||
|
As an alternative, the Dokku project offers an optional letsencrypt plugin that can be used to automate SSL certificate retrieval and renewal.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# on the Dokku host
|
||||||
|
# install the letsencrypt plugin
|
||||||
|
# plugin installation requires root, hence the user change
|
||||||
|
sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
|
||||||
|
|
||||||
|
# configure the plugin
|
||||||
|
dokku config:set --global DOKKU_LETSENCRYPT_EMAIL=your-email@your.domain.com
|
||||||
|
|
||||||
|
# set a custom domain that you own for your application
|
||||||
|
dokku domains:set ruby-getting-started ruby-getting-started.your.domain.com
|
||||||
|
|
||||||
|
# enable letsencrypt
|
||||||
|
dokku letsencrypt:enable ruby-getting-started
|
||||||
|
|
||||||
|
# enable auto-renewal
|
||||||
|
dokku letsencrypt:cron-job --add
|
||||||
|
```
|
||||||
|
|
||||||
### Skipping deployment
|
### Skipping deployment
|
||||||
|
|
||||||
@@ -121,7 +156,7 @@ If you need to redeploy or restart your app:
|
|||||||
dokku ps:rebuild ruby-getting-started
|
dokku ps:rebuild ruby-getting-started
|
||||||
```
|
```
|
||||||
|
|
||||||
See the [process scaling documentation](/docs/deployment/process-management.md) for more information.
|
See the [process scaling documentation](/docs/processes/process-management.md) for more information on how to manage your app processes.
|
||||||
|
|
||||||
### Deploying with private Git submodules
|
### Deploying with private Git submodules
|
||||||
|
|
||||||
@@ -143,8 +178,9 @@ If you do not enter a fully qualified domain name when pushing your app, Dokku d
|
|||||||
```shell
|
```shell
|
||||||
# from your local machine
|
# from your local machine
|
||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
|
# the below example assumes your app server domain or IP is dokku.me. Push in the form of: dokku@{serveripordomain}:{dokkuappname}
|
||||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||||
git push dokku master
|
git push dokku main:master
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -158,7 +194,7 @@ You can also specify the fully qualified name as follows:
|
|||||||
# from your local machine
|
# from your local machine
|
||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
git remote add dokku dokku@dokku.me:app.dokku.me
|
git remote add dokku dokku@dokku.me:app.dokku.me
|
||||||
git push dokku master
|
git push dokku main:master
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -172,13 +208,15 @@ This is useful when you want to deploy to the root domain:
|
|||||||
# from your local machine
|
# from your local machine
|
||||||
# the remote username *must* be dokku or pushes will fail
|
# the remote username *must* be dokku or pushes will fail
|
||||||
git remote add dokku dokku@dokku.me:dokku.me
|
git remote add dokku dokku@dokku.me:dokku.me
|
||||||
git push dokku master
|
git push dokku main:master
|
||||||
```
|
```
|
||||||
|
|
||||||
... deployment ...
|
```
|
||||||
|
... deployment ...
|
||||||
|
|
||||||
remote: -----> Application deployed:
|
remote: -----> Application deployed:
|
||||||
remote: http://dokku.me
|
remote: http://dokku.me
|
||||||
|
```
|
||||||
|
|
||||||
## Dokku/Docker container management compatibility
|
## Dokku/Docker container management compatibility
|
||||||
|
|
||||||
@@ -188,36 +226,36 @@ Prior to every deployment, Dokku will execute a cleanup function. As of 0.5.x, t
|
|||||||
|
|
||||||
## Adding deploy users
|
## Adding deploy users
|
||||||
|
|
||||||
See the [user management documentation](/docs/deployment/user-management.md).
|
See the [user management documentation](/docs/deployment/user-management.md) for more information on how to manage users with access to your Dokku server.
|
||||||
|
|
||||||
## Default vhost
|
## Default vhost
|
||||||
|
|
||||||
See the [nginx documentation](/docs/configuration/nginx.md#default-site).
|
See the [domains documentation](/docs/configuration/domains.md#default-site) for more information on how to manage the default site.
|
||||||
|
|
||||||
## Deploying non-master branch
|
## Deploying non-master branch
|
||||||
|
|
||||||
See the [Git documentation](/docs/deployment/methods/git.md#changing-the-deploy-branch).
|
See the [Git documentation](/docs/deployment/methods/git.md#changing-the-deploy-branch) for more information on deploying a non-master branch to your application.
|
||||||
|
|
||||||
## Dockerfile deployment
|
## Dockerfile deployment
|
||||||
|
|
||||||
See the [Dockerfile documentation](/docs/deployment/methods/dockerfiles.md).
|
See the [Dockerfile documentation](/docs/deployment/builders/dockerfiles.md) for information Dokku's Dockerfile support.
|
||||||
|
|
||||||
## Image tagging
|
## Image tagging
|
||||||
|
|
||||||
See the [image tagging documentation](/docs/deployment/methods/images.md).
|
See the [image tagging documentation](/docs/deployment/methods/images.md) for more information on how Docker images can be tagged and deployed for a given application.
|
||||||
|
|
||||||
## Specifying a custom buildpack
|
## Specifying a custom buildpack
|
||||||
|
|
||||||
See the [buildpack documentation](/docs/deployment/methods/buildpacks.md).
|
See the [herokuish buildpack documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to specify a set of custom buildpacks for your application.
|
||||||
|
|
||||||
## Removing a deployed app
|
## Removing a deployed app
|
||||||
|
|
||||||
See the [application management documentation](/docs/deployment/application-management.md#removing-a-deployed-app).
|
See the [application management documentation](/docs/deployment/application-management.md#removing-a-deployed-app) for more information on how to remove an application from your Dokku server.
|
||||||
|
|
||||||
## Renaming a deployed app
|
## Renaming a deployed app
|
||||||
|
|
||||||
See the [application management documentation](/docs/deployment/application-management.md#renaming-a-deployed-app).
|
See the [application management documentation](/docs/deployment/application-management.md#renaming-a-deployed-app) for more information on how an application can be renamed and the impact of doing so upon the application and associated resources.
|
||||||
|
|
||||||
## Zero downtime deploy
|
## Zero downtime deploy
|
||||||
|
|
||||||
See the [zero-downtime deploy documentation](/docs/deployment/zero-downtime-deploys.md).
|
See the [zero-downtime deploy documentation](/docs/deployment/zero-downtime-deploys.md) for more information on how Dokku enables zero-downtime deploys.
|
||||||
|
|||||||
@@ -103,6 +103,16 @@ dokku --force apps:destroy node-js-app
|
|||||||
Destroying node-js-app (including all add-ons)
|
Destroying node-js-app (including all add-ons)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The `--force` flag can also be specified on the command vs globally:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku apps:destroy --force node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Destroying node-js-app (including all add-ons)
|
||||||
|
```
|
||||||
|
|
||||||
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||||
|
|
||||||
### Renaming a deployed app
|
### Renaming a deployed app
|
||||||
@@ -181,7 +191,6 @@ dokku apps:clone --ignore-existing node-js-app io-js-app
|
|||||||
|
|
||||||
If you wish to disable deploying for a period of time, this can be done via deploy locks. Normally, deploy locks exist only for the duration of a deploy so as to avoid deploys from colliding, but a deploy lock can be created by running the `apps:lock` command.
|
If you wish to disable deploying for a period of time, this can be done via deploy locks. Normally, deploy locks exist only for the duration of a deploy so as to avoid deploys from colliding, but a deploy lock can be created by running the `apps:lock` command.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku apps:lock node-js-app
|
dokku apps:lock node-js-app
|
||||||
```
|
```
|
||||||
@@ -214,7 +223,6 @@ dokku apps:unlock node-js-app
|
|||||||
|
|
||||||
In some cases, you may wish to inspect the state of an app lock. To do so, you can issue an `apps:lock` command. This will exit non-zero if there is no app lock in place.
|
In some cases, you may wish to inspect the state of an app lock. To do so, you can issue an `apps:lock` command. This will exit non-zero if there is no app lock in place.
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku apps:locked node-js-app
|
dokku apps:locked node-js-app
|
||||||
```
|
```
|
||||||
@@ -234,13 +242,15 @@ dokku apps:report
|
|||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
=====> node-js-app
|
=====> node-js-app app information
|
||||||
App dir: /home/dokku/node-js-app
|
App dir: /home/dokku/node-js-app
|
||||||
App deploy source: git
|
App deploy source: git
|
||||||
App locked: false
|
App locked: false
|
||||||
=====> python-sample
|
=====> python-sample app information
|
||||||
not deployed
|
App dir: /home/dokku/python-sample
|
||||||
=====> ruby-sample
|
App deploy source:
|
||||||
|
App locked: false
|
||||||
|
=====> ruby-sample app information
|
||||||
App dir: /home/dokku/ruby-sample
|
App dir: /home/dokku/ruby-sample
|
||||||
App deploy source: git
|
App deploy source: git
|
||||||
App locked: false
|
App locked: false
|
||||||
@@ -253,7 +263,7 @@ dokku apps:report node-js-app
|
|||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
=====> node-js-app
|
=====> node-js-app app information
|
||||||
App dir: /home/dokku/node-js-app
|
App dir: /home/dokku/node-js-app
|
||||||
App deploy source: git
|
App deploy source: git
|
||||||
App locked: false
|
App locked: false
|
||||||
|
|||||||
145
docs/deployment/builders/builder-management.md
Normal file
145
docs/deployment/builders/builder-management.md
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
# Builder Management
|
||||||
|
|
||||||
|
> New as of 0.24.0
|
||||||
|
|
||||||
|
```
|
||||||
|
builder:report [<app>] [<flag>] # Displays a builder report for one or more apps
|
||||||
|
builder:set <app> <key> (<value>) # Set or clear a builder property for an app
|
||||||
|
```
|
||||||
|
|
||||||
|
Builders are a way of customizing how an app is built from a source, allowing users flexibility in how artifacts are created for later scheduling.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Builder selection
|
||||||
|
|
||||||
|
Dokku supports the following built-in builders:
|
||||||
|
|
||||||
|
- `builder-dockerfile`: Builds apps using a `Dockerfile` via `docker build`. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how this builder functions.
|
||||||
|
- `builder-herokuish`: Builds apps with Heroku's v2a Buildpack specification via `gliderlabs/herokuish`. See the [herokuish builder documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how this builder functions.
|
||||||
|
- `builder-pack`: Builds apps with Cloud Native Buildpacks via the `pack-cli` tool. See the [cloud native buildpacks builder documentation](/docs/deployment/builders/cloud-native-buildpacks.md) for more information on how this builder functions.
|
||||||
|
|
||||||
|
Builders run a detection script against a source code repository, and the first detected builder will be used to build the app artifact. The exception to this is when a `Dockerfile` is detected and the app is also able to use either `herokuish` or `pack-cli` for building, in which case one of the latter will be chosen.
|
||||||
|
|
||||||
|
### Overriding the auto-selected builder
|
||||||
|
|
||||||
|
If desired, the builder can be specified via the `builder:set` command by speifying a value for `selected`. The selected builder will always be used.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app selected dockerfile
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app selected
|
||||||
|
```
|
||||||
|
|
||||||
|
The `selected` property can also be set globally. The global default is an empty string, and auto-detection will be performed when no value is set per-app or globally.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set --global selected herokuish
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set --global selected
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Changing the build directory
|
||||||
|
|
||||||
|
> Warning: Please keep in mind that setting a custom build directory will result in loss of any changes to the top-level directory, such as the `git.keep-git-dir` property.
|
||||||
|
|
||||||
|
When deploying a monorepo, it may be desirable to specify the specific build directory to use for a given app. This can be done via the `builder:set` command. If a value is specified and that directory does not exist within the repository, the build will fail.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app build-dir app2
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app build-dir
|
||||||
|
```
|
||||||
|
|
||||||
|
The `build-dir` property can also be set globally. The global default is empty string, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set --global build-dir app2
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set --global build-dir
|
||||||
|
```
|
||||||
|
|
||||||
|
### Displaying builder reports for an app
|
||||||
|
|
||||||
|
You can get a report about the app's builder status using the `builder:report` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:report
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder information
|
||||||
|
Builder build dir: custom
|
||||||
|
Builder computed build dir: custom
|
||||||
|
Builder computed selected: herokuish
|
||||||
|
Builder global build dir:
|
||||||
|
Builder global selected: herokuish
|
||||||
|
Builder selected: herokuish
|
||||||
|
=====> python-sample builder information
|
||||||
|
Builder build dir:
|
||||||
|
Builder computed build dir:
|
||||||
|
Builder computed selected: dockerfile
|
||||||
|
Builder global build dir:
|
||||||
|
Builder global selected: herokuish
|
||||||
|
Builder selected: dockerfile
|
||||||
|
=====> ruby-sample builder information
|
||||||
|
Builder build dir:
|
||||||
|
Builder computed build dir:
|
||||||
|
Builder computed selected: herokuish
|
||||||
|
Builder global build dir:
|
||||||
|
Builder global selected: herokuish
|
||||||
|
Builder selected:
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:report node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder information
|
||||||
|
Builder selected: herokuish
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:report node-js-app --builder-selected
|
||||||
|
```
|
||||||
|
|
||||||
|
### Custom builders
|
||||||
|
|
||||||
|
To create a custom builder, the following triggers must be implemented:
|
||||||
|
|
||||||
|
- `builder-build`:
|
||||||
|
- arguments: `BUILDER_TYPE` `APP` `SOURCECODE_WORK_DIR`
|
||||||
|
- description: Creates a docker image named with the output of `common#get_app_image_name $APP`.
|
||||||
|
- `builder-detect`:
|
||||||
|
- arguments: `APP` `SOURCECODE_WORK_DIR`
|
||||||
|
- description: Outputs the name of the builder (without the `builder-` prefix) to use to build the app.
|
||||||
|
- `builder-release`:
|
||||||
|
- arguments: `BUILDER_TYPE` `APP` `IMAGE_AG`
|
||||||
|
- description: A post-build, pre-release trigger that can be used to post-process the image. Usually simply tags and labels the image appropriately.
|
||||||
|
|
||||||
|
Custom plugins names _must_ have the prefix `builder-` or builder overriding via `builder:set` may not function as expected.
|
||||||
|
|
||||||
|
Builders can use any tools available on the system to build the docker image, and may even be used to schedule building off-server. The only current requirement is that the image must exist on the server at the end of the `builder-build` command, though this requirement may be relaxed in a future release.
|
||||||
|
|
||||||
|
For a simple example of how to implement this trigger, see `builder-pack`, which utilizes a cli tool - `pack-cli` - to generate an OCI image that is compatible with Docker and can be scheduled by the official scheduling plugins.
|
||||||
154
docs/deployment/builders/cloud-native-buildpacks.md
Normal file
154
docs/deployment/builders/cloud-native-buildpacks.md
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
# Cloud Native Buildpacks (Experimental)
|
||||||
|
|
||||||
|
> New as of 0.22.0
|
||||||
|
|
||||||
|
```
|
||||||
|
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
|
||||||
|
```
|
||||||
|
|
||||||
|
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application.
|
||||||
|
|
||||||
|
> Warning: This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. As the integration is experimental in Dokku, it is likely to change over time.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
The `pack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://buildpacks.io/docs/tools/pack/).
|
||||||
|
|
||||||
|
Builds will proceed with the `pack` cli for the app from then on.
|
||||||
|
|
||||||
|
### Caveats
|
||||||
|
|
||||||
|
As this functionality is highly experimental, there are a number of caveats. Please note that not all issuesare listed below.
|
||||||
|
|
||||||
|
- Specifying specific buildpacks is not currently possible.
|
||||||
|
- A future release will add support for specifying buildpacks via the `buildpacks` plugin.
|
||||||
|
- There is currently no way to specify extra arguments for `pack` cli invocations.
|
||||||
|
- A future release will add support for injecting extra arguments during the build process.
|
||||||
|
- The default process type is `web`.
|
||||||
|
- Build cache is stored in Docker volumes instead of on disk. As such, `repo:purge-cache` currently has no effect.
|
||||||
|
- A future version will add integration with the `repo` plugin.
|
||||||
|
- `pack` is not currently included with Dokku, nor is it added as a package dependency.
|
||||||
|
- A future version will include it as a package dependency.
|
||||||
|
|
||||||
|
### Detection
|
||||||
|
|
||||||
|
This builder will be auto-detected in either the following cases:
|
||||||
|
|
||||||
|
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
|
||||||
|
```shell
|
||||||
|
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||||
|
```
|
||||||
|
- A `project.toml` file exists in the root of the app repository.
|
||||||
|
- This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||||
|
|
||||||
|
The builder can also be specified via the `builder:set` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app selected pack
|
||||||
|
```
|
||||||
|
|
||||||
|
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||||
|
|
||||||
|
### Changing the `project.toml` location
|
||||||
|
|
||||||
|
When deploying a monorepo, it may be desirable to specify the specific path of the `project.toml` file to use for a given app. This can be done via the `builder-pack:set` command. If a value other than `project.toml` is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `project.toml`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:set node-js-app projecttoml-path project2.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:set node-js-app projecttoml-path
|
||||||
|
```
|
||||||
|
|
||||||
|
The `projecttoml-path` property can also be set globally. The global default is `project.toml`, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:set --global projecttoml-path project2.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:set --global projecttoml-path
|
||||||
|
```
|
||||||
|
|
||||||
|
### Displaying builder-pack reports for an app
|
||||||
|
|
||||||
|
> New as of 0.25.0
|
||||||
|
|
||||||
|
You can get a report about the app's storage status using the `builder-pack:report` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:report
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder-pack information
|
||||||
|
Builder-pack computed projecttoml path: project2.toml
|
||||||
|
Builder-pack global projecttoml path: project.toml
|
||||||
|
Builder-pack projecttoml path: project2.toml
|
||||||
|
=====> python-sample builder-pack information
|
||||||
|
Builder-pack computed projecttoml path: project.toml
|
||||||
|
Builder-pack global projecttoml path: project.toml
|
||||||
|
Builder-pack projecttoml path:
|
||||||
|
=====> ruby-sample builder-pack information
|
||||||
|
Builder-pack computed projecttoml path: project.toml
|
||||||
|
Builder-pack global projecttoml path: project.json
|
||||||
|
Builder-pack projecttoml path:
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:report node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder-pack information
|
||||||
|
Builder-pack computed projecttoml path: project2.toml
|
||||||
|
Builder-pack global projecttoml path: project.toml
|
||||||
|
Builder-pack projecttoml path: project2.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-pack:report node-js-app --builder-pack-projecttoml-path
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
project2.toml
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customizing the Buildpack stack builder
|
||||||
|
|
||||||
|
> New as of 0.23.0
|
||||||
|
|
||||||
|
The default stack builder in use by CNB buildpacks in Dokku is based on `heroku/buildpacks`. Users may desire to switch the stack builder to a custom version, either to update the operating system or to customize packages included with the stack builder. This can be performed via the `buildpacks:set-property` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku buildpacks:set-property node-js-app stack paketobuildpacks/build:base-cnb
|
||||||
|
```
|
||||||
|
|
||||||
|
The specified stack builder can also be unset by omitting the name of the stack builder when calling `buildpacks:set-property`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku buildpacks:set-property node-js-app stack
|
||||||
|
```
|
||||||
|
|
||||||
|
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||||
|
|
||||||
|
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_BUILDER` environment variable (`heroku/buildpacks` by default).
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# set globally
|
||||||
|
dokku buildpacks:set-property --global stack paketobuildpacks/build:base-cnb
|
||||||
|
|
||||||
|
# unset globally
|
||||||
|
dokku buildpacks:set-property --global stack
|
||||||
|
```
|
||||||
227
docs/deployment/builders/dockerfiles.md
Normal file
227
docs/deployment/builders/dockerfiles.md
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
# Dockerfile Deployment
|
||||||
|
|
||||||
|
> New as of 0.3.15
|
||||||
|
|
||||||
|
While Dokku normally defaults to using [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use Docker's native `Dockerfile` system to define a container.
|
||||||
|
|
||||||
|
> Dockerfile support is considered a *power user* feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Detection
|
||||||
|
|
||||||
|
This builder will be auto-detected in the following case:
|
||||||
|
|
||||||
|
- A `Dockerfile` exists in the root of the app repository.
|
||||||
|
|
||||||
|
Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. For more information on how those are detected, see the following links:
|
||||||
|
|
||||||
|
- [Cloud Native Buildpacks documentation](/docs/deployment/builders/cloud-native-buildpacks.md#detection)
|
||||||
|
- [Herokuish documentation](/docs/deployment/builders/herokuish-buildpacks.md#detection)
|
||||||
|
|
||||||
|
### Switching from buildpack deployments
|
||||||
|
|
||||||
|
If an application was previously deployed via buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||||
|
```
|
||||||
|
|
||||||
|
### Changing the `Dockerfile` location
|
||||||
|
|
||||||
|
> The previous method to perform this - via `docker-options:add` - should be removed in favor of the `builder-dockerfile:set` command outlined here.
|
||||||
|
|
||||||
|
When deploying a monorepo, it may be desirable to specify the specific path of the `Dockerfile` file to use for a given app. This can be done via the `builder-dockerfile:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:set node-js-app dockerfile-path Dockerfile2
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:set node-js-app dockerfile-path
|
||||||
|
```
|
||||||
|
|
||||||
|
The `dockerfile-path` property can also be set globally. The global default is `Dockerfile`, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:set --global dockerfile-path Dockerfile2
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:set --global dockerfile-path
|
||||||
|
```
|
||||||
|
|
||||||
|
### Displaying builder-dockerfile reports for an app
|
||||||
|
|
||||||
|
> New as of 0.25.0
|
||||||
|
|
||||||
|
You can get a report about the app's storage status using the `builder-dockerfile:report` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku app-json:report
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder-dockerfile information
|
||||||
|
Builder-dockerfile computed dockerfile path: Dockerfile2
|
||||||
|
Builder-dockerfile global dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile dockerfile path: Dockerfile2
|
||||||
|
=====> python-sample builder-dockerfile information
|
||||||
|
Builder-dockerfile computed dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile global dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile dockerfile path:
|
||||||
|
=====> ruby-sample builder-dockerfile information
|
||||||
|
Builder-dockerfile computed dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile global dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile dockerfile path:
|
||||||
|
```
|
||||||
|
|
||||||
|
You can run the command for a specific app also.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:report node-js-app
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
=====> node-js-app builder-dockerfile information
|
||||||
|
Builder-dockerfile computed dockerfile path: Dockerfile2
|
||||||
|
Builder-dockerfile global dockerfile path: Dockerfile
|
||||||
|
Builder-dockerfile dockerfile path: Dockerfile2
|
||||||
|
```
|
||||||
|
|
||||||
|
You can pass flags which will output only the value of the specific information you want. For example:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder-dockerfile:report node-js-app --builder-dockerfile-dockerfile-path
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
Dockerfile2
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build-time configuration variables
|
||||||
|
|
||||||
|
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
||||||
|
|
||||||
|
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](docs/advanced-usage/docker-options.md):
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
||||||
|
```
|
||||||
|
|
||||||
|
Once set, the Dockerfile usage would be as follows:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
# set the argument default
|
||||||
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
|
# use the argument
|
||||||
|
RUN echo $NODE_ENV
|
||||||
|
```
|
||||||
|
|
||||||
|
You may also set the argument as an environment variable
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
# set the argument default
|
||||||
|
ARG NODE_ENV=production
|
||||||
|
|
||||||
|
# assign it to an environment variable
|
||||||
|
# we can wrap the variable in brackets
|
||||||
|
ENV NODE_ENV ${NODE_ENV}
|
||||||
|
|
||||||
|
# or omit them completely
|
||||||
|
|
||||||
|
# use the argument
|
||||||
|
RUN echo $NODE_ENV
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building images with Docker Buildkit
|
||||||
|
|
||||||
|
If your Dockerfile is using Docker engine's [buildkit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set. Additionally, complete build log output can be forced via `BUILDKIT_PROGRESS=plain`. Both of these environment variables can be set as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# via config:set
|
||||||
|
dokku config:set --global DOCKER_BUILDKIT=1 BUILDKIT_PROGRESS=plain
|
||||||
|
|
||||||
|
# on the /etc/default/dokku file
|
||||||
|
echo DOCKER_BUILDKIT=1 | sudo tee -a /etc/default/dokku
|
||||||
|
echo BUILDKIT_PROGRESS=plain | sudo tee -a /etc/default/dokku
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Buildkit directory caching
|
||||||
|
|
||||||
|
Buildkit implements the `RUN --mount` option, enabling mount directory caches for `RUN` directives. The following is an example that mounts debian packaging related directories, which can speed up fetching of remote package data.
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM debian:latest
|
||||||
|
RUN --mount=target=/var/lib/apt/lists,type=cache \
|
||||||
|
--mount=target=/var/cache/apt,type=cache \
|
||||||
|
apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
|
git
|
||||||
|
```
|
||||||
|
|
||||||
|
Mount cache targets may vary depending on the tool in use, and users are encouraged to investigate the directories that apply for their language and framework.
|
||||||
|
|
||||||
|
You would adjust the cache directory for whatever application cache you have, e.g. `/root/.pnpm-store/v3` for pnpm, `$HOME/.m2` for maven, or `/root/.cache` for golang.
|
||||||
|
|
||||||
|
### Customizing the run command
|
||||||
|
|
||||||
|
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base Node.js image, with the following `ENTRYPOINT`:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
ENTRYPOINT ["node"]
|
||||||
|
```
|
||||||
|
|
||||||
|
You can do:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku config:set node-js-app DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||||
|
```
|
||||||
|
|
||||||
|
To tell Docker what to run.
|
||||||
|
|
||||||
|
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable Docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
|
||||||
|
|
||||||
|
### Procfiles and multiple processes
|
||||||
|
|
||||||
|
> New as of 0.5.0
|
||||||
|
|
||||||
|
You can also customize the run command using a `Procfile`, much like you would on Heroku or
|
||||||
|
with a buildpack deployed app. The `Procfile` should contain one or more lines defining [process types and associated commands](https://devcenter.heroku.com/articles/procfile#declaring-process-types).
|
||||||
|
When you deploy your app, a Docker image will be built. The `Procfile` will be extracted from the image
|
||||||
|
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
||||||
|
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
||||||
|
|
||||||
|
```Procfile
|
||||||
|
web: bin/run-prod.sh
|
||||||
|
worker: bin/run-worker.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
And `Dockerfile`:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . ./
|
||||||
|
CMD ["bin/run-dev.sh"]
|
||||||
|
```
|
||||||
|
|
||||||
|
When you deploy this app the `web` process will automatically be scaled to 1 and your Docker container
|
||||||
|
will be started basically using the command `docker run bin/run-prod.sh`. If you want to also run
|
||||||
|
a worker container for this app, you can run `dokku ps:scale worker=1` and a new container will be
|
||||||
|
started by running `docker run bin/run-worker.sh` (the actual `docker run` commands are a bit more
|
||||||
|
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
||||||
|
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
||||||
|
|
||||||
|
### Exposed ports
|
||||||
|
|
||||||
|
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
# Buildpack Deployment
|
# Herokuish Buildpack Deployment
|
||||||
|
|
||||||
> Subcommands new as of 0.15.0
|
> Subcommands new as of 0.15.0
|
||||||
|
|
||||||
```
|
```
|
||||||
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
|
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
|
||||||
buildpacks:clear <app> # Clear all buildpacks set on the app
|
buildpacks:clear <app> # Clear all buildpacks set on the app
|
||||||
buildpacks:list <app> # List all buildpacks for an app
|
buildpacks:list <app> # List all buildpacks for an app
|
||||||
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
||||||
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
||||||
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
||||||
|
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
|
||||||
```
|
```
|
||||||
|
|
||||||
> Warning: If using the `buildpacks` plugin, be sure to unset any `BUILDPACK_URL` and remove any such entries from a committed `.env` file. A specified `BUILDPACK_URL` will always override a `.buildpacks` file or the buildpacks plugin.
|
> Warning: If using the `buildpacks` plugin, be sure to unset any `BUILDPACK_URL` and remove any such entries from a committed `.env` file. A specified `BUILDPACK_URL` will always override a `.buildpacks` file or the buildpacks plugin.
|
||||||
@@ -24,6 +25,23 @@ This page will cover usage of the `buildpacks` plugin.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
### Detection
|
||||||
|
|
||||||
|
This builder will be auto-detected in either the following cases:
|
||||||
|
|
||||||
|
- The `BUILDPACK_URL` app environment variable is set.
|
||||||
|
- This can be done via `dokku config:set` or via a committed `.env` file in the root of the repository. See the [environment variable documentation](/docs/configuration/environment-variables.md) for more details.
|
||||||
|
- A `.buildpacks` file exists in the root of the app repository.
|
||||||
|
- This can be via a committed `.buildpacks` file or managed via the `buildpacks` plugin commands.
|
||||||
|
|
||||||
|
The builder can also be specified via the `builder:set` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app selected herokuish
|
||||||
|
```
|
||||||
|
|
||||||
|
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||||
|
|
||||||
### Listing Buildpacks in Use
|
### Listing Buildpacks in Use
|
||||||
|
|
||||||
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
|
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
|
||||||
@@ -37,7 +55,6 @@ dokku buildpacks:list node-js-app
|
|||||||
-----> test buildpack urls
|
-----> test buildpack urls
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# running for an app with two buildpacks specified
|
# running for an app with two buildpacks specified
|
||||||
dokku buildpacks:list node-js-app
|
dokku buildpacks:list node-js-app
|
||||||
@@ -123,6 +140,34 @@ The `buildpacks:clear` command can be used to clear all configured buildpacks fo
|
|||||||
dokku buildpacks:clear node-js-app
|
dokku buildpacks:clear node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Customizing the Buildpack stack builder
|
||||||
|
|
||||||
|
> New as of 0.23.0
|
||||||
|
|
||||||
|
The default stack builder in use by Herokuish buildpacks in Dokku is based on `gliderlabs/herokuish:latest`. Typically, this is installed via an OS package which pulls the requisite Docker image. Users may desire to switch the stack builder to a custom version, either to update the operating system or to customize packages included with the stack builder. This can be performed via the `buildpacks:set-property` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku buildpacks:set-property node-js-app stack gliderlabs/herokuish:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
The specified stack builder can also be unset by omitting the name of the stack builder when calling `buildpacks:set-property`.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku buildpacks:set-property node-js-app stack
|
||||||
|
```
|
||||||
|
|
||||||
|
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||||
|
|
||||||
|
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_IMAGE` environment variable (`gliderlabs/herokuish:latest-20` by default).
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# set globally
|
||||||
|
dokku buildpacks:set-property --global stack gliderlabs/herokuish:latest
|
||||||
|
|
||||||
|
# unset globally
|
||||||
|
dokku buildpacks:set-property --global stack
|
||||||
|
```
|
||||||
|
|
||||||
### Displaying buildpack reports for an app
|
### Displaying buildpack reports for an app
|
||||||
|
|
||||||
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
|
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
|
||||||
@@ -133,11 +178,20 @@ dokku buildpacks:report
|
|||||||
|
|
||||||
```
|
```
|
||||||
=====> node-js-app buildpacks information
|
=====> node-js-app buildpacks information
|
||||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
Buildpacks computed stack: gliderlabs/herokuish:v0.5.23-20
|
||||||
|
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||||
|
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||||
|
Buildpacks stack: gliderlabs/herokuish:v0.5.23-20
|
||||||
=====> python-sample buildpacks information
|
=====> python-sample buildpacks information
|
||||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
||||||
|
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||||
|
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
||||||
|
Buildpacks stack:
|
||||||
=====> ruby-sample buildpacks information
|
=====> ruby-sample buildpacks information
|
||||||
|
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
||||||
|
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||||
Buildpacks list:
|
Buildpacks list:
|
||||||
|
Buildpacks stack:
|
||||||
```
|
```
|
||||||
|
|
||||||
You can run the command for a specific app also.
|
You can run the command for a specific app also.
|
||||||
@@ -164,14 +218,14 @@ dokku buildpacks:report node-js-app --buildpacks-list
|
|||||||
If an application was previously deployed via Dockerfile, the following commands should be run before a buildpack deploy will succeed:
|
If an application was previously deployed via Dockerfile, the following commands should be run before a buildpack deploy will succeed:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku config:unset --no-restart node-js-app DOKKU_DOCKERFILE_CMD DOKKU_DOCKERFILE_ENTRYPOINT DOKKU_PROXY_PORT_MAP
|
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||||
```
|
```
|
||||||
|
|
||||||
### Using a specific buildpack version
|
### Using a specific buildpack version
|
||||||
|
|
||||||
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
||||||
|
|
||||||
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified *without* a Git commit SHA like so:
|
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# using the latest nodejs buildpack
|
# using the latest nodejs buildpack
|
||||||
@@ -187,7 +241,7 @@ dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-node
|
|||||||
|
|
||||||
### Specifying commands via Procfile
|
### Specifying commands via Procfile
|
||||||
|
|
||||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
||||||
|
|
||||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||||
|
|
||||||
@@ -208,8 +262,7 @@ worker: env QUEUE=* bundle exec rake resque:work
|
|||||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||||
```
|
```
|
||||||
|
|
||||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
||||||
|
|
||||||
|
|
||||||
### `curl` build timeouts
|
### `curl` build timeouts
|
||||||
|
|
||||||
@@ -224,4 +277,4 @@ dokku config:set --global CURL_CONNECT_TIMEOUT=180
|
|||||||
|
|
||||||
### Clearing buildpack cache
|
### Clearing buildpack cache
|
||||||
|
|
||||||
See the [repository management documentation](/docs/advanced-usage/repository-management.md#clearing-app-cache).
|
See the [repository management documentation](/docs/advanced-usage/repository-management.md#clearing-app-cache) for more information on how to clear buildpack build cache for an application.
|
||||||
15
docs/deployment/builders/null.md
Normal file
15
docs/deployment/builders/null.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Null Builder
|
||||||
|
|
||||||
|
> New as of 0.25.0
|
||||||
|
|
||||||
|
The `null` builder does nothing, and is useful for routing to services not managed by Dokku. It should not be used in normal operation. Please see the [network documentation](/docs/networking/network.md#routing-an-app-to-a-known-ip:port-combination) for more information on the aforementioned use case.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Detection
|
||||||
|
|
||||||
|
This builder is _never_ auto-detected. The builder _must_ be specified via the `builder:set` command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku builder:set node-js-app selected null
|
||||||
|
```
|
||||||
25
docs/deployment/continuous-integration/generic.md
Normal file
25
docs/deployment/continuous-integration/generic.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Generic CI/CD Integration
|
||||||
|
|
||||||
|
In cases where there is no direct or documented integration available, the Dokku project provides an [Official Docker Image](https://github.com/dokku/ci-docker-image) for use in Continuous Integration/Continuous Deployment (CI/CD) systems.
|
||||||
|
|
||||||
|
Assuming a Docker image can be run as a CI task with environment variables injected, the following CI systems will have their variables automatically detected:
|
||||||
|
|
||||||
|
- [circleci](https://circleci.com/)
|
||||||
|
- [cloudbees](https://www.cloudbees.com/)
|
||||||
|
- [drone](https://www.drone.io/)
|
||||||
|
- [github actions](https://github.com/features/actions)
|
||||||
|
- [gitlab-ci](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/)
|
||||||
|
- [semaphoreci](https://semaphoreci.com/)
|
||||||
|
- [travisci](https://travis-ci.com/)
|
||||||
|
|
||||||
|
## Simple Usage
|
||||||
|
|
||||||
|
The simplest usage of the image is as follows.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# where the `.env` file contains `GIT_REMOTE_URL` and `SSH_PRIVATE_KEY`
|
||||||
|
|
||||||
|
docker run --rm -v="$PWD:/app" --env-file=.env dokku/ci-docker-image dokku-deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
For more configuration examples and further documentation, see the [ci-docker-image](https://github.com/dokku/ci-docker-image) readme.
|
||||||
30
docs/deployment/continuous-integration/github-actions.md
Normal file
30
docs/deployment/continuous-integration/github-actions.md
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# GitHub Actions
|
||||||
|
|
||||||
|
The Dokku project has an official GitHub Action available on the [GitHub Marketplace](https://github.com/marketplace/actions/dokku). The simplest usage example is as follows:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: 'deploy'
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Cloning repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Push to dokku
|
||||||
|
uses: dokku/github-action@master
|
||||||
|
with:
|
||||||
|
git_remote_url: 'ssh://dokku@dokku.me:22/appname'
|
||||||
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
```
|
||||||
|
|
||||||
|
For further usage documentation and other advanced examples, see the entry on the [GitHub Marketplace](https://github.com/marketplace/actions/dokku).
|
||||||
27
docs/deployment/continuous-integration/gitlab-ci.md
Normal file
27
docs/deployment/continuous-integration/gitlab-ci.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# GitLab CI
|
||||||
|
|
||||||
|
GitLab CI can be used to automatically deploy a Dokku application via the official the [dokku/ci-docker-image](https://github.com/dokku/ci-docker-image). The simplest example is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
image: dokku/ci-docker-image
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
variables:
|
||||||
|
GIT_DEPTH: 0
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
variables:
|
||||||
|
GIT_REMOTE_URL: ssh://dokku@dokku.me:22/appname
|
||||||
|
script:
|
||||||
|
- dokku-deploy
|
||||||
|
after_script:
|
||||||
|
- dokku-unlock
|
||||||
|
```
|
||||||
|
|
||||||
|
For further usage documentation and other advanced examples, see Dokku's [gitlab-ci](https://github.com/dokku/gitlab-ci) repository.
|
||||||
@@ -1,8 +1,13 @@
|
|||||||
# Log Management
|
# Log Management
|
||||||
|
|
||||||
```
|
```
|
||||||
logs <app> [-h] [-t] [-n num] [-q] [-p process] # Display recent log output
|
logs <app> [-h] [-t|--tail] [-n|--num num] [-q|--quiet] [-p|--ps process] # Display recent log output
|
||||||
logs:failed [<app>] # Shows the last failed deploy logs
|
logs:failed [--all|<app>] # Shows the last failed deploy logs
|
||||||
|
logs:report [<app>] [<flag>] # Displays a logs report for one or more apps
|
||||||
|
logs:set [--global|<app>] <key> <value> # Set or clear a logs property for an app
|
||||||
|
logs:vector-logs [--num num] [--tail] # Display vector log output
|
||||||
|
logs:vector-start # Start the vector logging container
|
||||||
|
logs:vector-stop # Stop the vector logging container
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -32,7 +37,7 @@ You can use these modifiers as follows:
|
|||||||
dokku logs node-js-app -t -p web
|
dokku logs node-js-app -t -p web
|
||||||
```
|
```
|
||||||
|
|
||||||
will show logs continually from the web process.
|
The above command will show logs continually from the web process.
|
||||||
|
|
||||||
### Failed deploy logs
|
### Failed deploy logs
|
||||||
|
|
||||||
@@ -40,14 +45,165 @@ will show logs continually from the web process.
|
|||||||
|
|
||||||
In some cases, it may be useful to retrieve the logs from a previously failed deploy.
|
In some cases, it may be useful to retrieve the logs from a previously failed deploy.
|
||||||
|
|
||||||
You can retrieve these logs by using the `logs:failed` command
|
You can retrieve these logs by using the `logs:failed` command.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku logs:failed node-js-app
|
dokku logs:failed node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also retrieve the failed logs for each app:
|
You may also fetch all failed app logs by using the `--all` flag.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
dokku logs:failed node-js-app
|
dokku logs:failed --all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Docker Log Retention
|
||||||
|
|
||||||
|
Docker log retention can be specified via the `logs:set` command by specifying a value for `max-size`. Log retention is set via injected docker options for all applications, but is also available via the `logs-get-property` trigger for alternative schedulers.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set node-js-app max-size 20m
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set node-js-app max-size
|
||||||
|
```
|
||||||
|
|
||||||
|
Valid values include any integer number followed by a unit of measure (`k`, `m`, or `g`) or the string `unlimited`. Setting to `unlimited` will result in Dokku omitting the log option.
|
||||||
|
|
||||||
|
The `max-size` property can also be set globally. The global default is `10m`, and the global value is used when no app-specific value is set.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set --global max-size 20m
|
||||||
|
```
|
||||||
|
|
||||||
|
The default value may be set by passing an empty value for the option.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set --global max-size
|
||||||
|
```
|
||||||
|
|
||||||
|
### Vector Logging Shipping
|
||||||
|
|
||||||
|
> New as of 0.22.6
|
||||||
|
|
||||||
|
Vector is an open-source, lightweight and ultra-fast tool for building observability pipelines. Dokku integrates with it for shipping container logs for the `docker-local` scheduler. Users may configure log-shipping on a per-app or global basis, neither of which interfere with the `dokku logs` commands.
|
||||||
|
|
||||||
|
#### Starting the Vector container
|
||||||
|
|
||||||
|
> Warning: While the default vector image may be updated over time, this will not impact running vector containers. Users are encouraged to view any Dokku and Vector changelogs to ensure their system will continue running as expected.
|
||||||
|
|
||||||
|
Vector may be started via the `logs:vector-start` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:vector-start
|
||||||
|
```
|
||||||
|
|
||||||
|
This will start a new container named `vector` with Dokku's vector config mounted and ready for use. If a running container already exists, this command will do nothing. Additionally, if a container exists but is not running, this command will attempt to start the container.
|
||||||
|
|
||||||
|
While the default vector image is hardcoded, users may specify an alternative via the `--vector-image` flag:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:vector-start --vector-image timberio/vector:latest-debian
|
||||||
|
```
|
||||||
|
|
||||||
|
The `vector` container will be started with the following volume mounts:
|
||||||
|
|
||||||
|
- `/var/lib/dokku/data/logs/vector.json:/etc/vector/vector.json`
|
||||||
|
- `/var/run/docker.sock:/var/run/docker.sock`
|
||||||
|
- `/var/log/dokku/apps:/var/log/dokku/apps`
|
||||||
|
|
||||||
|
The final volume mount - `/var/log/dokku/apps` - may be used for users that wish to ship logs to a file on disk that may be later logrotated. This directory is owned by the `dokku` user and group, with permissions set to `0755`. At this time, log-rotation is not configured for this directory.
|
||||||
|
|
||||||
|
#### Stopping the Vector container
|
||||||
|
|
||||||
|
Vector may be stopped via the `logs:vector-stop` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:vector-stop
|
||||||
|
```
|
||||||
|
|
||||||
|
The `vector` container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||||
|
|
||||||
|
#### Checking Vector's Logs
|
||||||
|
|
||||||
|
It may be necessary to check the vector container's logs to ensure that vector is operating as expected. This can be performed with the `logs:vector-logs` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:vector-logs
|
||||||
|
```
|
||||||
|
|
||||||
|
This command also supports the following modifiers:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
--num NUM # the number of lines to display
|
||||||
|
--tail # continually stream logs
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use these modifiers as follows:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:vector-logs --tail --num 10
|
||||||
|
```
|
||||||
|
|
||||||
|
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
||||||
|
|
||||||
|
#### Configuring a log sink
|
||||||
|
|
||||||
|
Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sinks may be configured globally or on a per-app basis by specifying a `vector-sink` in DSN form with the `logs:set` command. Specifying a sink value will reload any running vector container.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# setting the sink value in quotes is encouraged to avoid
|
||||||
|
# issues with ampersand encoding in shell commands
|
||||||
|
dokku logs:set node-js-app vector-sink "console://?encoding[codec]=json"
|
||||||
|
```
|
||||||
|
|
||||||
|
A sink may be removed by setting an empty value, which will also reload the running vector container.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set node-js-app vector-sink
|
||||||
|
```
|
||||||
|
|
||||||
|
Only one sink may be specified on a per-app basis at a given time.
|
||||||
|
|
||||||
|
Log sinks can also be specified globally by specifying the `--global` flag to `logs:set` with no app name specified:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set --global vector-sink "console://?encoding[codec]=json"
|
||||||
|
```
|
||||||
|
|
||||||
|
As with app-specific sink settings, the global value may also be cleared by setting no value.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku logs:set --global vector-sink
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Log Sink DSN Format
|
||||||
|
|
||||||
|
The DSN form of a sink is as follows:
|
||||||
|
|
||||||
|
```
|
||||||
|
SINK_TYPE://?SINK_OPTIONS
|
||||||
|
```
|
||||||
|
|
||||||
|
Valid values for `SINK_TYPE` include all log vector log sinks, while `SINK_OPTIONS` is a query-string form for the sink's options. The following is a short description on how to set various values:
|
||||||
|
|
||||||
|
- `bool`: form: `key=bool`
|
||||||
|
- `string`: form: `key=string`
|
||||||
|
- `int`: form: `key=int`
|
||||||
|
- `[string]`: form: `key[]=string`
|
||||||
|
- `[int]`: form: `key[]=int`
|
||||||
|
- `table`: form: `option[key]=value`
|
||||||
|
|
||||||
|
For some sinks - such as the `http` sink - it may be useful to use special characters such as `&`. These characters must be url escaped as per [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986.html).
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# the following command will set the `http` sink with a uri config value
|
||||||
|
# for a uri config value: https://loggerservice.com:1234/?token=abc1234&type=vector
|
||||||
|
# the url quoted version: https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector
|
||||||
|
dokku logs:set test vector-sink "http://?uri=https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector"
|
||||||
|
```
|
||||||
|
|
||||||
|
Please read the [sink documentation](https://vector.dev/docs/reference/sinks/) for your sink of choice to configure the sink as desired.
|
||||||
|
|||||||
@@ -1,119 +0,0 @@
|
|||||||
# Dockerfile Deployment
|
|
||||||
|
|
||||||
> New as of 0.3.15
|
|
||||||
|
|
||||||
While Dokku normally defaults to using [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use Docker's native `Dockerfile` system to define a container.
|
|
||||||
|
|
||||||
> Dockerfile support is considered a *power user* feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
|
||||||
|
|
||||||
To use a Dockerfile for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers *except* in the following two cases:
|
|
||||||
|
|
||||||
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
|
|
||||||
- The application has a `.buildpacks` file in the root of the repository. In this case, Dokku will use your specified buildpack(s).
|
|
||||||
|
|
||||||
## Switching from buildpack deployments
|
|
||||||
|
|
||||||
If an application was previously deployed via buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
|
||||||
```
|
|
||||||
|
|
||||||
## Build-time configuration variables
|
|
||||||
|
|
||||||
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
|
||||||
|
|
||||||
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](docs/advanced-usage/docker-options.md):
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
|
||||||
```
|
|
||||||
|
|
||||||
The location of the `Dockerfile` may also be specified. If the location is changed, the repository **must also** have a `Dockerfile` in the root directory in order to trigger a dockerfile-based deploy.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku docker-options:add node-js-app build '--file Dockerfile.dokku'
|
|
||||||
```
|
|
||||||
|
|
||||||
Once set, the Dockerfile usage would be as follows:
|
|
||||||
|
|
||||||
```Dockerfile
|
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
# set the argument default
|
|
||||||
ARG NODE_ENV=production
|
|
||||||
|
|
||||||
# use the argument
|
|
||||||
RUN echo $NODE_ENV
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also set the argument as an environment variable
|
|
||||||
|
|
||||||
```Dockerfile
|
|
||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
# set the argument default
|
|
||||||
ARG NODE_ENV=production
|
|
||||||
|
|
||||||
# assign it to an environment variable
|
|
||||||
# we can wrap the variable in brackets
|
|
||||||
ENV NODE_ENV ${NODE_ENV}
|
|
||||||
|
|
||||||
# or omit them completely
|
|
||||||
|
|
||||||
# use the argument
|
|
||||||
RUN echo $NODE_ENV
|
|
||||||
```
|
|
||||||
|
|
||||||
## Customizing the run command
|
|
||||||
|
|
||||||
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base Node.js image, with the following `ENTRYPOINT`:
|
|
||||||
|
|
||||||
```Dockerfile
|
|
||||||
ENTRYPOINT ["node"]
|
|
||||||
```
|
|
||||||
|
|
||||||
You can do:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku config:set node-js-app DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
|
||||||
```
|
|
||||||
|
|
||||||
To tell Docker what to run.
|
|
||||||
|
|
||||||
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable Docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
|
|
||||||
|
|
||||||
### Procfiles and multiple processes
|
|
||||||
|
|
||||||
> New as of 0.5.0
|
|
||||||
|
|
||||||
You can also customize the run command using a `Procfile`, much like you would on Heroku or
|
|
||||||
with a buildpack deployed app. The `Procfile` should contain one or more lines defining [process types and associated commands](https://devcenter.heroku.com/articles/procfile#declaring-process-types).
|
|
||||||
When you deploy your app, a Docker image will be built. The `Procfile` will be extracted from the image
|
|
||||||
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
|
||||||
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
|
||||||
|
|
||||||
```Procfile
|
|
||||||
web: bin/run-prod.sh
|
|
||||||
worker: bin/run-worker.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
And `Dockerfile`:
|
|
||||||
|
|
||||||
```Dockerfile
|
|
||||||
FROM ubuntu:18.04
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . ./
|
|
||||||
CMD ["bin/run-dev.sh"]
|
|
||||||
```
|
|
||||||
|
|
||||||
When you deploy this app the `web` process will automatically be scaled to 1 and your Docker container
|
|
||||||
will be started basically using the command `docker run bin/run-prod.sh`. If you want to also run
|
|
||||||
a worker container for this app, you can run `dokku ps:scale worker=1` and a new container will be
|
|
||||||
started by running `docker run bin/run-worker.sh` (the actual `docker run` commands are a bit more
|
|
||||||
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
|
||||||
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
|
||||||
|
|
||||||
## Exposed ports
|
|
||||||
|
|
||||||
See the [port management documentation](/docs/networking/port-management.md).
|
|
||||||
@@ -3,15 +3,28 @@
|
|||||||
> Subcommands new as of 0.12.0
|
> Subcommands new as of 0.12.0
|
||||||
|
|
||||||
```
|
```
|
||||||
git:initialize <app> # Initialize a git repository for an app
|
git:allow-host <host> # Adds a host to known_hosts
|
||||||
git:report [<app>] [<flag>] # Displays a git report for one or more apps
|
git:auth <host> [<username> <password>] # Configures netrc authentication for a given git server
|
||||||
git:set <app> <key> (<value>) # Set or clear a git property for an app
|
git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-username> <git-email>] # Updates an app's git repository with a given archive file
|
||||||
|
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
|
||||||
|
git:sync [--build] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
|
||||||
|
git:initialize <app> # Initialize a git repository for an app
|
||||||
|
git:public-key # Outputs the dokku public deploy key
|
||||||
|
git:report [<app>] [<flag>] # Displays a git report for one or more apps
|
||||||
|
git:set <app> <key> (<value>) # Set or clear a git property for an app
|
||||||
|
git:unlock <app> [--force] # Removes previous git clone folder for new deployment
|
||||||
```
|
```
|
||||||
|
|
||||||
Git-based deployment has been the traditional method of deploying applications in Dokku. As of v0.12.0, Dokku introduces a few ways to customize the experience of deploying via `git push`. A Git-based deployment currently supports building applications via both [Buildpack](/docs/deployment/methods/buildpacks.md) and [Dockerfile](/docs/deployment/methods/dockerfiles.md).
|
Git-based deployment has been the traditional method of deploying applications in Dokku. As of v0.12.0, Dokku introduces a few ways to customize the experience of deploying via `git push`. A Git-based deployment currently supports building applications via:
|
||||||
|
|
||||||
|
- [Cloud Native Buildpacks](/docs/deployment/builders/cloud-native-buildpacks.md)
|
||||||
|
- [Herokuish Buildpack](/docs/deployment/builders/herokuish-buildpacks.md)
|
||||||
|
- [Dockerfiles](/docs/deployment/builders/dockerfiles.md)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
> Warning: Pushing from a shallow clone is not currently supported and may have undefined behavior. Please unshallow your local repository before pushing to a Dokku app to avoid potential errors in the deployment process.
|
||||||
|
|
||||||
### Initializing an application
|
### Initializing an application
|
||||||
|
|
||||||
When an application is created via `git push`, Dokku will create the proper `pre-receive` hook in order to execute the build pipeline. In certain cases - such as when fronting deploys with the [`git-http-backend`](https://git-scm.com/docs/git-http-backend) - this may not be correctly created. As an alternative, the `git:initialize` command can be used to trigger this creation:
|
When an application is created via `git push`, Dokku will create the proper `pre-receive` hook in order to execute the build pipeline. In certain cases - such as when fronting deploys with the [`git-http-backend`](https://git-scm.com/docs/git-http-backend) - this may not be correctly created. As an alternative, the `git:initialize` command can be used to trigger this creation:
|
||||||
@@ -23,7 +36,7 @@ When an application is created via `git push`, Dokku will create the proper `pre
|
|||||||
dokku git:initialize node-js-app
|
dokku git:initialize node-js-app
|
||||||
```
|
```
|
||||||
|
|
||||||
In order for the above command to succeed, the application *must* already exist.
|
In order for the above command to succeed, the application _must_ already exist.
|
||||||
|
|
||||||
> Warning: If the `pre-receive` hook was customized in any way, this will overwrite that hook with the current defaults for Dokku.
|
> Warning: If the `pre-receive` hook was customized in any way, this will overwrite that hook with the current defaults for Dokku.
|
||||||
|
|
||||||
@@ -51,6 +64,8 @@ dokku git:set --global deploy-branch SOME_BRANCH_NAME
|
|||||||
dokku git:set node-js-app deploy-branch SOME_BRANCH_NAME
|
dokku git:set node-js-app deploy-branch SOME_BRANCH_NAME
|
||||||
```
|
```
|
||||||
|
|
||||||
|
As of 0.22.1, Dokku will also respect the first pushed branch as the primary branch, and automatically set the `deploy-branch` value at that time.
|
||||||
|
|
||||||
Pushing multiple branches can also be supported by creating a [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin.
|
Pushing multiple branches can also be supported by creating a [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin.
|
||||||
|
|
||||||
### Configuring the `GIT_REV` environment variable
|
### Configuring the `GIT_REV` environment variable
|
||||||
@@ -101,3 +116,141 @@ dokku git:set node-js-app keep-git-dir false
|
|||||||
# delete the .git directory during builds (default)
|
# delete the .git directory during builds (default)
|
||||||
dokku git:set node-js-app keep-git-dir ""
|
dokku git:set node-js-app keep-git-dir ""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Please keep in mind that setting `keep-git-dir` to `true` may result in unstaged changes shown within the built container due to the build process generating application changes within the built app directory.
|
||||||
|
|
||||||
|
### Initializing an app repository from a docker image
|
||||||
|
|
||||||
|
> New as of 0.24.0
|
||||||
|
|
||||||
|
A Dokku app repository can be initialized or updated from a Docker image via the `git:from-image` command. This command will either initialize the app repository or update it to include the specified Docker image via a `FROM` stanza. This is an excellent way of tracking changes when deploying only a given docker image, especially if deploying an image from a remote CI/CD pipeline.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-image node-js-app dokku/node-js-getting-started:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example, Dokku will build the app as if the repository contained _only_ a `Dockerfile` with the following content:
|
||||||
|
|
||||||
|
```Dockerfile
|
||||||
|
FROM dokku/node-js-getting-started:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected.
|
||||||
|
|
||||||
|
The `git:from-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-image --build-dir path/to/build node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||||
|
|
||||||
|
### Initializing an app repository from an archive file
|
||||||
|
|
||||||
|
> New as of 0.24.0
|
||||||
|
|
||||||
|
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a GitHub repository at a specific commit.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example, Dokku will build the app as if the repository contained the extracted contents of the specified archive file.
|
||||||
|
|
||||||
|
Triggering a build with the same archive file multiple times will result in Dokku exiting `0` early as there will be no changes detected.
|
||||||
|
|
||||||
|
The `git:from-archive` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar "Camila" "camila@example.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
The default archive type is always set to `.tar`. To use a different archive type, specify the `--archive-type` flag. Failure to do so will result in a failure to extract the archive.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:from-archive --archive-type zip node-js-app https://github.com/dokku/smoke-test-app/archive/2.0.0.zip "Camila" "camila@example.com"
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, if the archive url is specified as `--`, the archive will be fetched from stdin.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl -sSL https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar | dokku git:from-archive node-js-app --
|
||||||
|
```
|
||||||
|
|
||||||
|
### Initializing an app repository from a remote repository
|
||||||
|
|
||||||
|
> New as of 0.23.0
|
||||||
|
|
||||||
|
A Dokku app repository can be initialized or updated from a remote git repository via the `git:sync` command. This command will either clone or fetch updates from a remote repository and has undefined behavior if the history cannot be fast-fowarded to the referenced repository reference. Any repository that can be cloned by the `dokku` user can be specified.
|
||||||
|
|
||||||
|
> The application must exist before the repository can be initialized
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:sync node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||||
|
```
|
||||||
|
|
||||||
|
The `git:sync` command optionally takes an optional third parameter containing a git reference, which may be a branch, tag, or specific commit.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# specify a branch
|
||||||
|
dokku git:sync node-js-app https://github.com/heroku/node-js-getting-started.git main
|
||||||
|
|
||||||
|
# specify a tag
|
||||||
|
dokku git:sync node-js-app https://github.com/heroku/node-js-getting-started.git 1
|
||||||
|
|
||||||
|
# specify a commit
|
||||||
|
dokku git:sync node-js-app https://github.com/heroku/node-js-getting-started.git 97e6c72491c7531507bfc5413903e0e00e31e1b0
|
||||||
|
```
|
||||||
|
|
||||||
|
By default, this command does not trigger an application build. To do so during a `git:sync`, specify the `--build` flag.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:sync --build node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||||
|
```
|
||||||
|
|
||||||
|
### Initializing from private repositories
|
||||||
|
|
||||||
|
> New as of 0.24.0
|
||||||
|
|
||||||
|
Initializing from a private repository requires one of the following:
|
||||||
|
|
||||||
|
- A Public SSH Key (`id_rsa.pub` file) configured on the remote server, with the associated private key (`id_rsa`) in the Dokku server's `/home/dokku/.ssh/` directory.
|
||||||
|
- A configured [`.netrc`](https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html) entry.
|
||||||
|
|
||||||
|
Dokku provides the `git:auth` command which can be used to configure a `netrc` entry for the remote server. This command can be used to add or remove configuration for any remote server.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# add credentials for github.com
|
||||||
|
dokku git:auth github.com username personal-access-token
|
||||||
|
|
||||||
|
# remove credentials for github.com
|
||||||
|
dokku git:auth github.com
|
||||||
|
```
|
||||||
|
|
||||||
|
For syncing to a private repository stored on a remote Git product such as GitHub or GitLab, Dokku's recommendation is to use a personal access token on a bot user where possible. Please see your service's documentation for information regarding the recommended best practices.
|
||||||
|
|
||||||
|
### Allowing remote repository hosts
|
||||||
|
|
||||||
|
By default, the Dokku host may not have access to a server containing the remote repository. This can be initialized via the `git:allow-host` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:allow-host github.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that this command is currently not idempotent and may add duplicate entries to the `~dokku/.ssh/known_hosts` file.
|
||||||
|
|
||||||
|
### Verifying the cloning public key
|
||||||
|
|
||||||
|
In order to clone a remote repository, the remote server should have the Dokku host's public key configured. This plugin does not currently create this key, but if there is one available, it can be shown via the `git:public-key` command.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
dokku git:public-key
|
||||||
|
```
|
||||||
|
|
||||||
|
If there is no key, an error message is shown that displays the command that can be run on the Dokku server to generate a new public/private ssh key pair.
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Docker Image Tag Deployment
|
# Docker Image Tag Deployment
|
||||||
|
|
||||||
|
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-image`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||||
|
>
|
||||||
> New as of 0.4.0
|
> New as of 0.4.0
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -22,7 +24,7 @@ The Dokku tags plugin allows you to add Docker image tags to the currently deplo
|
|||||||
|
|
||||||
### Exposed ports
|
### Exposed ports
|
||||||
|
|
||||||
See the [port management documentation](/docs/networking/port-management.md).
|
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||||
|
|
||||||
### Listing tags for an application
|
### Listing tags for an application
|
||||||
|
|
||||||
@@ -78,7 +80,7 @@ dokku tags:deploy node-js-app v1
|
|||||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||||
-----> Running pre-flight checks
|
-----> Running pre-flight checks
|
||||||
For more efficient zero downtime deployments, create a file CHECKS.
|
For more efficient zero downtime deployments, create a file CHECKS.
|
||||||
See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
|
See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
|
||||||
CHECKS file not found in container: Running simple container check...
|
CHECKS file not found in container: Running simple container check...
|
||||||
-----> Waiting for 10 seconds ...
|
-----> Waiting for 10 seconds ...
|
||||||
-----> Default container check successful!
|
-----> Default container check successful!
|
||||||
@@ -168,4 +170,4 @@ ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-a
|
|||||||
## Related articles
|
## Related articles
|
||||||
- [Setting up persistent storage](/docs/advanced-usage/persistent-storage.md)
|
- [Setting up persistent storage](/docs/advanced-usage/persistent-storage.md)
|
||||||
- [Defining environment variables](/docs/configuration/environment-variables.md)
|
- [Defining environment variables](/docs/configuration/environment-variables.md)
|
||||||
- [Setting up the ports](/docs/advanced-usage/proxy-management.md)
|
- [Setting up the ports](/docs/networking/proxy-management.md)
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Tarball Deployment
|
# Tarball Deployment
|
||||||
|
|
||||||
|
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-arhive`.
|
||||||
|
>
|
||||||
> New as of 0.4.0
|
> New as of 0.4.0
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,180 +0,0 @@
|
|||||||
# One-off Processes and Cron
|
|
||||||
|
|
||||||
Sometimes you need to either inspect running containers or run a one-off command under an application. In those cases, Dokku makes it easy to either connect to a running container or run a fresh container.
|
|
||||||
|
|
||||||
## Run a command in an app environment
|
|
||||||
|
|
||||||
```
|
|
||||||
run [ --env KEY=VALUE | -e KEY=VALUE ] <app> <cmd> # Run a command in a new container using the current application image
|
|
||||||
```
|
|
||||||
|
|
||||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# runs `ls -lah` in the `/app` directory of the application `node-js-app`
|
|
||||||
dokku run node-js-app ls -lah
|
|
||||||
|
|
||||||
# optionally, run can be passed custom environment variables
|
|
||||||
dokku run --env "NODE_ENV=development" --env "PATH=/custom/path" node-js-app npm run mytask
|
|
||||||
```
|
|
||||||
|
|
||||||
The `run` command can also be used to run a command defined in your Procfile:
|
|
||||||
|
|
||||||
```
|
|
||||||
console: bundle exec racksh
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# runs `bundle exec racksh` in the `/app` directory of the application `my-app`
|
|
||||||
dokku run my-app console
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to remove the container after a command has started, you can run the following command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# don't keep `run` containers around
|
|
||||||
dokku config:set --global DOKKU_RM_CONTAINER=1
|
|
||||||
|
|
||||||
# revert the above setting and keep containers around
|
|
||||||
dokku config:unset --global DOKKU_RM_CONTAINER
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also use the `--rm-container` or `--rm` Dokku flags to remove the containers automatically:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
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
|
|
||||||
dokku --detach run node-js-app ls -lah
|
|
||||||
# returns the ID of the new container
|
|
||||||
```
|
|
||||||
|
|
||||||
> Note that you may not use the `--rm-container` or `--rm` flags when running containers in detached mode, and attempting to do so will result in the `--detach` flag being ignored.
|
|
||||||
|
|
||||||
### Using `run` for cron tasks
|
|
||||||
|
|
||||||
You can always use a one-off container to run an application task:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku --rm run node-js-app some-command
|
|
||||||
dokku --rm-container run node-js-app some-command
|
|
||||||
```
|
|
||||||
|
|
||||||
For tasks that should not be interrupted, run is the *preferred* method of handling cron tasks, as the container will continue running even during a deploy or scaling event. The trade-off is that there will be an increase in memory usage if there are multiple concurrent tasks running.
|
|
||||||
|
|
||||||
## Entering existing containers
|
|
||||||
|
|
||||||
> New as of 0.4.0
|
|
||||||
|
|
||||||
```
|
|
||||||
enter <app> [<container-type> || --container-id <container-id>] # Connect to a specific app container
|
|
||||||
```
|
|
||||||
|
|
||||||
The `enter` command can be used to enter a running container. The following variations of the command exist:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku enter node-js-app web
|
|
||||||
dokku enter node-js-app web.1
|
|
||||||
dokku enter node-js-app --container-id ID
|
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, you can run `enter` with no `<container-type>`. If only a single `<container-type>` is defined in your app, you will be dropped into the only running container. This behavior is not supported when specifying a custom command; as described below.
|
|
||||||
|
|
||||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# just echo hi
|
|
||||||
dokku enter node-js-app web echo hi
|
|
||||||
|
|
||||||
# run a long-running command, as one might for a cron task
|
|
||||||
dokku enter node-js-app web python script/background-worker.py
|
|
||||||
```
|
|
||||||
|
|
||||||
### Using `enter` for cron tasks
|
|
||||||
|
|
||||||
Your Procfile can have the following entry:
|
|
||||||
|
|
||||||
```Procfile
|
|
||||||
cron: sleep infinity
|
|
||||||
```
|
|
||||||
|
|
||||||
With the `cron` process scaled to `1`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:scale node-js-app cron=1
|
|
||||||
```
|
|
||||||
|
|
||||||
You can now run all your commands in that container:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku enter node-js-app cron some-command
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that you can also run multiple commands at the same time to reduce memory usage, though that may result in polluting the container environment.
|
|
||||||
|
|
||||||
For tasks that will properly resume, you *should* use the above method, as running tasks will be interrupted during deploys and scaling events, and subsequent commands will always run with the latest container. Note that if you scale the cron container down, this may interrupt proper running of the task.
|
|
||||||
|
|
||||||
## General cron recommendations
|
|
||||||
|
|
||||||
Regularly scheduled tasks can be a bit of a pain with Dokku. The following are general recommendations to follow to help ensure successful task runs.
|
|
||||||
|
|
||||||
- Use the `dokku` user's crontab.
|
|
||||||
- If you do not, the `dokku` binary will attempt to execute with `sudo`, and your cron run with fail with `sudo: no tty present and no askpass program specified`.
|
|
||||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
|
||||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
|
||||||
- Add a `SHELL` environment variable to specify Bash when running commands.
|
|
||||||
- Keep your cron tasks in time-sorted order.
|
|
||||||
- Keep your server time in UTC so you don't need to translate daylight savings time when reading the cronfile.
|
|
||||||
- Run tasks at the lowest traffic times if possible.
|
|
||||||
- Use cron to *trigger* jobs, not run them. Use a real queuing system such as rabbitmq to actually process jobs.
|
|
||||||
- Try to keep tasks quiet so that mails only send on errors.
|
|
||||||
- Do not silence standard error or standard out. If you silence the former, you will miss failures. Silencing the latter means you should actually make application changes to handle log levels.
|
|
||||||
- Use a service such as [Dead Man's Snitch](https://deadmanssnitch.com) to verify that cron tasks completed successfully.
|
|
||||||
- Add lots of comments to your cronfile, including what a task is doing, so that you don't spend time deciphering the file later.
|
|
||||||
- Place your cronfiles in a pattern such as `/etc/cron.d/APP`.
|
|
||||||
- Do not use non-ASCII characters in your cronfile names. cron is finicky.
|
|
||||||
- Remember to have trailing newlines in your cronfile! cron is finicky.
|
|
||||||
|
|
||||||
The following is a sample cronfile that you can use for your applications:
|
|
||||||
|
|
||||||
```cron
|
|
||||||
# server cron jobs
|
|
||||||
MAILTO="mail@dokku.me"
|
|
||||||
PATH=/usr/local/bin:/usr/bin:/bin
|
|
||||||
SHELL=/bin/bash
|
|
||||||
|
|
||||||
# m h dom mon dow username command
|
|
||||||
# * * * * * dokku command to be executed
|
|
||||||
# - - - - -
|
|
||||||
# | | | | |
|
|
||||||
# | | | | +----- day of week (0 - 6) (Sunday=0)
|
|
||||||
# | | | +------- month (1 - 12)
|
|
||||||
# | | +--------- day of month (1 - 31)
|
|
||||||
# | +----------- hour (0 - 23)
|
|
||||||
# +----------- min (0 - 59)
|
|
||||||
|
|
||||||
### HIGH TRAFFIC TIME IS B/W 00:00 - 04:00 AND 14:00 - 23:59
|
|
||||||
### RUN YOUR TASKS FROM 04:00 - 14:00
|
|
||||||
### KEEP SORTED IN TIME ORDER
|
|
||||||
|
|
||||||
### PLACE ALL CRON TASKS BELOW
|
|
||||||
|
|
||||||
# removes unresponsive users from the subscriber list to decrease bounce rates
|
|
||||||
0 0 * * * dokku dokku --rm run node-js-app some-command
|
|
||||||
|
|
||||||
# sends out our email alerts to users
|
|
||||||
0 1 * * * dokku dokku ps:scale node-js-app cron=1 && dokku enter node-js-app cron some-other-command && dokku ps:scale node-js-app cron=0
|
|
||||||
|
|
||||||
### PLACE ALL CRON TASKS ABOVE, DO NOT REMOVE THE WHITESPACE AFTER THIS LINE
|
|
||||||
|
|
||||||
```
|
|
||||||
@@ -1,215 +0,0 @@
|
|||||||
# Process and Container Management
|
|
||||||
|
|
||||||
> New as of 0.3.14, Enhanced in 0.7.0
|
|
||||||
|
|
||||||
```
|
|
||||||
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
|
|
||||||
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
|
|
||||||
ps:restart <app> # Restart app container(s)
|
|
||||||
ps:restart-policy <app> # Shows the restart-policy for an app
|
|
||||||
ps:restartall # Restart all deployed app containers
|
|
||||||
ps:scale <app> <proc>=<count> [<proc>=<count>] # Get/Set how many instances of a given process to run
|
|
||||||
ps:set-restart-policy <app> <policy> # Sets app restart-policy
|
|
||||||
ps:start <app> # Start app container(s)
|
|
||||||
ps:startall # Start all deployed app containers
|
|
||||||
ps:stop <app> # Stop app container(s)
|
|
||||||
ps:stopall # Stop all app container(s)
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or [via a custom `DOKKU_SCALE` file](/docs/deployment/process-management.md#manually-managing-process-scaling).
|
|
||||||
|
|
||||||
> The `web` proctype is the only proctype that will invoke custom checks as defined by a `CHECKS` file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
### Inspecting app containers
|
|
||||||
|
|
||||||
> New as of 0.13.0
|
|
||||||
|
|
||||||
A common administrative task to perform is calling `docker inspect` on the containers that are running for an application. This can be an error-prone task to perform, and may also reveal sensitive environment variables if not done correctly. Dokku provides a wrapper around this command via the `ps:inspect` command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:inspect node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
This command will gather all the running container IDs for your application and call `docker inspect`, sanitizing the output data so it can be copy-pasted elsewhere safely.
|
|
||||||
|
|
||||||
### Rebuilding applications
|
|
||||||
|
|
||||||
There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run multiple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild`
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:rebuild node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also rebuild all applications at once, which is useful when enabling/disabling a plugin that modifies all applications:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:rebuildall
|
|
||||||
```
|
|
||||||
|
|
||||||
> The `ps:rebuild` and `ps:rebuildall` commands only work for applications for which there is a source, and thus
|
|
||||||
> will only always work deterministically for Git-deployed application. Please see
|
|
||||||
> the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
|
||||||
> in for more information concerning rebuilding those applications.
|
|
||||||
|
|
||||||
### Restarting applications
|
|
||||||
|
|
||||||
Applications can be restarted, which is functionally identical to calling the `release_and_deploy` function on an application. Please note that any linked containers *must* be started before the application in order to have a successful boot.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:restart node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also trigger a restart on all applications at one time:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:restartall
|
|
||||||
```
|
|
||||||
|
|
||||||
### `ps:scale` command
|
|
||||||
|
|
||||||
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:scale node-js-app web=1
|
|
||||||
```
|
|
||||||
|
|
||||||
Multiple process types can be scaled at once:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:scale node-js-app web=1 worker=1
|
|
||||||
```
|
|
||||||
|
|
||||||
Issuing the `ps:scale` command with no process type argument will output the current scaling settings for an application:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:scale node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Scaling for node-js-app
|
|
||||||
-----> proctype qty
|
|
||||||
-----> -------- ---
|
|
||||||
-----> web 1
|
|
||||||
-----> worker 1
|
|
||||||
```
|
|
||||||
|
|
||||||
### Stopping applications
|
|
||||||
|
|
||||||
Deployed applications can be stopped using the `ps:stop` command. This turns off all running containers for an application, and will result in a **502 Bad Gateway** response for the default nginx proxy implementation.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:stop node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
You may also stop all applications at once:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:stopall
|
|
||||||
```
|
|
||||||
|
|
||||||
### Starting applications
|
|
||||||
|
|
||||||
All stopped containers can be started using the `ps:start` command. This is similar to running `ps:restart`, except no action will be taken if the application containers are running.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:start node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
### Starting all applications
|
|
||||||
|
|
||||||
In some cases, it may be necessary to start all applications from scratch - e.g. if all Docker containers have been manually stopped. This can be executed via the `ps:startall` command, which supports parallelism in the same manner `ps:rebuildall`, `ps:restartall`, and `ps:stopall` do.
|
|
||||||
|
|
||||||
Be aware that no action will be taken if the application containers are running.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:startall
|
|
||||||
```
|
|
||||||
|
|
||||||
## Restart policies
|
|
||||||
|
|
||||||
> New as of 0.7.0
|
|
||||||
|
|
||||||
By default, Dokku will automatically restart containers that exit with a non-zero status up to 10 times via the [on-failure Docker restart policy](https://docs.docker.com/engine/reference/run/#restart-policies-restart).
|
|
||||||
|
|
||||||
### Showing the current restart policy
|
|
||||||
|
|
||||||
The `ps:restart-policy` command will show the currently configured restart policy for an application. The default policy is `on-failure:10`
|
|
||||||
|
|
||||||
```shell
|
|
||||||
dokku ps:restart-policy node-js-app
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
=====> node-js-app restart-policy:
|
|
||||||
on-failure:10
|
|
||||||
```
|
|
||||||
|
|
||||||
### Setting the restart policy
|
|
||||||
|
|
||||||
You can configure this via the `ps:set-restart-policy` command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# always restart an exited container
|
|
||||||
dokku ps:set-restart-policy node-js-app always
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Setting restart policy: always
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# never restart an exited container
|
|
||||||
dokku ps:set-restart-policy node-js-app no
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Setting restart policy: no
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# only restart it on Docker restart if it was not manually stopped
|
|
||||||
dokku ps:set-restart-policy node-js-app unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Setting restart policy: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# restart only on non-zero exit status
|
|
||||||
dokku ps:set-restart-policy node-js-app on-failure
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Setting restart policy: on-failure
|
|
||||||
```
|
|
||||||
|
|
||||||
```shell
|
|
||||||
# restart only on non-zero exit status up to 20 times
|
|
||||||
dokku ps:set-restart-policy node-js-app on-failure:20
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
-----> Setting restart policy: on-failure:20
|
|
||||||
```
|
|
||||||
|
|
||||||
Restart policies have no bearing on server reboot, and Dokku will always attempt to restart your applications at that point unless they were manually stopped.
|
|
||||||
|
|
||||||
## Manually managing process scaling
|
|
||||||
|
|
||||||
You can optionally *commit* a `DOKKU_SCALE` file to the root of your repository - *not* to the `/home/dokku/APP` directory. Dokku expects this file to contain one line for every process defined in your Procfile.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```Procfile
|
|
||||||
web=1
|
|
||||||
worker=2
|
|
||||||
```
|
|
||||||
|
|
||||||
If it is not committed to the repository, the `DOKKU_SCALE` file will otherwise be automatically generated based on your `ps:scale` settings.
|
|
||||||
|
|
||||||
> *NOTE*: Dokku will always use the `DOKKU_SCALE` file that ships with the repo to override any local settings.
|
|
||||||
@@ -17,12 +17,78 @@ in order to avoid SSH interpretting Dokku arguments for itself.
|
|||||||
```
|
```
|
||||||
--quiet suppress output headers
|
--quiet suppress output headers
|
||||||
--trace enable DOKKU_TRACE for current execution only
|
--trace enable DOKKU_TRACE for current execution only
|
||||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
|
||||||
--force force flag. currently used in apps:destroy and other ":destroy" commands
|
--force force flag. currently used in apps:destroy and other ":destroy" commands
|
||||||
```
|
```
|
||||||
|
|
||||||
## Clients
|
## Official Client
|
||||||
|
|
||||||
You may optionally use a client to connect to your Dokku server. Most clients use the configured `git remote` to locate the Dokku server, though some allow for overriding this via an environment variable or flag.
|
You may optionally use the official client when connecting to the Dokku server.
|
||||||
|
|
||||||
Please refer to the [clients](/docs/community/clients.md) list for more details.
|
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.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# optional: make sure that the dokku_client.sh version matches your Dokku version
|
||||||
|
cd ~/.dokku
|
||||||
|
git checkout <tag/branch>
|
||||||
|
|
||||||
|
# add the following to either your
|
||||||
|
# .bashrc, .bash_profile, or .profile file
|
||||||
|
alias dokku='$HOME/.dokku/contrib/dokku_client.sh'
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, if using another shell such as **zsh**, create an alias command which invokes the script using **bash**:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# zsh: add the following to either .zshenv or .zshrc
|
||||||
|
alias dokku='bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||||
|
|
||||||
|
# fish: add the following to ~/.config/fish/config.fish
|
||||||
|
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||||
|
|
||||||
|
# csh: add the following to .cshrc
|
||||||
|
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
All commands have the application name automatically set via the `--app` flag on the remote server, and thus the app name does not need to be specified manually for core plugins.
|
||||||
|
|
||||||
|
The client supports several environment variables:
|
||||||
|
|
||||||
|
- `DOKKU_HOST` (default: `dokku` git remote): Used to interact with a specific remote server. Can be overriden via `--remote` flag.
|
||||||
|
- `DOKKU_PORT` (default: `22`): Used to specify a port to connect to the Dokku server on.
|
||||||
|
|
||||||
|
It also supports several flags (all flags unspecified here are passed as is to the server):
|
||||||
|
|
||||||
|
- `--app`: Override the remote app in use.
|
||||||
|
- `--trace`: Enable trace mode.
|
||||||
|
- `--remote`: Override the remote server.
|
||||||
|
- `--global`: Unsets the "app" value. May not be supported for the specified command.
|
||||||
|
|
||||||
|
In addition, the following commands have special local side-effects:
|
||||||
|
|
||||||
|
- `apps:create`:
|
||||||
|
- If no local `--app` flag is specified or detected from a `dokku` git remote, a random name is generated and used for the app.
|
||||||
|
- The `dokku` git remote is set if not already set.
|
||||||
|
- `apps:destroy`:
|
||||||
|
- Removes the local `dokku` git remote if set.
|
||||||
|
|
||||||
|
## Unofficial Clients
|
||||||
|
|
||||||
|
Please refer to the [community clients](/docs/community/clients.md) list for more details.
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user