Compare commits
716 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e793fde8e | ||
|
|
7a0f527336 | ||
|
|
0b14c2b541 | ||
|
|
527515f1a0 | ||
|
|
5eb95dd6ab | ||
|
|
fa3755454a | ||
|
|
40b0bdd6e8 | ||
|
|
cc0687ec0f | ||
|
|
b5ecdfc0c5 | ||
|
|
db7cc94939 | ||
|
|
86f917db79 | ||
|
|
e9638a4d92 | ||
|
|
165b6ff46f | ||
|
|
bed573ebe8 | ||
|
|
7917072941 | ||
|
|
c53ebb66d0 | ||
|
|
770a8f8812 | ||
|
|
c3dba49007 | ||
|
|
9a1dd41e9f | ||
|
|
726c1571eb | ||
|
|
2b0d34d0db | ||
|
|
ed4aa60420 | ||
|
|
c9d9750afe | ||
|
|
be79060d7e | ||
|
|
4891599d13 | ||
|
|
63616796cb | ||
|
|
81feac7617 | ||
|
|
9e6a099735 | ||
|
|
eb0f49f08c | ||
|
|
15747612cd | ||
|
|
25982e961d | ||
|
|
4b3de76f94 | ||
|
|
3f1fe17977 | ||
|
|
6d91a32f3d | ||
|
|
af19e5e453 | ||
|
|
1025c7679f | ||
|
|
12efcd02b1 | ||
|
|
34dda8917b | ||
|
|
e3cca57762 | ||
|
|
3d7f03611f | ||
|
|
1c62a055d3 | ||
|
|
1201b05dfa | ||
|
|
6d43931e17 | ||
|
|
b2ca01eea0 | ||
|
|
399073f77b | ||
|
|
86a0ae1dde | ||
|
|
745a5b1e45 | ||
|
|
9641aa88e7 | ||
|
|
5b683ec4af | ||
|
|
2f5ed8c591 | ||
|
|
748c43fcfd | ||
|
|
5242eeeb86 | ||
|
|
d80a280fc2 | ||
|
|
227606d94a | ||
|
|
21bdfa0e43 | ||
|
|
8a29f63f73 | ||
|
|
aaa55802b7 | ||
|
|
cd674d3cb3 | ||
|
|
376284381e | ||
|
|
7d8c80f0cc | ||
|
|
46d63dfd0c | ||
|
|
e1d1135ef1 | ||
|
|
2271badaf5 | ||
|
|
b5e2b82248 | ||
|
|
43592174e6 | ||
|
|
7fd1c7f89d | ||
|
|
930094b45e | ||
|
|
1429c2d174 | ||
|
|
3a8ecff3ca | ||
|
|
251b781ecd | ||
|
|
3491d9eff2 | ||
|
|
d43f9f730f | ||
|
|
a55fb34a77 | ||
|
|
c4ba380627 | ||
|
|
9b1849e816 | ||
|
|
98a20e36cd | ||
|
|
cad4cec050 | ||
|
|
6c76038bfc | ||
|
|
54079714c8 | ||
|
|
77c63b8d98 | ||
|
|
8eb4246040 | ||
|
|
eddd518718 | ||
|
|
38e039ab08 | ||
|
|
16b8f2682b | ||
|
|
5eddb260f4 | ||
|
|
cd32180f1a | ||
|
|
00a3ca856f | ||
|
|
a80bd92f40 | ||
|
|
d8878fdfe2 | ||
|
|
124072df95 | ||
|
|
dbdefd972d | ||
|
|
26c533fde3 | ||
|
|
faf284809b | ||
|
|
a9927c24e2 | ||
|
|
ff14323fdc | ||
|
|
e7f8aeff8a | ||
|
|
6a9583b176 | ||
|
|
2475b9e7ea | ||
|
|
fe1275d4e7 | ||
|
|
236f388aec | ||
|
|
ee864e4ff8 | ||
|
|
2c0a7a687e | ||
|
|
a932a421ce | ||
|
|
6efac356f3 | ||
|
|
ef027c0e5f | ||
|
|
bc8f2be582 | ||
|
|
afeb521f07 | ||
|
|
22a0ffd98d | ||
|
|
800fd928ca | ||
|
|
e5d473f494 | ||
|
|
ed275d479b | ||
|
|
b5c1646b50 | ||
|
|
c09e102692 | ||
|
|
463c5b8120 | ||
|
|
d79a4d1b5c | ||
|
|
57d4c93d2d | ||
|
|
30922fc818 | ||
|
|
59ca40f368 | ||
|
|
25bd4c8785 | ||
|
|
41dd72dd3e | ||
|
|
59abb1c161 | ||
|
|
5ee42f876e | ||
|
|
af158d945a | ||
|
|
28c409509c | ||
|
|
19806636ad | ||
|
|
b90bb0cd38 | ||
|
|
b83f351a3e | ||
|
|
95243b1757 | ||
|
|
b250fe6aeb | ||
|
|
7a4ab91ecf | ||
|
|
f0ee6288fb | ||
|
|
7330a849a5 | ||
|
|
226a3da87d | ||
|
|
58332d707b | ||
|
|
652530a4b4 | ||
|
|
b6e7fb5839 | ||
|
|
0db55bc6af | ||
|
|
9fb5dc9759 | ||
|
|
b4ebd3bd75 | ||
|
|
52b586e8d2 | ||
|
|
cc2ca2aee0 | ||
|
|
63bced7679 | ||
|
|
76dd0252ee | ||
|
|
ae1b0b3510 | ||
|
|
693ec111b1 | ||
|
|
e10e62b1e9 | ||
|
|
f425e23bdf | ||
|
|
4c86c7bd26 | ||
|
|
fa605b6a83 | ||
|
|
1f08853fc7 | ||
|
|
40421b32a4 | ||
|
|
f3d6190e18 | ||
|
|
46377071ea | ||
|
|
5fbe28f672 | ||
|
|
302d82a192 | ||
|
|
061ea9bfd7 | ||
|
|
f8e3bdc56b | ||
|
|
92d7e8ce65 | ||
|
|
e7faec3e26 | ||
|
|
72a847a6f1 | ||
|
|
0e007a1196 | ||
|
|
af626a51cc | ||
|
|
4bb221d89a | ||
|
|
984388d191 | ||
|
|
f0ef1daa15 | ||
|
|
3d065bf35c | ||
|
|
f1c0432375 | ||
|
|
21645247fb | ||
|
|
1a350796e5 | ||
|
|
5522cf63f7 | ||
|
|
52d6143d97 | ||
|
|
0fe5c645d6 | ||
|
|
85d04ee11a | ||
|
|
343c5fb5ca | ||
|
|
4ae56cf01c | ||
|
|
8336247cc1 | ||
|
|
3fe0b56fb8 | ||
|
|
329e849894 | ||
|
|
70cee2df86 | ||
|
|
2a30f45177 | ||
|
|
6528c4511a | ||
|
|
fe6f339890 | ||
|
|
c46efa54b4 | ||
|
|
3ef3f0218f | ||
|
|
59414fe231 | ||
|
|
052a14f13c | ||
|
|
050fa7edf3 | ||
|
|
e9db130b38 | ||
|
|
39aefb95c2 | ||
|
|
f1baa1f6a5 | ||
|
|
cd9c2d7dbe | ||
|
|
2e0939702a | ||
|
|
fc4903c1c9 | ||
|
|
3f408f1304 | ||
|
|
e3eab48e4a | ||
|
|
39abbdc5dd | ||
|
|
5d5ede2b85 | ||
|
|
64252b282a | ||
|
|
b449227467 | ||
|
|
228eb9ed7a | ||
|
|
a999f9d4e5 | ||
|
|
9b431321fa | ||
|
|
a96c1d644a | ||
|
|
6bd6cad8fd | ||
|
|
58cc088445 | ||
|
|
1d46208ac2 | ||
|
|
465c6e9a62 | ||
|
|
7a8cc2687d | ||
|
|
96ad5e8e5d | ||
|
|
4cc215ea02 | ||
|
|
c10c58a1cd | ||
|
|
099653ca02 | ||
|
|
84a6c6017d | ||
|
|
1ddef4183d | ||
|
|
9fcd9b0065 | ||
|
|
dc9ebf867c | ||
|
|
3684c10a78 | ||
|
|
10492587c2 | ||
|
|
bc93007c74 | ||
|
|
0e91a5bd0b | ||
|
|
75c7c2ebf0 | ||
|
|
6c57f1a08b | ||
|
|
59e5036456 | ||
|
|
158f10d321 | ||
|
|
4a3047b170 | ||
|
|
64a1c91b76 | ||
|
|
39b879058d | ||
|
|
5ae9067750 | ||
|
|
2af312ac03 | ||
|
|
172bc87f32 | ||
|
|
83ef992155 | ||
|
|
0df3f8d12d | ||
|
|
23ee740c04 | ||
|
|
54d731aeee | ||
|
|
9481e7031d | ||
|
|
70ba60e9e8 | ||
|
|
04a5e8bedf | ||
|
|
9706f7a298 | ||
|
|
cdd2b2028e | ||
|
|
3eb7a13006 | ||
|
|
71763e18f6 | ||
|
|
e9506e80cb | ||
|
|
33a540502a | ||
|
|
b8575a33f5 | ||
|
|
a3cd6f6e63 | ||
|
|
85fa7a5bb0 | ||
|
|
72d702a522 | ||
|
|
90ee5d58c5 | ||
|
|
ffac858566 | ||
|
|
0f10c94839 | ||
|
|
0581b38adf | ||
|
|
576ec05a9e | ||
|
|
6f4720adca | ||
|
|
ab3249c76b | ||
|
|
2f7daad200 | ||
|
|
6780d53c77 | ||
|
|
36fc689a5d | ||
|
|
98c45b55b7 | ||
|
|
1be66bd1bc | ||
|
|
91c2164e49 | ||
|
|
9876b9e588 | ||
|
|
58e36fee10 | ||
|
|
03830562c2 | ||
|
|
430cc2b4ca | ||
|
|
3f497908b5 | ||
|
|
3422866909 | ||
|
|
b84635baf7 | ||
|
|
ad8bcecb5b | ||
|
|
c896ca700c | ||
|
|
ecf67d3cdd | ||
|
|
e9b9091de5 | ||
|
|
62b27d4007 | ||
|
|
cc3ccda90a | ||
|
|
dc79152fe0 | ||
|
|
6b340c69b5 | ||
|
|
f2ec959598 | ||
|
|
b16c2876c4 | ||
|
|
3f50097619 | ||
|
|
28ca39266c | ||
|
|
6dcf695822 | ||
|
|
aeba3f2269 | ||
|
|
1fb0e737c3 | ||
|
|
462a648ac8 | ||
|
|
6523163701 | ||
|
|
a9a9d0a898 | ||
|
|
2851f2c63f | ||
|
|
5e82b37147 | ||
|
|
810ebffceb | ||
|
|
adedd3af5d | ||
|
|
722f22e7f0 | ||
|
|
ad732bd42b | ||
|
|
fdbab2c291 | ||
|
|
8654783131 | ||
|
|
b099d2c389 | ||
|
|
c9ea884e5d | ||
|
|
fbf9077075 | ||
|
|
5e32f9a89d | ||
|
|
690c32ceb8 | ||
|
|
7d73577952 | ||
|
|
edfec35177 | ||
|
|
c2ee6e99c6 | ||
|
|
419d687c50 | ||
|
|
3ca5503b74 | ||
|
|
acde3d60a7 | ||
|
|
7a4464a8ae | ||
|
|
096ba83f41 | ||
|
|
04cd5eeb91 | ||
|
|
9d287d0a5d | ||
|
|
af13d1247f | ||
|
|
81ddef04ff | ||
|
|
9ef7c385d4 | ||
|
|
dc00542b6f | ||
|
|
7fe2f8593c | ||
|
|
20dca9fd46 | ||
|
|
647efab2dd | ||
|
|
44282fd857 | ||
|
|
1372522258 | ||
|
|
27f247eabd | ||
|
|
a3abf8016b | ||
|
|
3b9f4ba63f | ||
|
|
92d6e76ea4 | ||
|
|
350efd8d53 | ||
|
|
6f008d6643 | ||
|
|
6e76831b5d | ||
|
|
31333452c8 | ||
|
|
25759bcbb4 | ||
|
|
72eb8a06f0 | ||
|
|
1e8831d9a0 | ||
|
|
c788659b63 | ||
|
|
e74346f0dc | ||
|
|
5b592575e7 | ||
|
|
c43a3edfc6 | ||
|
|
94149c8445 | ||
|
|
7fd32fb3e8 | ||
|
|
006eb452f1 | ||
|
|
2c5190bf63 | ||
|
|
0cc9e42c59 | ||
|
|
b409af602a | ||
|
|
b0afa778fb | ||
|
|
b8a4152e10 | ||
|
|
4949d1e33e | ||
|
|
06a7cb2a3d | ||
|
|
aee88d081d | ||
|
|
f71d147a8f | ||
|
|
dfad37ba23 | ||
|
|
1a2ed28e5b | ||
|
|
054a1328f7 | ||
|
|
901ec7c213 | ||
|
|
6fbd148597 | ||
|
|
d7d5d373c9 | ||
|
|
a9e0f8b7be | ||
|
|
f668bec210 | ||
|
|
1835b04809 | ||
|
|
ec9b8be5f8 | ||
|
|
8be92d9739 | ||
|
|
bbb38031f0 | ||
|
|
c25ef5dc4c | ||
|
|
093414b846 | ||
|
|
f664ad1cde | ||
|
|
5e9306ad40 | ||
|
|
c9af7e4cfa | ||
|
|
5d72f145df | ||
|
|
5b3506584a | ||
|
|
27748f9576 | ||
|
|
e6f7d4a732 | ||
|
|
32b18a8a5c | ||
|
|
160a5c9760 | ||
|
|
dde1531f42 | ||
|
|
60e3b37d39 | ||
|
|
a8563489e7 | ||
|
|
a86c037a91 | ||
|
|
523429b47f | ||
|
|
a13722eec1 | ||
|
|
8e8b6d60f0 | ||
|
|
4808c047ee | ||
|
|
be5e81b246 | ||
|
|
a137ed64dc | ||
|
|
fc1129c728 | ||
|
|
a22594b891 | ||
|
|
4f5c747c99 | ||
|
|
e7a81a8f8b | ||
|
|
32414b343a | ||
|
|
eeb6e78fa4 | ||
|
|
08aa2b9fa4 | ||
|
|
8b90d4ebf9 | ||
|
|
133fdc1f0a | ||
|
|
e7e01ee838 | ||
|
|
12c9536a7b | ||
|
|
c20fbfccf6 | ||
|
|
fd27d90303 | ||
|
|
686428a41a | ||
|
|
73e85b7df5 | ||
|
|
dfa241d6a9 | ||
|
|
dd8e1fdf45 | ||
|
|
21b091ab14 | ||
|
|
416b499670 | ||
|
|
dc90a889d7 | ||
|
|
14757ca925 | ||
|
|
7d865ccb1f | ||
|
|
294d4b1f29 | ||
|
|
5e3184b61d | ||
|
|
e57e1408b2 | ||
|
|
ef95d2bcd4 | ||
|
|
d8602c52af | ||
|
|
657bb1d2a1 | ||
|
|
0bd6b041c8 | ||
|
|
28077dff67 | ||
|
|
68917f12fb | ||
|
|
bb1b657ac9 | ||
|
|
07c83d4d32 | ||
|
|
264109360b | ||
|
|
2278290b91 | ||
|
|
23bcb4127a | ||
|
|
8004f0962c | ||
|
|
689f0443f3 | ||
|
|
441e864ea1 | ||
|
|
4f17392bf1 | ||
|
|
deace7a03a | ||
|
|
c49f81cd8b | ||
|
|
bada02a122 | ||
|
|
3d785360e1 | ||
|
|
3a81c8f279 | ||
|
|
9f64fdb9b6 | ||
|
|
e9873c58a8 | ||
|
|
a4a3bfc556 | ||
|
|
235115af9c | ||
|
|
aa82042db2 | ||
|
|
e8f1ce501a | ||
|
|
a4f4bef1f6 | ||
|
|
6aa315f815 | ||
|
|
15494d85a9 | ||
|
|
787e2f106a | ||
|
|
4db991c891 | ||
|
|
ab11453fc8 | ||
|
|
1a5bea6dde | ||
|
|
5e0ea9c734 | ||
|
|
68e628d384 | ||
|
|
0babde74f3 | ||
|
|
42cee30187 | ||
|
|
c50f1c8830 | ||
|
|
1db9e16006 | ||
|
|
3bf3bb433b | ||
|
|
fa0b4b26ac | ||
|
|
ec9f81b323 | ||
|
|
c400bc8f03 | ||
|
|
fc2fb71396 | ||
|
|
e8287b839f | ||
|
|
fcd713b23c | ||
|
|
294f82c327 | ||
|
|
0cc8ee6669 | ||
|
|
e7a2284226 | ||
|
|
64162a0bfd | ||
|
|
c2f92e07d9 | ||
|
|
29e44260a0 | ||
|
|
e2bebe078a | ||
|
|
d025a00d18 | ||
|
|
db0b2bc93e | ||
|
|
0b2bea3fa9 | ||
|
|
9156dea8b7 | ||
|
|
1f93169c43 | ||
|
|
65990068cb | ||
|
|
4008919a3c | ||
|
|
52b45d74cb | ||
|
|
ee27ea76a6 | ||
|
|
a85159425b | ||
|
|
ab69be6665 | ||
|
|
68ca119ae0 | ||
|
|
a0e05eaef0 | ||
|
|
34d80a18dc | ||
|
|
1a38b5533d | ||
|
|
7df06fb2f6 | ||
|
|
0efb690992 | ||
|
|
5af42dc678 | ||
|
|
2b929a98e7 | ||
|
|
9aa3721aa3 | ||
|
|
5ee257304a | ||
|
|
4497a54b12 | ||
|
|
13ff7f7b96 | ||
|
|
0147d55302 | ||
|
|
2169fb3859 | ||
|
|
8f9e23a59d | ||
|
|
9735f73c38 | ||
|
|
a8d60e13e1 | ||
|
|
b843716113 | ||
|
|
f442e6fabf | ||
|
|
e8e6660b2a | ||
|
|
6dd4e61e04 | ||
|
|
98fa428386 | ||
|
|
a145333fbd | ||
|
|
72491257c3 | ||
|
|
b009da2710 | ||
|
|
def60a510c | ||
|
|
4ac68cfbaa | ||
|
|
433a35fac2 | ||
|
|
6c9746c55e | ||
|
|
efa99d02b2 | ||
|
|
5269975753 | ||
|
|
0bdc6e443e | ||
|
|
b1ac7ac991 | ||
|
|
4f6e714a9d | ||
|
|
85f7f22520 | ||
|
|
79f8c1581c | ||
|
|
191ae25f63 | ||
|
|
484f3f8299 | ||
|
|
da748b1170 | ||
|
|
5835dbd9a4 | ||
|
|
f49405d4cf | ||
|
|
e6103cc49b | ||
|
|
40001b7287 | ||
|
|
0e08134a7c | ||
|
|
1c6eacd756 | ||
|
|
bec6c6bd66 | ||
|
|
f459745402 | ||
|
|
65ebd90903 | ||
|
|
ea30cd8cd2 | ||
|
|
e6a1a27516 | ||
|
|
79fea59713 | ||
|
|
e0b03aafe8 | ||
|
|
5b782c1ff4 | ||
|
|
fd0a6905dd | ||
|
|
1e18299364 | ||
|
|
b937f57a72 | ||
|
|
3fe65fd3fb | ||
|
|
460af1885a | ||
|
|
370e656209 | ||
|
|
337bc9d10e | ||
|
|
8fa40b7a70 | ||
|
|
af71b1b4b3 | ||
|
|
4f60297630 | ||
|
|
11aa78a5f9 | ||
|
|
f4be4ad28d | ||
|
|
cd4ebf5ffc | ||
|
|
584d4a4619 | ||
|
|
5061f1e2c8 | ||
|
|
8602fa9e01 | ||
|
|
ea10d23133 | ||
|
|
3d9714446a | ||
|
|
ee14acf735 | ||
|
|
7d9f133824 | ||
|
|
07f6a26c3e | ||
|
|
653d6ca1eb | ||
|
|
e1263bf55c | ||
|
|
ac96217ac3 | ||
|
|
d747e146a6 | ||
|
|
58512b2dea | ||
|
|
3d24f376ec | ||
|
|
954a5dba0b | ||
|
|
e7e44d431a | ||
|
|
9865908163 | ||
|
|
ff99cfe3f7 | ||
|
|
944d2c6ac4 | ||
|
|
3b28f0103f | ||
|
|
5d72c7f714 | ||
|
|
92c8ca50d1 | ||
|
|
fb918af050 | ||
|
|
ff536c58df | ||
|
|
9ff3ae9860 | ||
|
|
75fe75f7a9 | ||
|
|
79bfd0fd12 | ||
|
|
41bbf0a62b | ||
|
|
6f1206e8a9 | ||
|
|
74ca540c18 | ||
|
|
36fb3aef22 | ||
|
|
694ae52d64 | ||
|
|
ed48542fd8 | ||
|
|
4ab147a8a5 | ||
|
|
9d57baf5a9 | ||
|
|
a5b1412d43 | ||
|
|
6e16a1b76a | ||
|
|
d468572bf7 | ||
|
|
cc08da9600 | ||
|
|
f9f333ca0a | ||
|
|
02aca5aac5 | ||
|
|
e719da300f | ||
|
|
a7b929a80e | ||
|
|
c05ceb0aff | ||
|
|
4194702442 | ||
|
|
04dda5e347 | ||
|
|
cde90620b0 | ||
|
|
dea195df26 | ||
|
|
6a441d8ed5 | ||
|
|
7c6c8feb95 | ||
|
|
18957dcf39 | ||
|
|
7d825f8be0 | ||
|
|
518757c47d | ||
|
|
593f7d42d8 | ||
|
|
39c117a3cc | ||
|
|
4700104303 | ||
|
|
bc4b9dc5f3 | ||
|
|
6d21ab20bd | ||
|
|
dea1c86a9b | ||
|
|
15021d05c9 | ||
|
|
4639f3c930 | ||
|
|
42860dd2a9 | ||
|
|
df6ac90812 | ||
|
|
53fbaec1fa | ||
|
|
2f819d1d1c | ||
|
|
c74bd93c58 | ||
|
|
9f9ecca59c | ||
|
|
9e021f889f | ||
|
|
1c5896c3e3 | ||
|
|
4abad29b3a | ||
|
|
3fab901097 | ||
|
|
6e0adaead0 | ||
|
|
55afe3a760 | ||
|
|
a61f7f44d6 | ||
|
|
f0e0e20496 | ||
|
|
3e4f91a78d | ||
|
|
fb68a6f4b6 | ||
|
|
5a611b73d0 | ||
|
|
7e36d74959 | ||
|
|
442d2cc414 | ||
|
|
8cac7ee63f | ||
|
|
ab29554f3f | ||
|
|
2803c39fb5 | ||
|
|
0ba9393285 | ||
|
|
6cb8b108db | ||
|
|
9aef43d5a0 | ||
|
|
8dadc4cf50 | ||
|
|
45518fce6c | ||
|
|
b21f4b6470 | ||
|
|
c52f60f9d7 | ||
|
|
c815d732eb | ||
|
|
18849c085a | ||
|
|
cb62958095 | ||
|
|
4fcfad5df5 | ||
|
|
5101096518 | ||
|
|
afef3b94d5 | ||
|
|
73a84f90c5 | ||
|
|
918bc9efe8 | ||
|
|
98619733b2 | ||
|
|
2fb712c3a2 | ||
|
|
0fa6503034 | ||
|
|
fab97a377f | ||
|
|
811bf2f9c4 | ||
|
|
20497dabb4 | ||
|
|
0b430af077 | ||
|
|
e42e7c3694 | ||
|
|
eeef120433 | ||
|
|
8950571acb | ||
|
|
a72a82e29b | ||
|
|
b6adc23bdd | ||
|
|
8677aadad7 | ||
|
|
a4b8e59c3f | ||
|
|
3a5d0716d4 | ||
|
|
b54a5b3f67 | ||
|
|
5b33bd5eda | ||
|
|
6d55dd8884 | ||
|
|
0fae350256 | ||
|
|
90015ab594 | ||
|
|
28281ae4d4 | ||
|
|
4723b27f2c | ||
|
|
de338f4da5 | ||
|
|
d52eac7b35 | ||
|
|
4d01e677ee | ||
|
|
33daa88197 | ||
|
|
607a3d88ae | ||
|
|
be082e2fe0 | ||
|
|
27bd578405 | ||
|
|
0962ebeadb | ||
|
|
95d9ca8945 | ||
|
|
e71cd7a939 | ||
|
|
4bf301c913 | ||
|
|
0ea9e398bb | ||
|
|
2a6ea5d979 | ||
|
|
b8cde503c2 | ||
|
|
89c8e1c6a5 | ||
|
|
6c66e9850c | ||
|
|
fbcc8d8d6c | ||
|
|
e2bbdc968d | ||
|
|
ed7d5623ad | ||
|
|
217e491e59 | ||
|
|
101414dcd3 | ||
|
|
edda1e6567 | ||
|
|
dd7439095a | ||
|
|
9e3ae9c37c | ||
|
|
b1bd2c17a0 | ||
|
|
a939296981 | ||
|
|
23cfccf424 | ||
|
|
071e746c45 | ||
|
|
eae2876187 | ||
|
|
8730bbf0a9 | ||
|
|
1f5e5e5c14 | ||
|
|
e8b6e33934 | ||
|
|
9ee6c7aab6 | ||
|
|
22a8b914d2 | ||
|
|
dfab96c72e | ||
|
|
7c8fba8fc1 | ||
|
|
85f4023965 | ||
|
|
e9ee47a7c7 | ||
|
|
a7c6127f2b | ||
|
|
4e6a699140 | ||
|
|
f71644faf6 | ||
|
|
9a6306c53b | ||
|
|
83d98fb6fb | ||
|
|
c501574753 | ||
|
|
f0efdd2ed4 | ||
|
|
177b45c49b | ||
|
|
fc31b28ab6 | ||
|
|
e61475c7ea | ||
|
|
c92c0fce37 | ||
|
|
1a0c308b65 | ||
|
|
dffbad49b4 | ||
|
|
b6dffaabee | ||
|
|
8d83803763 | ||
|
|
85e5bd7c86 | ||
|
|
7ba063c6bb | ||
|
|
12b44c865b | ||
|
|
58c2ad8e4b | ||
|
|
4c354bdcd6 | ||
|
|
22f670d999 | ||
|
|
e5f3dcaaef | ||
|
|
3f4b1e69c7 | ||
|
|
fa286caca2 | ||
|
|
3b78e65b2b | ||
|
|
62b5ca20df |
28
.circleci/config.yml
Normal file
28
.circleci/config.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
parallelism: 4
|
||||
steps:
|
||||
- checkout
|
||||
- run: |
|
||||
make ci-dependencies
|
||||
- run: |
|
||||
./tests/ci/setup.sh
|
||||
- run: |
|
||||
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
- run: |
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
- run: |
|
||||
case $CIRCLE_NODE_INDEX in
|
||||
0) sudo -E make -e lint ;;
|
||||
1) sudo -E make -e go-tests ci-go-coverage;;
|
||||
2) sudo -E make -e deploy-test-checks-root deploy-test-config deploy-test-multi deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||
esac
|
||||
- run:
|
||||
shell: /bin/bash
|
||||
command: sudo -E make -e test-ci
|
||||
no_output_timeout: 60m
|
||||
- store_artifacts:
|
||||
path: ./coverage.out
|
||||
5
.codacy.yml
Normal file
5
.codacy.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
exclude_paths:
|
||||
- vendor/**/*
|
||||
- tests/**/*
|
||||
- "**_test.go"
|
||||
- contrib/*
|
||||
@@ -6,3 +6,4 @@ contrib
|
||||
docs
|
||||
tests
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/dokku-update
|
||||
|
||||
@@ -14,3 +14,8 @@ indent_size = 4
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.go]
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,7 +2,10 @@
|
||||
*.rpm
|
||||
.DS_Store
|
||||
.ruby-version
|
||||
.idea/
|
||||
.vagrant
|
||||
data/
|
||||
stack.tgz
|
||||
tmp
|
||||
coverage.out
|
||||
contrib/dokku-update-version
|
||||
10
.stickler.yml
Normal file
10
.stickler.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
linters:
|
||||
shellcheck:
|
||||
shell: bash
|
||||
exclude: SC2034,SC1090
|
||||
golint:
|
||||
|
||||
files:
|
||||
ignore:
|
||||
- './debian/*'
|
||||
- '*/vendor/*'
|
||||
351
HISTORY.md
351
HISTORY.md
@@ -1,5 +1,352 @@
|
||||
# History
|
||||
|
||||
## 0.11.6
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3091: @josegonzalez Properly trigger tar-based deploys on git-deployed repositories
|
||||
- #3076: @Kjwon15 Prune worktree after build
|
||||
- #3090: @josegonzalez Ensure all plugin triggers have docs and events integration
|
||||
- #3089: @josegonzalez Use a longer password for self-signed certificates
|
||||
|
||||
### New Features
|
||||
|
||||
- #2950: @adelq Add configuration option to disable automatic app creation
|
||||
- #3093: @josegonzalez Add subcommands to allow app locking and unlocking
|
||||
- #3092: @josegonzalez Add support for configuring the app shell
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3096: @josegonzalez docs: Document how to check on a running dokku-installer
|
||||
|
||||
## 0.11.5
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3088: @josegonzalez Silence port retrieval stderr
|
||||
- #3086: @josegonzalez Fix help output for golang plugins
|
||||
- #3079: @josegonzalez Move container status exclusively to ps plugin
|
||||
|
||||
### New Features
|
||||
|
||||
- #3085: @josegonzalez Add support for checking if an application exists
|
||||
- #3032: @josegonzalez Add support for arbitrary ubuntu versions
|
||||
- #3074: @josegonzalez Add the ability to disable ANSI prefixes via DOKKU_DISABLE_ANSI_PREFIX_REMOVAL
|
||||
- #3083: @josegonzalez Source /etc/defaults/dokku if available
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2958: @silverfix Add tutorial for running Dokku on an external volume
|
||||
- #3082: @josegonzalez Switch from Gratipay to Patreon
|
||||
- #3081: @josegonzalez Add docs for switching between deployment methodologies
|
||||
|
||||
## 0.11.4
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3071: @josegonzalez Do not grab restart policies if the deploy phase cannot be read
|
||||
- #3065: @josegonzalez Check if dokkurc files are readable before attempting to source
|
||||
- #3066: @josegonzalez Validate that all application names are valid domain names
|
||||
- #3052: @alexquick Remove bad config keys on load from app/global envfiles
|
||||
|
||||
### New Features
|
||||
|
||||
- #3073: @josegonzalez Add support for rhel
|
||||
- #3039: @josegonzalez Enhance security-related upgrade process
|
||||
- #3038: @shrmnk Add ps:stopall subcommand
|
||||
- #3055: @michaelshobbs Update to herokuish v0.3.34
|
||||
- #3045: @jcrben Remove nginx configuration files on debian purge
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3072: @josegonzalez Remove all references to VHOST files from documentation
|
||||
- #3069: @josegonzalez Remove potentially bad nginx template examples
|
||||
- #3059: @lwm Add note for runtime host configuration for checks.
|
||||
- #3041: @jcrben Point to unattended install instructions
|
||||
- #3053: @mimischi Add plugin to manage Dockerfile location to documentation
|
||||
- #3062: @shannara Change help run command be more explicit
|
||||
- #3034: @znz Fix a typo in golang config.go source
|
||||
- #3061: @tomdyson Fix plugin-triggers docs typo
|
||||
- #3056: @raine Fix typo in config help output
|
||||
- #3044: @takuti Fix links to port-management
|
||||
- #3042: @josegonzalez Improve documentation around port handling.
|
||||
|
||||
## 0.11.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3031: @josegonzalez fix: ensure we respect DOKKU_DEPLOY_BRANCH when rebuilding applications
|
||||
|
||||
### New Features
|
||||
|
||||
- #3028: @josegonzalez Ensure parallel runs properly for non-restorable apps and moreutils parallel
|
||||
- #3030: @josegonzalez feat: allow changing the system user the properties plugin uses
|
||||
- #3024: @jcrben Use high-availability pool keyserver during tests
|
||||
- #3017: @josegonzalez feat: add pre-start trigger for notifying on application start
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3020: @gliwka Point to docs in the right version
|
||||
- #3016: @josegonzalez Update nginx template example to use http2 when available
|
||||
|
||||
## 0.11.2
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3014: @josegonzalez fix: handle case where DOKKU_DOCKERFILE_PORTS is an empty string
|
||||
- #3013: @alexquick Fix some issues with config/network/repo help output
|
||||
- #3012: @alexquick Fail when setting/unsetting invalid keys
|
||||
- #3011: @alexquick Forward output from plugn triggers to user
|
||||
- #3004: @josegonzalez Return/Exit 1 when an image being deployed is invalid
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3015: @elia Tiny fixes to triggers documentation
|
||||
|
||||
## 0.11.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3010: @josegonzalez fix: route config_all to the `config` command to fix datastore plugin usage
|
||||
- #3009: @josegonzalez fix: correct the guard around the config_export call in config_sub
|
||||
- #3006: @josegonzalez fix: do not allow shadowing of the CACHE_DIR variable
|
||||
- #3005: @josegonzalez fix: persist users in the dokku group through installations
|
||||
- #3003: @josegonzalez Fix issues in apps:clone calls
|
||||
- #3001: @josegonzalez fix: allow applications to begin with numeric values
|
||||
|
||||
### New Features
|
||||
|
||||
- #3002: @josegonzalez fix: omit redirection of docker build output
|
||||
- #3000: @josegonzalez fix: remove golang files and triggers directory for packaging
|
||||
|
||||
## 0.11.0
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2998: @josegonzalez Fix issues in release process
|
||||
- #2993: @josegonzalez Add config_all alias for plugin usage
|
||||
- #2972: @buckle2000 Correct typo in docker-options:remove error output
|
||||
- #2964: @znz Remove unused variable
|
||||
- #2967: @znz Fix indentation in test file
|
||||
- #2963: @znz Correct typos in config plugin and remove potential infinite recursion issue
|
||||
- #2951: @josegonzalez Handle case where the app directory is a symlink
|
||||
- #2939: @znz Remove unnecessary lines
|
||||
- #2945: @znz Fix network plugin version
|
||||
- #2937: @michaelshobbs Strip restart flag from app_user_pre_deploy_trigger
|
||||
- #2931: @josegonzalez Upgrade git package for CI
|
||||
- #2928: @silverfix Do not overwrite the VHOST file during installation if it exists
|
||||
- #2926: @vtavernier Remove leading forward slash from app name in git-upload-pack
|
||||
|
||||
### New Features
|
||||
|
||||
- #2985: @bitmand Build a custom dhparam file once for nginx and include it as default
|
||||
- #2974: @josegonzalez Upgrade to herokuish 0.3.33
|
||||
- #2973: @josegonzalez Allow usage of git 2.13.0+ by unsetting GIT_QUARANTINE_PATH during git worktree usage
|
||||
- #2971: @miraculixx Add support for older virtualbox versions in official Dokku Vagrantfile
|
||||
- #2966: @znz Simplify internal config functions to reduce duplication
|
||||
- #2751: @alexquick Move config plugin to golang
|
||||
- #2938: @michaelshobbs Upgrade to golang 1.9.1
|
||||
- #2736: @josegonzalez Implement Network Plugin
|
||||
- #2929: @michaelshobbs Add codacy config and coverage targets
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2935: @jcrben Document how to make herokuish optional during the bootstrap installation
|
||||
- #2982: @agorf Correct typo in user management docs
|
||||
- #2981: @agorf Correct typos in process management docs
|
||||
- #2969: @znz Correct comments on network triggers
|
||||
- #2965: @znz Remove spaces from config subcommand help output to mirror help output of other subcommands
|
||||
- #2954: @mrname Add vernemq community datastore plugin to docs
|
||||
- #2944: @axilleas Fix syntax typo in debian installation docs
|
||||
- #2932: @znz Update code comment to match documentation
|
||||
- #2933: @znz Fix version number for network binding documentation
|
||||
|
||||
## 0.10.5
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2912: @josegonzalez Add missing depends statement for rsyslog
|
||||
- #2906: @manuel-colmenero Check the location of nginx in a central way
|
||||
- #2895: @josegonzalez cd to app directory when calling git worktree add
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2922: @axilleas Clarify the minimum Nginx version for HTTP/2 support
|
||||
- #2919: @wootwoot1234 Update nginx documentation surrounding file uploading for php buildpack users
|
||||
- #2913: @znz Fix a typo in the rpm release script
|
||||
- #2910: @buckle2000 Add a note about using the full git url for non-compliant toolchains
|
||||
|
||||
## 0.10.4
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2894: @josegonzalez fix: bail if any step in the release process fails
|
||||
- #2880: @josegonzalez fix: properly detect empty subcommands
|
||||
- #2881: @josegonzalez Verify app name on git push
|
||||
- #2858: @cstroe Use correct port number for the upstream.
|
||||
- #2848: @josegonzalez Ensure https applications return an https url from `dokku url`
|
||||
- #2839: @josegonzalez fix: skip clearing cache if we are not building a herokuish image
|
||||
|
||||
### New Features
|
||||
|
||||
- #2890: @michaelshobbs use circleci 2.0
|
||||
- #2847: @scjody Add nginx ppa before installing Dokku
|
||||
- #2850: @michaelshobbs add optional PROC_TYPE and CONTAINER_INDEX to docker-args-deploy plugn trigger
|
||||
- #2840: @josegonzalez Add DYNO environment variable to run containers
|
||||
- #2824: @josegonzalez Upgrade herokuish to version 0.3.31
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2861: @adelq Use non-deprecated apps command
|
||||
- #2878: @m0rth1um Add telegram notifications plugin
|
||||
- #2876: @josegonzalez docs: clarify storage documentation caveats
|
||||
- #2873: @josegonzalez docs: add a note on which docs to look at for customizing nginx docs
|
||||
- #2867: @josegonzalez docs: cleanup help output for dokku shell
|
||||
- #2859: @josegonzalez docs: use relative link for application deployment doc
|
||||
- #2866: @josegonzalez Add missing migration guides
|
||||
- #2863: @josegonzalez docs: fix syntax on getting started docs
|
||||
- #2836: @fishnux Add a note regarding nginx dependency to installation docs
|
||||
- #2834: @iansu Clarify port exposure in Dockerfile documentation
|
||||
|
||||
## 0.10.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2832: @josegonzalez fix: use python2.7 binary instead of python2 binary
|
||||
|
||||
## 0.10.2
|
||||
|
||||
### New Features
|
||||
|
||||
- #2827: @josegonzalez feat: allow installation of openresty instead of nginx
|
||||
|
||||
## 0.10.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2826: @josegonzalez Fix HISTORY.md generator
|
||||
|
||||
## 0.10.0
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2820: @josegonzalez Require netcat in debian packaging
|
||||
- #2774: @fruitl00p Include docker-options in the default `dokku`
|
||||
- #2778: @zarqman Fix /etc/logrotate.d/dokku on debian
|
||||
- #2747: @ebeigarts Update herokuish base image on updates using --pull
|
||||
- #2739: @josegonzalez Use listener_port in nginx.conf.sigil
|
||||
- #2735: @josegonzalez Ensure we can call ps:report without specifying an application
|
||||
- #2733: @josegonzalez Add support for new docker package names
|
||||
- #2730: @weyert Ignore the cache directory when cloning an app
|
||||
- #2723: @weyert Call non-deprecated plugin:list method
|
||||
|
||||
### New Features
|
||||
|
||||
- #2822: @josegonzalez refactor: allow skipping cleanup on a per-application basis
|
||||
- #2754: @fzerorubigd Add support for set DOKKU_IMAGE per app
|
||||
- #2815: @markstory Add stickler-ci configuration.
|
||||
- #2809: @oliw Remove aufs step from Makefile
|
||||
- #2785: @josegonzalez Add a release-plugin binary
|
||||
- #2777: @stokarenko Turn on ps-post-stop hook.
|
||||
- #2781: @fruitl00p Adds docker.io support
|
||||
- #2766: @josegonzalez Upgrade to herokuish 0.3.29
|
||||
- #2765: @josegonzalez Install python3-software-properties as an alternative to python-software-properties
|
||||
- #2642: @chiedo Added better default nginx error pages
|
||||
- #2678: @callahad Default to secure PCI-compliant SSL setup
|
||||
- #2734: @josegonzalez Allow quieter report output
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2803: @iSDP Adding related articles on the Docker Image Deployment page
|
||||
- #2798: @znz Update CURL_CONNECT_TIMEOUT in docs
|
||||
- #2795: @josegonzalez docs: Add documentation around adding build-time configuration variables
|
||||
- #2791: @yazinsai Correct typo in persistent storage docs
|
||||
- #2789: @h4ckninja Subject-verb agreement
|
||||
- #2790: @flyinggrizzly Add entry for insecure connection issue in Rails
|
||||
- #2788: @josegonzalez Flesh out uninstallation documentation
|
||||
- #2784: @josegonzalez Document special dokku environment variables
|
||||
- #2773: @znz Update year in footer [ci skip]
|
||||
- #2768: @znz Ubuntu 12.04 is EOL
|
||||
- #2769: @lucianopf Fix SlackButton for mobile devices.
|
||||
- #2763: @ZiadSalah Update vagrant documentation for windows users
|
||||
- #2764: @joshmanders Create PULL_REQUEST_TEMPLATE.md
|
||||
- #2758: @AxelTheGerman Update doc location for dokku-git-rev community plugin
|
||||
- #2757: @nodanaonlyzuul Fix typo from "To use a dockerfiles" to "To use a dockerfile" singular
|
||||
- #2753: @abrkn Use short-hand method for shutting down all applications in upgrade docs
|
||||
- #2746: @josegonzalez Add redirect for installation to advanced install docs
|
||||
- #2738: @josegonzalez Add missing `NO_SSL_SERVER_NAME` to example template
|
||||
- #2457: @john-doherty Update Digitalocean installation instructions
|
||||
- #2725: @timaschew Fix typo in application management docs
|
||||
- #2719: @joshco Clarify that nginx.conf.sigil must be committed to repository
|
||||
- #2715: @josegonzalez Use urls that are linkable on github
|
||||
|
||||
## 0.9.4
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2710: @josegonzalez Quiet output for git-related commands
|
||||
|
||||
## 0.9.3
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2706: @josegonzalez fix: ensure nginx conf.d directory exists when running nginx install hook
|
||||
- #2701: @scjody Set SSH_USER for root commands
|
||||
|
||||
### New Features
|
||||
|
||||
- #2708: @josegonzalez Document that we will not do buildpack support in the issue tracker
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2709: @michaelshobbs increase CURL_TIMEOUT and CURL_CONNECT_TIMEOUT defaults
|
||||
- #2699: @mbreit Add support for git >= 2.11
|
||||
|
||||
## 0.9.2
|
||||
|
||||
### New Features
|
||||
|
||||
- #2698: @josegonzalez docs: Document that we only care about specific sections
|
||||
- #2697: @callahad Restore installer note regarding AUFS on Linode
|
||||
- #2694: @scjody Add documentation note re: git-pre-pull vs. auth
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2695: @michaelshobbs add tests for pre/post deploy tasks
|
||||
|
||||
## 0.9.1
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2693: @josegonzalez fix: explicitly chown data and data/storage directories
|
||||
|
||||
## 0.9.0
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2691: @josegonzalez Fix package building when golang binaries are available
|
||||
- #2671: @znz Fix variable name
|
||||
- #2672: @callahad Fix logrotate on Debian
|
||||
- #2666: @josegonzalez Use correct flag for build arguments when installing herokuish
|
||||
- #2664: @pvalentim Fix remote name when using --remote option with apps:create
|
||||
|
||||
### New Features
|
||||
|
||||
- #2689: @mbreit Add dokku-monit to community plugin list
|
||||
- #2683: @josegonzalez Ensure we have an example for adding keys as another user
|
||||
- #2682: @josegonzalez Clarify supported stanzas in app.json
|
||||
- #2679: @callahad Remove unnecessary Linode-specific instructions
|
||||
- #2670: @znz Remove duplicated `(i.e. `
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2685: @josegonzalez Pass shellcheck on os x
|
||||
- #2677: @callahad Prefer HTTP2 to SPDY in nginx-vhosts
|
||||
- #2673: @michaelshobbs Update to herokuish 0.3.27
|
||||
- #2674: @michaelshobbs Update sshcommand to 0.7.0
|
||||
- #2654: @ebeigarts Enable nginx and docker on system startup when using bootstrap.sh on CentOS
|
||||
- #2546: @michaelshobbs Convert repo plugin to golang
|
||||
|
||||
## 0.8.2
|
||||
|
||||
### New Features
|
||||
@@ -1091,7 +1438,7 @@ Thanks to the *many* contributors for making this release our best release so fa
|
||||
- #1473: @josegonzalez Handle crashing containers by using restart=on-failure policy
|
||||
- #1476: @michaelshobbs Support static nginx port when deploying without an application VHOST
|
||||
- #1476: nginx proxy without VHOST
|
||||
- #1477: @arthurschreiber Support removing config variables that contain `\n`.
|
||||
- #1477: @arthurschreiber Support removing config variables containing newlines.
|
||||
|
||||
### Documentation
|
||||
|
||||
@@ -1237,7 +1584,7 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
|
||||
### New Features
|
||||
|
||||
- #1245: @arthurschreiber Support config variables containing `\n`
|
||||
- #1245: @arthurschreiber Support config variables containing newlines
|
||||
- #1257: @josegonzalez Split nginx ssl logs by $APP
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
> If you need help figuring out how to use a specific buildpack, or are having issues using multiple buildpacks, please see our [irc or slack channels](http://dokku.viewdocs.io/dokku/getting-started/where-to-get-help/#the-irc-and-slack-channels). Issues pertaining to buildpacks may be closed and locked.
|
||||
|
||||
Description of problem:
|
||||
|
||||
|
||||
|
||||
39
Makefile
39
Makefile
@@ -1,6 +1,6 @@
|
||||
DOKKU_VERSION ?= master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.6.0/sshcommand
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.7.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
@@ -8,6 +8,7 @@ PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
|
||||
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
||||
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
||||
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
||||
PLUGIN_MAKE_TARGET ?= build-in-docker
|
||||
|
||||
# If the first argument is "vagrant-dokku"...
|
||||
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
|
||||
@@ -23,7 +24,9 @@ else
|
||||
BUILD_STACK_TARGETS = build-in-docker
|
||||
endif
|
||||
|
||||
.PHONY: all apt-update install version copyfiles man-db plugins dependencies sshcommand plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku
|
||||
include common.mk
|
||||
|
||||
.PHONY: all apt-update install version copyfiles man-db plugins dependencies sshcommand plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
|
||||
|
||||
include tests.mk
|
||||
include deb.mk
|
||||
@@ -50,7 +53,24 @@ package_cloud:
|
||||
packer:
|
||||
packer build contrib/packer.json
|
||||
|
||||
go-build:
|
||||
basedir=$(PWD); \
|
||||
for dir in plugins/*; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -e -C $$dir $(PLUGIN_MAKE_TARGET) || exit $$? ;\
|
||||
fi ;\
|
||||
done
|
||||
|
||||
go-clean:
|
||||
basedir=$(PWD); \
|
||||
for dir in plugins/*; do \
|
||||
if [ -e $$dir/Makefile ]; then \
|
||||
$(MAKE) -e -C $$dir clean ;\
|
||||
fi ;\
|
||||
done
|
||||
|
||||
copyfiles:
|
||||
$(MAKE) go-build || exit 1
|
||||
cp dokku /usr/local/bin/dokku
|
||||
mkdir -p ${CORE_PLUGINS_PATH} ${PLUGINS_PATH}
|
||||
rm -rf ${CORE_PLUGINS_PATH}/*
|
||||
@@ -62,11 +82,15 @@ copyfiles:
|
||||
rm -rf ${CORE_PLUGINS_PATH}/$$plugin && \
|
||||
rm -rf ${PLUGINS_PATH}/$$plugin && \
|
||||
cp -R plugins/$$plugin ${CORE_PLUGINS_PATH}/available && \
|
||||
rm -rf ${CORE_PLUGINS_PATH}/available/$$plugin/src && \
|
||||
ln -s ${CORE_PLUGINS_PATH}/available/$$plugin ${PLUGINS_PATH}/available; \
|
||||
find /var/lib/dokku/ -xtype l -delete;\
|
||||
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
done
|
||||
done
|
||||
ifndef SKIP_GO_CLEAN
|
||||
$(MAKE) go-clean
|
||||
endif
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true
|
||||
$(MAKE) addman
|
||||
|
||||
@@ -92,7 +116,7 @@ dependencies: apt-update sshcommand plugn docker help2man man-db sigil
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
apt-get update
|
||||
apt-get update -qq
|
||||
|
||||
help2man:
|
||||
apt-get install -qq -y help2man
|
||||
@@ -113,7 +137,7 @@ sigil:
|
||||
wget -qO /tmp/sigil_latest.tgz ${SIGIL_URL}
|
||||
tar xzf /tmp/sigil_latest.tgz -C /usr/local/bin
|
||||
|
||||
docker: aufs
|
||||
docker:
|
||||
apt-get install -qq -y curl
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
@@ -125,11 +149,6 @@ endif
|
||||
sleep 2 # give docker a moment i guess
|
||||
endif
|
||||
|
||||
aufs:
|
||||
ifndef CI
|
||||
lsmod | grep aufs || modprobe aufs || apt-get install -qq -y linux-image-extra-`uname -r` > /dev/null
|
||||
endif
|
||||
|
||||
stack:
|
||||
ifeq ($(shell test -e /var/run/docker.sock && touch -c /var/run/docker.sock && echo $$?),0)
|
||||
ifdef BUILD_STACK
|
||||
|
||||
1
PULL_REQUEST_TEMPLATE.md
Normal file
1
PULL_REQUEST_TEMPLATE.md
Normal file
@@ -0,0 +1 @@
|
||||
**Note:** If this PR is just doc changes, please put [ci skip] in the body that way tests do not run.
|
||||
@@ -7,7 +7,7 @@
|
||||
[](http://dokku.viewdocs.io/dokku/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](https://gratipay.com/dokku/)
|
||||
[](https://www.patreon.com/dokku/)
|
||||
|
||||
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
@@ -99,8 +99,8 @@ A fresh VM running any of the following operating systems:
|
||||
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.8.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.8.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.11.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.11.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@@ -45,6 +45,8 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
|
||||
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
|
||||
# enable NAT adapter cable https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838999
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
end
|
||||
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
|
||||
|
||||
34
bootstrap.sh
34
bootstrap.sh
@@ -33,9 +33,6 @@ install-requirements() {
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
apt-get update -qq > /dev/null
|
||||
if [[ "$DOKKU_DISTRO_VERSION" == "12.04" ]]; then
|
||||
apt-get -qq -y install python-software-properties
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -49,13 +46,20 @@ install-dokku() {
|
||||
minor=$(echo "$DOKKU_SEMVER" | awk '{split($0,a,"."); print a[2]}')
|
||||
patch=$(echo "$DOKKU_SEMVER" | awk '{split($0,a,"."); print a[3]}')
|
||||
|
||||
use_plugin=false
|
||||
# 0.4.0 implemented a `plugin` plugin
|
||||
if [[ "$major" -eq "0" ]] && [[ "$minor" -ge "4" ]] && [[ "$patch" -ge "0" ]]; then
|
||||
use_plugin=true
|
||||
elif [[ "$major" -ge "1" ]]; then
|
||||
use_plugin=true
|
||||
fi
|
||||
|
||||
# 0.3.13 was the first version with a debian package
|
||||
if [[ "$major" -eq "0" ]] && [[ "$minor" -eq "3" ]] && [[ "$patch" -ge "13" ]]; then
|
||||
install-dokku-from-package "$DOKKU_SEMVER"
|
||||
echo "--> Running post-install dependency installation"
|
||||
dokku plugins-install-dependencies
|
||||
# 0.4.0 implemented a `plugin` plugin
|
||||
elif [[ "$major" -eq "0" ]] && [[ "$minor" -ge "4" ]] && [[ "$patch" -ge "0" ]]; then
|
||||
elif [[ "$use_plugin" == "true" ]]; then
|
||||
install-dokku-from-package "$DOKKU_SEMVER"
|
||||
echo "--> Running post-install dependency installation"
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
@@ -94,7 +98,7 @@ install-dokku-from-package() {
|
||||
debian|ubuntu)
|
||||
install-dokku-from-deb-package "$@"
|
||||
;;
|
||||
centos)
|
||||
centos|rhel)
|
||||
install-dokku-from-rpm-package "$@"
|
||||
;;
|
||||
*)
|
||||
@@ -107,6 +111,7 @@ install-dokku-from-package() {
|
||||
install-dokku-from-deb-package() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
local OS_ID
|
||||
|
||||
if [[ -n $DOKKU_DOCKERFILE ]]; then
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
@@ -118,16 +123,23 @@ install-dokku-from-deb-package() {
|
||||
|
||||
echo "--> Installing docker"
|
||||
if uname -r | grep -q linode; then
|
||||
echo "--> NOTE: Using Linode? Docker might complain about missing AUFS support."
|
||||
echo " See http://dokku.viewdocs.io/dokku/getting-started/install/linode/"
|
||||
echo "--> NOTE: Using Linode? Docker may complain about missing AUFS support."
|
||||
echo " You can safely ignore this warning."
|
||||
echo " Installation will continue in 10 seconds."
|
||||
sleep 10
|
||||
fi
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
if [[ "$DOKKU_DISTRO_VERSION" == "14.04" ]]; then
|
||||
echo "--> Adding nginx PPA"
|
||||
add-apt-repository -y ppa:nginx/stable
|
||||
fi
|
||||
|
||||
OS_ID="$(lsb_release -cs 2> /dev/null || echo "trusty")"
|
||||
|
||||
echo "--> Installing dokku"
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | tee /etc/apt/sources.list.d/dokku.list
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $OS_ID main" | tee /etc/apt/sources.list.d/dokku.list
|
||||
apt-get update -qq > /dev/null
|
||||
|
||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
|
||||
@@ -167,6 +179,10 @@ install-dokku-from-rpm-package() {
|
||||
yum -y install herokuish dokku
|
||||
fi
|
||||
|
||||
echo "--> Enabling docker and nginx on system startup"
|
||||
systemctl enable docker
|
||||
systemctl enable nginx
|
||||
|
||||
echo "--> Starting nginx"
|
||||
systemctl start nginx
|
||||
}
|
||||
|
||||
20
circle.yml
20
circle.yml
@@ -1,20 +0,0 @@
|
||||
machine:
|
||||
pre:
|
||||
- echo 'DOCKER_OPTS="-s btrfs -e lxc --userland-proxy=false"' | sudo tee -a /etc/default/docker
|
||||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci-cp-workaround'
|
||||
- sudo chmod 0755 /usr/bin/docker
|
||||
services:
|
||||
- docker
|
||||
dependencies:
|
||||
cache_directories:
|
||||
- "~/docker"
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
|
||||
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
- sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
post:
|
||||
- sudo -E make -e lint
|
||||
test:
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 3600 }
|
||||
4
common.mk
Normal file
4
common.mk
Normal file
@@ -0,0 +1,4 @@
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.9.1
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
@@ -1,34 +0,0 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
|
||||
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
WORKDIR /dokku
|
||||
|
||||
COPY Makefile /dokku/
|
||||
|
||||
COPY *.mk /dokku/
|
||||
|
||||
RUN make deb-setup rpm-setup
|
||||
|
||||
COPY . /dokku
|
||||
|
||||
RUN make sshcommand plugn version copyfiles
|
||||
|
||||
ARG DOKKU_VERSION=master
|
||||
ENV DOKKU_VERSION ${DOKKU_VERSION}
|
||||
|
||||
ARG DOKKU_GIT_REV
|
||||
ENV DOKKU_GIT_REV ${DOKKU_GIT_REV}
|
||||
|
||||
ARG IS_RELEASE=false
|
||||
ENV IS_RELEASE ${IS_RELEASE}
|
||||
|
||||
RUN make rpm-herokuish rpm-dokku rpm-plugn rpm-sshcommand rpm-sigil
|
||||
|
||||
RUN mkdir -p /data && cp /tmp/*.rpm /data && ls /data/
|
||||
@@ -1,34 +0,0 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
|
||||
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
WORKDIR /dokku
|
||||
|
||||
COPY Makefile /dokku/
|
||||
|
||||
COPY *.mk /dokku/
|
||||
|
||||
RUN make deb-setup rpm-setup
|
||||
|
||||
COPY . /dokku
|
||||
|
||||
RUN make sshcommand plugn version copyfiles
|
||||
|
||||
ARG DOKKU_VERSION=master
|
||||
ENV DOKKU_VERSION ${DOKKU_VERSION}
|
||||
|
||||
ARG DOKKU_GIT_REV
|
||||
ENV DOKKU_GIT_REV ${DOKKU_GIT_REV}
|
||||
|
||||
ARG IS_RELEASE=false
|
||||
ENV IS_RELEASE ${IS_RELEASE}
|
||||
|
||||
RUN make deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
|
||||
RUN mkdir -p /data && cp /tmp/*.deb /data && ls /data/
|
||||
45
contrib/build.Dockerfile
Normal file
45
contrib/build.Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG 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 \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
COPY Makefile ${WORKDIR}/
|
||||
COPY *.mk ${WORKDIR}/
|
||||
|
||||
RUN make deb-setup rpm-setup sshcommand plugn
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
ENV GOPATH=/go
|
||||
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& rm -rf plugins/common/*.go plugins/common/glide* plugins/common/vendor/ \
|
||||
&& make deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil deb-dokku-update \
|
||||
rpm-herokuish rpm-dokku rpm-plugn rpm-sshcommand rpm-sigil rpm-dokku-update
|
||||
|
||||
RUN mkdir -p /data \
|
||||
&& cp /tmp/*.deb /data \
|
||||
&& cp /tmp/*.rpm /data \
|
||||
&& ls -lha /data/
|
||||
@@ -10,7 +10,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.8.2'
|
||||
VERSION = 'v0.11.6'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
@@ -254,7 +254,7 @@ PAGE = """
|
||||
$.post('/setup', data)
|
||||
.done(function() {
|
||||
$("#result").html("Success!")
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/deployment/application-deployment/";
|
||||
window.location.href = "http://dokku.viewdocs.io/dokku~{VERSION}/deployment/application-deployment/";
|
||||
})
|
||||
.fail(function(data) {
|
||||
$("#result").html("Something went wrong...")
|
||||
|
||||
112
contrib/dokku-update
Executable file
112
contrib/dokku-update
Executable file
@@ -0,0 +1,112 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
if [[ -r /etc/defaults/dokku ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/defaults/dokku
|
||||
fi
|
||||
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
if [[ -f "$DOKKU_ROOT/dokkurc" ]]; then
|
||||
if [[ -r $DOKKU_ROOT/dokkurc ]]; then
|
||||
source "$DOKKU_ROOT/dokkurc"
|
||||
else
|
||||
echo "Unable to read $DOKKU_ROOT/dokkurc for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ -d $DOKKU_ROOT/.dokkurc ]]; then
|
||||
for f in $DOKKU_ROOT/.dokkurc/*; do
|
||||
if [[ -r "$f" ]]; then
|
||||
source "$f"
|
||||
else
|
||||
echo "Unable to read $f for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
||||
export PLUGIN_ENABLED_PATH=${PLUGIN_ENABLED_PATH:="$PLUGIN_PATH/enabled"}
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
dokku-log-info() {
|
||||
declare desc="log info formatter"
|
||||
echo "-----> $*"
|
||||
}
|
||||
|
||||
dokku-log-verbose() {
|
||||
declare desc="log verbose formatter"
|
||||
echo " $*"
|
||||
}
|
||||
|
||||
dokku-log-warn() {
|
||||
declare desc="log warning formatter"
|
||||
echo " ! $*" 1>&2
|
||||
}
|
||||
|
||||
dokku-update-plugin() {
|
||||
declare PLUGIN_NAME="$1"
|
||||
if [[ -d "$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/.git" ]]; then
|
||||
dokku-log-verbose "Updating $PLUGIN_NAME"
|
||||
dokku plugin:update "$PLUGIN_NAME"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare COMMAND="$1"
|
||||
local DOKKU_DISTRO PLUGIN_NAME VERSION
|
||||
|
||||
if [[ -f "/etc/os-release" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
|
||||
fi
|
||||
|
||||
if [[ "$COMMAND" == "version" ]] || [[ "$COMMAND" == "-v" ]]; then
|
||||
VERSION=UNRELEASED
|
||||
if [[ -f "/var/lib/dokku-update/VERSION" ]]; then
|
||||
VERSION="$(cat /var/lib/dokku-update/VERSION)"
|
||||
fi
|
||||
echo "dokku-update ${VERSION}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
dokku-log-info "Running system updates"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch)
|
||||
yaourt -Syyua
|
||||
;;
|
||||
debian|ubuntu)
|
||||
apt-get update -qq > /dev/null
|
||||
apt-get -qq -y --force-yes dist-upgrade
|
||||
;;
|
||||
centos|opensuse|rhel)
|
||||
dokku-log-warn "Updating this operating system is not supported"
|
||||
;;
|
||||
*)
|
||||
dokku-log-warn "Updating this operating system is not supported"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# update all plugins
|
||||
dokku-log-info "Updating all plugins"
|
||||
for PLUGIN_NAME in $(dokku plugin:list | grep enabled | awk '$1=$1' | cut -d' ' -f1); do
|
||||
dokku-update-plugin "$PLUGIN_NAME"
|
||||
done
|
||||
dokku plugin:install
|
||||
|
||||
# rebuild all applications
|
||||
dokku-log-info "Rebuilding all applications"
|
||||
dokku ps:rebuildall
|
||||
|
||||
dokku-log-info "Waiting for old containers to stop"
|
||||
sleep 120
|
||||
dokku-log-info "Cleaning up"
|
||||
dokku cleanup
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -56,7 +56,7 @@ fn-dokku-host() {
|
||||
if [[ -z "$DOKKU_HOST" ]]; then
|
||||
fn-client-help-msg
|
||||
fi
|
||||
|
||||
|
||||
echo "$DOKKU_HOST"
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ main() {
|
||||
else
|
||||
APP="$APP_ARG"
|
||||
fi
|
||||
if git remote add dokku "dokku@$DOKKU_REMOTE_HOST:$APP"; then
|
||||
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then
|
||||
echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}"
|
||||
echo "-----> Application name is ${APP}"
|
||||
else
|
||||
|
||||
338
contrib/release
Executable file
338
contrib/release
Executable file
@@ -0,0 +1,338 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log info formatter"
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
log-error() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log error formatter"
|
||||
echo "! $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log fail formatter"
|
||||
log-error "$*"
|
||||
exit -1
|
||||
}
|
||||
|
||||
fn-build-dokku() {
|
||||
declare desc="Builds dokku packages within a docker container"
|
||||
declare IS_RELEASE="$1" DOKKU_VERSION="$2"
|
||||
local NAME GOLANG_VERSION
|
||||
|
||||
if [[ -z "$DOKKU_VERSION" ]]; then
|
||||
log-error "Invalid deb file specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
NAME="dokku:build"
|
||||
[[ "$IS_RELEASE" == "true" ]] && NAME="dokku:build-release"
|
||||
[[ -n "$DOKKU_VERSION" ]] || DOKKU_VERSION="master"
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
GOLANG_VERSION="$(grep BUILD_IMAGE common.mk | cut -d' ' -f3 | cut -d':' -f2)"
|
||||
docker build \
|
||||
--build-arg DOKKU_VERSION="$DOKKU_VERSION" \
|
||||
--build-arg DOKKU_GIT_REV="$DOKKU_GIT_REV" \
|
||||
--build-arg IS_RELEASE="$IS_RELEASE" \
|
||||
--build-arg PLUGIN_MAKE_TARGET="build" \
|
||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
||||
-f "contrib/build.Dockerfile" \
|
||||
-t "$NAME" .
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-extract-package() {
|
||||
declare desc="Extract packages from a docker container to the root directory"
|
||||
declare IS_RELEASE="$1" PACKAGE_NAME="$2"
|
||||
local NAME
|
||||
|
||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
||||
log-error "Invalid deb file specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
NAME="dokku:build"
|
||||
[[ "$IS_RELEASE" == "true" ]] && NAME="dokku:build-release"
|
||||
|
||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
||||
docker run --rm --entrypoint cat "$NAME" "/data/${PACKAGE_NAME}" > "${ROOT_DIR}/${PACKAGE_NAME}"
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-in-array() {
|
||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
||||
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-is-release() {
|
||||
declare desc="Checks if a given run is a release run"
|
||||
declare RELEASE="$1"
|
||||
local IS_RELEASE=false
|
||||
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
|
||||
IS_RELEASE=true
|
||||
fi
|
||||
|
||||
echo "$IS_RELEASE"
|
||||
}
|
||||
|
||||
fn-version-current() {
|
||||
declare desc="Retrieves the current version of dokku"
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
grep Version debian/control | cut -d' ' -f2
|
||||
}
|
||||
|
||||
fn-version-next() {
|
||||
declare desc="Calculates the next version name of dokku"
|
||||
declare CURRENT_VERSION="$1" RELEASE="$2"
|
||||
local major minor patch short_object
|
||||
|
||||
major=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[1]}')
|
||||
minor=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[2]}')
|
||||
patch=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[3]}')
|
||||
|
||||
if [[ "$RELEASE" == "major" ]]; then
|
||||
major=$((major + 1))
|
||||
minor="0"
|
||||
patch="0"
|
||||
elif [[ "$RELEASE" == "minor" ]]; then
|
||||
minor=$((minor + 1))
|
||||
patch="0"
|
||||
elif [[ "$RELEASE" == "patch" ]]; then
|
||||
patch=$((patch + 1))
|
||||
else
|
||||
short_object=$(git log --oneline | tail -n 1 | cut -d' ' -f1)
|
||||
echo "${CURRENT_VERSION}build+$(echo "$DOKKU_GIT_REV" | cut -c1-${#short_object})"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "${major}.${minor}.${patch}"
|
||||
}
|
||||
|
||||
fn-publish-package() {
|
||||
declare desc="Publishes a package to packagecloud"
|
||||
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu EXIT_CODE=0
|
||||
local OS_ID ex
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("trusty" "utopic" "vivid" "wily" "xenial" "yakkety" "zesty" "artful")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
else
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
||||
EXIT_CODE="$?"
|
||||
fi
|
||||
return "$EXIT_CODE"
|
||||
}
|
||||
|
||||
fn-replace-version() {
|
||||
declare desc="Replaces the version within a file"
|
||||
local CURRENT_VERSION="$1"
|
||||
local NEXT_VERSION="$2"
|
||||
local FILENAME="$3"
|
||||
sed -i.bak "s/${CURRENT_VERSION//./\.}/$NEXT_VERSION/g" "$FILENAME" && rm "$FILENAME.bak"
|
||||
git add "$FILENAME"
|
||||
}
|
||||
|
||||
fn-repo-merged-requests() {
|
||||
declare desc="Retrieves all pull request ids since a given release of dokku"
|
||||
declare TAG="$1"
|
||||
git log "v${TAG}..HEAD" --oneline | grep "Merge pull request" | cut -d' ' -f 5 | cut -d '#' -f2
|
||||
}
|
||||
|
||||
fn-repo-push-tags() {
|
||||
declare desc="Pushes tags and the repository to github"
|
||||
declare IS_RELEASE="$1"
|
||||
|
||||
if [[ "$IS_RELEASE" == "false" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
git push --tags origin master
|
||||
}
|
||||
|
||||
fn-repo-update() {
|
||||
declare desc="Updates files within the repository for a given release"
|
||||
declare IS_RELEASE="$1" CURRENT_VERSION="$2" NEXT_VERSION="$3"
|
||||
|
||||
log-info "(release-dokku) Replacing ${CURRENT_VERSION} with ${NEXT_VERSION}"
|
||||
for f in plugins/*/plugin.toml; do
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" "$f"
|
||||
done
|
||||
|
||||
if [[ "$IS_RELEASE" == "false" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" contrib/dokku-installer.py
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" debian/control
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/advanced-usage/plugin-management.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/browserconfig.xml
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/manifest.json
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/style.css
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/development/release-process.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/home.html
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/getting-started/installation.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/template.html
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" README.md
|
||||
|
||||
if [[ "$RELEASE" == 'patch' ]]; then
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/versions.json
|
||||
else
|
||||
versions=$(python -c 'import json,sys;d=json.load(sys.stdin);d["max-versions"].append("'"${NEXT_VERSION}"'"); print json.dumps(d, indent=2, sort_keys=True)' <docs/assets/versions.json)
|
||||
echo "$versions" >docs/assets/versions.json
|
||||
git add docs/assets/versions.json
|
||||
fi
|
||||
|
||||
if [[ "$IS_RELEASE" == "false" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
log-info "(release-dokku) Adding HISTORY.md, committing and tagging"
|
||||
fn-repo-update-history-and-commit "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||
git tag "v${NEXT_VERSION}"
|
||||
}
|
||||
|
||||
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_BUG ISSUE_FILE
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
|
||||
mkdir -p /tmp/github-data
|
||||
|
||||
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"
|
||||
fi
|
||||
|
||||
TITLE="$(jq -r '.title' "$ISSUE_FILE")"
|
||||
AUTHOR="$(jq -r '.user.login' "$ISSUE_FILE")"
|
||||
TYPE="$(jq -r '.labels[] | select( .name | contains("type") ) | .name' "$ISSUE_FILE" | cut -d' ' -f2)"
|
||||
CHANGELOG_TEXT="- #${PULL_REQUEST_ID}: @${AUTHOR} ${TITLE}"
|
||||
|
||||
if [[ "$TYPE" == "bug" ]]; then
|
||||
HISTORY_BUG="${HISTORY_BUG}"$'\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"
|
||||
fi
|
||||
done
|
||||
|
||||
HISTORY="# History"
|
||||
HISTORY="${HISTORY}"$'\n\n'"## ${NEXT_VERSION}"
|
||||
|
||||
if [[ "$HISTORY_BUG" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Bug Fixes"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_BUG"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_ENHANCEMENT" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### New Features"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_ENHANCEMENT"
|
||||
fi
|
||||
|
||||
if [[ "$HISTORY_DOCUMENTATION" ]]; then
|
||||
HISTORY="${HISTORY}"$'\n\n'"### Documentation"
|
||||
HISTORY="${HISTORY}"$'\n'"$HISTORY_DOCUMENTATION"
|
||||
fi
|
||||
|
||||
sed -i.bak '1d' HISTORY.md && rm HISTORY.md.bak
|
||||
HISTORY_CONTENTS="$(cat HISTORY.md)"
|
||||
echo -e "$HISTORY\n$HISTORY_CONTENTS" >HISTORY.md
|
||||
git add HISTORY.md
|
||||
|
||||
COMMIT_MESSAGE="Release ${NEXT_VERSION}"$'\n\n'"${HISTORY}"
|
||||
git commit -m "${COMMIT_MESSAGE}"
|
||||
}
|
||||
|
||||
fn-require-bin() {
|
||||
declare desc="Checks that a binary exists"
|
||||
declare BINARY="$1"
|
||||
if ! command -v "$BINARY" &>/dev/null; then
|
||||
log-fail "Missing ${BINARY}, please install it"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare RELEASE="$1"
|
||||
local CURRENT_VERSION NEXT_VERSION IS_RELEASE major minor patch versions
|
||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish")
|
||||
|
||||
if [[ "$RELEASE" == '--trace' ]]; then
|
||||
shift 1
|
||||
RELEASE="$1"
|
||||
TRACE=1 && set -x
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], none given"
|
||||
fi
|
||||
|
||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], '${RELEASE}' given"
|
||||
fi
|
||||
|
||||
fn-require-bin "docker"
|
||||
fn-require-bin "git"
|
||||
fn-require-bin "package_cloud"
|
||||
[[ -n "$PACKAGECLOUD_API_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_API_TOKEN environment variable"
|
||||
|
||||
CURRENT_VERSION="$(fn-version-current)"
|
||||
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
|
||||
IS_RELEASE="$(fn-is-release "$RELEASE")"
|
||||
|
||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION"
|
||||
[[ "$?" == 0 ]] || log-fail "Error building package"
|
||||
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb"
|
||||
[[ "$?" == 0 ]] || log-fail "Error extracting deb package"
|
||||
|
||||
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm"
|
||||
[[ "$?" == 0 ]] || log-fail "Error extracting rpm package"
|
||||
|
||||
fn-publish-package "$IS_RELEASE" "deb" "dokku_${NEXT_VERSION}_amd64.deb"
|
||||
[[ "$?" == 0 ]] || log-fail "Error publishing deb package"
|
||||
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "dokku-${NEXT_VERSION}-1.x86_64.rpm"
|
||||
[[ "$?" == 0 ]] || log-fail "Error publishing rpm package"
|
||||
|
||||
fn-repo-push-tags "$IS_RELEASE"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
121
contrib/release-dokku-update
Executable file
121
contrib/release-dokku-update
Executable file
@@ -0,0 +1,121 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log info formatter"
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
log-error() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log error formatter"
|
||||
echo "! $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log fail formatter"
|
||||
log-error "$*"
|
||||
exit -1
|
||||
}
|
||||
|
||||
fn-build-dokku() {
|
||||
declare desc="Builds dokku packages within a docker container"
|
||||
|
||||
pushd "$ROOT_DIR" >/dev/null
|
||||
docker build \
|
||||
-f "contrib/update-build.Dockerfile" \
|
||||
-t dokku-update:build .
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-extract-package() {
|
||||
declare desc="Extract packages from a docker container to the root directory"
|
||||
declare PACKAGE_NAME="$1"
|
||||
|
||||
if [[ -z "$PACKAGE_NAME" ]]; then
|
||||
log-error "Invalid deb file specified"
|
||||
return 1
|
||||
fi
|
||||
|
||||
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
|
||||
docker run --rm --entrypoint cat dokku-update:build "/data/${PACKAGE_NAME}" > "${ROOT_DIR}/${PACKAGE_NAME}"
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-publish-package() {
|
||||
declare desc="Publishes a package to packagecloud"
|
||||
declare RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
|
||||
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu/trusty
|
||||
|
||||
[[ "$RELEASE" != "betafish" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
|
||||
return "$?"
|
||||
}
|
||||
|
||||
fn-in-array() {
|
||||
declare desc="return true if value ($1) is in list (all other arguments)"
|
||||
|
||||
local e
|
||||
for e in "${@:2}"; do
|
||||
[[ "$e" == "$1" ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-require-bin() {
|
||||
declare desc="Checks that a binary exists"
|
||||
declare BINARY="$1"
|
||||
if ! command -v "$BINARY" &>/dev/null; then
|
||||
log-fail "Missing ${BINARY}, please install it"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
declare RELEASE="$1"
|
||||
local CURRENT_VERSION NEXT_VERSION major minor patch versions
|
||||
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish")
|
||||
|
||||
if [[ "$RELEASE" == '--trace' ]]; then
|
||||
shift 1
|
||||
RELEASE="$1"
|
||||
TRACE=1 && set -x
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], none given"
|
||||
fi
|
||||
|
||||
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
|
||||
log-fail "Argument 1 must be one of [major, minor, patch, betafish], '${RELEASE}' given"
|
||||
fi
|
||||
|
||||
fn-require-bin "docker"
|
||||
fn-require-bin "package_cloud"
|
||||
[[ -n "$PACKAGECLOUD_API_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_API_TOKEN environment variable"
|
||||
|
||||
NEXT_VERSION="$(grep DOKKU_UPDATE_VERSION deb.mk | head -n1 | cut -d'=' -f2 | xargs)"
|
||||
|
||||
fn-build-dokku || log-fail "Error building package"
|
||||
|
||||
fn-extract-package "dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
|
||||
fn-extract-package "dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
|
||||
fn-publish-package "$RELEASE" "deb" "dokku-update_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
|
||||
fn-publish-package "$RELEASE" "rpm" "dokku-update-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
171
contrib/release-plugin
Executable file
171
contrib/release-plugin
Executable file
@@ -0,0 +1,171 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXX")"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log info formatter"
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
log-error() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log error formatter"
|
||||
echo "! $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
# shellcheck disable=SC2034
|
||||
declare desc="Log fail formatter"
|
||||
log-error "$*"
|
||||
exit -1
|
||||
}
|
||||
|
||||
fn-github-download-release() {
|
||||
declare REPO_NAME="$1" VERSION="$2"
|
||||
|
||||
if [[ -n "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
curl -L "https://api.github.com/repos/${REPO_NAME}/tarball/${VERSION}?access_token=${DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN}"
|
||||
else
|
||||
curl -L "https://api.github.com/repos/${REPO_NAME}/tarball/${VERSION}"
|
||||
fi
|
||||
}
|
||||
|
||||
fn-replace-version() {
|
||||
declare desc="Replaces the version within a file"
|
||||
local CURRENT_VERSION="$1"
|
||||
local NEXT_VERSION="$2"
|
||||
local FILENAME="$3"
|
||||
sed -i.bak "s/${CURRENT_VERSION//./\.}/$NEXT_VERSION/g" "$FILENAME" && rm "$FILENAME.bak"
|
||||
git add "$FILENAME"
|
||||
}
|
||||
|
||||
fn-require-bin() {
|
||||
declare desc="Checks that a binary exists"
|
||||
declare BINARY="$1"
|
||||
if ! command -v "$BINARY" &>/dev/null; then
|
||||
log-fail "Missing ${BINARY}, please install it"
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
local RELEASE="$1"
|
||||
local CURRENT_VERSION FILENAME NEXT_VERSION ORG_REPO_NAME REPO_NAME major minor patch
|
||||
|
||||
if [[ -z "$RELEASE" ]]; then
|
||||
cat<<'EOF'
|
||||
requirements:
|
||||
|
||||
- this is run in a plugin folder
|
||||
- a `plugin.toml` exists
|
||||
- the plugin is versioned via git
|
||||
|
||||
usage:
|
||||
|
||||
# the following commands make these assumptions
|
||||
# - the plugin's folder name is dokku-example, as is the remote repository
|
||||
# - the current version is `0.0.1` in the `plugin.toml`
|
||||
|
||||
# create the alias
|
||||
alias release-dokku-plugin="path/to/dokku/contrib/release-plugin"
|
||||
|
||||
# make a specific kind of release
|
||||
release-dokku-plugin patch # creates a 0.0.2 release
|
||||
release-dokku-plugin minor # creates a 0.1.0 release
|
||||
release-dokku-plugin major # creates a 1.0.0 release
|
||||
|
||||
# release private plugins as tarballs to S3
|
||||
# note that the plugin *must* exist on github for this to work
|
||||
export DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN="some-github-token"
|
||||
export DOKKU_PLUGIN_S3_BUCKET="example"
|
||||
export DOKKU_PLUGIN_S3_PATH="some/path"
|
||||
# will upload the versioned tarball url to s3://example/some/path/dokku-plugin-name-0.0.1.tar.gz
|
||||
release-dokku-plugin patch
|
||||
EOF
|
||||
return
|
||||
fi
|
||||
|
||||
fn-require-bin "git"
|
||||
|
||||
if [[ "$CI" != "true" ]] && [[ -z "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
log-info "You are running this without a DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN environment variable."
|
||||
log-info "Doing so disables uploading releases to S3, which may be necessary for installing private plugins."
|
||||
while true; do
|
||||
read -rp "Do you wish to continue? " yn
|
||||
case $yn in
|
||||
[Yy]* ) break;;
|
||||
[Nn]* ) exit;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
fn-require-bin "aws"
|
||||
fn-require-bin "curl"
|
||||
if [[ -z "$DOKKU_PLUGIN_S3_BUCKET" ]]; then
|
||||
log-fail "No DOKKU_PLUGIN_S3_BUCKET environment variable set"
|
||||
fi
|
||||
if [[ -z "$DOKKU_PLUGIN_S3_PATH" ]]; then
|
||||
log-fail "No DOKKU_PLUGIN_S3_PATH environment variable set"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ! -f plugin.toml ]]; then
|
||||
log-error "No plugin.toml found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ ! -d .git ]]; then
|
||||
log-error "No git repository found"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CURRENT_VERSION=$(grep version plugin.toml | cut -d '"' -f2)
|
||||
major=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[1]}')
|
||||
minor=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[2]}')
|
||||
patch=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[3]}')
|
||||
|
||||
if [[ "$RELEASE" == "major" ]]; then
|
||||
major=$((major + 1));
|
||||
minor="0"
|
||||
patch="0"
|
||||
elif [[ "$RELEASE" == "minor" ]]; then
|
||||
minor=$((minor + 1));
|
||||
patch="0"
|
||||
elif [[ "$RELEASE" == "patch" ]]; then
|
||||
patch=$((patch + 1));
|
||||
else
|
||||
log-error "Invalid release type specified"
|
||||
return 1
|
||||
fi
|
||||
NEXT_VERSION="${major}.${minor}.${patch}"
|
||||
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" plugin.toml
|
||||
git add plugin.toml
|
||||
git commit -m "Release ${NEXT_VERSION}"
|
||||
git tag "${NEXT_VERSION}"
|
||||
git push --tags origin master
|
||||
git fetch
|
||||
|
||||
ORG_REPO_NAME="$(git remote -v | grep origin | HEAD -n1 | cut -d':' -f2 | cut -d'.' -f1)"
|
||||
REPO_NAME="$(echo "$ORG_REPO_NAME" | cut -d'/' -f2)"
|
||||
FILENAME="${REPO_NAME}-${NEXT_VERSION}.tar.gz"
|
||||
|
||||
if [[ -n "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
DOKKU_PLUGIN_S3_BUCKET="${DOKKU_PLUGIN_S3_BUCKET%/}"
|
||||
DOKKU_PLUGIN_S3_PATH="${DOKKU_PLUGIN_S3_PATH%/}"
|
||||
if [[ "$DOKKU_PLUGIN_S3_PATH" != "/" ]]; then
|
||||
DOKKU_PLUGIN_S3_PATH="${DOKKU_PLUGIN_S3_PATH}/"
|
||||
fi
|
||||
|
||||
fn-github-download-release "$ORG_REPO_NAME" "$NEXT_VERSION" > "${TMP_WORK_DIR}/${FILENAME}"
|
||||
aws s3 cp "${TMP_WORK_DIR}/${FILENAME}" "s3://${DOKKU_PLUGIN_S3_BUCKET}/${DOKKU_PLUGIN_S3_PATH}${FILENAME}" --acl public-read
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
19
contrib/update-build.Dockerfile
Normal file
19
contrib/update-build.Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM ubuntu:14.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
RUN make deb-dokku-update rpm-dokku-update
|
||||
|
||||
RUN mkdir -p /data \
|
||||
&& cp /tmp/*.deb /data \
|
||||
&& cp /tmp/*.rpm /data \
|
||||
&& ls -lha /data/
|
||||
58
deb.mk
58
deb.mk
@@ -1,6 +1,6 @@
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.3.26
|
||||
HEROKUISH_VERSION ?= 0.3.34
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -8,6 +8,12 @@ DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lif
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
DOKKU_UPDATE_DESCRIPTION = 'Binary that handles updating Dokku and related systems'
|
||||
DOKKU_UPDATE_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_UPDATE_VERSION ?= 0.1.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
define PLUGN_DESCRIPTION
|
||||
Hook system that lets users extend your application with plugins
|
||||
Plugin triggers are simply scripts that are executed by the system.
|
||||
@@ -26,7 +32,7 @@ Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.6.0
|
||||
SSHCOMMAND_VERSION ?= 0.7.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
@@ -52,7 +58,7 @@ export PLUGN_DESCRIPTION
|
||||
export SIGIL_DESCRIPTION
|
||||
export SSHCOMMAND_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-plugn deb-setup deb-sshcommand deb-sigil
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
@@ -64,11 +70,11 @@ install-from-deb:
|
||||
|
||||
@echo "--> Installing dokku"
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2> /dev/null || echo "trusty") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil deb-dokku-update
|
||||
mv /tmp/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
@@ -86,16 +92,11 @@ deb-herokuish:
|
||||
@echo "-> Creating deb files"
|
||||
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
||||
@echo "sleep 5" >> /tmp/tmp/post-install
|
||||
@echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install
|
||||
@echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install
|
||||
@echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install
|
||||
@echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
|
||||
@echo "fi" >> /tmp/tmp/post-install
|
||||
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
||||
@echo 'if [[ ! -z $${http_proxy+x} ]]; then BUILDARGS="--build-args http_proxy=$$http_proxy"; fi' >> /tmp/tmp/post-install
|
||||
@echo 'if [[ ! -z $${https_proxy+x} ]]; then BUILDARGS="$$BUILDARGS --build-args https_proxy=$$https_proxy"; fi' >> /tmp/tmp/post-install
|
||||
@echo 'if [[ ! -z $${http_proxy+x} ]]; then BUILDARGS="--build-arg http_proxy=$$http_proxy"; fi' >> /tmp/tmp/post-install
|
||||
@echo 'if [[ ! -z $${https_proxy+x} ]]; then BUILDARGS="$$BUILDARGS --build-arg https_proxy=$$https_proxy"; fi' >> /tmp/tmp/post-install
|
||||
@echo 'if [[ ! -z $${BUILDARGS+x} ]]; then echo Adding proxy settings to docker build: $$BUILDARGS; fi' >> /tmp/tmp/post-install
|
||||
@echo 'sudo docker build $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null' >> /tmp/tmp/post-install
|
||||
@echo 'sudo docker build --pull $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish' >> /tmp/tmp/post-install
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" --branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null
|
||||
@@ -106,7 +107,7 @@ deb-herokuish:
|
||||
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
|
||||
|
||||
@echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1)' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-dokku:
|
||||
@@ -124,8 +125,12 @@ deb-dokku:
|
||||
cp dokku /tmp/build/usr/bin
|
||||
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
|
||||
find . -name ".DS_Store" -depth -exec rm {} \;
|
||||
$(MAKE) go-build
|
||||
cp common.mk /tmp/build/var/lib/dokku/core-plugins/common.mk
|
||||
cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do cd /tmp/build/var/lib/dokku/core-plugins/available/$$plugin && if [ -e Makefile ]; then $(MAKE) src-clean; fi; done
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
|
||||
rm /tmp/build/var/lib/dokku/core-plugins/common.mk
|
||||
$(MAKE) help2man
|
||||
$(MAKE) addman
|
||||
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1
|
||||
@@ -140,16 +145,31 @@ endif
|
||||
ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak
|
||||
endif
|
||||
rm /tmp/build/DEBIAN/lintian-overrides
|
||||
mv debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
|
||||
rm -f /tmp/build/DEBIAN/lintian-overrides
|
||||
cp debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
|
||||
ifdef DOKKU_GIT_REV
|
||||
echo "$(DOKKU_GIT_REV)" > /tmp/build/var/lib/dokku/GIT_REV
|
||||
else
|
||||
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
|
||||
endif
|
||||
sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control
|
||||
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control && rm /tmp/build/DEBIAN/control.bak
|
||||
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
deb-dokku-update:
|
||||
rm -rf /tmp/dokku-update*.deb dokku-update*.deb
|
||||
echo "${DOKKU_UPDATE_VERSION}" > contrib/dokku-update-version
|
||||
sudo fpm -t deb -s dir -n dokku-update \
|
||||
--version $(DOKKU_UPDATE_VERSION) \
|
||||
--architecture $(DOKKU_UPDATE_ARCHITECTURE) \
|
||||
--package $(DOKKU_UPDATE_PACKAGE_NAME) \
|
||||
--depends 'dokku' \
|
||||
--url "https://github.com/$(DOKKU_UPDATE_REPO_NAME)" \
|
||||
--description $(DOKKU_UPDATE_DESCRIPTION) \
|
||||
--license 'MIT License' \
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-plugn:
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
|
||||
|
||||
8
debian/control
vendored
8
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.8.2
|
||||
Version: 0.11.6
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee, software-properties-common, python-software-properties
|
||||
Recommends: herokuish (>= 0.3.4), parallel
|
||||
Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-io (>= 1.9.1) | docker-ce | docker-ee, software-properties-common, python-software-properties | python3-software-properties, rsyslog
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
|
||||
9
debian/lintian-overrides
vendored
9
debian/lintian-overrides
vendored
@@ -1,3 +1,12 @@
|
||||
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:87
|
||||
dokku: changelog-file-missing-in-native-package
|
||||
dokku: statically-linked-binary
|
||||
dokku: unstripped-binary-or-object
|
||||
|
||||
# The Go compiler is currently unable to produce read-only relocations
|
||||
# (it produces static binaries).
|
||||
dokku: hardening-no-relro
|
||||
|
||||
# Built golang binaries link to libc
|
||||
dokku: missing-dependency-on-libc
|
||||
|
||||
20
debian/postinst
vendored
20
debian/postinst
vendored
@@ -6,6 +6,11 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
if [[ -r /etc/defaults/dokku ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/defaults/dokku
|
||||
fi
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
@@ -35,7 +40,7 @@ case "$1" in
|
||||
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/data
|
||||
chown dokku:dokku ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
@@ -100,12 +105,15 @@ case "$1" in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
rm -f "${DOKKU_ROOT}/VHOST"
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
|
||||
2
debian/postrm
vendored
2
debian/postrm
vendored
@@ -24,6 +24,8 @@ main() {
|
||||
(nginx -t && service nginx reload) || true
|
||||
|
||||
if [[ "$1" == "purge" ]]; then
|
||||
rm -f /etc/nginx/conf.d/dokku.conf
|
||||
rm -f /etc/nginx/conf.d/dokku-installer.conf
|
||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||
rm -f ${DOKKU_ROOT}/.ssh/authorized_keys ${DOKKU_ROOT}/.sshcommand
|
||||
rm -f ${DOKKU_ROOT}/ENV ${DOKKU_ROOT}/HOSTNAME ${DOKKU_ROOT}/VERSION
|
||||
|
||||
@@ -26,7 +26,7 @@ dokku postgres:import [db_name] < [db_name].dump
|
||||
|
||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
|
||||
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more details.
|
||||
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
@@ -20,40 +20,15 @@ For dockerfile apps, place `app.json` in the configured `WORKDIR` directory; oth
|
||||
|
||||
### Example app.json
|
||||
|
||||
> NOTE: Only the `scripts.dokku.predeploy` and `scripts.dokku.postdeploy` tasks are supported by Dokku at this time. All other fields will be ignored and can be omitted.
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "barebones nodejs",
|
||||
"description": "A barebones Node.js app using Express 4.",
|
||||
"keywords": [
|
||||
"nodejs",
|
||||
"express"
|
||||
],
|
||||
"repository": "https://github.com/michaelshobbs/node-js-sample",
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test",
|
||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"SECRET_TOKEN": {
|
||||
"description": "A secret key for verifying the integrity of signed cookies.",
|
||||
"value": "secret"
|
||||
},
|
||||
"WEB_CONCURRENCY": {
|
||||
"description": "The number of processes to run.",
|
||||
"generator": "echo 5"
|
||||
}
|
||||
},
|
||||
"image": "gliderlabs/herokuish",
|
||||
"addons": [
|
||||
"dokku-postgres",
|
||||
"dokku-redis"
|
||||
],
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-nodejs"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@@ -28,7 +28,7 @@ Dokku deploys your application in multiple "phases" and the `docker-options` plu
|
||||
|
||||
### Add Docker options
|
||||
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/dokku/deployment/one-off-processes/):
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/docs/deployment/one-off-processes.md):
|
||||
|
||||
```shell
|
||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||
|
||||
@@ -36,10 +36,8 @@ 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[129337]: INVOKED: bind-external-ip( pythonapp )
|
||||
Jul 3 16:10:24 dokku.me dokku[129451]: INVOKED: check-deploy( pythonapp 6274ced0d4be11af4490cd18abaf77cdd593f025133f403d984e80d86a39acec web 5000 10.0.16.80 )
|
||||
Jul 3 16:10:35 dokku.me dokku[129561]: INVOKED: docker-args-deploy( pythonapp )
|
||||
Jul 3 16:10:35 dokku.me dokku[129649]: INVOKED: bind-external-ip( pythonapp )
|
||||
Jul 3 16:10:36 dokku.me dokku[129760]: INVOKED: check-deploy( pythonapp ac88a56ee4161ff37e4b92d1498c3eadc91f0aa7c8b81b44fc077e2a51d54cc0 worker )
|
||||
Jul 3 16:10:46 dokku.me dokku[129851]: INVOKED: post-deploy( pythonapp )
|
||||
Jul 3 16:10:46 dokku.me dokku[129945]: INVOKED: nginx-pre-reload( pythonapp )
|
||||
@@ -56,29 +54,28 @@ dokku events:list
|
||||
|
||||
```
|
||||
=====> Events currently logged
|
||||
docker-args-build
|
||||
pre-delete
|
||||
post-deploy
|
||||
receive-app
|
||||
pre-release-buildpack
|
||||
nginx-pre-reload
|
||||
docker-args-deploy
|
||||
post-build-buildpack
|
||||
post-domains-update
|
||||
post-release-dockerfile
|
||||
check-deploy
|
||||
git-pre-pull
|
||||
git-post-pull
|
||||
nginx-hostname
|
||||
bind-external-ip
|
||||
pre-deploy
|
||||
post-delete
|
||||
dependencies
|
||||
pre-build-buildpack
|
||||
docker-args-build
|
||||
docker-args-deploy
|
||||
docker-args-run
|
||||
pre-build-dockerfile
|
||||
post-release-buildpack
|
||||
git-post-pull
|
||||
git-pre-pull
|
||||
nginx-hostname
|
||||
nginx-pre-reload
|
||||
post-build-buildpack
|
||||
post-build-dockerfile
|
||||
post-delete
|
||||
post-deploy
|
||||
post-domains-update
|
||||
post-release-buildpack
|
||||
post-release-dockerfile
|
||||
pre-build-buildpack
|
||||
pre-build-dockerfile
|
||||
pre-delete
|
||||
pre-deploy
|
||||
pre-release-buildpack
|
||||
pre-release-dockerfile
|
||||
receive-app
|
||||
update
|
||||
```
|
||||
```
|
||||
@@ -14,9 +14,19 @@ storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
|
||||
> The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy/run phase.
|
||||
|
||||
## Ideology and Background
|
||||
The storage plugin supports the following mount points:
|
||||
|
||||
The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
- explicit paths that exist on the host
|
||||
- docker volumes
|
||||
|
||||
There are a few caveats to using the persistent storage plugin:
|
||||
|
||||
- Using implicit paths that do not exist are no longer supported, and actually deprecated in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0). When you specify a persistent storage mount, the host directory is **not** autocreated by either Dokku or Docker.
|
||||
- We recommend using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts, and we create this on Dokku installation.
|
||||
- Mounts are only available at run and deploy times, and you **must** redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
- When a directory is mounted, any existing files within the container will be overwritten. If you are writing assets during the build process and then replace the directory with a mount, those files will no longer exist. This is a Docker limitation.
|
||||
- Paths are mounted within the container at the root of the disk - `/` - and are **not** relative to `/app` (for buildpacks deploys) or the `WORKDIR` (for Dockerfile/Docker images).
|
||||
- For applications using buildpack deploys, the host directory should be owned by the user and group id `32767`. This is due to how permissions within Herokuish - which builds the Docker images - works. For Dockerfile or Docker image deployments, please use the user and group id which corresponds to the one running the process within the container.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -30,7 +40,7 @@ dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/dokku/deployment/process-management) for more information.
|
||||
[process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild app-name
|
||||
@@ -45,7 +55,8 @@ mkdir -p /var/lib/dokku/data/storage/node-js-app
|
||||
# ensure the proper user has access to this directory
|
||||
chown -R dokku:dokku /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# as of 0.7.x, you should chown using the `32767` user and group id
|
||||
# as of 0.7.x, you should chown using the `32767` user and group id for buildpack deploys
|
||||
# For dockerfile deploys, substitute the user and group id in use within the image
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
|
||||
@@ -31,30 +31,30 @@ dokku plugin
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.8.2 enabled dokku core standard plugin
|
||||
20_events 0.8.2 enabled dokku core events logging plugin
|
||||
apps 0.8.2 enabled dokku core apps plugin
|
||||
build-env 0.8.2 enabled dokku core build-env plugin
|
||||
certs 0.8.2 enabled dokku core certificate management plugin
|
||||
checks 0.8.2 enabled dokku core checks plugin
|
||||
common 0.8.2 enabled dokku core common plugin
|
||||
config 0.8.2 enabled dokku core config plugin
|
||||
docker-options 0.8.2 enabled dokku core docker-options plugin
|
||||
domains 0.8.2 enabled dokku core domains plugin
|
||||
enter 0.8.2 enabled dokku core enter plugin
|
||||
git 0.8.2 enabled dokku core git plugin
|
||||
logs 0.8.2 enabled dokku core logs plugin
|
||||
named-containers 0.8.2 enabled dokku core named containers plugin
|
||||
nginx-vhosts 0.8.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.8.2 enabled dokku core plugin plugin
|
||||
proxy 0.8.2 enabled dokku core proxy plugin
|
||||
ps 0.8.2 enabled dokku core ps plugin
|
||||
repo 0.8.2 enabled dokku core repo plugin
|
||||
shell 0.8.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.8.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.8.2 enabled dokku core storage plugin
|
||||
tags 0.8.2 enabled dokku core tags plugin
|
||||
tar 0.8.2 enabled dokku core tar plugin
|
||||
00_dokku-standard 0.11.6 enabled dokku core standard plugin
|
||||
20_events 0.11.6 enabled dokku core events logging plugin
|
||||
apps 0.11.6 enabled dokku core apps plugin
|
||||
build-env 0.11.6 enabled dokku core build-env plugin
|
||||
certs 0.11.6 enabled dokku core certificate management plugin
|
||||
checks 0.11.6 enabled dokku core checks plugin
|
||||
common 0.11.6 enabled dokku core common plugin
|
||||
config 0.11.6 enabled dokku core config plugin
|
||||
docker-options 0.11.6 enabled dokku core docker-options plugin
|
||||
domains 0.11.6 enabled dokku core domains plugin
|
||||
enter 0.11.6 enabled dokku core enter plugin
|
||||
git 0.11.6 enabled dokku core git plugin
|
||||
logs 0.11.6 enabled dokku core logs plugin
|
||||
named-containers 0.11.6 enabled dokku core named containers plugin
|
||||
nginx-vhosts 0.11.6 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.11.6 enabled dokku core plugin plugin
|
||||
proxy 0.11.6 enabled dokku core proxy plugin
|
||||
ps 0.11.6 enabled dokku core ps plugin
|
||||
repo 0.11.6 enabled dokku core repo plugin
|
||||
shell 0.11.6 enabled dokku core shell plugin
|
||||
ssh-keys 0.11.6 enabled dokku core ssh-keys plugin
|
||||
storage 0.11.6 enabled dokku core storage plugin
|
||||
tags 0.11.6 enabled dokku core tags plugin
|
||||
tar 0.11.6 enabled dokku core tar plugin
|
||||
```
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
@@ -1,206 +0,0 @@
|
||||
# Proxy Management
|
||||
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy:disable <app> # Disable proxy for app
|
||||
proxy:enable <app> # Enable proxy for app
|
||||
proxy:ports <app> # List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
|
||||
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Usage
|
||||
|
||||
### Container network interface binding
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. `0.0.0.0`) and your app container will be directly accessible by other hosts on your network.
|
||||
|
||||
> If a proxy is disabled, Dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
|
||||
By way of example, in the default case, each container is bound to the docker interface:
|
||||
|
||||
```shell
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1
|
||||
```
|
||||
|
||||
As such, the container's IP address will be an internal IP, and thus it is only accessible on the host itself:
|
||||
|
||||
```
|
||||
docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
|
||||
```
|
||||
|
||||
```
|
||||
172.17.0.6
|
||||
```
|
||||
|
||||
However, you can disable the internal proxying via the `proxy:disable` command so that it will listen on the host's IP address:
|
||||
|
||||
```shell
|
||||
dokku proxy:disable node-js-app
|
||||
|
||||
# container bound to all interfaces
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1
|
||||
```
|
||||
|
||||
### Displaying proxy reports about an app
|
||||
|
||||
> New as of 0.8.1
|
||||
|
||||
You can get a report about the app's proxy status using the `proxy:report` command:
|
||||
|
||||
```shell
|
||||
dokku proxy:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000 https:443:5000
|
||||
=====> python-sample proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000
|
||||
=====> ruby-sample proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku proxy:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000 https:443:5000
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku proxy:report node-js-app --proxy-type
|
||||
```
|
||||
|
||||
### Proxy port mapping
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
||||
|
||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Port mappings for node-js-app
|
||||
-----> scheme host port container port
|
||||
http 80 5000
|
||||
```
|
||||
|
||||
The above application is listening on the host's port `80`, which we can test via curl:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
There are cases where we may wish for the service to be listening on more than one port, such as port 8080. Normally, this would not be possible:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
||||
```
|
||||
|
||||
However, we can use the `proxy:ports-add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-add node-js-app http:8080:5000
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting config vars
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
We can now test that port 80 still responds properly:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
And our new listening port of `8080` also works:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
You can also remove a port mapping that is no longer necessary:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80:5000
|
||||
```
|
||||
|
||||
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
||||
|
||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
|
||||
|
||||
#### Proxy Port Scheme
|
||||
|
||||
The proxy port scheme is as follows:
|
||||
|
||||
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
||||
|
||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports both the `http` and `https` schemes.
|
||||
|
||||
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
||||
|
||||
To change the proxy implementation in use for an application, use the `proxy:set` command:
|
||||
|
||||
```shell
|
||||
# no validation will be performed against
|
||||
# the specified proxy implementation
|
||||
dokku proxy:set node-js-app nginx
|
||||
```
|
||||
13
docs/appendices/0.10.0-migration-guide.md
Normal file
13
docs/appendices/0.10.0-migration-guide.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# 0.10.0 Migration Guide
|
||||
|
||||
## PCI Compliance
|
||||
|
||||
By default, Dokku will ship a PCI Compliant nginx configuration. For developers whose users are on older browsers or mobile devices, you may need to ship a custom `nginx.conf.sigil` to enable ciphers for older browsers.
|
||||
|
||||
See the [nginx customization](/docs/configuration/nginx/#customizing-the-nginx-configuration) docs for more details.
|
||||
|
||||
## Nginx Error Pages
|
||||
|
||||
We now ship with nicer error pages by default. You are free to customize your Dokku installation via a custom `nginx.conf.sigil` to change what error pages are displayed in different circumstances.
|
||||
|
||||
See the [nginx customization](/docs/configuration/nginx/#customizing-the-nginx-configuration) docs for more details.
|
||||
@@ -5,11 +5,11 @@
|
||||
- The nginx-vhosts template language is now [sigil](https://github.com/gliderlabs/sigil)
|
||||
- No need to escape literal `$` characters (or other "bash-isms")
|
||||
- Template variables are represented as {{ .VARIABLE_NAME }}
|
||||
- A detailed list of template variables can be found [here](/dokku/configuration/nginx/#available-template-variables)
|
||||
- A detailed list of template variables can be found [here](/docs/configuration/nginx.md#available-template-variables)
|
||||
- A custom nginx-vhosts template must be named `nginx.conf.sigil`
|
||||
- The default path for this custom template is the root of your repo (i.e. `/app` in the container or `WORKDIR` if defined in a dockerfile app)
|
||||
- Dokku no longer looks for this file in `/home/dokku/myapp` on the Dokku server
|
||||
- Check out an example template [here](/dokku/configuration/nginx/)
|
||||
- Check out an example template [here](/docs/configuration/nginx.md)
|
||||
- Support for server-wide SSL certs have been dropped in favor of using the `certs` plugin
|
||||
- `dokku certs:add myapp < certs.tar`
|
||||
- All domains for an SSL-enabled app will be redirected to https by default
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/methods/dockerfiles/#exposed-ports)
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/docs/deployment/methods/dockerfiles.md#exposed-ports)
|
||||
- Note that nginx will proxy the same port numbers to listen publicly
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/advanced-usage/proxy-management/) with `dokku proxy:disable myapp`
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/docs/advanced-usage/proxy-management.md) with `dokku proxy:disable myapp`
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
- `DOKKU_CHECKS_ENABLED` has been migrated to `DOKKU_CHECKS_SKIPPED`
|
||||
- `DOKKU_CHECKS_DISABLED` is now a thing
|
||||
- The values for the above can be a comma-separated list of process-types or the literal string `_all_`
|
||||
- See the [updated `checks`](/dokku/deployment/zero-downtime-deploys/) docs for more info
|
||||
- See the [updated `checks`](/docs/deployment/zero-downtime-deploys.md) docs for more info
|
||||
|
||||
## Proxy port mapping
|
||||
|
||||
- You can now configure host -> container proxy port mappings
|
||||
- The UI is handled by the [proxy](/dokku/advanced-usage/proxy-management/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- The UI is handled by the [proxy](/docs/advanced-usage/proxy-management.md) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- Default port mappings
|
||||
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
||||
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/dokku/advanced-usage/proxy-management/) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/docs/advanced-usage/proxy-management.md) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
||||
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
## Persistent Storage
|
||||
|
||||
We should now properly handle file ownership for mounted directories. This was enhanced in 0.7.1. See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
|
||||
We should now properly handle file ownership for mounted directories. This was enhanced in 0.7.1. See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more details.
|
||||
|
||||
## Restart Policies
|
||||
|
||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/dokku/deployment/process-management/#restart-policies) for more details.
|
||||
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/docs/deployment/process-management.md#restart-policies) for more details.
|
||||
|
||||
## SSH Keys
|
||||
|
||||
Dokku now has an `ssh-keys` plugin that can be used to manage ssh keys for the `dokku` user on the host operating system. See the [user management documentation](/dokku/deployment/user-management/) for more details.
|
||||
Dokku now has an `ssh-keys` plugin that can be used to manage ssh keys for the `dokku` user on the host operating system. See the [user management documentation](/docs/deployment/user-management.md) for more details.
|
||||
|
||||
19
docs/appendices/0.8.0-migration-guide.md
Normal file
19
docs/appendices/0.8.0-migration-guide.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 0.8.0 Migration Guide
|
||||
|
||||
## Domain Management
|
||||
|
||||
You can now set global and app domains via `domains:set` and `domains:set-global`. See the [domains documentation](/docs/configuration/domains/) for more details.
|
||||
|
||||
## Plugin Uninstallation
|
||||
|
||||
A new `uninstall` plugin trigger was introduced. This functionality may be in use for newer plugins, so be aware that older Dokku versions may require manual cleanup.
|
||||
|
||||
See the [uninstall trigger documentation](/docs/development/plugin-triggers/#uninstall) for implementation instructions.
|
||||
|
||||
## Deployment Tasks
|
||||
|
||||
Should a pre or post deployment task fail, we now fail the entire deploy.
|
||||
|
||||
## Nginx HTTP2 Support
|
||||
|
||||
Due to bugs in Nginx, the minimum version for HTTP2 is now 1.11.5.
|
||||
12
docs/appendices/0.9.0-migration-guide.md
Normal file
12
docs/appendices/0.9.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 0.9.0 Migration Guide
|
||||
|
||||
## Golang Migration
|
||||
|
||||
There is an ongoing migration to rewrite Dokku in Golang. The reasons are beyond the scope of this document, but this may impact any patches you have for Dokku. As of 0.9.0, only the `repo` plugin is in Golang.
|
||||
|
||||
The following shall remain true, regardless of the state of our rewrite:
|
||||
|
||||
- You will be able to write custom plugins in any language.
|
||||
- You will be able to enable or disable core plugins.
|
||||
- `plugn` will continue to be used for executing plugin triggers.
|
||||
- We will provide bash wrappers that can be sourced to execute core functionality that is implemented in golang.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.8.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.11.6\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -35,13 +35,13 @@ h1 {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -169,7 +169,8 @@ h1 {
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 2.5em;
|
||||
padding: 2.5em 0;
|
||||
padding-top: 2.5em;
|
||||
padding-bottom: 2.5em;
|
||||
text-align: center
|
||||
}
|
||||
.slack-channel .inline-container {
|
||||
@@ -600,6 +601,11 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
height: auto
|
||||
}
|
||||
}
|
||||
|
||||
.button.slack-button > img {
|
||||
width: inherit;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.col-md-offset-right-2 {
|
||||
margin-right: 20.666667%;
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
"0.5.8",
|
||||
"0.6.5",
|
||||
"0.7.2",
|
||||
"0.8.2"
|
||||
"0.8.2",
|
||||
"0.9.4",
|
||||
"0.10.5",
|
||||
"0.11.6"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ Let's take a quick look at the current Dokku nginx plugin that's shipped with Do
|
||||
|
||||
## Installing a plugin
|
||||
|
||||
[See the plugin management documentation](/dokku/advanced-usage/plugin-management/).
|
||||
[See the plugin management documentation](/docs/advanced-usage/plugin-management.md).
|
||||
|
||||
## Creating your own plugin
|
||||
|
||||
[See the full documentation](/dokku/development/plugin-creation/).
|
||||
[See the full documentation](/docs/development/plugin-creation.md).
|
||||
|
||||
## Official Plugins (Beta)
|
||||
|
||||
@@ -89,15 +89,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[Kloadut]: https://github.com/Kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[m0rth1um]: https://github.com/m0rth1um
|
||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
||||
[matto1990]: https://github.com/matto1990
|
||||
[mbreit]: https://github.com/mbreit
|
||||
[mbriskar]: https://github.com/mbriskar
|
||||
[michaelshobbs]: https://github.com/michaelshobbs
|
||||
[mikecsh]: https://github.com/mikecsh
|
||||
[mikexstudios]: https://github.com/mikexstudios
|
||||
[mimischi]: https://github.com/mimischi
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[motin]: https://github.com/motin
|
||||
[mrname]: https://github.com/mrname
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
[nickcharlton]: https://github.com/nickcharlton
|
||||
@@ -150,6 +154,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [ElasticMQ (SQS compatible)](https://github.com/cu12/dokku-elasticmq) | [cu12][] | 0.5.0+ |
|
||||
| [VerneMQ (MQTT Broker)](https://github.com/SpinifexGroup/dokku-vernemq) | [mrname][] | 0.4.0+ |
|
||||
|
||||
#### Other
|
||||
|
||||
@@ -172,14 +177,16 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Docker Direct](https://github.com/josegonzalez/dokku-docker-direct) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dockerfile custom path](https://github.com/mimischi/dokku-dockerfile) | [mimischi][] | 0.8.0+ |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/dokku-community/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.4.0+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
| [Monit (Health Checks)](https://github.com/mbreit/dokku-monit) | [mbreit][] | 0.8.0+ |
|
||||
| [Nuke Containers](https://github.com/josegonzalez/dokku-nuke) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Open App Ports](https://github.com/josegonzalez/dokku-ports) | [josegonzalez][] | 0.3.x |
|
||||
| [Proctype Filter](https://github.com/michaelshobbs/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
||||
@@ -213,6 +220,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Syslog](https://github.com/michaelshobbs/dokku-syslog) | [michaelshobbs][] | 0.10.4+ |
|
||||
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
@@ -220,6 +228,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | 0.3.x |
|
||||
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [Telegram Notifications](https://github.com/m0rth1um/dokku-telegram) | [m0rth1um][] | 0.4.0+ |
|
||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/dokku-community/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
|
||||
|
||||
75
docs/community/tutorials/run-on-external-volume.md
Normal file
75
docs/community/tutorials/run-on-external-volume.md
Normal file
@@ -0,0 +1,75 @@
|
||||
# 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.
|
||||
|
||||
## 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 /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
|
||||
```
|
||||
@@ -15,7 +15,7 @@ domains:set <app> <domain> [<domain> ...] # Set domains for app
|
||||
domains:set-global <domain> [<domain> ...] # Set global domain names
|
||||
```
|
||||
|
||||
> Adding a domain before deploying an application will result in port mappings being set. This may cause issues for applications that use non-standard ports, as those will not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
> Adding a domain before deploying an application will result in port mappings being set. This may cause issues for applications that use non-standard ports, as those will not be automatically detected. Please refer to the [proxy documentation](/docs/advanced-usage/proxy-management.md) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
@@ -25,9 +25,9 @@ Applications typically have the following structure for their hostname:
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-global`. This value is used as a default TLD for all applications on a host.
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial dokku configuration. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
If a FQDN such as `other.tld` is used as the application name, the global virtualhost will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
|
||||
|
||||
@@ -5,10 +5,11 @@ Typically an application will require some configuration to run properly. Dokku
|
||||
The `config` plugin provides the following commands to manage your variables:
|
||||
|
||||
```
|
||||
config (<app>|--global) Display all global or app-specific config vars
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
config (<app>|--global) Display all global or app-specific config vars
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
config:export [--format=FORMAT] [--merged] (<app>|--global) Export all global or app-specific configuration
|
||||
```
|
||||
|
||||
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
@@ -23,10 +24,15 @@ You can set multiple environment variables at once:
|
||||
dokku config:set node-js-app ENV=prod COMPILE_ASSETS=1
|
||||
```
|
||||
|
||||
When setting variables with whitespaces, you need to escape them:
|
||||
> Note: Whitespace and special characters get tricky. If you are using dokku locally you don't need to do any special escaping. If you are using dokku over ssh you will need to backslash-escape spaces:
|
||||
```shell
|
||||
dokku config:set node-js-app KEY="VAL\ WITH\ SPACES"
|
||||
```
|
||||
|
||||
Dokku can also read base64 encoded values. That's the easiest way to set a value with newlines or spaces. To set a value with newlines you need to base64 encode it first and pass the `--encoded` flag:
|
||||
|
||||
```shell
|
||||
dokku config:set node-js-app KEY=\"VAL\ WITH\ SPACES\"
|
||||
dokku config:set --encoded node-js-app KEY="$(base64 ~/.ssh/id_rsa)"
|
||||
```
|
||||
|
||||
When setting or unsetting environment variables, you may wish to avoid an application restart. This is useful when developing plugins or when setting multiple environment variables in a scripted manner. To do so, use the `--no-restart` flag:
|
||||
@@ -35,25 +41,83 @@ When setting or unsetting environment variables, you may wish to avoid an applic
|
||||
dokku config:set --no-restart node-js-app ENV=prod
|
||||
```
|
||||
|
||||
If you wish to have the variables output in an `eval`-compatible form, you can use the `--export` flag:
|
||||
If you wish to have the variables output in an `eval`-compatible form, you can use the `config:export` command
|
||||
|
||||
```shell
|
||||
dokku config node-js-app --export
|
||||
dokku config:export node-js-app
|
||||
# outputs variables in the form:
|
||||
#
|
||||
# export ENV='prod'
|
||||
# export COMPILE_ASSETS='1'
|
||||
|
||||
# source in all the node-js-app app environment variables
|
||||
eval $(dokku config node-js-app --export)
|
||||
eval $(dokku config:export node-js-app)
|
||||
```
|
||||
|
||||
You can also output the variables in a single-line for usage in command-line utilities with the `--shell` flag:
|
||||
You can control the format of the exported variables with the `--format` flag.
|
||||
`--format=shell` will output the variables in a single-line for usage in command-line utilities:
|
||||
|
||||
```shell
|
||||
dokku config node-js-app --shell
|
||||
dokku config:export --format shell node-js-app
|
||||
|
||||
# outputs variables in the form:
|
||||
#
|
||||
# ENV='prod' COMPILE_ASSETS='1'
|
||||
```
|
||||
|
||||
## Special Config Variables
|
||||
|
||||
The following list config variables have special meaning and can be set in a variety of ways.
|
||||
|
||||
> Warning: This list is not exhaustive, and may vary from version to version.
|
||||
|
||||
| Name | Default | How to modify | Description |
|
||||
| ------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `DOKKU_ROOT` | `~dokku` | `/etc/environment` | The root directory where dokku will store application repositories, as well as certain configuration files. |
|
||||
| `DOKKU_IMAGE` | `gliderlabs/herokuish` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The default image to use when building herokuish containers. |
|
||||
| `DOKKU_LIB_ROOT` | `/var/lib/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory where plugins, certain data, and general configuration is stored. |
|
||||
| `PLUGIN_PATH` | `$DOKKU_LIB_ROOT/plugins"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The top-level directory where plugins are stored. |
|
||||
| `PLUGIN_AVAILABLE_PATH` | `$PLUGIN_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that holds all available plugins, including core. |
|
||||
| `PLUGIN_ENABLED_PATH` | `$PLUGIN_PATH/enabled"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that holds all enabled plugins, including core. |
|
||||
| `PLUGIN_CORE_PATH` | `$DOKKU_LIB_ROOT/core-plugins"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all core plugins. |
|
||||
| `PLUGIN_CORE_AVAILABLE_PATH` | `$PLUGIN_CORE_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all available core plugins. |
|
||||
| `PLUGIN_CORE_ENABLED_PATH` | `$PLUGIN_CORE_PATH/enabled"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all enabled core plugins. |
|
||||
| `DOKKU_LOGS_DIR` | `/var/log/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where dokku logs should be written to. |
|
||||
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace on` <br /> `dokku trace false` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
|
||||
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
|
||||
| `DOKKU_APP_SHELL` | `/bin/bash` | `dokku config:set` | Allows users to change the default shell used by Dokku for `dokku enter` and execution of deployment tasks. |
|
||||
| `DOKKU_APP_TYPE` | `herokuish` | Auto-detected by using buildpacks or dockerfile | |
|
||||
| `DOKKU_CHECKS_DISABLED` | none | `dokku checks:disable` | |
|
||||
| `DOKKU_CHECKS_ENABLED` | none | `dokku checks:enable` | |
|
||||
| `DOKKU_CHECKS_SKIPPED` | none | `dokku checks:skip` | |
|
||||
| `DOKKU_CHECKS_WAIT` | `5` | `dokku config:set` | Wait this many seconds for the container to start before running checks.
|
||||
| `DOKKU_CHECKS_TIMEOUT` | `30` | `dokku config:set` | Wait this many seconds for each response before marking it as a failure.
|
||||
| `DOKKU_CHECKS_ATTEMPTS` | `5` | `dokku config:set` | Number of retries for to run for a specific check before marking it as a failure
|
||||
| `DOKKU_DEFAULT_CHECKS_WAIT` | `10` | `dokku config:set` | 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_DEPLOY_BRANCH` | `master` | `dokku config:set` | Branch to deploy by default. |
|
||||
| `DOKKU_DISABLE_PROXY` | none | `dokku proxy:disable` <br /> `dokku proxy:enable` | Disables the proxy in front of your application, resulting in publicly routing the docker container. |
|
||||
| `DOKKU_DISABLE_ANSI_PREFIX_REMOVAL` | none | `dokku config:set` <br /> `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Disables removal of the ANSI prefix during deploys. Can be used in cases where the client deployer does not understand ansi escape codes. |
|
||||
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
||||
| `DOKKU_DOCKER_STOP_TIMEOUT` | `10` | `dokku config:set` | Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.|
|
||||
| `DOKKU_DOCKERFILE_CMD` | dockerfile cmd | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
||||
| `DOKKU_NGINX_PORT` | automatically assigned | `dokku config:set` | |
|
||||
| `DOKKU_NGINX_SSL_PORT` | automatically assigned | `dokku config:set` | |
|
||||
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |
|
||||
| `DOKKU_SKIP_ALL_CHECKS` | none | `dokku config:set` | |
|
||||
| `DOKKU_SKIP_CLEANUP` | | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | When a deploy is triggered, if this is set to a non-empty value, then old docker containers and images will not be removed. |
|
||||
| `DOKKU_SKIP_DEFAULT_CHECKS` | | `dokku config:set` | |
|
||||
| `DOKKU_SKIP_DEPLOY` | | `dokku config:set` | |
|
||||
| `DOKKU_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. |
|
||||
@@ -15,54 +15,13 @@ nginx:error-logs <app> [-t] # Show the nginx error logs for an appl
|
||||
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:
|
||||
|
||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||
- check it into the root of your app repo for buildpack applications
|
||||
- If using a buildpack application, you __must__ check it into the root of your app repo.
|
||||
- `ADD` it to your dockerfile `WORKDIR`
|
||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
||||
|
||||
> 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`.
|
||||
|
||||
### Example Custom Template
|
||||
|
||||
Use case: add an `X-Served-By` header to requests
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
# set a custom header for requests
|
||||
add_header X-Served-By www-ec2-01;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
> The default template is available [here](https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil), and can be used as a guide for your own, custom `nginx.conf.sigil` file. Please refer to the appropriate template file version for your Dokku version.
|
||||
|
||||
### Available template variables
|
||||
|
||||
@@ -83,104 +42,6 @@ upstream {{ .APP }} {
|
||||
|
||||
> Note: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
|
||||
|
||||
|
||||
### Example HTTP to HTTPS Custom Template
|
||||
Use case: a simple dockerfile app that includes `EXPOSE 80`
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
return 301 https://$host:443$request_uri;
|
||||
}
|
||||
server {
|
||||
listen [::]:443 ssl spdy;
|
||||
listen 443 ssl spdy;
|
||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||
|
||||
keepalive_timeout 70;
|
||||
add_header Alternate-Protocol 443:npn-spdy/2;
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
### Example using new proxy port mapping
|
||||
|
||||
```go
|
||||
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
||||
{{ $port_map_list := $port_map | split ":" }}
|
||||
{{ $scheme := index $port_map_list 0 }}
|
||||
{{ $listen_port := index $port_map_list 1 }}
|
||||
{{ $upstream_port := index $port_map_list 2 }}
|
||||
|
||||
server {
|
||||
listen [::]:{{ $listen_port }};
|
||||
listen {{ $listen_port }};
|
||||
server_name {{ $.NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ $.APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ $.APP }}-error.log;
|
||||
|
||||
location / {
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
|
||||
upstream {{ $.APP }}-{{ $upstream_port }} {
|
||||
{{ range $listeners := $.DOKKU_APP_LISTENERS | split " " }}
|
||||
{{ $listener_list := $listeners | split ":" }}
|
||||
{{ $listener_ip := index $listener_list 0 }}
|
||||
{{ $listener_port := index $listener_list 1 }}
|
||||
server {{ $listener_ip }}:{{ $upstream_port }};{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
### Customizing via configuration files included by the default templates
|
||||
|
||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
@@ -193,45 +54,59 @@ That means you can put additional configuration in separate files, for example t
|
||||
|
||||
```shell
|
||||
mkdir /home/dokku/myapp/nginx.conf.d/
|
||||
echo 'client_max_body_size 50M;' > /home/dokku/myapp/nginx.conf.d/upload.conf
|
||||
echo 'client_max_body_size 50m;' > /home/dokku/myapp/nginx.conf.d/upload.conf
|
||||
chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
|
||||
service nginx reload
|
||||
```
|
||||
|
||||
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
|
||||
|
||||
For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config *within* the container. The following are example contents for your `Procfile`
|
||||
|
||||
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
|
||||
|
||||
Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - would also need to be configured as shown in this example:
|
||||
|
||||
client_max_body_size 50m;
|
||||
location / {
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
Please adjust the `Procfile` and `nginx.conf` file as appropriate.
|
||||
|
||||
## Domains plugin
|
||||
|
||||
See the [domain configuration documentation](/dokku/configuration/domains/).
|
||||
See the [domain configuration documentation](/docs/configuration/domains.md).
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
See the [customizing hostnames documentation](/dokku/configuration/domains/#customizing-hostnames).
|
||||
See the [customizing hostnames documentation](/docs/configuration/domains.md#customizing-hostnames).
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
See the [disabling vhosts documentation](/dokku/configuration/domains/#disabling-vhosts).
|
||||
See the [disabling vhosts documentation](/docs/configuration/domains.md#disabling-vhosts).
|
||||
|
||||
## Default site
|
||||
|
||||
See the [default site documentation](/dokku/configuration/domains/#default-site).
|
||||
See the [default site documentation](/docs/configuration/domains.md#default-site).
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
See the [load balancer documentation](/dokku/configuration/ssl/#running-behind-a-load-balancer).
|
||||
See the [load balancer documentation](/docs/configuration/ssl.md#running-behind-a-load-balancer).
|
||||
|
||||
## HSTS Header
|
||||
|
||||
See the [HSTS documentation](/dokku/configuration/ssl/#hsts-header).
|
||||
See the [HSTS documentation](/docs/configuration/ssl.md#hsts-header).
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/dokku/configuration/ssl/).
|
||||
See the [ssl documentation](/docs/configuration/ssl.md).
|
||||
|
||||
## Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/).
|
||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md).
|
||||
|
||||
## Managing Proxy Port mappings
|
||||
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/#proxy-port-mapping).
|
||||
See the [proxy documentation](/docs/advanced-usage/proxy-management.md#proxy-port-mapping).
|
||||
|
||||
@@ -17,7 +17,7 @@ certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can
|
||||
dokku nginx:import-ssl <app> < certs.tar
|
||||
```
|
||||
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/docs/advanced-usage/proxy-management.md) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Per-application certificate management
|
||||
|
||||
@@ -40,9 +40,9 @@ cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
||||
|
||||
#### SSL and Multiple Domains
|
||||
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/dokku/configuration/domains/).
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/docs/configuration/domains.md).
|
||||
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/dokku/configuration/nginx/).
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/docs/configuration/nginx.md).
|
||||
|
||||
### Certificate generation
|
||||
|
||||
@@ -117,11 +117,15 @@ The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)
|
||||
|
||||
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails.
|
||||
|
||||
## HTTP/2 support
|
||||
|
||||
Certain versions of nginx have bugs that prevent [HTTP/2](https://nginx.org/en/docs/http/ngx_http_v2_module.html) from properly responding to all clients, thus causing applications to be unavailable. For HTTP/2 to be enabled in your applications' nginx configs, you need to have installed nginx 1.11.5 or higher. See [issue 2435](https://github.com/dokku/dokku/issues/2435) for more details.
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-Port` and `X-Forwarded-For`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
|
||||
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/configuration/nginx/#customizing-the-nginx-configuration)
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/docs/configuration/nginx.md#customizing-the-nginx-configuration)
|
||||
|
||||
```go
|
||||
server {
|
||||
@@ -162,4 +166,4 @@ This could result in security issue, for example, if your application looks at t
|
||||
|
||||
### SSL Port Exposure
|
||||
|
||||
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.
|
||||
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.
|
||||
|
||||
@@ -21,7 +21,7 @@ dokku apps:create ruby-rails-sample
|
||||
|
||||
### Create the backing services
|
||||
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/community/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/docs/community/plugins.md#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
|
||||
```shell
|
||||
# on your Dokku host
|
||||
@@ -33,7 +33,7 @@ sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
dokku postgres:create rails-database
|
||||
```
|
||||
|
||||
> Each services may take a few moments to create.
|
||||
> Each service may take a few moments to create.
|
||||
|
||||
### Linking backing services to applications
|
||||
|
||||
@@ -59,6 +59,10 @@ git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
||||
> the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-rails-sample`
|
||||
> Please see the [Git](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a) documentation for more details.
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
Delta compression using up to 8 threads.
|
||||
@@ -105,7 +109,7 @@ dokku config:set --global DOKKU_DEPLOY_BRANCH=some-branch
|
||||
dokku config:set ruby-rails-sample DOKKU_DEPLOY_BRANCH=some-branch
|
||||
```
|
||||
|
||||
You can also support pushing multiple branches using the [receive-branch](/dokku/development/plugin-triggers/#receive-branch) plugin trigger in a custom plugin.
|
||||
You can also support pushing multiple branches using the [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin.
|
||||
|
||||
### Skipping deployment
|
||||
|
||||
@@ -125,7 +129,7 @@ If you need to re-deploy (or restart) your app:
|
||||
dokku ps:rebuild ruby-rails-sample
|
||||
```
|
||||
|
||||
See the [process scaling documentation](/dokku/deployment/process-management) for more information.
|
||||
See the [process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
### Deploying with private git submodules
|
||||
|
||||
@@ -192,32 +196,32 @@ As of 0.5.x, this function removes all containers with the label `dokku` where t
|
||||
|
||||
## Adding deploy users
|
||||
|
||||
See the [user management documentation](/dokku/deployment/user-management).
|
||||
See the [user management documentation](/docs/deployment/user-management.md).
|
||||
|
||||
## Default vhost
|
||||
|
||||
See the [nginx documentation](/dokku/configuration/nginx/#default-site).
|
||||
See the [nginx documentation](/docs/configuration/nginx.md#default-site).
|
||||
|
||||
## Dockerfile deployment
|
||||
|
||||
See the [dockerfile documentation](/dokku/deployment/methods/dockerfiles/).
|
||||
See the [dockerfile documentation](/docs/deployment/methods/dockerfiles.md).
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [buildpack documentation](/dokku/deployment/methods/buildpacks/).
|
||||
See the [buildpack documentation](/docs/deployment/methods/buildpacks.md).
|
||||
|
||||
## Image tagging
|
||||
|
||||
See the [image tagging documentation](/dokku/deployment/methods/images/).
|
||||
See the [image tagging documentation](/docs/deployment/methods/images.md).
|
||||
|
||||
## Removing a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#removing-a-deployed-app).
|
||||
See the [application management documentation](/docs/deployment/application-management.md#removing-a-deployed-app).
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#renaming-a-deployed-app).
|
||||
See the [application management documentation](/docs/deployment/application-management.md#renaming-a-deployed-app).
|
||||
|
||||
## Zero downtime deploy
|
||||
|
||||
See the [zero-downtime deploy documentation](/dokku/deployment/zero-downtime-deploys/).
|
||||
See the [zero-downtime deploy documentation](/docs/deployment/zero-downtime-deploys.md).
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
apps:clone <old-app> <new-app> # Clones an app
|
||||
apps:create <app> # Create a new app
|
||||
apps:destroy <app> # Permanently destroy an app
|
||||
apps:exists <app> # Checks if an app exists
|
||||
apps:list # List your apps
|
||||
apps:lock # Creates a '.deploy.lock' file in an application's repo
|
||||
apps:rename <old-app> <new-app> # Rename an app
|
||||
apps:report [<app>] [<flag>] # Display report about an app
|
||||
apps:unlock # Removes the '.deploy.lock' file from an application's repo
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -40,6 +43,20 @@ node-js-app
|
||||
python-app
|
||||
```
|
||||
|
||||
### Checking if an application exists
|
||||
|
||||
For CI/CD pipelines, it may be useful to see if an application exists before creating a "review" application for a specific branch. You can do so via the `apps:exists` command:
|
||||
|
||||
```shell
|
||||
dokku apps:exists node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
App does not exist
|
||||
```
|
||||
|
||||
The `apps:exists` command will return non-zero if the application does not exist, and zero if it does.
|
||||
|
||||
### Manually creating an application
|
||||
|
||||
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the `apps:create` command:
|
||||
@@ -119,9 +136,9 @@ This will copy all of your app's contents into a new app directory with the name
|
||||
|
||||
### Cloning an existing app
|
||||
|
||||
> New as of 0.8.1
|
||||
> New as of 0.11.5
|
||||
|
||||
You can clone an existing app using the `apps:clone` command. Note that the application *must* have been deployed at least once, or the rename will not complete successfully:
|
||||
You can clone an existing app using the `apps:clone` command. Note that the application *must* have been deployed at least once, or cloning will not complete successfully:
|
||||
|
||||
```shell
|
||||
dokku apps:clone node-js-app io-js-app
|
||||
@@ -141,6 +158,39 @@ By default, Dokku will deploy this new application, though you can skip the depl
|
||||
dokku apps:clone --skip-deploy node-js-app io-js-app
|
||||
```
|
||||
|
||||
### Locking app deploys
|
||||
|
||||
> New as of 0.11.6
|
||||
|
||||
If you wish to disable deploying for a period of time, this can be done via deploy locks. Normally, deploy locks exist only for the duration of a deploy so as to avoid deploys from colliding, but a deploy lock can be created by running the `apps:lock` subcommand.
|
||||
|
||||
|
||||
```shell
|
||||
dokku apps:lock node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Deploy lock created
|
||||
```
|
||||
|
||||
### Unlocking app deploys
|
||||
|
||||
> New as of 0.11.6
|
||||
|
||||
In some cases, it may be necessary to remove an existing deploy lock. This can be performed via the `apps:unlock` subcommand.
|
||||
|
||||
> Warning: Removing the deploy lock _will not_ stop in progress deploys. At this time, in progress deploys will need to be manually terminated by someone with server access.
|
||||
|
||||
```shell
|
||||
dokku apps:unlock node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
! A deploy may be in progress.
|
||||
! Removing the application lock will not stop in progress deploys.
|
||||
-----> Deploy lock removed.
|
||||
```
|
||||
|
||||
### Displaying reports about an app
|
||||
|
||||
> New as of 0.8.1
|
||||
@@ -154,16 +204,16 @@ dokku apps:report
|
||||
```
|
||||
=====> node-js-app
|
||||
App dir: /home/dokku/node-js-app
|
||||
Git sha: dbddc3f
|
||||
App cid: 7b18489c98be
|
||||
Status: running
|
||||
Git sha: dbddc3f
|
||||
Deploy method: git
|
||||
Locked: false
|
||||
=====> python-sample
|
||||
not deployed
|
||||
=====> ruby-sample
|
||||
App dir: /home/dokku/ruby-sample
|
||||
Git sha: a2d477c
|
||||
App cid: 78a44d71012a
|
||||
Status: running
|
||||
Deploy method: git
|
||||
Locked: false
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -175,9 +225,9 @@ dokku apps:report node-js-app
|
||||
```
|
||||
=====> node-js-app
|
||||
App dir: /home/dokku/node-js-app
|
||||
Git sha: dbddc3f
|
||||
App cid: 7b18489c98be
|
||||
Status: running
|
||||
Git sha: dbddc3f
|
||||
Deploy method: git
|
||||
Locked: false
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
@@ -4,9 +4,17 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
|
||||
|
||||
- Use `dokku config:set` to set the `BUILDPACK_URL` environment variable.
|
||||
- Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository.
|
||||
- See the [environment variable documentation](/dokku/configuration/environment-variables/) for more details.
|
||||
- See the [environment variable documentation](/docs/configuration/environment-variables.md) for more details.
|
||||
- Create a `.buildpacks` file in the root of your repository.
|
||||
|
||||
## Switching from Dockerfile deployments
|
||||
|
||||
If an application was previously deployed via Dockerfile, the following commands should be run before a buildpack deploy will succeed:
|
||||
|
||||
```shell
|
||||
dokku config:unset --no-restart node-js-app DOKKU_DOCKERFILE_CMD DOKKU_DOCKERFILE_ENTRYPOINT DOKKU_PROXY_PORT_MAP
|
||||
```
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
In certain cases you may want to specify a custom buildpack. While Dokku uses herokuish to support all the [official heroku buildpacks](https://github.com/gliderlabs/herokuish#buildpacks), it is possible that the buildpack detection does not work well for your application. As well, you may wish to use a custom buildpack to handle specific application logic.
|
||||
@@ -56,7 +64,7 @@ dokku config:set node-js-app BUILDPACK_URL=https://github.com/heroku/heroku-buil
|
||||
|
||||
## Specifying commands via Procfile
|
||||
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/deployment/process-management/) for more details around scaling individual processes.
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
||||
|
||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||
|
||||
@@ -77,7 +85,7 @@ worker: env QUEUE=* bundle exec rake resque:work
|
||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
```
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/deployment/process-management/) for more details around scaling individual processes.
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/deployment/process-management.md) for more details around scaling individual processes.
|
||||
|
||||
## Curl Build Timeouts
|
||||
|
||||
@@ -87,9 +95,9 @@ If you see output similar this when deploying , you may need to override the cur
|
||||
|
||||
```shell
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=180
|
||||
```
|
||||
|
||||
## Clearing buildpack cache
|
||||
|
||||
See the [repository management documentation](/dokku/advanced-usage/repository-management/#clearing-app-cache).
|
||||
See the [repository management documentation](/docs/advanced-usage/repository-management.md#clearing-app-cache).
|
||||
|
||||
@@ -6,22 +6,58 @@ While Dokku normally defaults to using [heroku buildpacks](https://devcenter.her
|
||||
|
||||
> Dockerfile support is considered a **Power User** feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by Buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||
|
||||
To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers **except** in the following two cases:
|
||||
To use a dockerfile for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers **except** in the following two cases:
|
||||
|
||||
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
|
||||
- The application has a `.buildpacks` file in the root of the repository. In this case, Dokku will use your specified buildpack(s).
|
||||
|
||||
## Exposed ports
|
||||
## Switching from Buildpack deployments
|
||||
|
||||
> Changed as of 0.5.0
|
||||
If an application was previously deployed via Buildpacks, the following commands should be run before a Dockerfile deploy will succeed:
|
||||
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
|
||||
```shell
|
||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||
```
|
||||
|
||||
> Note: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
## Build-time Configuration Variables
|
||||
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, Dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
||||
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/dokku/advanced-usage/proxy-management/).
|
||||
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](docs/advanced-usage/docker-options.md):
|
||||
|
||||
```shell
|
||||
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
||||
```
|
||||
|
||||
Once set, the Dockerfile usage would be as follows:
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
|
||||
# use the argument
|
||||
RUN echo $NODE_ENV
|
||||
```
|
||||
|
||||
You may also set the argument as an environment variable
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
|
||||
# set the argument default
|
||||
ARG NODE_ENV=production
|
||||
|
||||
# assign it to an environment variable
|
||||
# we can wrap the variable in brackets
|
||||
ENV NODE_ENV ${NODE_ENV}
|
||||
|
||||
# or omit them completely
|
||||
|
||||
# use the argument
|
||||
RUN echo $NODE_ENV
|
||||
```
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
@@ -72,3 +108,7 @@ a worker container for this app, you can run `dokku ps:scale worker=1` and a new
|
||||
started by running `docker run bin/run-worker.sh` (the actual `docker run` commands are a bit more
|
||||
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
||||
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
||||
|
||||
## Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Image Tag Deployment
|
||||
# Docker Image Tag Deployment
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
@@ -20,6 +20,10 @@ The Dokku tags plugin allows you to add docker image tags to the currently deplo
|
||||
|
||||
## Usage
|
||||
|
||||
### Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md).
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
@@ -124,9 +128,6 @@ You can alternatively add image pulled from a docker Registry and deploy app fro
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
|
||||
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
|
||||
|
||||
### Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
@@ -162,3 +163,8 @@ docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker loa
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12 && dokku tags:create test-app latest"
|
||||
```
|
||||
|
||||
## Related articles
|
||||
- [Setting up Persistent Storage](/docs/advanced-usage/persistent-storage.md)
|
||||
- [Defining Environment Variables](/docs/configuration/environment-variables.md)
|
||||
- [Setting up the Ports](/docs/advanced-usage/proxy-management.md)
|
||||
|
||||
@@ -5,7 +5,7 @@ Sometimes you need to either inspect running containers or run a one-off command
|
||||
## Run a command in an app environment
|
||||
|
||||
```
|
||||
run <app> <cmd> # Run a command in the environment of an application
|
||||
run <app> <cmd> # Run a command in a new container using the current application image
|
||||
```
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
||||
|
||||
@@ -14,9 +14,10 @@ ps:scale <app> <proc>=<count> [<proc>=<count>] # Get/Set how many instances of a
|
||||
ps:set-restart-policy <app> <policy> # Sets app restart-policy
|
||||
ps:start <app> # Start app container(s)
|
||||
ps:stop <app> # Stop app container(s)
|
||||
ps:stopall # Stop all app container(s)
|
||||
```
|
||||
|
||||
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or [via a custom `DOKKU_SCALE` file](/dokku/deployment/process-management/#manually-managing-process-scaling).
|
||||
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or [via a custom `DOKKU_SCALE` file](/docs/deployment/process-management.md#manually-managing-process-scaling).
|
||||
|
||||
> The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
|
||||
|
||||
@@ -46,7 +47,7 @@ dokku ps:rebuildall
|
||||
|
||||
> The `ps:rebuild` and `ps:rebuildall` commands only work for applications for which there is a source, and thus
|
||||
> will only always work deterministically for git-deployed application. Please see
|
||||
> the [images documentation](/dokku/deployment/methods/images/) and [tar documentation](/dokku/deployment/methods/tar/)
|
||||
> the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> in for more information concerning rebuilding those applications.
|
||||
|
||||
### Restarting applications
|
||||
@@ -93,12 +94,18 @@ dokku ps:scale node-js-app
|
||||
|
||||
### Stopping applications
|
||||
|
||||
Deployed applications can be stopped using the `ps:stop` command. This turns all running containers for an application, and will result in a `502 Bad Gateway` response for the default nginx proxy implementation.
|
||||
Deployed applications can be stopped using the `ps:stop` command. This turns off all running containers for an application, and will result in a `502 Bad Gateway` response for the default nginx proxy implementation.
|
||||
|
||||
```shell
|
||||
dokku ps:stop node-js-app
|
||||
```
|
||||
|
||||
You may also stop all applications at once:
|
||||
|
||||
```shell
|
||||
dokku ps:stopall
|
||||
```
|
||||
|
||||
### Starting applications
|
||||
|
||||
All stopped containers can be started using the `ps:start` command. This is similar to running `ps:restart`, except no action will be taken if the application containers are running.
|
||||
@@ -115,7 +122,7 @@ By default, Dokku will automatically restart containers that exit with a non-zer
|
||||
|
||||
### Showing the current restart policy
|
||||
|
||||
THe `ps:restart-policy` command will show the currently configured restart policy for an application. The default policy is `on-failure:10`
|
||||
The `ps:restart-policy` command will show the currently configured restart policy for an application. The default policy is `on-failure:10`
|
||||
|
||||
```shell
|
||||
dokku ps:restart-policy node-js-app
|
||||
|
||||
@@ -25,4 +25,4 @@ in order to avoid ssh interpretting Dokku arguments for itself.
|
||||
|
||||
You may optionally use a client to connect to your Dokku server. Most clients use the configured `git remote` to locate the Dokku server, though some allow for overriding this via an environment variable or flag.
|
||||
|
||||
Please refer to the [clients](/dokku/community/clients/) list for more details.
|
||||
Please refer to the [clients](/docs/community/clients.md) list for more details.
|
||||
|
||||
@@ -46,7 +46,7 @@ dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
||||
b7:76:27:4f:30:90:21:ae:d4:1e:70:20:35:3f:06:d6
|
||||
```
|
||||
|
||||
`KEY_NAME` is the username prefer to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
|
||||
`KEY_NAME` is the name you want to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
|
||||
|
||||
> `KEY_NAME` is a unique name which is used to identify public keys. Attempting to re-use a key name will result in an error. The ssh (git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all it's actions.
|
||||
|
||||
@@ -56,6 +56,13 @@ Admin users and root can also add keys remotely:
|
||||
cat ~/.ssh/id_rsa.pub | ssh dokku@dokku.me ssh-keys:add KEY_NAME
|
||||
```
|
||||
|
||||
If you are using an ssh user other than `dokku`, then you'll also need to specify the `dokku` bin:
|
||||
|
||||
```shell
|
||||
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me dokku ssh-keys:add KEY_NAME
|
||||
```
|
||||
|
||||
|
||||
Finally, if you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to Dokku (it will use your host username as the `USER`):
|
||||
|
||||
```shell
|
||||
@@ -72,7 +79,7 @@ dokku ssh-keys:remove KEY_NAME
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
|
||||
Keys are given unique names, which can be used in conjunction with the [user-auth](/docs/development/plugin-triggers.md#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
|
||||
|
||||
## Granting other Unix user accounts Dokku access
|
||||
|
||||
|
||||
@@ -15,6 +15,14 @@ By default, Dokku will wait `10` seconds after starting each container before as
|
||||
|
||||
You may both create user-defined checks for web processes using a `CHECKS` file, as well as customize any and all parts of this experience using the checks plugin.
|
||||
|
||||
> Web checks are performed via `curl` on Dokku host. Some application code - such
|
||||
> as the Django framework - checks for specific hostnames or header values, these
|
||||
> checks will fail. To avoid this:
|
||||
>
|
||||
> - Remove such checks from your code: Modify your application to remove the hostname check completely
|
||||
> - 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 Check Settings using the `config` plugin
|
||||
|
||||
There are certain settings that can be configured via environment variables:
|
||||
|
||||
@@ -1,14 +1,33 @@
|
||||
# Plugin Creation
|
||||
|
||||
Plugins can simply be implementations of [triggers](/docs/development/plugin-triggers.md) or they may implement a command structure of their own. Dokku has no restrictions on the language in which a plugin is implemented, it only cares that the plugin implements the appropriate [commands](/docs/development/plugin-creation.md#command-api) or [triggers](/docs/development/plugin-triggers.md) API. NOTE: all files that implement the triggers or commands API must be executable.
|
||||
|
||||
If you create your own plugin:
|
||||
|
||||
1. Take a look at the plugins shipped with Dokku and hack away!
|
||||
2. Check out the [list of triggers](/dokku/development/plugin-triggers) your plugin can implement.
|
||||
2. Check out the [list of triggers](/docs/development/plugin-triggers.md) your plugin can implement.
|
||||
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
|
||||
4. Edit [this page](/dokku/community/plugins/) and add a link to it.
|
||||
4. Edit [this page](/docs/community/plugins.md) and add a link to it.
|
||||
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
|
||||
|
||||
|
||||
### Compilable Plugins (i.e. golang, java(?), c, etc.)
|
||||
The plugin developer is required to implement the `install` trigger such that it will output your built executable(s) in the correct directory structure to implement the plugin's desired command and/or trigger API. See [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
|
||||
|
||||
|
||||
### Command API
|
||||
There are 3 main implementation points: `commands`, `subcommands/default`, and `subcommands/<command-name>`
|
||||
|
||||
#### commands
|
||||
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands))
|
||||
|
||||
#### subcommands/default
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default))
|
||||
|
||||
#### subcommands/<command-name>
|
||||
Implements the additional command interface and will translate to `dokku plugin:cmd` on the command line. (i.e. [`dokku plugin:install`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/install))
|
||||
|
||||
|
||||
### Sample plugin
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
|
||||
@@ -154,6 +173,6 @@ A few notes:
|
||||
dokku config:unset --no-restart node-js-app KEY1 [KEY2 ...]
|
||||
```
|
||||
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/dokku/development/plugin-triggers) doc for examples.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/docs/development/plugin-triggers.md) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
- As of 0.6.0, we advise you to *not* call the `dokku` binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions
|
||||
|
||||
@@ -29,38 +29,6 @@ The following plugin triggers describe those available to a Dokku installation.
|
||||
|
||||
> The example plugin trigger code is not guaranteed to be implemented as in within dokku, and are merely simplified examples. Please look at the Dokku source for larger, more in-depth examples.
|
||||
|
||||
### `post-config-update`
|
||||
|
||||
- Description: Allows you to get notified when one or more configs is added or removed. Action can be *set* or *unset*
|
||||
- Invoked by: `dokku config:set`, `dokku config:unset`
|
||||
- Arguments: `$APP` `set|unset` `key1=VALUE1 key2=VALUE2`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `bind-external-ip`
|
||||
|
||||
- Description: Allows you to disable binding to the external box ip
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Force always binding to the docker ip, no matter
|
||||
# what the settings are for a given app.
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
echo false
|
||||
```
|
||||
|
||||
### `check-deploy`
|
||||
|
||||
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
|
||||
@@ -87,7 +55,7 @@ if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
||||
fi
|
||||
```
|
||||
|
||||
### `comands help` and `commands <PLUGIN_NAME>:help`
|
||||
### `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.
|
||||
- Invoked by: `dokku help` and `commands <PLUGIN_NAME>:help`
|
||||
@@ -154,7 +122,7 @@ curl "http://httpstat.us/200"
|
||||
|
||||
### `dependencies`
|
||||
|
||||
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
|
||||
- Description: Used to install system-level dependencies.
|
||||
- Invoked by: `dokku plugin:install-dependencies`
|
||||
- Arguments: None
|
||||
- Example:
|
||||
@@ -179,20 +147,31 @@ case "$DOKKU_DISTRO" in
|
||||
esac
|
||||
```
|
||||
|
||||
### `deployed-app-image-tag`
|
||||
### `deploy-source`
|
||||
|
||||
- Description: Used to manage the tag of the image being deployed. Useful for deploying a specific version of an image, or when deploying from an external registry
|
||||
- Invoked by: `internal function dokku_deploy_cmd() (deploy phase)`
|
||||
- Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
|
||||
- Invoked by: `dokku apps:report`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Checks if the app should be deployed via git
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# customize the tag version
|
||||
echo 'not-latest'
|
||||
APP="$1"
|
||||
STDIN=$(cat)
|
||||
|
||||
# bail if another source is detected
|
||||
if [[ -n "$STDIN" ]]; then
|
||||
echo "$STDIN"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then
|
||||
echo "git"
|
||||
fi
|
||||
```
|
||||
|
||||
### `deployed-app-image-repo`
|
||||
@@ -212,6 +191,22 @@ APP="$1"
|
||||
echo "dokkupaas/$APP"
|
||||
```
|
||||
|
||||
### `deployed-app-image-tag`
|
||||
|
||||
- Description: Used to manage the tag of the image being deployed. Useful for deploying a specific version of an image, or when deploying from an external registry
|
||||
- Invoked by: `internal function dokku_deploy_cmd() (deploy phase)`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# customize the tag version
|
||||
echo 'not-latest'
|
||||
```
|
||||
|
||||
### `deployed-app-repository`
|
||||
|
||||
- Description: Used to manage the remote repository of the image being deployed.
|
||||
@@ -240,26 +235,21 @@ echo 'derp.dkr.ecr.us-east-1.amazonaws.com'
|
||||
# to bust cache at any arbitrary point in a Dockerfile build
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cache-bust-build-arg() {
|
||||
declare desc="dockerfile cache busting plugin trigger"
|
||||
local STDIN=$(cat)
|
||||
local APP="$1" IMAGE_SOURCE_TYPE="$2"
|
||||
local output=""
|
||||
STDIN=$(cat)
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$2"
|
||||
output=""
|
||||
|
||||
if [[ "$IMAGE_SOURCE_TYPE" == "dockerfile" ]]; then
|
||||
output=" --build-arg CACHEBUST=$(date +%s)"
|
||||
fi
|
||||
echo -n "$STDIN$output"
|
||||
}
|
||||
|
||||
cache-bust-build-arg "$@"
|
||||
if [[ "$IMAGE_SOURCE_TYPE" == "dockerfile" ]]; then
|
||||
output=" --build-arg CACHEBUST=$(date +%s)"
|
||||
fi
|
||||
echo -n "$STDIN$output"
|
||||
```
|
||||
|
||||
### `docker-args-deploy`
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Arguments: `$APP $IMAGE_TAG [$PROC_TYPE $CONTAINER_INDEX]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -321,6 +311,10 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
> WARNING: The `git-pre-pull` trigger should _not_ be used for authentication
|
||||
since it does not get called for commands that use `git-upload-archive` such
|
||||
as `git archive`. Instead, use the [`user-auth`](#user-auth) trigger.
|
||||
|
||||
### `install`
|
||||
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
@@ -340,6 +334,141 @@ if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
|
||||
fi
|
||||
```
|
||||
|
||||
### `network-build-config`
|
||||
|
||||
- Description: Rebuilds network configuration
|
||||
- Invoked by: `internally triggered by proxy-build-config within proxy implementations`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-compute-ports`
|
||||
|
||||
- Description: Computes the ports for a given app container
|
||||
- Invoked by: `internally triggered by proxy-build-config within proxy implementations`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-config-exists`
|
||||
|
||||
- Description: Returns whether the network configuration for a given app exists
|
||||
- Invoked by: `internally triggered by core-post-deploy within proxy implementations`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-get-ipaddr`
|
||||
|
||||
- Description: Return the ipaddr for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-get-listeners`
|
||||
|
||||
- Description: Return the listeners (host:port combinations) for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-get-port`
|
||||
|
||||
- Description: Return the port for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-get-property`
|
||||
|
||||
- Description: Return the network value for an application's property
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $KEY`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-write-ipaddr`
|
||||
|
||||
- Description: Write the ipaddr for a given app index
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_INDEX $IP_ADDRESS`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-write-port`
|
||||
|
||||
- Description: Write the port for a given app index
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_INDEX $PORT`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `nginx-hostname`
|
||||
|
||||
- Description: Allows you to customize the hostname for a given application.
|
||||
@@ -376,6 +505,36 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
nginx -t
|
||||
```
|
||||
|
||||
### `post-app-clone`
|
||||
|
||||
- Description: Allows you to run commands after an application was cloned.
|
||||
- Invoked by: `dokku apps:clone`
|
||||
- Arguments: `$OLD_APP_NAME $NEW_APP_NAME`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-app-rename`
|
||||
|
||||
- Description: Allows you to run commands after an application was renamed.
|
||||
- Invoked by: `dokku apps:rename`
|
||||
- Arguments: `$OLD_APP_NAME $NEW_APP_NAME`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
|
||||
@@ -406,6 +565,55 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-certs-remove`
|
||||
|
||||
- Description: Allows you to run commands after a cert is removed
|
||||
- Invoked by: `dokku certs:remove`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-certs-update`
|
||||
|
||||
- Description: Allows you to run commands after a cert is added/updated
|
||||
- Invoked by: `dokku certs:add`, `dokku certs:update`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-config-update`
|
||||
|
||||
- Description: Allows you to get notified when one or more configs is added or removed. Action can be *set* or *unset*
|
||||
- Invoked by: `dokku config:set`, `dokku config:unset`
|
||||
- Arguments: `$APP` `set|unset` `key1=VALUE1 key2=VALUE2`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-create`
|
||||
|
||||
- Description: Can be used to run commands after an application is created.
|
||||
@@ -571,7 +779,7 @@ verify_app_name "$APP"
|
||||
### `post-stop`
|
||||
|
||||
- Description: Can be used to run commands after an application is manually stopped
|
||||
- Invoked by: `dokku ps:stop`
|
||||
- Invoked by: `dokku ps:stop` and `dokku ps:stopall`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
@@ -661,6 +869,40 @@ docker commit $id $IMAGE > /dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
```
|
||||
|
||||
### `pre-disable-vhost`
|
||||
|
||||
- Description: Allows you to run commands before the VHOST feature is disabled
|
||||
- Invoked by: `dokku domains:disable`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-enable-vhost`
|
||||
|
||||
- Description: Allows you to run commands before the VHOST feature is enabled
|
||||
- Invoked by: `dokku domains:enable`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-receive-app`
|
||||
|
||||
- Description: Allows you to customize the contents of an application directory before they are processed for deployment. The `IMAGE_SOURCE_TYPE` can be any of `[herokuish, dockerfile]`
|
||||
@@ -725,10 +967,28 @@ verify_app_name "$APP"
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-disable-vhost`
|
||||
### `pre-start`
|
||||
|
||||
- Description: Allows you to run commands before the VHOST feature is disabled
|
||||
- Invoked by: `dokku domains:disable`
|
||||
- Description: Can be used to run commands before an application is started
|
||||
- Invoked by: `dokku ps:start`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Notifies an example url that an application is starting
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
curl "https://example.com/starting/${APP}" || true
|
||||
```
|
||||
|
||||
### `proxy-build-config`
|
||||
|
||||
- Description: Builds the proxy implementation configuration for a given app
|
||||
- Invoked by: `internally triggered by ps:restore`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
@@ -736,16 +996,14 @@ verify_app_name "$APP"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-enable-vhost`
|
||||
### `proxy-enable`
|
||||
|
||||
- Description: Allows you to run commands before the VHOST feature is enabled
|
||||
- Invoked by: `dokku domains:enable`
|
||||
- Description: Enables the configured proxy implementation for an app
|
||||
- Invoked by: `internally triggered by ps:restore`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
@@ -753,16 +1011,14 @@ APP="$1"; verify_app_name "$APP"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-certs-update`
|
||||
### `proxy-disable`
|
||||
|
||||
- Description: Allows you to run commands after a cert is added/updated
|
||||
- Invoked by: `dokku certs:add`, `dokku certs:update`
|
||||
- Description: Disables the configured proxy implementation for an app
|
||||
- Invoked by: `internally triggered by ps:restore`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
@@ -770,25 +1026,6 @@ APP="$1"; verify_app_name "$APP"
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-certs-remove`
|
||||
|
||||
- Description: Allows you to run commands after a cert is removed
|
||||
- Invoked by: `dokku certs:remove`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -829,7 +1066,7 @@ newrev=$2
|
||||
APP=${refname/*\//}.$reference_app
|
||||
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
REFERENCE_REPO="$DOKKU_ROOT/$reference_app
|
||||
REFERENCE_REPO="$DOKKU_ROOT/$reference_app"
|
||||
git clone --bare --shared --reference "$REFERENCE_REPO" "$REFERENCE_REPO" "$DOKKU_ROOT/$APP" > /dev/null
|
||||
fi
|
||||
plugn trigger receive-app $APP $newrev
|
||||
@@ -885,7 +1122,7 @@ docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"
|
||||
|
||||
some code to remove a docker hub tag because it's not implemented in the CLI....
|
||||
# some code to remove a docker hub tag because it's not implemented in the CLI...
|
||||
```
|
||||
|
||||
### `uninstall`
|
||||
@@ -895,16 +1132,16 @@ some code to remove a docker hub tag because it's not implemented in the CLI....
|
||||
- Arguments: `$PLUGIN`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Cleanup up extra containers created
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Cleanup up extra containers created
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
PLUGIN="$1"
|
||||
PLUGIN="$1"
|
||||
|
||||
[[ "$PLUGIN" = "my-plugin" ]] && docker rmi -f "${PLUGIN_IMAGE_DEPENDENCY}"
|
||||
```
|
||||
[[ "$PLUGIN" = "my-plugin" ]] && docker rmi -f "${PLUGIN_IMAGE_DEPENDENCY}"
|
||||
```
|
||||
|
||||
> To avoid uninstalling other plugins make sure to check the plugin name like shown in the example.
|
||||
|
||||
@@ -945,7 +1182,7 @@ sshcommand acl-add dokku NAME < $PATH_TO_SSH_KEY
|
||||
Note that the `NAME` value is set at the first ssh key match. If an ssh key is set in the `/home/dokku/.ssh/authorized_keys` multiple times, the first match will decide the value.
|
||||
|
||||
- Description: Allows you to deny access to a Dokku command by either ssh user or associated ssh-command NAME user.
|
||||
- Invoked by `dokku`
|
||||
- Invoked by: `dokku`
|
||||
- Arguments: `$SSH_USER $SSH_NAME $DOKKU_COMMAND`
|
||||
- Example:
|
||||
|
||||
|
||||
@@ -67,7 +67,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.8.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.11.6-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'
|
||||
|
||||
@@ -17,7 +17,7 @@ While we do provide official packages for a variety of platforms, as our test su
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
- Setup Dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
|
||||
- Setup Dokku in a [vagrant vm](/docs/getting-started/install/vagrant.md)
|
||||
- Run the following to setup tests and execute them:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -44,17 +44,21 @@ cd dokku
|
||||
sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make install
|
||||
```
|
||||
|
||||
## Configuring
|
||||
## Skipping herokuish installation
|
||||
|
||||
The `herokuish` package is recommended but not required if not using Heroku Buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=true bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
|
||||
|
||||
## Configuring an unattended installation
|
||||
|
||||
Once Dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
|
||||
|
||||
For Debian, unattended installation is described [Debian installation guide](/docs/getting-started/install/debian.md).
|
||||
|
||||
*You should also stop and disable the `dokku-installer` service to remove public access to adding SSH keys.*
|
||||
|
||||
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, Dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
|
||||
Set up a domain using your preferred vendor and a wildcard domain pointing to the host running dokku. You can manage this global domain using the [domains plugin](/docs/configuration/domains.md).
|
||||
|
||||
Follow the [user management documentation](/dokku/deployment/user-management/) in order to add users to Dokku, or to give other Unix accounts access to Dokku.
|
||||
|
||||
That's it!
|
||||
Follow the [user management documentation](/docs/deployment/user-management.md) in order to add ssh keys for users to Dokku, or to give other Unix accounts access to Dokku.
|
||||
|
||||
## VMs with less than 1GB of memory
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
# install dokku
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
OS_ID="$(lsb_release -cs 2> /dev/null || echo "trusty")"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
@@ -35,7 +36,7 @@ After setting the desired options, proceed with the installation as described ab
|
||||
| Name | Type | Default | Description |
|
||||
| ------------------ | ------- | --------------------- | ------------------------------------------------------------------------ |
|
||||
| dokku/web_config | boolean | true | Use web-based config for below options |
|
||||
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. <app>.dokku.me) |
|
||||
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g., <app>.dokku.me) |
|
||||
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
|
||||
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: This setting this to true, will require you to manually add an SSH key later on. |
|
||||
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: Setting this to true, will require you to manually add an SSH key later on. |
|
||||
| dokku/key_file | string | /root/.ssh/id_rsa.pub | Path on disk to an SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
|
||||
|
||||
@@ -1,11 +1,22 @@
|
||||
# Digital Ocean
|
||||
# Digital Ocean Droplet
|
||||
|
||||
On Digital Ocean, there is a pre-made image that can be run for Dokku. You can choose to run this image on any sized droplet, though larger droplets will allow you to run larger applications.
|
||||
[Digital Ocean](https://www.digitalocean.com/products/compute/) offers a pre-installed Dokku image. You can run this image on any sized droplet, although larger droplets will allow you to run larger applications.
|
||||
|
||||
When choosing your Droplet configuration, please disable IPv6 on the droplet. There are known issues with IPv6 on Digital Ocean and Docker, and many have been reported to the Dokku issue tracker.
|
||||
> **Please disable IPv6**. There are known issues with IPv6 on Digital Ocean and Docker. If you would like to run Dokku on an IPv6 Digital Ocean Droplet, please consult [this guide](https://jeffloughridge.wordpress.com/2015/01/17/native-ipv6-functionality-in-docker/).
|
||||
|
||||
If you would like to run Dokku on an IPv6 Digital Ocean Droplet, please consult [this guide](https://jeffloughridge.wordpress.com/2015/01/17/native-ipv6-functionality-in-docker/) for modifying Docker to run under the Digital Ocean IPv6 configuration.
|
||||
|
||||
Once Dokku is installed, you can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs.
|
||||
1. Login to your [Digital Ocean](https://m.do.co/c/fe06b043a083) account
|
||||
2. Click **Create a Droplet**.
|
||||
3. Under **Choose an image > One-click apps** and choose the latest **Dokku** release for 16.04 _(version numbers may vary)_.
|
||||
4. Under **Choose a size** and select your a machine spec. We recommend a machine with _at least_ 1GB of memory.
|
||||
5. Under **Choose a datacenter region** select your region.
|
||||
6. Add an SSH Key
|
||||
* New Keys
|
||||
1. Under **Add your SSH keys** click **New SSH Key** _(this opens a dialog)_
|
||||
2. From your terminal, execute `cat $HOME/.ssh/id_rsa.pub`
|
||||
3. Copy the output and paste it into the **New SSH Key** dialog, provide a name and click **Add SSH Key**
|
||||
* Existing Keys
|
||||
1. Simply add a checkmark next to the existing keys you'd like to add.
|
||||
7. Under **Finalize and create**, give your droplet a hostname _(not required)_ and click **Create**.
|
||||
8. Once created, copy the IP address to your clipboard.
|
||||
9. In a browser, go to the IP address you copied above and fill out the presented form to complete configuration. **Failure to do so may allow others to reconfigure SSH access on your server.**
|
||||
10. Once the web ui has been submitted, you will be redirected to our [application deployment tutorial](/docs/deployment/application-deployment.md), which will guide you through deploying a sample application to your Dokku server.
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# Installing on Linode
|
||||
|
||||
## Enable AUFS Storage Driver
|
||||
|
||||
When installing Dokku on a newly-created Linode server, you'll likely see an error during Docker installation:
|
||||
|
||||
> Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.
|
||||
|
||||
After 10 seconds, the installation will continue as normal.
|
||||
|
||||
This warning is the result of Linode using its own kernel, which does not support AUFS, instead of using the kernel supplied by Debian/Ubuntu. If you ignore the warning, Docker will fall back to using the DeviceMapper storage backend and Dokku will work normally. However, AUFS is better tested and will perform better.
|
||||
|
||||
To avoid this error message and use AUFS, follow the steps below to select the GRUB 2 kernel.
|
||||
|
||||
|
||||
### Select the GRUB 2 kernel instead of the default Linode kernel:
|
||||
|
||||
1. Login to your [Linode Manager](http://manager.linode.com), open the `Dashboard` associated with your new server.
|
||||
2. Click `Edit` for the `Configuration Profile`. You should now be on the `Edit Configuration Profile` page.
|
||||
3. Scroll down to `Boot Settings` > `Kernel menu`. Change the "Kernel" option to "GRUB 2" and save your changes.
|
||||
4. If you have already pushed the `Boot` button and your server is running, you will need to reboot it before continuing. Otherwise, you can now push the `Boot` button to start your server and proceed with the normal Dokku installation.
|
||||
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/getting-started/installation/) and `bootstrap.sh` will take care of everything else.
|
||||
|
||||
|
||||
### Verify that you are using AUFS:
|
||||
|
||||
Once you have fully installed Dokku and rebooted your server, you can verify that AUFS is being used with the terminal command: `docker info`. If AUFS is being used, you should see `Storage Driver: aufs` in the output.
|
||||
@@ -2,21 +2,26 @@
|
||||
|
||||
> New as of 0.8.0 *(experimental)*
|
||||
|
||||
>**Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface.
|
||||
>**Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/docs/deployment/user-management.md#adding-ssh-keys) and [virtual hosts](/docs/configuration/domains.md#customizing-hostnames) using dokku command line interface.
|
||||
|
||||
Dokku defaults to being installed via RPM package on CentOS 7. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
|
||||
|
||||
```shell
|
||||
# install docker
|
||||
# Install docker
|
||||
curl -fsSL https://get.docker.com/ | sh
|
||||
|
||||
# install epel for nginx packages to be available
|
||||
# Install epel for nginx packages to be available
|
||||
sudo yum install -y epel-release
|
||||
|
||||
# install dokku
|
||||
# Install dokku
|
||||
curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.rpm.sh | sudo bash
|
||||
sudo yum install -y herokuish dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
systemctl start nginx
|
||||
|
||||
# Enable docker and nginx on system startup
|
||||
systemctl enable docker
|
||||
systemctl enable nginx
|
||||
```
|
||||
|
||||
The [devicemapper](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the default Docker storage driver on CentOS 7 and defaults to a configuration mode known as `loop-lvm`. This mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under `loop-lvm` mode. The preferred configuration for production deployments is [`direct-lvm`](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production).
|
||||
|
||||
@@ -19,8 +19,14 @@
|
||||
# - `DOKKU_IP`
|
||||
# - `FORWARDED_PORT`.
|
||||
cd path/to/dokku
|
||||
|
||||
# for most users
|
||||
vagrant up
|
||||
|
||||
# windows users must instead use the following
|
||||
vagrant up dokku-windows
|
||||
```
|
||||
|
||||
- Setup SSH Config in `~/.ssh/config`.
|
||||
|
||||
```ini
|
||||
|
||||
@@ -21,40 +21,45 @@ 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.8.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.8.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.11.6/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.11.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
If you're using Debian 8 or Ubuntu 14.04, make sure your package manager is configured to install a sufficiently recent version of nginx<sup>[3]</sup>, otherwise, the installation may fail due to "unmet dependencies" relating nginx.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.
|
||||
|
||||
>**Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key.
|
||||
Alternatively, instructions to skip the web installer with an unattended installation are available in the [advanced install guide](/docs/getting-started/advanced-installation/#configuring).
|
||||
|
||||
>**Warning:** Web installer is not available on CentOS and Arch Linux. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface.
|
||||
> **Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key. You can check if it is still running via `ps auxf | grep dokku-installer`, and it may be stopped via your server's init system - usually either `service dokku-installer stop` or `stop dokku-installer`.
|
||||
|
||||
> **Warning:** Web installer is not available on CentOS and Arch Linux. You will need to configure [SSH keys](/docs/deployment/user-management.md#adding-ssh-keys) and [virtual hosts](/docs/configuration/domains.md#customizing-hostnames) using dokku command line interface - see unattended installation linked above.
|
||||
|
||||
#### 3. Deploy your first application
|
||||
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the Dokku installation.
|
||||
|
||||
### Installing via other methods
|
||||
|
||||
For various reasons, certain hosting providers may have other steps that should be preferred to the above. If hosted on any of the following popular hosts, please follow the linked to instructions:
|
||||
|
||||
- [Digital Ocean Installation Notes](/dokku/getting-started/install/digitalocean)
|
||||
- [DreamHost Cloud Installation Notes](/dokku/getting-started/install/dreamhost/)
|
||||
- [Linode Installation Notes](/dokku/getting-started/install/linode/)
|
||||
- [Microsoft Azure Installation Notes](/dokku/getting-started/install/azure/)
|
||||
- [Digital Ocean Installation Notes](/docs/getting-started/install/digitalocean.md)
|
||||
- [DreamHost Cloud Installation Notes](/docs/getting-started/install/dreamhost.md)
|
||||
- [Microsoft Azure Installation Notes](/docs/getting-started/install/azure.md)
|
||||
|
||||
As well, you may wish to customize your installation in some other fashion. or experiment with vagrant. The guides below should get you started:
|
||||
|
||||
- [Debian Package Installation Notes](/dokku/getting-started/install/debian/)
|
||||
- [RPM Package Installation Notes](/dokku/getting-started/install/rpm/)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant/)
|
||||
- [Advanced Install Customization](/dokku/getting-started/advanced-installation/)
|
||||
- [Debian Package Installation Notes](/docs/getting-started/install/debian.md)
|
||||
- [RPM Package Installation Notes](/docs/getting-started/install/rpm.md)
|
||||
- [Vagrant Installation Notes](/docs/getting-started/install/vagrant.md)
|
||||
- [Advanced Install Customization](/docs/getting-started/advanced-installation.md)
|
||||
|
||||
---
|
||||
|
||||
- <sup>[1]: To check whether your system has an fqdn set, run `sudo hostname -f`</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/getting-started/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/docs/getting-started/advanced-installation.md#vms-with-less-than-1gb-of-memory).</sup>
|
||||
- <sup>[3]: nginx >= 1.8.0 can be installed via the [nginx repositories](https://www.nginx.com/resources/admin-guide/installing-nginx-open-source/), or by adding [this PPA](https://launchpad.net/~nginx/+archive/ubuntu/stable) if you're using Ubuntu. nginx >= 1.11.5 is necessary for HTTP/2 support</sup>
|
||||
|
||||
@@ -150,7 +150,7 @@ it might that the curl command that is supposed to fetch the buildpack (anything
|
||||
|
||||
```shell
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=180
|
||||
```
|
||||
|
||||
Please see https://github.com/dokku/dokku/issues/509
|
||||
@@ -195,3 +195,12 @@ sudo ufw disable
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I can't connect to my application because the server is sending an invalid response, or can't provide a secure connection.
|
||||
|
||||
__Solution:__
|
||||
|
||||
This isn't usually an issue with Dokku, but rather an app config problem. This can happen when your application is configured to enforce secure connections/HSTS, but you don't have SSL set up for the app.
|
||||
|
||||
In Rails at least, if your `application.rb` or `environmnents/production.rb` include the line `configure.force_ssl = true`, which includes HSTS try commenting that out and redeploying.
|
||||
|
||||
If this solves the issue temporarily, longer term you should consider [configuring SSL](http://dokku.viewdocs.io/dokku/configuration/ssl/).
|
||||
|
||||
54
docs/getting-started/uninstalling.md
Normal file
54
docs/getting-started/uninstalling.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Uninstalling
|
||||
|
||||
While we hate to see you go, if you need to uninstall Dokku, the following may help you out:
|
||||
|
||||
## Arch Installation
|
||||
|
||||
```shell
|
||||
# purge dokku from your system
|
||||
yaourt -Rsn dokku
|
||||
```
|
||||
|
||||
## CentOS Installation
|
||||
|
||||
```shell
|
||||
# uninstall dokku
|
||||
yum remove dokku herokuish
|
||||
```
|
||||
|
||||
## Debian Installation
|
||||
|
||||
```shell
|
||||
# purge dokku from your system
|
||||
apt-get purge -y --force-yes dokku herokuish
|
||||
|
||||
# remove any dependencies that are no longer necessary
|
||||
apt-get -y --force-yes autoremove
|
||||
```
|
||||
|
||||
## Makefile Installation
|
||||
|
||||
This is a manual deletion process, and as it is not a recommended installation method, there is currently no automated uninstallation.
|
||||
|
||||
All service plugins should be unlinked from applications, stopped, and destroyed.
|
||||
|
||||
All applications should be stopped, and all docker containers and images deleted:
|
||||
|
||||
```shell
|
||||
# stop all applications
|
||||
dokku ps:stopall
|
||||
|
||||
# cleanup containers and images
|
||||
dokku cleanup
|
||||
```
|
||||
|
||||
The following user/group must be deleted:
|
||||
|
||||
- user: `dokku`
|
||||
- group: `dokku`
|
||||
|
||||
The following directories must be deleted:
|
||||
|
||||
- `~dokku`
|
||||
- `/var/lib/dokku`
|
||||
- `/var/log/dokku`
|
||||
@@ -1,6 +1,27 @@
|
||||
# Upgrading
|
||||
|
||||
If your version of Dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/getting-started/installation/) on a new server.
|
||||
If your version of Dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/docs/getting-started/installation.md) on a new server.
|
||||
|
||||
## Security Updates
|
||||
|
||||
For any security related updates, please follow our [twitter account](https://twitter.com/dokku). As Dokku does not run any daemons, the security risk introduced by our software is minimal.
|
||||
|
||||
Your operating system may occasionally provide security updates. We recommend setting unattended upgrades for your operating system. Here are some helpful links:
|
||||
|
||||
- [Arch Linux System Maintenance](https://wiki.archlinux.org/index.php/System_maintenance)
|
||||
- [Centos Automatic Security Updates](https://serversforhackers.com/c/automatic-security-updates-centos)
|
||||
- [Debian Unattended Upgrades](https://wiki.debian.org/UnattendedUpgrades)
|
||||
- [Ubuntu Unattended Upgrades](https://help.ubuntu.com/community/AutomaticSecurityUpdates)
|
||||
|
||||
Docker releases updates periodically to their engine. We recommend reading their release notes and upgrading accordingly. Please see the [Docker documentation](https://docs.docker.com/) for more details.
|
||||
|
||||
Finally, we provide a helpful binary called `dokku-update`. This is a recommended package that:
|
||||
|
||||
- Can be installed separately, so upgrading Dokku will not affect the running of this package.
|
||||
- Automates many of the upgrade instructions for you.
|
||||
- Provides a clean way for us to further enhance the upgrade process in the future.
|
||||
|
||||
When installing from source, this is available from `contrib/dokku-update`, and is also available on Debian and RPM-based systems from our package repositories under the name `dokku-update`.
|
||||
|
||||
## Migration Guides
|
||||
|
||||
@@ -8,25 +29,48 @@ Before upgrading, check the migration guides to get comfortable with new feature
|
||||
|
||||
### 0.5 Migration Guide
|
||||
|
||||
- [0.5 Migration Guide](/dokku/appendices/0.5.0-migration-guide/)
|
||||
- [0.5 Migration Guide](/docs/appendices/0.5.0-migration-guide.md)
|
||||
|
||||
### 0.6 Migration Guide
|
||||
|
||||
- [0.6 Migration Guide](/dokku/appendices/0.6.0-migration-guide/)
|
||||
- [0.6 Migration Guide](/docs/appendices/0.6.0-migration-guide.md)
|
||||
|
||||
### 0.7 Migration Guide
|
||||
|
||||
- [0.7 Migration Guide](/dokku/appendices/0.7.0-migration-guide/)
|
||||
- [0.7 Migration Guide](/docs/appendices/0.7.0-migration-guide.md)
|
||||
|
||||
### 0.8 Migration Guide
|
||||
|
||||
- [0.8 Migration Guide](/docs/appendices/0.8.0-migration-guide.md)
|
||||
|
||||
### 0.9 Migration Guide
|
||||
|
||||
- [0.9 Migration Guide](/docs/appendices/0.9.0-migration-guide.md)
|
||||
|
||||
### 0.10 Migration Guide
|
||||
|
||||
- [0.10 Migration Guide](/docs/appendices/0.10.0-migration-guide.md)
|
||||
|
||||
## Upgrade Instructions
|
||||
|
||||
If Dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
|
||||
|
||||
```shell
|
||||
# update your local apt cache
|
||||
sudo apt-get update
|
||||
dokku apps
|
||||
dokku ps:stop APP # repeat to shut down each running app
|
||||
|
||||
# stop each running app
|
||||
# for 0.11.4 and newer versions, use
|
||||
dokku ps:stopall
|
||||
# for versions between 0.8.1 and 0.11.3, use
|
||||
dokku --quiet apps:list | xargs -L1 dokku ps:stop
|
||||
# for versions versions older than 0.8.1, use
|
||||
dokku --quiet apps | xargs -L1 dokku ps:stop
|
||||
|
||||
# update dokku and it's dependencies
|
||||
sudo apt-get install -qq -y dokku herokuish sshcommand plugn
|
||||
|
||||
# rebuild all of your applications
|
||||
dokku ps:rebuildall # rebuilds all applications
|
||||
```
|
||||
|
||||
@@ -37,7 +81,7 @@ dokku ps:rebuildall # rebuilds all applications
|
||||
> dokku ps:rebuild APP
|
||||
> ```
|
||||
>
|
||||
> Please see the [images documentation](/dokku/deployment/methods/images/) and [tar documentation](/dokku/deployment/methods/tar/)
|
||||
> Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> for instructions on rebuilding applications deployed by those plugins.
|
||||
|
||||
### Upgrade From Source
|
||||
@@ -45,8 +89,7 @@ dokku ps:rebuildall # rebuilds all applications
|
||||
If you installed Dokku from source (less common), upgrade with:
|
||||
|
||||
```shell
|
||||
dokku apps
|
||||
dokku ps:stop APP # repeat to shut down each running app
|
||||
dokku --quiet apps | xargs -L1 dokku ps:stop # stops each running app
|
||||
cd ~/dokku
|
||||
git pull --tags origin master
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
## The Official Dokku Website
|
||||
|
||||
- [http://dokku.viewdocs.io/dokku/](/dokku/)
|
||||
- [http://dokku.viewdocs.io/dokku/](/docs/)
|
||||
|
||||
The Official Dokku website is always a great place to visit. It features links to oft-used developer tools, community plugins, and guides on using dokku.
|
||||
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/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.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -98,12 +98,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.8.2/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.11.6/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.8.2 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.11.6 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -135,7 +135,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "deb $SOURCE trusty main" | tee /etc/apt/sources.list.d/dokku.list</span>
|
||||
<span class="command">export OS_ID="$(lsb_release -cs 2> /dev/null || echo "trusty")"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "deb $SOURCE $OS_ID main" | tee /etc/apt/sources.list.d/dokku.list</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
@@ -173,7 +178,7 @@
|
||||
</div>
|
||||
|
||||
<div class="alternate-instructions">
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.<p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -246,22 +251,6 @@
|
||||
Jose Diaz-Gonzalez
|
||||
<a class="fund-link" href="http://www.amazon.com/registry/wishlist/36RYHSXCFYDTG/">Buy him something nice</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/u2mejc-hidden.jpg" alt="Justin Clark">
|
||||
<img src="./assets/team/u2mejc.jpg" alt="Justin Clark">
|
||||
</div>
|
||||
Justin Clark
|
||||
<a class="fund-link" href="http://smile.amazon.com/registry/wishlist/3SCPXMNI2EIYV">Feed his dog greenie treats!</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/flink-hidden.jpg" alt="Loïc Guitaut">
|
||||
<img src="./assets/team/flink.jpg" alt="Loïc Guitaut">
|
||||
</div>
|
||||
Loïc Guitaut
|
||||
<a class="fund-link" href="https://www.amazon.com/gp/registry/wishlist/23NWY5AVAGGGO/">Build out his star wars collection</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/michaelshobbs-hidden.jpg" alt="Michael Hobbs">
|
||||
@@ -270,20 +259,12 @@
|
||||
Michael Hobbs
|
||||
<a class="fund-link" href="https://gratipay.com/~michaelshobbs/">Fund on gratipay</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/morrisjobke-hidden.jpg" alt="Morris Jobke">
|
||||
<img src="./assets/team/morrisjobke.jpg" alt="Morris Jobke">
|
||||
</div>
|
||||
Morris Jobke
|
||||
<a class="fund-link" href="">Get him an ebook</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p>© 2013-2016 Dokku</p>
|
||||
<p>© 2013-2017 Dokku</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
@@ -24,7 +24,6 @@ Please remember that DNS relies heavily on _caching_. Changes you make to DNS c
|
||||
|
||||
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/dokku/dokku/issues) and someone will be glad to assist you.
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
|
||||
@@ -70,7 +69,7 @@ If everything is working correctly, you should also be able to query for any oth
|
||||
|
||||
If they all return your IP address, you have set DNS up properly for dokku. You should also be able to `ssh root@myserver.example.tld` and access your server.
|
||||
|
||||
Proceed with the setup instructions in the [installation documentation](/dokku/getting-started/installation/)
|
||||
Proceed with the setup instructions in the [installation documentation](/docs/getting-started/installation.md)
|
||||
|
||||
#### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
@@ -78,5 +77,5 @@ This section is a work in progress. It is incomplete.
|
||||
|
||||
Using the 'root' of your domain is nearly identical to the previous example.
|
||||
|
||||
* hostname is under `example.tld`, still needs `A` record
|
||||
* Need to modify `/home/dokku/HOSTNAME` and `/home/dokku/VHOST`
|
||||
* hostname is under `example.tld`, still needs `A` record.
|
||||
* Update your global domain using the [domains plugin](docs/configuration/domains.md).
|
||||
124
docs/networking/network.md
Normal file
124
docs/networking/network.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# Network Management
|
||||
|
||||
> New as of 0.11.0
|
||||
|
||||
```
|
||||
network:report [<app>] [<flag>] # Displays a network report for one or more apps
|
||||
network:rebuild <app> # Rebuilds network settings for an app
|
||||
network:rebuildall # Rebuild network settings for all apps
|
||||
network:set <app> <key> (<value>) # Set or clear a network property for an app
|
||||
```
|
||||
|
||||
The Network plugin allows developers to abstract the concept of container network management, allowing developers to both change what networks a given container is attached to as well as rebuild the configuration on the fly.
|
||||
|
||||
## Usage
|
||||
|
||||
### Rebuilding network settings
|
||||
|
||||
There are cases where you may need to rebuild the network configuration for an app, such as on app boot or container restart. In these cases, you can use the `network:rebuild` command:
|
||||
|
||||
```shell
|
||||
dokku network:rebuild node-js-app
|
||||
```
|
||||
|
||||
> This command will exit a non-zero number that depends on the number of containers for which configuration could not be built
|
||||
|
||||
### Rebuilding all network settings
|
||||
|
||||
In some cases, a docker upgrade may reset container IPs or Ports. In both cases, you can quickly rewrite those files by using the `network:rebuildall` command:
|
||||
|
||||
```shell
|
||||
dokku network:rebuildall
|
||||
```
|
||||
|
||||
> This command will exit a non-zero number that depends on the number of containers for which configuration could not be built
|
||||
|
||||
### Container network interface binding
|
||||
|
||||
> This functionality does not control the `--network` docker flag. Please use the [docker-options plugin](docs/advanced-usage/docker-options.md) to manage this flag.
|
||||
|
||||
By default, an application will only bind to the internal interface. This behavior can be modified per app by changing the `bind-all-interfaces` network property.
|
||||
|
||||
```shell
|
||||
# bind to the default docker interface (`docker0`) with a random internal ip
|
||||
# this is the default behavior
|
||||
dokku network:set node-js-app bind-all-interfaces false
|
||||
|
||||
# bind to all interfaces (`0.0.0.0`) on a random port for each upstream port
|
||||
# this will make the app container directly accessible by other hosts on your network
|
||||
# ports are randomized for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
dokku network:set node-js-app bind-all-interfaces true
|
||||
```
|
||||
|
||||
By way of example, in the default case, each container is bound to the docker interface:
|
||||
|
||||
```shell
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1
|
||||
```
|
||||
|
||||
As such, the container's IP address will be an internal IP, and thus it is only accessible on the host itself:
|
||||
|
||||
```
|
||||
docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' node-js-app.web.1
|
||||
```
|
||||
|
||||
```
|
||||
172.17.0.6
|
||||
```
|
||||
|
||||
However, you can disable the internal proxying via the `network:set` command so that it will listen on the host's IP address:
|
||||
|
||||
```shell
|
||||
dokku network:set node-js-app bind-all-interfaces true
|
||||
|
||||
# container bound to all interfaces
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1
|
||||
```
|
||||
|
||||
### Displaying network reports about an app
|
||||
|
||||
You can get a report about the app's network status using the `network:report` command:
|
||||
|
||||
```shell
|
||||
dokku network:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.1:5000
|
||||
=====> python-sample network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.2:5000
|
||||
=====> ruby-sample network information
|
||||
Network bind all interfaces: true
|
||||
Network listeners:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku network:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.1:5000
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku network:report node-js-app --network-bind-all-interfaces
|
||||
```
|
||||
162
docs/networking/port-management.md
Normal file
162
docs/networking/port-management.md
Normal file
@@ -0,0 +1,162 @@
|
||||
# Port Management
|
||||
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy:ports <app> # List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Usage
|
||||
|
||||
### Proxy port mapping
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
||||
|
||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Port mappings for node-js-app
|
||||
-----> scheme host port container port
|
||||
http 80 5000
|
||||
```
|
||||
|
||||
The above application is listening on the host's port `80`, which we can test via curl:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
There are cases where we may wish for the service to be listening on more than one port, such as port 8080. Normally, this would not be possible:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
||||
```
|
||||
|
||||
However, we can use the `proxy:ports-add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-add node-js-app http:8080:5000
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting config vars
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
We can now test that port 80 still responds properly:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
And our new listening port of `8080` also works:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
You can also remove a port mapping that is no longer necessary:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80:5000
|
||||
```
|
||||
|
||||
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
||||
|
||||
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
|
||||
|
||||
## Port management by Deployment Method
|
||||
|
||||
> WARNING: If you set a proxy port map but _do not have a global domain set_, Dokku will reset that map upon first deployment.
|
||||
|
||||
### Buildpacks
|
||||
|
||||
For buildpack deployments, your application *must* respect the `PORT` environment variable. We will typically set this to port `5000`, but this is not guaranteed. If you do not respect the `PORT` environment variable, your containers may start but your services will not be accessible outside of that container.
|
||||
|
||||
### Dockerfile
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku's default proxy implementation - nginx - only supports HTTP request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
|
||||
#### Applications using EXPOSE
|
||||
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile`.
|
||||
|
||||
For example, if the Dokku installation is configured with the domain `dokku.me` and an application named `node-js-app` is deployed with following Dockerfile:
|
||||
|
||||
```
|
||||
FROM ubuntu:14.04
|
||||
EXPOSE 1234
|
||||
RUN python -m SimpleHTTPServer 1234
|
||||
```
|
||||
|
||||
The application would be exposed to the user at `node-js-app.dokku.me:1234`. If this is not desired, the following application configuration may be applied:
|
||||
|
||||
```shell
|
||||
# add a port mapping to port 80
|
||||
dokku proxy:ports-add node-js-app http:80:1234
|
||||
|
||||
# remove the incorrect port mapping
|
||||
dokku proxy:ports-remove node-js-app http:1234:1234
|
||||
```
|
||||
|
||||
#### Applications not using EXPOSE
|
||||
|
||||
Any application that does not use an `EXPOSE` directive will result in Dokku defaulting to port `5000`. This behavior mimics the behavior of a Buildpack deploy. If your application _does not_ support the `PORT` environment variable, then you will either need to:
|
||||
|
||||
- modify your application to support the `PORT` environment variable.
|
||||
- switch to using an `EXPOSE` directive in your Dockerfile.
|
||||
|
||||
#### Switching between `EXPOSE` usage modes
|
||||
|
||||
When switching between `EXPOSE` usage modes, it is important to reset your port management. The following two commands can be used to reset your state and redeploy your application.
|
||||
|
||||
```shell
|
||||
# assuming your application is called `node-js-app`
|
||||
dokku config:unset --no-restart node-js-app DOKKU_DOCKERFILE_PORTS PORT
|
||||
dokku proxy:ports-clear node-js-app
|
||||
```
|
||||
|
||||
### Docker Image
|
||||
|
||||
When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate port mapping. If this behavior is not desired, you can override that configuration variable with the following commands.
|
||||
|
||||
```shell
|
||||
# assuming your application is called `node-js-app`
|
||||
dokku config:set node-js-app DOKKU_DOCKERFILE_PORTS="1234/tcp 80/tcp"
|
||||
dokku proxy:ports-clear node-js-app
|
||||
```
|
||||
|
||||
All other port-related behavior is the same as when deploying via Dockerfile.
|
||||
86
docs/networking/proxy-management.md
Normal file
86
docs/networking/proxy-management.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# Proxy Management
|
||||
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy:disable <app> # Disable proxy for app
|
||||
proxy:enable <app> # Enable proxy for app
|
||||
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Usage
|
||||
|
||||
### Container network interface binding
|
||||
|
||||
> Changed as of 0.11.0
|
||||
|
||||
From Dokku versions `0.5.0` until `0.11.0`, enabling or disabling an application's proxy would **also** control whether or not the application was bound to all interfaces - e.g. `0.0.0.0`. As of `0.11.0`, this is now controlled by the network plugin. Please see the [network documentation](/docs/networking/network.md#container-network-interface-binding) for more information.
|
||||
|
||||
### Displaying proxy reports about an app
|
||||
|
||||
> New as of 0.8.1
|
||||
|
||||
You can get a report about the app's proxy status using the `proxy:report` command:
|
||||
|
||||
```shell
|
||||
dokku proxy:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000 https:443:5000
|
||||
=====> python-sample proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000
|
||||
=====> ruby-sample proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku proxy:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app proxy information
|
||||
Proxy enabled: true
|
||||
Proxy type: nginx
|
||||
Proxy port map: http:80:5000 https:443:5000
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku proxy:report node-js-app --proxy-type
|
||||
```
|
||||
|
||||
#### Proxy Port Scheme
|
||||
|
||||
The proxy port scheme is as follows:
|
||||
|
||||
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
||||
|
||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports both the `http` and `https` schemes.
|
||||
|
||||
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
||||
|
||||
To change the proxy implementation in use for an application, use the `proxy:set` command:
|
||||
|
||||
```shell
|
||||
# no validation will be performed against
|
||||
# the specified proxy implementation
|
||||
dokku proxy:set node-js-app nginx
|
||||
```
|
||||
|
||||
### Proxy port mapping
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md).
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/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.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.8.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.11.6/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
@@ -111,6 +111,7 @@
|
||||
<a href="#" class="list-group-item disabled">Getting Started</a>
|
||||
<a href="/{{NAME}}/getting-started/installation/" class="list-group-item">Getting Started with Dokku</a>
|
||||
<a href="/{{NAME}}/getting-started/upgrading/" class="list-group-item">Upgrading Dokku</a>
|
||||
<a href="/{{NAME}}/getting-started/uninstalling/" class="list-group-item">Uninstalling Dokku</a>
|
||||
<a href="/{{NAME}}/getting-started/troubleshooting/" class="list-group-item">Troubleshooting</a>
|
||||
<a href="/{{NAME}}/getting-started/where-to-get-help/" class="list-group-item">Getting Help</a>
|
||||
|
||||
@@ -135,11 +136,17 @@
|
||||
<a href="#" class="list-group-item disabled">Configuration</a>
|
||||
|
||||
<a href="/{{NAME}}/configuration/environment-variables/" class="list-group-item">Environment Variables</a>
|
||||
<a href="/{{NAME}}/configuration/dns/" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/domains/" class="list-group-item">Domain Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/nginx/" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/ssl/" class="list-group-item">SSL Configuration</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Network Management</a>
|
||||
|
||||
<a href="/{{NAME}}/networking/dns/" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/{{NAME}}/networking/network/" class="list-group-item">Network Management</a>
|
||||
<a href="/{{NAME}}/networking/port-management/" class="list-group-item">Port Management</a>
|
||||
<a href="/{{NAME}}/networking/proxy-management/" class="list-group-item">Proxy Management</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Advanced Usage</a>
|
||||
|
||||
<a href="/{{NAME}}/advanced-usage/backup-recovery/" class="list-group-item">Backup and Recovery</a>
|
||||
@@ -148,20 +155,21 @@
|
||||
<a href="/{{NAME}}/advanced-usage/event-logs/" class="list-group-item">Event Logs</a>
|
||||
<a href="/{{NAME}}/advanced-usage/persistent-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/{{NAME}}/advanced-usage/plugin-management/" class="list-group-item">Plugin Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/proxy-management/" class="list-group-item">Proxy and Port Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/repository-management/" class="list-group-item">Repository Management</a>
|
||||
|
||||
<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">Development</a>
|
||||
|
||||
<a href="/{{NAME}}/development/plugin-creation/" class="list-group-item">Plugin Creation</a>
|
||||
<a href="/{{NAME}}/development/plugin-triggers/" class="list-group-item">Plugin Triggers</a>
|
||||
<a href="/{{NAME}}/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/{{NAME}}/development/release-process/" class="list-group-item">Release Process</a>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"redirects": {
|
||||
"installation": "getting-started/advanced-installation/",
|
||||
"advanced-installation": "getting-started/advanced-installation/",
|
||||
"troubleshooting": "getting-started/troubleshooting/",
|
||||
"upgrading": "getting-started/upgrading/",
|
||||
@@ -14,16 +15,19 @@
|
||||
"deployment/images": "deployment/methods/images/",
|
||||
"configuration-management": "configuration/environment-variables/",
|
||||
"deployment/ssl-configuration": "configuration/ssl/",
|
||||
"dns": "configuration/dns/",
|
||||
"nginx": "configuration/nginx/",
|
||||
|
||||
"dns": "networking/dns/",
|
||||
"configuration/dns": "networking/dns/",
|
||||
"proxy": "networking/proxy-management/",
|
||||
"advanced-usage/proxy-management": "networking/proxy-management/",
|
||||
|
||||
"backup-recovery": "advanced-usage/backup-recovery/",
|
||||
"deployment-tasks": "advanced-usage/deployment-tasks/",
|
||||
"deployment/deployment-tasks": "advanced-usage/deployment-tasks/",
|
||||
"docker-options": "advanced-usage/docker-options/",
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
"proxy": "advanced-usage/proxy-management/",
|
||||
|
||||
"plugins": "community/plugins/"
|
||||
}
|
||||
|
||||
35
dokku
35
dokku
@@ -2,9 +2,30 @@
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
if [[ -r /etc/defaults/dokku ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/defaults/dokku
|
||||
fi
|
||||
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
[[ -f $DOKKU_ROOT/dokkurc ]] && source "$DOKKU_ROOT/dokkurc"
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] && for f in $DOKKU_ROOT/.dokkurc/*; do source "$f"; done
|
||||
if [[ -f "$DOKKU_ROOT/dokkurc" ]]; then
|
||||
if [[ -r $DOKKU_ROOT/dokkurc ]]; then
|
||||
source "$DOKKU_ROOT/dokkurc"
|
||||
else
|
||||
echo "Unable to read $DOKKU_ROOT/dokkurc for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if [[ -d $DOKKU_ROOT/.dokkurc ]]; then
|
||||
for f in $DOKKU_ROOT/.dokkurc/*; do
|
||||
if [[ -r "$f" ]]; then
|
||||
source "$f"
|
||||
else
|
||||
echo "Unable to read $f for sourcing" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DOKKU_DISTRO
|
||||
@@ -56,8 +77,12 @@ if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $(id -un) != "root" && $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $(id -un) != "root" && $1 == "ssh-keys:add" ]]; then
|
||||
dokku_log_fail "This command must be run as root"
|
||||
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]]; then
|
||||
if [[ $(id -un) != "root" ]]; then
|
||||
dokku_log_fail "This command must be run as root"
|
||||
else
|
||||
export SSH_USER=root
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||
@@ -121,7 +146,7 @@ execute_dokku_cmd() {
|
||||
elif [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD ]]; then
|
||||
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD" "$@"
|
||||
implemented=1
|
||||
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]]; then
|
||||
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]] && [[ -n "${1#*:}" ]]; then
|
||||
"$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:}" "$@"
|
||||
implemented=1
|
||||
fi
|
||||
|
||||
@@ -9,7 +9,7 @@ case "$1" in
|
||||
declare desc="return standard plugin help content"
|
||||
cat<<help_content
|
||||
ls , Pretty listing of deployed applications and containers
|
||||
run <app> <cmd>, Run a command in the environment of an application
|
||||
run <app> <cmd>, Run a command in a new container using the current application image
|
||||
trace [on/off], Enable dokku tracing
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
|
||||
@@ -23,8 +23,10 @@ get_phase_script() {
|
||||
|
||||
execute_script() {
|
||||
declare desc="executes appropriate phase script key from app.json"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="$3"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local PHASE_SCRIPT_KEY="$3"
|
||||
local IMAGE id
|
||||
|
||||
IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||
if [[ -n "$SCRIPT_CMD" ]];then
|
||||
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
|
||||
@@ -55,8 +57,16 @@ execute_script() {
|
||||
# strip --restart args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" $DOCKER_ARGS "$IMAGE" /bin/bash -c "$COMMAND")
|
||||
# eval args as array to respect escapes
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
local DOKKU_APP_SHELL="/bin/bash"
|
||||
DOKKU_APP_SHELL="$(config_get --global DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
|
||||
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
|
||||
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
|
||||
|
||||
id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
|
||||
if test "$(docker wait "$id")" -eq 0; then
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.8.2"
|
||||
version = "0.11.6"
|
||||
[plugin.config]
|
||||
|
||||
@@ -17,6 +17,7 @@ app_user_pre_deploy_trigger() {
|
||||
local desc="app user pre-deploy trigger"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE; local DOCKER_ARGS
|
||||
local DOKKU_APP_TYPE DOKKU_APP_USER APP_PATHS CONTAINER_PATHS
|
||||
declare -a ARG_ARRAY
|
||||
|
||||
IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
|
||||
@@ -27,12 +28,15 @@ app_user_pre_deploy_trigger() {
|
||||
|
||||
if [[ -n "$APP_PATHS" ]]; then
|
||||
CONTAINER_PATHS=$(echo "$APP_PATHS" | awk -F ':' '{ print $2 }' | xargs)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG" | xargs)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
|
||||
# strip --restart args from DOCKER_ARGS
|
||||
DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]] && [[ -n "$CONTAINER_PATHS" ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOCKER_ARGS $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ dokku_cleanup_cmd(){
|
||||
declare desc="cleans up old deployment cruft"
|
||||
local cmd="cleanup"
|
||||
|
||||
docker_cleanup
|
||||
docker_cleanup "$APP" "true"
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ dokku_report_cmd() {
|
||||
docker run --rm -ti gliderlabs/herokuish:latest herokuish version
|
||||
dokku_log_info1 "dokku version: $(dokku version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
dokku plugin
|
||||
dokku plugin:list
|
||||
}
|
||||
|
||||
dokku_report_cmd "$@"
|
||||
|
||||
@@ -22,7 +22,10 @@ dokku_run_cmd() {
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-run "$APP" "$IMAGE_TAG")
|
||||
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
|
||||
|
||||
local DOKKU_RUN_OPTS=""
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
local DOKKU_RUN_OPTS=" -e DYNO=run.$RANDOM"
|
||||
if [[ "$DOKKU_RM_CONTAINER" ]]; then
|
||||
DOKKU_RUN_OPTS+=" --rm"
|
||||
elif [[ "$DOKKU_DETACH_CONTAINER" ]]; then
|
||||
@@ -44,7 +47,7 @@ dokku_run_cmd() {
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS "${ARG_ARRAY[@]}" $IMAGE $EXEC_CMD "$@"
|
||||
}
|
||||
|
||||
dokku_run_cmd "$@"
|
||||
|
||||
@@ -10,9 +10,10 @@ flag_rsyslog_needs_restart=n
|
||||
|
||||
# This can be done unconditionally as mkdir -p
|
||||
# exits gracefully if the path already exists
|
||||
# shellcheck disable=SC2174
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch|debian|centos)
|
||||
arch|debian|centos|rhel)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
@@ -23,7 +24,7 @@ esac
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
arch|debian|centos)
|
||||
arch|debian|centos|rhel)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
@@ -59,7 +60,7 @@ $DOKKU_LOGS_DIR/*.log {
|
||||
EOF
|
||||
|
||||
if [[ "$DOKKU_DISTRO" = "debian" ]]; then
|
||||
sed -i '/\s*su syslog dokku/d; s/\(create [0-7][0-7][0-7]\) syslog dokku/\1 root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
sed -i 's/ syslog dokku$/ root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
fi
|
||||
|
||||
flag_rsyslog_needs_restart=y
|
||||
|
||||
1
plugins/20_events/network-build-config
Symbolic link
1
plugins/20_events/network-build-config
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/network-compute-ports
Symbolic link
1
plugins/20_events/network-compute-ports
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/network-config-exists
Symbolic link
1
plugins/20_events/network-config-exists
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/network-get-ipaddr
Symbolic link
1
plugins/20_events/network-get-ipaddr
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/network-get-listeners
Symbolic link
1
plugins/20_events/network-get-listeners
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