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