Compare commits
687 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b624ac485 | ||
|
|
f73dfe0672 | ||
|
|
e3b5024ca3 | ||
|
|
a0c4f1fc1f | ||
|
|
399b3ecfe3 | ||
|
|
8832a9dd58 | ||
|
|
c561a8b900 | ||
|
|
eacb27d70b | ||
|
|
a2359d6994 | ||
|
|
67b4170e43 | ||
|
|
01f5c93585 | ||
|
|
f6306deb0a | ||
|
|
f6a4521e19 | ||
|
|
35dc92fb3f | ||
|
|
eecd262eff | ||
|
|
6fbe8cabde | ||
|
|
dd0d0a3873 | ||
|
|
4a36cbad53 | ||
|
|
3c3e5a962d | ||
|
|
8775a2de1a | ||
|
|
803ef7d9f3 | ||
|
|
d7b1e38cb7 | ||
|
|
e323770f89 | ||
|
|
32f1bc5396 | ||
|
|
9d0f099e86 | ||
|
|
76ad65b715 | ||
|
|
d320203c2c | ||
|
|
30118d1b32 | ||
|
|
88be5083e0 | ||
|
|
2955150dfe | ||
|
|
321c178f9f | ||
|
|
a24b12eece | ||
|
|
8b88cb8867 | ||
|
|
8b879079e4 | ||
|
|
e4a23048ec | ||
|
|
a06166c08b | ||
|
|
b3e9893e9d | ||
|
|
d31ac73066 | ||
|
|
6366aad1e7 | ||
|
|
208d3c13d9 | ||
|
|
e408351ec6 | ||
|
|
66e255a396 | ||
|
|
441272d54b | ||
|
|
3d21132e98 | ||
|
|
51cd991174 | ||
|
|
104b76129d | ||
|
|
4608a382b1 | ||
|
|
1286529c6e | ||
|
|
a00d4ef792 | ||
|
|
d097a34735 | ||
|
|
dda3c721e0 | ||
|
|
715e51b80c | ||
|
|
260b294ee9 | ||
|
|
16242e78ba | ||
|
|
90ea6a5ba4 | ||
|
|
74ebcb472f | ||
|
|
2d147cfd12 | ||
|
|
7fa6b1901a | ||
|
|
1c33159dcd | ||
|
|
4e6f03a2c1 | ||
|
|
89a2dbfb3e | ||
|
|
9001c1079b | ||
|
|
ab2721bc37 | ||
|
|
b4e56c43fc | ||
|
|
80dc4cc3b6 | ||
|
|
f66d764197 | ||
|
|
37db940d1f | ||
|
|
fb5bc6c3e3 | ||
|
|
244fd15d48 | ||
|
|
6d58c8af40 | ||
|
|
bed6254450 | ||
|
|
711a0c12d4 | ||
|
|
be1a9d3d9a | ||
|
|
9ba2d15f86 | ||
|
|
c1dfb46bf0 | ||
|
|
3fd4f519bf | ||
|
|
c2153aa840 | ||
|
|
f8f9aa7b1b | ||
|
|
012d8eabe7 | ||
|
|
9d3c856afd | ||
|
|
65cda8b04e | ||
|
|
da70a18601 | ||
|
|
783cf417a0 | ||
|
|
63867d4abe | ||
|
|
606036a50f | ||
|
|
0606d1a805 | ||
|
|
a86119ddb6 | ||
|
|
f0b260d7dc | ||
|
|
2f95fa0a95 | ||
|
|
cfe7604696 | ||
|
|
8e9d04ae36 | ||
|
|
e0143ed226 | ||
|
|
4894a03bfe | ||
|
|
21799dcf40 | ||
|
|
d520be9e81 | ||
|
|
757e6b8f68 | ||
|
|
f11459faad | ||
|
|
9c73cfa452 | ||
|
|
6495537d44 | ||
|
|
2c34a60a8d | ||
|
|
f188e6ff3d | ||
|
|
aae62398b0 | ||
|
|
d540b6e3fe | ||
|
|
f6f1d2adfc | ||
|
|
dc4f7f6f88 | ||
|
|
b1632958f5 | ||
|
|
0e205b8133 | ||
|
|
6a51ec0f64 | ||
|
|
aa1ffd1aab | ||
|
|
11d396e6ef | ||
|
|
a2ccbcbbfb | ||
|
|
4b2a777425 | ||
|
|
091c1acf15 | ||
|
|
2ed0424860 | ||
|
|
ad4a945941 | ||
|
|
498d52ecdf | ||
|
|
da91841ac6 | ||
|
|
1eb1e1cd94 | ||
|
|
8bca701bc8 | ||
|
|
6cd1b768ff | ||
|
|
e23328b16c | ||
|
|
939feb62eb | ||
|
|
3e466917fd | ||
|
|
650dcd2538 | ||
|
|
518d7f9e56 | ||
|
|
d2f288d3a9 | ||
|
|
09aa97f9e5 | ||
|
|
e57d9dac3b | ||
|
|
5f7543bf46 | ||
|
|
6eee13b67f | ||
|
|
aae2213168 | ||
|
|
daa3b88d91 | ||
|
|
9cfa1b9065 | ||
|
|
200d1128a1 | ||
|
|
06b8d166ca | ||
|
|
76e9ea6cc3 | ||
|
|
6ff55ff16c | ||
|
|
59912d43f1 | ||
|
|
ef7d49bafc | ||
|
|
6af8811912 | ||
|
|
d694a73aed | ||
|
|
8a1f7fb900 | ||
|
|
3c1b85f272 | ||
|
|
cff8e27545 | ||
|
|
75b8953799 | ||
|
|
9b283fd6ec | ||
|
|
8f5eacf516 | ||
|
|
ffbb2f3c42 | ||
|
|
acbd1b8655 | ||
|
|
b6240fcb9a | ||
|
|
23f4bb7983 | ||
|
|
cd633d4427 | ||
|
|
0853850f7a | ||
|
|
db02e2a11a | ||
|
|
a49adef9b0 | ||
|
|
bb9fd8b320 | ||
|
|
4ddbb84367 | ||
|
|
f3f9a11813 | ||
|
|
2a7e2393ad | ||
|
|
fc125d41e8 | ||
|
|
0eab678fcc | ||
|
|
7307b385d8 | ||
|
|
3585ee8612 | ||
|
|
b7fbd9aea0 | ||
|
|
5dbb31cf8a | ||
|
|
26d50b0140 | ||
|
|
c2fc3141a9 | ||
|
|
23c25d01ff | ||
|
|
de832c596a | ||
|
|
237dfe2bbd | ||
|
|
49a07e5210 | ||
|
|
a1983e0131 | ||
|
|
95a7a93cb9 | ||
|
|
455033703a | ||
|
|
0470d493ae | ||
|
|
c2858e5fb3 | ||
|
|
f85775b870 | ||
|
|
d50f3cd151 | ||
|
|
9b887b6262 | ||
|
|
f3cc2310da | ||
|
|
ce26004fc8 | ||
|
|
ff07842dc5 | ||
|
|
c389b213b5 | ||
|
|
e1e7fbcc52 | ||
|
|
84c0988fd8 | ||
|
|
9229e1a9a7 | ||
|
|
5f83476811 | ||
|
|
0bd06e70d5 | ||
|
|
c78bf267a3 | ||
|
|
c8c83703ed | ||
|
|
baac2ceda2 | ||
|
|
d465ceb045 | ||
|
|
8ed0193b1d | ||
|
|
1de54d52ac | ||
|
|
e1b5b1aafc | ||
|
|
344d48e01b | ||
|
|
279c49f084 | ||
|
|
2b64fe4666 | ||
|
|
2d109a20c5 | ||
|
|
804c822ace | ||
|
|
7f5c2caed6 | ||
|
|
85db7c7552 | ||
|
|
de29abdab6 | ||
|
|
c250d170cd | ||
|
|
c48fe4e2a9 | ||
|
|
81c5173f5e | ||
|
|
ac04199963 | ||
|
|
a2985e082b | ||
|
|
8c24483fb7 | ||
|
|
cd3ce7de22 | ||
|
|
e28c75e56a | ||
|
|
f13796fa57 | ||
|
|
49d8cc4902 | ||
|
|
b22b04af8e | ||
|
|
39bf2a2100 | ||
|
|
b50df757db | ||
|
|
aaeae0d9cc | ||
|
|
4f6843104c | ||
|
|
bdd0f50dd9 | ||
|
|
77b3725d5b | ||
|
|
6c19414b7a | ||
|
|
b3f44e3f96 | ||
|
|
f705004975 | ||
|
|
39ba53607a | ||
|
|
d17cb43bd3 | ||
|
|
c8bcd67498 | ||
|
|
dcf34eb4d4 | ||
|
|
5a35c9a76c | ||
|
|
b23e5d1cbb | ||
|
|
a11b46058e | ||
|
|
b3041661b3 | ||
|
|
66833f12a0 | ||
|
|
18d6e1be3b | ||
|
|
6674d7823e | ||
|
|
f3959c38b0 | ||
|
|
8d0fbc0d1b | ||
|
|
9878c0b6fa | ||
|
|
79cc07d71b | ||
|
|
9d5d147a9c | ||
|
|
82475ab70d | ||
|
|
cc2c7be96e | ||
|
|
68e3f93b08 | ||
|
|
9b3d722eec | ||
|
|
994c54f6b1 | ||
|
|
695c0c2edf | ||
|
|
e155461eaa | ||
|
|
99a64e6f86 | ||
|
|
1f09ed3da4 | ||
|
|
8d2f465318 | ||
|
|
c793dca61a | ||
|
|
7d31c4fc1e | ||
|
|
b39039f231 | ||
|
|
56d8003818 | ||
|
|
9177036416 | ||
|
|
c885d23fe4 | ||
|
|
325bbdeda1 | ||
|
|
d079121b32 | ||
|
|
7f2cbed0c2 | ||
|
|
e9f7ef5d6e | ||
|
|
e76bc37988 | ||
|
|
0d15020dac | ||
|
|
8f3e194141 | ||
|
|
4accec2ac9 | ||
|
|
0a9db4174b | ||
|
|
6d3028271e | ||
|
|
7545d837f3 | ||
|
|
51935d4510 | ||
|
|
3adbdd0326 | ||
|
|
3550486070 | ||
|
|
f3dc6198f7 | ||
|
|
f9e636ddb1 | ||
|
|
4e75657638 | ||
|
|
91d2ed8449 | ||
|
|
e47121446d | ||
|
|
309a9740fb | ||
|
|
63d1963f19 | ||
|
|
3fb2ed6462 | ||
|
|
1781536dbe | ||
|
|
64040d1494 | ||
|
|
7d07cf03d4 | ||
|
|
4ce9f210b3 | ||
|
|
5d08b56e3f | ||
|
|
0e631e7254 | ||
|
|
689d1a78a7 | ||
|
|
5d1d0343c0 | ||
|
|
663f66e81a | ||
|
|
425b343340 | ||
|
|
b89b7fa62b | ||
|
|
12cd913130 | ||
|
|
ad5583190c | ||
|
|
e30a253522 | ||
|
|
eef75069e1 | ||
|
|
c372f4c054 | ||
|
|
e680a70d1a | ||
|
|
e653e1ea58 | ||
|
|
2550da65db | ||
|
|
3f9d770a79 | ||
|
|
ef3480703a | ||
|
|
1606276d7e | ||
|
|
a95fb1169a | ||
|
|
359d5ce2fd | ||
|
|
f58f3690c3 | ||
|
|
89b96a06ec | ||
|
|
e391dfbccc | ||
|
|
f80ecaf22a | ||
|
|
b81ec41e93 | ||
|
|
917e26ad82 | ||
|
|
d665dbacb9 | ||
|
|
d617d12c33 | ||
|
|
9010bc8fa4 | ||
|
|
1424df5697 | ||
|
|
0403c70ed4 | ||
|
|
8174faedc9 | ||
|
|
9b4434dd40 | ||
|
|
dfafb7d0c7 | ||
|
|
d7ee5cb7bc | ||
|
|
f36a0df86b | ||
|
|
b6c34cbf95 | ||
|
|
36f087f44a | ||
|
|
2e842da0eb | ||
|
|
bba7ee658e | ||
|
|
a8b4efb3cf | ||
|
|
fc85105a86 | ||
|
|
0048a631c6 | ||
|
|
f4102975f9 | ||
|
|
8df4404d93 | ||
|
|
d88de2b97c | ||
|
|
98616f50dc | ||
|
|
5c396da0df | ||
|
|
8a117aa59f | ||
|
|
d27b9b9705 | ||
|
|
31c5d82775 | ||
|
|
e9a7862a50 | ||
|
|
9878de5526 | ||
|
|
7f08489e9f | ||
|
|
b6cc3a65b5 | ||
|
|
c362d4b9e3 | ||
|
|
643bf8a3a8 | ||
|
|
59597aa10c | ||
|
|
f1860ab83d | ||
|
|
4c64470830 | ||
|
|
dc12388c93 | ||
|
|
5f6b9e2824 | ||
|
|
3005a5c2c6 | ||
|
|
843e2be8eb | ||
|
|
d2ad75daa4 | ||
|
|
f75cf277dd | ||
|
|
c8514d4590 | ||
|
|
50e35dd481 | ||
|
|
b1d985df19 | ||
|
|
89b24bef19 | ||
|
|
8b21b5dc13 | ||
|
|
5dfad4a89b | ||
|
|
d46221a4f5 | ||
|
|
18934c1b5b | ||
|
|
8a2f82efbf | ||
|
|
680db39ba9 | ||
|
|
e7e43141d6 | ||
|
|
19f66f69ee | ||
|
|
4c1cc38338 | ||
|
|
75b06bb02e | ||
|
|
fb5e5de6a3 | ||
|
|
01a6a5719e | ||
|
|
07e94de205 | ||
|
|
81523b3bd0 | ||
|
|
3a8f227355 | ||
|
|
85f785c93c | ||
|
|
2c8678ebd0 | ||
|
|
ee853a5b35 | ||
|
|
fe19ef15bc | ||
|
|
a7ec8dbd05 | ||
|
|
b776d4cfef | ||
|
|
629ed5cca6 | ||
|
|
4c002030d5 | ||
|
|
bd0377570d | ||
|
|
e0a89609ed | ||
|
|
92e9ab84ac | ||
|
|
40e869fe00 | ||
|
|
717ac8703b | ||
|
|
474ea3c9b3 | ||
|
|
781b8e9009 | ||
|
|
6b01da6dda | ||
|
|
b49cceefd7 | ||
|
|
c941a64eba | ||
|
|
03dee47d69 | ||
|
|
4512f76dd8 | ||
|
|
3ff11e0b9f | ||
|
|
a79834739e | ||
|
|
f8c9d9b823 | ||
|
|
9ace6cfec5 | ||
|
|
9e0f8dc7d1 | ||
|
|
7978aa9011 | ||
|
|
be1dc623db | ||
|
|
895b4d2c6a | ||
|
|
5e9c88ca63 | ||
|
|
e345cb6b93 | ||
|
|
8f2db587f2 | ||
|
|
80a2018c1f | ||
|
|
f25fabeae5 | ||
|
|
a8be09a866 | ||
|
|
616c3a6c50 | ||
|
|
b43422f544 | ||
|
|
dce98529d3 | ||
|
|
ec893fe330 | ||
|
|
c7820c0cf2 | ||
|
|
d11b976de3 | ||
|
|
fa033a2589 | ||
|
|
02d63b9d8d | ||
|
|
1aee4fdde8 | ||
|
|
92ec4462be | ||
|
|
2282b48ff1 | ||
|
|
9b9e983d2c | ||
|
|
0f14e9652f | ||
|
|
5bb62c0430 | ||
|
|
fd44635e74 | ||
|
|
7c76de93a0 | ||
|
|
3e18d9aff9 | ||
|
|
d71554e647 | ||
|
|
f914e6207b | ||
|
|
d3c218f95e | ||
|
|
70511c340d | ||
|
|
467264d31f | ||
|
|
1e543afb78 | ||
|
|
b9ecb32d3f | ||
|
|
bf1349bec8 | ||
|
|
28450eb4f3 | ||
|
|
068810ad36 | ||
|
|
7a0161dd86 | ||
|
|
b6c4a750de | ||
|
|
6e7ca94d84 | ||
|
|
9efa8beb81 | ||
|
|
e07ae7ad6a | ||
|
|
f84c2bf6d8 | ||
|
|
89dd783924 | ||
|
|
943e9b387c | ||
|
|
de6ccf4ce2 | ||
|
|
4dd4d7c567 | ||
|
|
a1d8cc23b9 | ||
|
|
1975384292 | ||
|
|
c1e9630052 | ||
|
|
ab8eb5a727 | ||
|
|
4ad955adcb | ||
|
|
c8b8b9bb93 | ||
|
|
1ebfedcfb5 | ||
|
|
7443a2f49e | ||
|
|
27a2478a33 | ||
|
|
1c53250211 | ||
|
|
30aa89ce8a | ||
|
|
ebe4af70dc | ||
|
|
433ced0f26 | ||
|
|
95388b07bb | ||
|
|
1e479c63bd | ||
|
|
1be4b94226 | ||
|
|
64b57359b5 | ||
|
|
39aedd158b | ||
|
|
c62ac4bcc3 | ||
|
|
964a84dc31 | ||
|
|
170f44f3d7 | ||
|
|
1b84527f8c | ||
|
|
72a1b76b63 | ||
|
|
cca49230d9 | ||
|
|
9ea0a8fe8b | ||
|
|
63d8994243 | ||
|
|
c929edfbe5 | ||
|
|
cadba248b6 | ||
|
|
872fbc130e | ||
|
|
5fdd69a657 | ||
|
|
e8fb585fa8 | ||
|
|
4bcc9ac05d | ||
|
|
8095df79f6 | ||
|
|
d6341e9ab7 | ||
|
|
30631692a5 | ||
|
|
bef51a1c6b | ||
|
|
424f9f1e5b | ||
|
|
18d234a925 | ||
|
|
e873f27eac | ||
|
|
aaa7a4ecb0 | ||
|
|
cd3af6b961 | ||
|
|
525e6f503d | ||
|
|
92497cf095 | ||
|
|
c9bca838f0 | ||
|
|
b3ddcbed53 | ||
|
|
aaae9adac3 | ||
|
|
ce23cf6ce6 | ||
|
|
ad72a137e1 | ||
|
|
37b8ccbe9d | ||
|
|
fcfc02be52 | ||
|
|
e2d138f55e | ||
|
|
2a4cbc7bee | ||
|
|
6d70751cfc | ||
|
|
5d8359c12e | ||
|
|
6c914173cb | ||
|
|
c21aea00ad | ||
|
|
7a545759f2 | ||
|
|
ac75c726ad | ||
|
|
48c6460b45 | ||
|
|
dc6e1ea987 | ||
|
|
2ba9809a7f | ||
|
|
1c48c9c1e9 | ||
|
|
0ef3f71d8d | ||
|
|
cfe2663f61 | ||
|
|
ce2c1e3f1d | ||
|
|
7eb8da5302 | ||
|
|
d3cdef44d9 | ||
|
|
59c8be210b | ||
|
|
8b357b2805 | ||
|
|
51e8b540cc | ||
|
|
01525e3164 | ||
|
|
9bc7f459ef | ||
|
|
2123917e9b | ||
|
|
a7c0020ceb | ||
|
|
299d530959 | ||
|
|
1b5756ca54 | ||
|
|
9e98fe11e0 | ||
|
|
b2949d2199 | ||
|
|
ff6de12196 | ||
|
|
b4b4e266b2 | ||
|
|
c4766b7f8d | ||
|
|
88bd50abaf | ||
|
|
39f09740b7 | ||
|
|
dca4e87d31 | ||
|
|
1265463dcf | ||
|
|
b71f6f4660 | ||
|
|
56e7c09733 | ||
|
|
34c5b53857 | ||
|
|
ad9d331257 | ||
|
|
a26602f3f2 | ||
|
|
5fa167c408 | ||
|
|
5f17720d3f | ||
|
|
1de092d84e | ||
|
|
ba82b544f0 | ||
|
|
d0c0ffc19c | ||
|
|
342e9aa95b | ||
|
|
7a1c080051 | ||
|
|
d50db13065 | ||
|
|
3c894fd130 | ||
|
|
515afa8d62 | ||
|
|
adfc3a8101 | ||
|
|
95161a2a9f | ||
|
|
76cf4d2969 | ||
|
|
71ebf1e476 | ||
|
|
1371056b20 | ||
|
|
148d563b82 | ||
|
|
db4e847e8d | ||
|
|
d37e64d3d6 | ||
|
|
f2e153744c | ||
|
|
5cb62b168f | ||
|
|
8ea5cfa2aa | ||
|
|
5378337456 | ||
|
|
983e0910b1 | ||
|
|
aec138ef32 | ||
|
|
f9da2d5c25 | ||
|
|
a983456030 | ||
|
|
0904c3d458 | ||
|
|
9eb30d9e33 | ||
|
|
74e1bf9f46 | ||
|
|
5f7c4426b7 | ||
|
|
ccb9e4a571 | ||
|
|
9c37069a6a | ||
|
|
433db65635 | ||
|
|
14acb8af1a | ||
|
|
880c4d11a0 | ||
|
|
495b1d2ba0 | ||
|
|
2f16b06a76 | ||
|
|
8be5c874ec | ||
|
|
d696013fe2 | ||
|
|
d8828c2d25 | ||
|
|
1c8722c763 | ||
|
|
5be7641f87 | ||
|
|
04a4da7fc5 | ||
|
|
03165ee3f8 | ||
|
|
a701b5d29a | ||
|
|
06b2347486 | ||
|
|
7db481fe36 | ||
|
|
e2954fee1e | ||
|
|
934f18c268 | ||
|
|
646fd467ab | ||
|
|
7b5ea80ea4 | ||
|
|
a62f914646 | ||
|
|
b01d371c46 | ||
|
|
59a80f7857 | ||
|
|
c32bf8f035 | ||
|
|
99f1f1b6d3 | ||
|
|
e08f02aca7 | ||
|
|
fa5fe2efd6 | ||
|
|
7979751d71 | ||
|
|
4e0fed18a6 | ||
|
|
5605863c79 | ||
|
|
e7c035e207 | ||
|
|
ae2e0bc57c | ||
|
|
3580e16733 | ||
|
|
cddc4afcea | ||
|
|
5d5c575251 | ||
|
|
d4c122c277 | ||
|
|
66ad7d0985 | ||
|
|
cc66905c6e | ||
|
|
12f97ee18e | ||
|
|
14f228b1b5 | ||
|
|
60c0f56724 | ||
|
|
afe65a86fb | ||
|
|
6566be04e5 | ||
|
|
2de2151f58 | ||
|
|
c2626bf934 | ||
|
|
b2cc353166 | ||
|
|
770139d2ca | ||
|
|
2bcb9caaf7 | ||
|
|
9055f90dcc | ||
|
|
b687e3297d | ||
|
|
3a3550e667 | ||
|
|
28288f70ed | ||
|
|
7d28f751b7 | ||
|
|
9637884861 | ||
|
|
d5df6a4190 | ||
|
|
32a8c0307f | ||
|
|
1372c426ef | ||
|
|
84fff1c2e2 | ||
|
|
5a51246007 | ||
|
|
712e1cada7 | ||
|
|
0f1faf06a2 | ||
|
|
cd23310042 | ||
|
|
ebfcece620 | ||
|
|
b6ef5af3d1 | ||
|
|
bd0803cf29 | ||
|
|
a1e747f4ad | ||
|
|
f3e0c63f68 | ||
|
|
771eaa33ee | ||
|
|
eccdc04268 | ||
|
|
606352b6ed | ||
|
|
e349d38581 | ||
|
|
09ee1def8f | ||
|
|
4f25392d9b | ||
|
|
4c05fbc020 | ||
|
|
4021b19dfc | ||
|
|
1622fc3673 | ||
|
|
461e79386a | ||
|
|
183edc9839 | ||
|
|
5676dbc4c6 | ||
|
|
6d71c164f0 | ||
|
|
3f43a64430 | ||
|
|
f20d24463f | ||
|
|
98990b6885 | ||
|
|
42905c345b | ||
|
|
d0623ea37b | ||
|
|
0a1cd5d9a5 | ||
|
|
a93ff02d50 | ||
|
|
5717e3afef | ||
|
|
268c8763b2 | ||
|
|
cb0565eb56 | ||
|
|
4cd40aef03 | ||
|
|
a95166c381 | ||
|
|
1a8ac56673 | ||
|
|
c589e8e267 | ||
|
|
66c7f8f056 | ||
|
|
2980731db5 | ||
|
|
ef6f58a96c | ||
|
|
198fe14b7b | ||
|
|
9409fc2ef0 | ||
|
|
ab6f49cebe | ||
|
|
5492b0e4e0 | ||
|
|
acd28f4647 | ||
|
|
e5976e62c7 | ||
|
|
55d4fb788e | ||
|
|
f39b38b25d | ||
|
|
9433ab3076 | ||
|
|
c6e4f95550 | ||
|
|
2b59932ba5 | ||
|
|
d3361d21d8 | ||
|
|
a45be794cc | ||
|
|
8e37d04dda | ||
|
|
1f6930294a | ||
|
|
1bf30bdcb1 | ||
|
|
c750f5a768 | ||
|
|
c1a0e0ce68 | ||
|
|
d21caa4811 | ||
|
|
dc5f34534b | ||
|
|
14e72ea337 | ||
|
|
fd187ec837 | ||
|
|
eebcfd85ab | ||
|
|
ab2539e894 | ||
|
|
039cfdc7ba | ||
|
|
27b79222c1 | ||
|
|
059ebcd9fc | ||
|
|
1668f3bbc6 | ||
|
|
f99f9cd5d7 | ||
|
|
2e9bb4eed1 | ||
|
|
a801592b56 | ||
|
|
0840d8fd1f |
1
.gitignore
vendored
@@ -4,3 +4,4 @@ stack.tgz
|
||||
build
|
||||
tmp
|
||||
*.deb
|
||||
.ruby-version
|
||||
|
||||
22
AUTHORS
@@ -1,22 +0,0 @@
|
||||
# If you're submitting a patch, please add your name here in alphabetical order as part of the patch.
|
||||
# This file lists all individuals having contributed content to the repository.
|
||||
#
|
||||
3onyc <3onyc@x3tech.com>
|
||||
Alexander <iam.asm89@gmail.com>
|
||||
Alexander Beletsky <alexander.beletsky@gmail.com>
|
||||
Alexis Gavoty <kload@kload.fr>
|
||||
Christian Joudrey <cmallette@gmail.com>
|
||||
Felipe Coury <felipe.coury@gmail.com>
|
||||
Jeff Lindsay <progrium@gmail.com>
|
||||
Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Leo Unbekandt <leo@unbekandt.eu>
|
||||
Ludovic Perrine <jazzzz@gmail.com>
|
||||
Luigi Maselli <grigio.org@gmail.com>
|
||||
Martin Weiss <kornnflake@gmail.com>
|
||||
Michael Hobbs <github@psudo.net>
|
||||
Paul Lietar <paul@lietar.net>
|
||||
Rajiv Makhijani <rajiv@blue-tech.org>
|
||||
rhy-jot <rhy-jot@myeml.net>
|
||||
Richard North <rich.north@gmail.com>
|
||||
Sebastian Götte <github@jaseg.net>
|
||||
Silas Baronda <silas.baronda@gmail.com>
|
||||
50
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of
|
||||
fostering an open and welcoming community, we pledge to respect all people who
|
||||
contribute through reporting issues, posting feature requests, updating
|
||||
documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free
|
||||
experience for everyone, regardless of level of experience, gender, gender
|
||||
identity and expression, sexual orientation, disability, personal appearance,
|
||||
body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic
|
||||
addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to
|
||||
fairly and consistently applying these principles to every aspect of managing
|
||||
this project. Project maintainers who do not follow or enforce the Code of
|
||||
Conduct may be permanently removed from the project team.
|
||||
|
||||
This code of conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting a project maintainer at dokku@josediazgonzalez.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. Maintainers are
|
||||
obligated to maintain confidentiality with regard to the reporter of an
|
||||
incident.
|
||||
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 1.3.0, available at
|
||||
[http://contributor-covenant.org/version/1/3/0/][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
198
CONTRIBUTING.md
Normal file
@@ -0,0 +1,198 @@
|
||||
# How to contribute
|
||||
|
||||
Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
|
||||
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
|
||||
have found a bug
|
||||
* Write test cases for open bug issues
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
|
||||
## Topics
|
||||
|
||||
* [Reporting Security Issues](#reporting-security-issues)
|
||||
* [Reporting Issues](#reporting-other-issues)
|
||||
* [Contributing](#contributing)
|
||||
* [Making Changes](#making-changes)
|
||||
* [Which branch to base the work](#which-branch-to-base-the-work)
|
||||
* [Submitting Changes](#submitting-changes)
|
||||
* [When will my change be merged?](#when-will-my-change-be-merged)
|
||||
* [Test cases and codesniffs](#test-cases-and-codesniffs)
|
||||
* [Additional Resources](#additional-resources)
|
||||
|
||||
## Reporting security issues
|
||||
|
||||
The Dokku maintainers take security seriously. If you discover a security
|
||||
issue, please bring it to their attention right away!
|
||||
|
||||
Please **DO NOT** file a public issue, instead send your report privately to
|
||||
[dokku@josediazgonzalez.com](mailto:dokku@josediazgonzalez.com),
|
||||
|
||||
Security reports are greatly appreciated and we will publicly thank you for it.
|
||||
|
||||
## Reporting other issues
|
||||
|
||||
A great way to contribute to the project is to send a detailed report when you
|
||||
encounter an issue. We always appreciate a well-written, thorough bug report,
|
||||
and will thank you for it!
|
||||
|
||||
Sometimes dokku is missing a feature you need. In some cases, those features can
|
||||
be found in pre-existing [plugins](http://dokku.viewdocs.io/dokku/plugins/),
|
||||
and we encourage our users to create and contribute such packages. From time to
|
||||
time, we will also pull plugins into the dokku core when the task they solve is
|
||||
a common one for our users.
|
||||
|
||||
Check that [our issue database](https://github.com/dokku/dokku/issues)
|
||||
doesn't already include that problem or suggestion before submitting an issue.
|
||||
If you find a match, add a quick "+1" or "I have this problem too." Doing this
|
||||
helps prioritize the most common problems and requests.
|
||||
|
||||
When reporting issues, please include your host OS (Ubuntu 14.04, Fedora 19,
|
||||
etc). Please include:
|
||||
|
||||
* The output of `uname -a`.
|
||||
* The output of `free -m`
|
||||
* The output of `docker version`.
|
||||
* The output of `docker -D info`.
|
||||
* The output of `docker run -ti gliderlabs/herokuish:latest herokuish version`
|
||||
* The output of `dokku version`.
|
||||
* The output of `dokku plugin`.
|
||||
|
||||
Please also include the steps required to reproduce the problem if possible and
|
||||
applicable. This information will help us review and fix your issue faster.
|
||||
|
||||
**Issue Report Template**:
|
||||
|
||||
```
|
||||
Description of problem:
|
||||
|
||||
|
||||
Output of the following commands
|
||||
|
||||
- `uname -a`:
|
||||
- `free -m`:
|
||||
- `docker version`:
|
||||
- `docker -D info`:
|
||||
- `docker run -ti gliderlabs/herokuish:latest herokuish version`:
|
||||
- `dokku version`:
|
||||
- `dokku plugin`:
|
||||
- `docker inspect CONTAINER_ID` (if applicable):
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Output of failing dokku commands with `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues):
|
||||
|
||||
Environment details (AWS, VirtualBox, physical, etc.):
|
||||
|
||||
How was dokku installed?:
|
||||
|
||||
How reproducible:
|
||||
|
||||
|
||||
Steps to Reproduce:
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
Actual Results:
|
||||
|
||||
|
||||
Expected Results:
|
||||
|
||||
|
||||
Additional info:
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Before you contribute to the dokku project, there are a few things that you'll
|
||||
need to do
|
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||
* Submit an [issue](https://github.com/dokku/dokku/issues), assuming one
|
||||
does not already exist.
|
||||
* Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
* Make sure you fill in the earliest version that you know has the issue.
|
||||
* Fork the repository on GitHub.
|
||||
|
||||
### Making Changes
|
||||
|
||||
* Create a topic branch from where you want to base your work.
|
||||
* This is usually the master branch.
|
||||
* Only target an existing branch if you are certain your fix must be on that
|
||||
branch.
|
||||
* To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master`.
|
||||
It is best to avoid working directly on the `master` branch. Doing so will
|
||||
help avoid conflicts if you pull in updates from origin.
|
||||
* Make commits of logical units. Implementing a new function and calling it in
|
||||
another file constitute a single logical unit of work.
|
||||
* Before you make a pull request, squash your commits into logical units of work
|
||||
using `git rebase -i` and `git push -f`.
|
||||
* A majority of submissions should have a single commit, so if in doubt,
|
||||
squash your commits down to one commit.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Use descriptive commit messages and reference the #issue number.
|
||||
* Core test cases should continue to pass. You can run tests locally or enable
|
||||
[circle-ci](https://circleci.com/gh/dokku/dokku) for your fork, so all
|
||||
tests and codesniffs will be executed.
|
||||
* Your work should apply the [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
* Pull requests must be cleanly rebased on top of master without multiple branches
|
||||
mixed into the PR.
|
||||
* **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
|
||||
feature branch to update your pull request rather than `merge master`.
|
||||
|
||||
### Which branch to base the work
|
||||
|
||||
All changes should be be based on the latest master commit.
|
||||
|
||||
### Submitting Changes
|
||||
|
||||
* Push your changes to a topic branch in your fork of the repository.
|
||||
* Submit a pull request to the repository on github, with the correct target
|
||||
branch.
|
||||
|
||||
### When will my change be merged?
|
||||
|
||||
Be patient! The dokku maintainers will review all pull requests and comment as
|
||||
quickly as possible. There may be some back and forth while the details of your
|
||||
pull request are discussed.
|
||||
|
||||
In the unlikely event that your pull request does not get merged, the dokku
|
||||
maintainers will either provide an alternative patch or guide you towards a
|
||||
better solution to the problem at hand.
|
||||
|
||||
During our pre-1.0 cycle, we will follow these general rules when merging pull
|
||||
requests:
|
||||
|
||||
- bugfix (patch)
|
||||
- security (patch/minor)
|
||||
- minor feature (patch)
|
||||
- backwards incompatible change (minor)
|
||||
- major feature (minor)
|
||||
|
||||
### Test cases and codesniffs
|
||||
|
||||
Dokku tests require [bats](https://github.com/sstephenson/bats).
|
||||
To run the test cases locally use the following command:
|
||||
|
||||
make ci-dependencies
|
||||
make unit-tests deploy-tests
|
||||
|
||||
To run the shellcheck sniffs for Dokku coding standards:
|
||||
|
||||
make ci-dependencies
|
||||
make lint
|
||||
|
||||
The [testing docs](http://dokku.viewdocs.io/dokku/development/testing/)
|
||||
contains installation info for bats and shellcheck.
|
||||
|
||||
# Additional Resources
|
||||
|
||||
* [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
* [Existing issues](https://github.com/dokku/dokku/issues)
|
||||
* [General GitHub documentation](https://help.github.com/)
|
||||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||
* [#dokku IRC channel on freenode.org](https://webchat.freenode.net/?channels=dokku)
|
||||
422
HISTORY.md
@@ -1,8 +1,415 @@
|
||||
# History
|
||||
|
||||
## 0.4.8
|
||||
|
||||
If upgrading to 0.4.8, please note that we have tightened the application naming schema, per docker requirements. Upgrade your dokku installation to 0.4.7 first to take advantage of the `dokku apps:rename` command if you are having issues with the new requirement.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1804: @josegonzalez Fix deprecated version constraint usage in debian control file
|
||||
- #1798: @michaelshobbs Ensure app name begins with lowercase alphanumeric character
|
||||
- #1808: @josegonzalez Fix path to dokku-installer
|
||||
|
||||
### New Features
|
||||
|
||||
- #1801: @josegonzalez Allow setting DOKKU_LIB_ROOT env var to modify the lib path on install
|
||||
- #1803: @michaelshobbs update plugn download url and version
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1809: @josegonzalez Remove non-zero downtime version of letsencrypt plugin
|
||||
|
||||
## 0.4.7
|
||||
|
||||
A few notable new features:
|
||||
|
||||
- The new `dokku apps:rename` command. It does not update linked containers, but is useful in many other cases.
|
||||
- Updated git clone methodology to be more performant for large repositories.
|
||||
- Moved the dokku-installer from Ruby to Python, allowing us to drop Ruby as a dependency. Python comes with the linux standard base, and should therefore be accessible on more systems.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1776: @t-8ch Fix docker version constraints on jessie systems
|
||||
- #1777: @michaelshobbs Format test labels
|
||||
- #1782: @michaelshobbs make docker cp work on circleci
|
||||
- #1788: @michaelshobbs Updates for moving of dokku sshcommand and plugn repos
|
||||
- #1791: @michaelshobbs Don't run app deploy tests and spread out unit tests to 4 containers
|
||||
- #1793: @michaelshobbs Filter out Procfile comments
|
||||
|
||||
### New Features
|
||||
|
||||
- #1670: @zachfeldman Add apps:rename
|
||||
- #1771: @jvanbaarsen Make plugin hooks send out more information
|
||||
- #1778: @mmerickel Optimize git clone for large repositories
|
||||
- #1781: @jvanbaarsen Add post config update hook
|
||||
- #1789: @lvillani Make it possible to skip a deploy
|
||||
- #1790: @michaelshobbs Use pgup/pgdown for history shortcut in dev env
|
||||
- #1794: @josegonzalez Replace dokku-installer.rb with dokku-installer.py
|
||||
- #1797: @michaelshobbs Ensure we run plugin commands as root
|
||||
- #1799: @josegonzalez Add support for tutum-agent as docker alternative
|
||||
- #1800: @josegonzalez Respect DOKKU_ROOT in debian/postint
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1779: @sseemayer Add link to new zero-downtime Let's Encrypt Plugin to docs
|
||||
- #1780: @jvanbaarsen Add documentation for the new domain plugin hooks
|
||||
- #1784: @duboff Tiny fix in SSL documentation
|
||||
|
||||
## 0.4.6
|
||||
|
||||
This is mostly a documentation change. A few notable changes:
|
||||
|
||||
- Rebooting dokku servers should properly handle not starting stopped services.
|
||||
- Better support for newer versions of Debian/Ubuntu.
|
||||
- Moved the dokku project to the dokku github organization.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1717: @josegonzalez Avoid using the PPA for ubuntu versions 15.10 and higher
|
||||
- #1727: @louisbl Enable dokku-redeploy systemd service.
|
||||
- #1732: @michaelshobbs do not chown file that doesn't exist
|
||||
- #1745: @beverku Change herokuish to recommended package
|
||||
- #1767: @jvanbaarsen Remove shebang from config/functions
|
||||
- #1775: @Flink Match complete container name in named-containers plugin
|
||||
|
||||
### New Features
|
||||
|
||||
- #1718: @josegonzalez Add post-create hook
|
||||
- #1735: @michaelshobbs use ps:restore on instance boot
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1720: @josegonzalez Add memory usage output as desired data for reporting issues
|
||||
- #1723: @josegonzalez Add herokuish version to desired debugging info
|
||||
- #1739: @michaelshobbs clarify location of nginx.conf.template in app repo
|
||||
- #1747: @josegonzalez Add Lets Encrypt plugin
|
||||
- #1748: @byrnedo Added unofficial Nats plugin to plugins.md
|
||||
- #1750: @jlachowski New graphite & statsd plugin with grafana frontend added
|
||||
- #1751: @josegonzalez Use flat-square style on image badges
|
||||
- #1752: @byrnedo Moved dokku-nats into official plugins section
|
||||
- #1753: @hhff Add .ca-bundle information to SSL docs
|
||||
- #1754: @josegonzalez Update all links to dokku repo
|
||||
- #1757: @josegonzalez Add DigitalOcean as a sponsor
|
||||
- #1761: @josegonzalez Fix link to docker-options documentation
|
||||
|
||||
## 0.4.5
|
||||
|
||||
This release is mostly a bugfix release. Two notable changes:
|
||||
|
||||
- It is now possible to build complex authentication layers around dokku using the new user auth plugin trigger introduced in #1671.
|
||||
- We have a Code of Conduct in our repository. Please refer to this document if you have any questiosn regarding what is acceptable in the Dokku community.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1666: @michaelshobbs Revert dokku group changes and add dokku user to adm group
|
||||
- #1667: @u2mejc Fix dokku certs:add file input bug
|
||||
- #1682: @michaelshobbs Aet nullglob when looking for PORT files
|
||||
- #1684: @u2mejc Cause certs:remove to return non zero on error
|
||||
- #1690: @u2mejc Fix "App tls has not been deployed" error
|
||||
- #1696: @michaelshobbs chown plugins paths to dokku:dokku
|
||||
- #1698: @pmvieira Ensure curl is installed inside of source-based installations
|
||||
- #1700: @michaelshobbs copy nginx.ssl.template from app container
|
||||
- #1701: @michaelshobbs Don't call nginx_build_config twice
|
||||
- #1702: @josegonzalez Remove extra whitespace in command output
|
||||
- #1703: @josegonzalez Fix casing on help output
|
||||
- #1706: @michaelshobbs Respect DOKKU_RM_CONTAINER in run phase
|
||||
- #1707: @Flink Do a perfect match on the container name in named-containers plugin
|
||||
- #1708: @michaelshobbs ensure permissions are locked down on tls folder and contents
|
||||
- #1709: @michaelshobbs Fix Must specify DOMAIN error over ssh
|
||||
- #1712: @michaelshobbs filter incompatible docker option when building dockerfile vs herokuish apps
|
||||
- #1715: @michaelshobbs use patched static buildpack in test
|
||||
|
||||
### New Features
|
||||
|
||||
- #1665: @callahad Replace curl with wget
|
||||
- #1671: @josegonzalez User Auth plugin trigger
|
||||
- #1683: @u2mejc Add bats test for certs plugin
|
||||
- #1699: @michaelshobbs print where we find DOKKU_SCALE when we find it
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1642: @cjblomqvist Add new plugin adding app name to env
|
||||
- #1674: @josegonzalez Expand buildpack deployment documentation
|
||||
- #1675: @josegonzalez Create CODE_OF_CONDUCT.md
|
||||
- #1677: @ignlg Added dokku-builders-plugin to plugins page
|
||||
- #1681: @josegonzalez Fix email in code of conduct
|
||||
- #1694: @MarcDiethelm Improve docker-options doc
|
||||
- #1713: @mbriskar Wkhtmltopdf plugin
|
||||
|
||||
## 0.4.4
|
||||
|
||||
This release adds a few interesting changes:
|
||||
|
||||
- The `dokku logs` command now roughly maps to the `heroku logs` command, and supports most available options.
|
||||
- Native Microsoft Azure support is now available!
|
||||
- Quite a few shellcheck issues were fixed thanks to @callahad!
|
||||
- Experimental debian installation support. Going forward, we will try and make dokku compatible with all systemd installations, as well as investigate dockerfile-based deployment to continue simplifying installation.
|
||||
|
||||
Thanks to all our contributors for making this release great!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1606: @josegonzalez Install plugn 0.2.0 in Makefile installs
|
||||
- #1643: @Flink Fix generated nginx config when NO_VHOST=1
|
||||
- #1644: @mmerickel Watch dokku events through a logrotate
|
||||
- #1647: @callahad Resolve SC2115: 'Use "${var:?}" to ensure this never expands to /'
|
||||
- #1648: @callahad Resolve SC2154: 'variable is referenced but not assigned'
|
||||
- #1649: @callahad Resolve SC2164: 'Use cd ... || exit in case cd fails.'
|
||||
- #1650: @callahad Resolve SC2148: 'target shell is unknown'
|
||||
- #1651: @callahad Resolve SC2029: 'this expands on client side'
|
||||
- #1652: @callahad Resolve SC2143: 'Instead of [ -n $(foo | grep bar) ], use foo | grep -q bar'
|
||||
- #1653: @callahad Resolve SC2145: 'Argument mixes string and array.'
|
||||
- #1655: @callahad Resolve SC2162: 'read without -r mangles backslashes'
|
||||
- #1656: @callahad Resolve SC2001: 'See if you can use ${var//search/replace} instead'
|
||||
- #1660: @callahad Fixup debian/control for Debian
|
||||
- #1662: @xadh00m Only return users of group 'adm'
|
||||
|
||||
### New Features
|
||||
|
||||
- #1607: @josegonzalez Dokku support for Debian Jessie installation
|
||||
- #1610: @kdomanski Add post-stop plugn trigger
|
||||
- #1612: @Flink Add multiple options to the logs plugin
|
||||
- #1613: @kdomanski Add ps:restore to start applications which weren't manually stopped
|
||||
- #1628: @michaelshobbs Move RESTORE variable to DOKKU_APP namespace
|
||||
- #1634: @callahad Allow installation of bats via homebrew
|
||||
- #1645: @rvalyi Add ability to access git repo via ssh
|
||||
- #1664: @michaelshobbs Add $REV to pre-receive-app call
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1605: @josegonzalez Make commented output a bit more readable
|
||||
- #1621: @josegonzalez Document `--force` option for `:destroy` commands
|
||||
- #1623: @sedouard Add Azure Documentation
|
||||
- #1624: @u2mejc Add trace to help output
|
||||
- #1626: @josegonzalez Add official dokku-copy-files-to-image plugin
|
||||
- #1630: @adamwolf Enabling tracing is actually 'dokku trace on'
|
||||
- #1633: @elia Add a warning regarding the use of `trace on`
|
||||
- #1635: @callahad Remove deprecated Linode stackscript
|
||||
- #1657: @kimausloos Various small doc updates
|
||||
|
||||
## 0.4.3
|
||||
|
||||
This release was mainly a documentation release/bugfix.
|
||||
|
||||
One major removal was is that as of 0.4.3, we no longer restart containers automatically on failure via docker. This feature was introduced in 0.4.0, and caused issues with duplicate containers being started on server reboot. Until the docker api for container restarts stabilizes, we will not be able to provide this functionality within Dokku.
|
||||
|
||||
If desired, you may replicate this functionality using the official `docker-options` plugin.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1560: @darklow Fixes issue where SSL and non-SSL templates cannot be used at the same time
|
||||
- #1566: @michaelshobbs Fix logic error in enabling nginx
|
||||
- #1568: @josegonzalez Remove 'connection closed' messages from dokku ssh client
|
||||
- #1574: @josegonzalez Ensure the user has a valid hostname set during installation
|
||||
- #1585: @michaelshobbs Ensure dokku can read nginx logs and don't remove other perms
|
||||
- #1589: @michaelshobbs Patch broken nginx 1.8.0 logrotate script
|
||||
- #1591: @michaelshobbs Remove docker restart policy until the docker api stabilizes
|
||||
- #1603: @josegonzalez Add missing plugin triggers
|
||||
Quiet client #1568
|
||||
|
||||
### New Features
|
||||
|
||||
- #1490: @vijayviji Add windows-specific vagrant setup
|
||||
- #1563: @kdomanski Cleanup all dead containers in dokku cleanup
|
||||
- #1590: @michaelshobbs Trigger docker-args-build for dockerfile deployments
|
||||
- #1600: @josegonzalez Upgrade to Herokuish 0.3.4
|
||||
- #1602: @josegonzalez Add pre-receive-app plugin trigger
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1556: @josegonzalez Use proper cdn link for css asset
|
||||
- #1557: @josegonzalez Code styling changes
|
||||
- #1561: @josegonzalez Set dokku-acl compatibility to 0.4.0+
|
||||
- #1562: @josegonzalez Documentation Overhaul
|
||||
- #1573: @mateusortiz Add link to license
|
||||
- #1577: @Flink Add official redirect plugin
|
||||
- #1587: @josegonzalez Update "reporting other issues" to include `docker inspect`
|
||||
- #1598: @adamwolf Add missing bootstrap.sh step
|
||||
- #1599: @ssd532 Fix a few grammatical mistakes
|
||||
- #1601: @ojacquemart Fix typo
|
||||
- #1604: @josegonzalez Add every type of favicon to all templates
|
||||
|
||||
## 0.4.2
|
||||
|
||||
This release was mainly a documentation release, with a few notable features:
|
||||
|
||||
- You can now use the commercial version of docker-engine with dokku.
|
||||
- You can now name your containers using the official `named-containers` plugin
|
||||
|
||||
Huge thanks to @Flink for working on our official plugins and adding official [basic auth](https://github.com/dokku/dokku-http-auth), [couchdb](https://github.com/dokku/dokku-couchdb), and [site maintenance](https://github.com/dokku/dokku-maintenance) plugins!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1530: @Flink Fix nginx configuration for SSL
|
||||
|
||||
### New Features
|
||||
|
||||
- #1515: @leonardodino Allow local prebuilt stack sourcing
|
||||
- #1536 #1537: @josegonzalez Add docker-engine-cs as docker-engine alternative
|
||||
- #1511: @Flink Add `named-containers` as a core plugin
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1520: @kimausloos Add `dokku` command-prefix to `plugin:install` command
|
||||
- #1519: @3onyc Fix typos in documentation
|
||||
- #1521: @edm00se Use correct url to bootstrap.sh in README.md
|
||||
- #1522: @josegonzalez Avoid redirects and use raw.githubusercontent.com for github links
|
||||
- #1523 #1548: @callahad Make room for the longer bootstrap.sh URL
|
||||
- #1524: @callahad Document idiosyncracies with Linode
|
||||
- #1529: @pzula Adds helpful information regarding whitespacing when setting config
|
||||
- #1525 #1550: @josegonzalez Add gratipay shield to readme
|
||||
- #1544 #1545 #1547 #1551: @josegonzalez @Flink Update compatibility for community plugins
|
||||
- #1546: @josegonzalez Add missing description to history output in HISTORY.md
|
||||
- #1552 #1553 #1555: @josegonzalez Various documentation styling tweaks
|
||||
|
||||
## 0.4.1
|
||||
|
||||
This release is primarily a bugfix and documentation update. In 0.4.0, we incorrectly handled setting environment variables in certain cases, resulting in misconfigured applications. We recommend that all users upgrade from 0.4.1 as soon as possible.
|
||||
|
||||
One new feature is colorized logging output, which should make it easier to debug application logging output when deploying multiple processes.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1494: @callahad Correctly install packages for DOKKU_TAG=v0.4.0
|
||||
- #1496: @callahad Don't prompt users when installing dokku package
|
||||
- #1514: @michaelshobbs Do not use exit 0 in config functions and fix CURL environment variable setting
|
||||
|
||||
### New Features
|
||||
|
||||
- #1482: @Flink Strip the `dokku-` part from plugins on install
|
||||
- #1500: @jazzzz Log user name and fingerprint in events
|
||||
- #1512: @Flink Colorize output from logs
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1485: @matto1990 Update Slack plugin compatability
|
||||
- #1488: @josegonzalez Update plugins list with compatibility changes
|
||||
- #1491: @josegonzalez Promote [maintenance](https://github.com/dokku/dokku-maintenance) and [http basic auth](https://github.com/dokku/dokku-http-auth) plugins to official status
|
||||
- #1492: @josegonzalez Upgrade hostname plugin to 0.4.0+ compatibility
|
||||
- #1501: @josegonzalez Clarify bootstrap installation documentation
|
||||
- #1502: @josegonzalez Update dokku-apt compatibility
|
||||
- #1504: @michaelshobbs Change plugin install doc to show one-step method
|
||||
|
||||
## 0.4.0
|
||||
|
||||
This is our first minor release in almost a year. Many new features and removals have occurred, so here is a neat summary:
|
||||
|
||||
- Plugins are now triggered via `plugn`. Notably, you'll need add a `plugin.toml` to describe the plugin as well as use `plugn trigger` instead of `pluginhook` to trigger plugin callbacks. Please see the [plugin creation documentation](http://dokku.viewdocs.io/dokku/development/plugin-creation/) for more details.
|
||||
- A few new official plugins have been added to the core, including [image tagging](http://dokku.viewdocs.io/dokku/application-deployment/), [certificate management](http://dokku.viewdocs.io/dokku/deployment/ssl-configuration/), a tar-based deploy solution, and much more. Check out the *New Features* section for more details.
|
||||
- We've removed a few deprecated plugin callbacks. Please see the [plugin triggers documentation](http://dokku.viewdocs.io/dokku/development/plugin-triggers/) to see what is available.
|
||||
- [Official datastorage plugins](https://github.com/dokku) have been created for the most commonly used datastores. If you previously used/maintained a community contributed plugin, please check these out. We'll be adding more official plugins as time goes on.
|
||||
|
||||
Thanks to the *many* contributors for making this release our best release so far, and special thanks to both @michaelshobbs and @Flink for pushing along the `0.4.0` release!
|
||||
|
||||
### Deprecations and Removals
|
||||
|
||||
- #1372: @SonicHedgehog Do no longer force-install a default nginx.conf
|
||||
- #1415: @tilgovi Remove uses of (un)set-norestart
|
||||
- #1432: @josegonzalez Delete unmaintained AUTHORS file
|
||||
- #1450: @michaelshobbs Rename event plugin buildstep hooks to buildpack
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1344: @AdamVig Add better error checking on nginx:import-ssl
|
||||
- #1417: @josegonzalez Expose host and port in vagrant build vm
|
||||
- #1418: @josegonzalez Use cgroupfs-mount as alternative package to cgroup-lite dependency
|
||||
- #1419: @u2mejc Fix dokku ps <app> over ssh
|
||||
- #1422: @josegonzalez Guard against missing VHOST files when listing domains
|
||||
- #1428: @jimeh Use `$PLUGIN_PATH` instead of `$(dirname $0)/..`
|
||||
- #1430: @lubert Update vagrant box name to `bento/ubuntu-14.04`
|
||||
- #1439: @michaelshobbs Fix tar tests by sleeping for 5 seconds
|
||||
- #1447: @alanjds Properly detect app name in the official cli client
|
||||
- #1449: @josegonzalez Match herokuish deb with released version number
|
||||
- #1457: @lukechilds Bashstyle fixes
|
||||
- #1463: @josegonzalez Update `Xenify Distro` option for linode stackscript
|
||||
- #1464: @josegonzalez Limit number of log lines when calling `dokku logs -t`
|
||||
- #1466: @josegonzalez Follow bashstyle conventions where possible
|
||||
- #1471: @michaelshobbs Make the default scaling logic clearer
|
||||
- #1475: @josegonzalez Fix issue where restart on failure option overrode existing DOCKER_ARGS
|
||||
|
||||
### New features
|
||||
|
||||
- #1225: @michaelshobbs Add tags plugin to handle image tagging and deployment of tagged app images
|
||||
- #1228: @michaelshobbs Use plugn instead of pluginhook to trigger plugin hooks
|
||||
- #1402: @josegonzalez Consolidate configuration management into config plugin
|
||||
- #1414: @michaelshobbs Add certs plugin for certificate management
|
||||
- #1420: @josegonzalez Add `dokku enter` for connecting to an app container
|
||||
- #1421: @basicer Add tar plugin to manage tar-based deployments
|
||||
- #1423: @josegonzalez Set `DYNO_TYPE_NUMBER` environment variable for each container
|
||||
- #1431: @josegonzalez Add helper function for inspecting the state of a container
|
||||
- #1444: @josegonzalez Extract cleanup command into common function
|
||||
- #1445: @josegonzalez Create CONTRIBUTING.md
|
||||
- #1455: @michaelshobbs Continue and log an event if/when container retirement fails
|
||||
- #1458: @michaelshobbs Set Herokuish `TRACE=true` when `DOKKU_TRACE` is set
|
||||
- #1460: @michaelshobbs Bump herokuish version to 0.3.3
|
||||
- #1465: @josegonzalez Set DYNO environment variable to heroku-compatible value
|
||||
- #1467: @josegonzalez Upgrade dokku installation to use docker-engine
|
||||
- #1468: @michaelshobbs Clean up semver logic and run install-dependencies after package installation
|
||||
- #1469: @isundaylee Add nginx:access-logs and nginx:error-logs commands
|
||||
- #1470: @assaf Add nginx configuration for running behind load balancer
|
||||
- #1472: @michaelshobbs Use processes defined in `Procfile` when generating `DOKKU_SCALE` file
|
||||
- #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`.
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1407: @ertrzyiks Correct DOKKU_DOCKERFILE_PORT variable name in docs
|
||||
- #1408: @josegonzalez Add links to official dokku datastorage plugins
|
||||
- #1426: @henrik Update memcached link to maintained fork
|
||||
- #1437: @Flink Update compatibility version for several plugins
|
||||
- #1446: @johnfraney Correct nginx documentation
|
||||
- #1478: @eljojo Fix naming of herokuish package in installation docs
|
||||
|
||||
## 0.3.26
|
||||
|
||||
This release has a few new features, the largest of which is switching from buildstep to herokuish for building containers. Going forward, this should help ensure that built containers are as close to heroku containers as possible, and also allow us to be on the cutting edge of heroku buildpack support. Props to @michaelshobbs for his work on herokuish.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1401: @josegonzalez Install apt-transport-https before adding https-backed apt sources
|
||||
|
||||
### New Features
|
||||
|
||||
- #1128: @michaelshobbs Switch from buildstep to herokuish
|
||||
- #1399: @basicer Make dokku play nice when there are multiple receive-app hooks
|
||||
- #1413: @michaelshobbs support comments in DOKKU_SCALE and print contents on deploy
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1400: @josegonzalez Fix HISTORY.md formatting
|
||||
- #1410: @josegonzalez Clarify DOKKU_SCALE usage
|
||||
- #1411: @josegonzalez Clarify `ps:scale` example
|
||||
|
||||
## 0.3.25
|
||||
|
||||
This release is a bugfix release fixing a broken 0.3.25 apt-get installation.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1398 @josegonzalez Revert "Remove `dokku plugins-install` from postinst hook
|
||||
|
||||
## 0.3.24
|
||||
|
||||
This release is a bugfix release covering dokku packaging.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1397: @josegonzalez Use https docker apt repo
|
||||
- #1394: @josegonzalez Remove `dokku plugins-install` from postinst hook
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1395: @adrianmoya Adding fqdn requirement
|
||||
|
||||
## 0.3.23
|
||||
|
||||
This release is a bugfix release mostly covering installation and nginx issues. As well, we launched a nicer documentation site [here](http://progrium.viewdocs.io/dokku/). Thanks to all of our contributors for making this a great release!
|
||||
This release is a bugfix release mostly covering installation and nginx issues. As well, we launched a nicer documentation site [here](http://dokku.viewdocs.io/dokku/). Thanks to all of our contributors for making this a great release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -23,7 +430,7 @@ This release is a bugfix release mostly covering installation and nginx issues.
|
||||
- #1359: @michaelshobbs allow DOKKU_WAIT_TO_RETIRE to be defined per app
|
||||
- #1365: @michaelshobbs support dockerfile images that don't include bash
|
||||
|
||||
### Docs Changes
|
||||
### Documentation
|
||||
|
||||
- #1305: @josegonzalez Updated documentation site
|
||||
- #1321: @fwolfst Mention alternative to nginx.conf templates: include-dir.
|
||||
@@ -62,7 +469,7 @@ This release is a general bugfix release, with improvements to handling of nginx
|
||||
- #1291: @michaelshobbs Refactored interface for managing global/local app configuration
|
||||
- #1299: @SonicHedgehog Set X-Forwarded-Proto header if TLS is enabled when running checks
|
||||
|
||||
### Docs Changes
|
||||
### Documentation
|
||||
|
||||
- #1273: @alessio Add docs for the events plugin
|
||||
- #1276: @josegonzalez Reorder and deprecate a few plugins
|
||||
@@ -103,7 +510,7 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- #1251: @josegonzalez Fallback to using /etc/init.d/nginx reload directly to restart nginx
|
||||
- #1264: @josegonzalez Require lxc-docker-1.6.2
|
||||
|
||||
### Docs Changes
|
||||
### Documentation
|
||||
|
||||
- #1252: @josegonzalez Fix ssh port for vagrant installation. Closes #1139. [ci skip]
|
||||
- #1250: @josegonzalez SSL documentation is misleading
|
||||
@@ -130,7 +537,7 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- #1227: @Flink Use --no-cache when building Dockerfile
|
||||
- #1246: @josegonzalez Ensure we call apt-get before installing packages
|
||||
|
||||
### Docs Changes
|
||||
### Documentation
|
||||
|
||||
- #1168: @cjblomqvist [docs] Update git-rev plugin to point to maintained version
|
||||
- #1180: @sherbondy [docs] Clarify usage around official dokku `docker-options` plugin
|
||||
@@ -407,9 +814,10 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- 969aed87: @jfrazelle Fix double brackets issue in nginx-vhosts install
|
||||
- 42fee25f: @rhy-jot Mention 14.04 & 12.10 sunset
|
||||
- 4f5fc586: @rhy-jot Update cipher list
|
||||
- #276: @joliv Add dependencies hook - wingrunr21- #476: Added man page entry
|
||||
- #276: @wingrunr21 Add dependencies hook
|
||||
- #476: @joliv Added man page entry
|
||||
- #522: @wingrunr21 Improve SSL support and implement SPDY
|
||||
- #544: @jfrazelle if dokku.conf has not been created, create it
|
||||
- #544: @jfrazelle if dokku.conf has not been created, create it
|
||||
- #555: @jakubholynet Readme fix, Env vars only set at run time
|
||||
- #562: @assaf Zero down-time deploy and server checks
|
||||
- #571: @joliv Added man page plugin command
|
||||
|
||||
96
Makefile
@@ -1,10 +1,12 @@
|
||||
DOKKU_VERSION = master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.github.com/progrium/sshcommand/master/sshcommand
|
||||
PLUGINHOOK_URL ?= https://s3.amazonaws.com/progrium-pluginhook/pluginhook_0.1.0_amd64.deb
|
||||
STACK_URL ?= https://github.com/progrium/buildstep.git
|
||||
PREBUILT_STACK_URL ?= https://github.com/progrium/buildstep/releases/download/2015-07-14/2015-07-14_1afb78e747.tar.gz
|
||||
PLUGINS_PATH ?= /var/lib/dokku/plugins
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/master/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
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
|
||||
|
||||
# If the first argument is "vagrant-dokku"...
|
||||
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
|
||||
@@ -14,7 +16,13 @@ ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
|
||||
$(eval $(RUN_ARGS):;@:)
|
||||
endif
|
||||
|
||||
.PHONY: all apt-update install copyfiles man-db version plugins dependencies sshcommand pluginhook docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku
|
||||
ifeq ($(CIRCLECI),true)
|
||||
BUILD_STACK_TARGETS = circleci deps build
|
||||
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 tests.mk
|
||||
include deb.mk
|
||||
@@ -22,15 +30,14 @@ include deb.mk
|
||||
all:
|
||||
# Type "make install" to install.
|
||||
|
||||
install: dependencies copyfiles plugin-dependencies plugins version
|
||||
install: dependencies version copyfiles plugin-dependencies plugins
|
||||
|
||||
release: deb-all package_cloud packer
|
||||
|
||||
package_cloud:
|
||||
package_cloud push dokku/dokku/ubuntu/trusty buildstep*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty herokuish*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty sshcommand*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty pluginhook*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty rubygem*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty plugn*.deb
|
||||
package_cloud push dokku/dokku/ubuntu/trusty dokku*.deb
|
||||
|
||||
packer:
|
||||
@@ -38,13 +45,21 @@ packer:
|
||||
|
||||
copyfiles:
|
||||
cp dokku /usr/local/bin/dokku
|
||||
mkdir -p ${PLUGINS_PATH}
|
||||
find ${PLUGINS_PATH} -mindepth 2 -maxdepth 2 -name '.core' -printf '%h\0' | xargs -0 rm -Rf
|
||||
mkdir -p ${CORE_PLUGINS_PATH} ${PLUGINS_PATH}
|
||||
rm -rf ${CORE_PLUGINS_PATH}/*
|
||||
test -d ${CORE_PLUGINS_PATH}/enabled || PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn init
|
||||
test -d ${PLUGINS_PATH}/enabled || PLUGIN_PATH=${PLUGINS_PATH} plugn init
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do \
|
||||
rm -Rf ${PLUGINS_PATH}/$$plugin && \
|
||||
cp -R plugins/$$plugin ${PLUGINS_PATH} && \
|
||||
touch ${PLUGINS_PATH}/$$plugin/.core; \
|
||||
rm -Rf ${CORE_PLUGINS_PATH}/available/$$plugin && \
|
||||
rm -Rf ${PLUGINS_PATH}/available/$$plugin && \
|
||||
rm -rf ${CORE_PLUGINS_PATH}/$$plugin && \
|
||||
rm -rf ${PLUGINS_PATH}/$$plugin && \
|
||||
cp -R plugins/$$plugin ${CORE_PLUGINS_PATH}/available && \
|
||||
ln -s ${CORE_PLUGINS_PATH}/available/$$plugin ${PLUGINS_PATH}/available; \
|
||||
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
done
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH}
|
||||
$(MAKE) addman
|
||||
|
||||
addman:
|
||||
@@ -55,13 +70,13 @@ addman:
|
||||
version:
|
||||
git describe --tags > ~dokku/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
|
||||
|
||||
plugin-dependencies: pluginhook
|
||||
dokku plugins-install-dependencies
|
||||
plugin-dependencies: plugn
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
|
||||
plugins: pluginhook docker
|
||||
dokku plugins-install
|
||||
plugins: plugn docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update sshcommand pluginhook docker help2man man-db
|
||||
dependencies: apt-update sshcommand plugn docker help2man man-db
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
@@ -78,22 +93,18 @@ sshcommand:
|
||||
chmod +x /usr/local/bin/sshcommand
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
|
||||
pluginhook:
|
||||
wget -qO /tmp/pluginhook_0.1.0_amd64.deb ${PLUGINHOOK_URL}
|
||||
dpkg -i /tmp/pluginhook_0.1.0_amd64.deb
|
||||
plugn:
|
||||
wget -qO /tmp/plugn_latest.tgz ${PLUGN_URL}
|
||||
tar xzf /tmp/plugn_latest.tgz -C /usr/local/bin
|
||||
|
||||
docker: aufs
|
||||
apt-get install -qq -y curl
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
ifndef CI
|
||||
curl -sSL https://get.docker.com/gpg | apt-key add -
|
||||
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
|
||||
apt-get update
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
ifdef DOCKER_VERSION
|
||||
apt-get install -qq -y lxc-docker-${DOCKER_VERSION}
|
||||
else
|
||||
apt-get install -qq -y lxc-docker-1.6.2
|
||||
apt-get install -qq -y docker-engine=${DOCKER_VERSION} || (apt-cache madison docker-engine ; exit 1)
|
||||
endif
|
||||
sleep 2 # give docker a moment i guess
|
||||
endif
|
||||
@@ -104,30 +115,31 @@ ifndef CI
|
||||
endif
|
||||
|
||||
stack:
|
||||
ifeq ($(shell test -e /var/run/docker.sock && touch -a -c /var/run/docker.sock && echo $$?),0)
|
||||
@echo "Start building buildstep"
|
||||
ifeq ($(shell test -e /var/run/docker.sock && touch -c /var/run/docker.sock && echo $$?),0)
|
||||
ifdef BUILD_STACK
|
||||
@docker images | grep progrium/buildstep || (git clone ${STACK_URL} /tmp/buildstep && docker build -t progrium/buildstep /tmp/buildstep && rm -rf /tmp/buildstep)
|
||||
@echo "Start building herokuish from source"
|
||||
docker images | grep gliderlabs/herokuish || (git clone ${STACK_URL} /tmp/herokuish && cd /tmp/herokuish && IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e ${BUILD_STACK_TARGETS} && rm -rf /tmp/herokuish)
|
||||
else
|
||||
@docker images | grep progrium/buildstep || curl --silent -L ${PREBUILT_STACK_URL} | gunzip -cd | docker import - progrium/buildstep
|
||||
ifeq ($(shell echo ${PREBUILT_STACK_URL} | egrep -q 'http.*://|file://' && echo $$?),0)
|
||||
@echo "Start importing herokuish from ${PREBUILT_STACK_URL}"
|
||||
docker images | grep gliderlabs/herokuish || wget -nv -O - ${PREBUILT_STACK_URL} | gunzip -cd | docker import - gliderlabs/herokuish
|
||||
else
|
||||
@echo "Start pulling herokuish from ${PREBUILT_STACK_URL}"
|
||||
docker images | grep gliderlabs/herokuish || docker pull ${PREBUILT_STACK_URL}
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
count:
|
||||
@echo "Core lines:"
|
||||
@cat dokku bootstrap.sh | egrep -v "^$$" | wc -l
|
||||
@cat dokku bootstrap.sh | sed 's/^$$//g' | wc -l
|
||||
@echo "Plugin lines:"
|
||||
@find plugins -type f | xargs cat | egrep -v "^$$" | wc -l
|
||||
@find plugins -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
|
||||
@echo "Test lines:"
|
||||
@find tests -type f | xargs cat | egrep -v "^$$" |wc -l
|
||||
@find tests -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
|
||||
|
||||
dokku-installer:
|
||||
apt-get install -qq -y ruby
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install rack -v 1.5.2 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install rack-protection -v 1.5.3 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install sinatra -v 1.4.5 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install tilt -v 1.4.1 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || ruby contrib/dokku-installer.rb onboot
|
||||
test -f /var/lib/dokku/.dokku-installer-created || python contrib/dokku-installer.py onboot
|
||||
test -f /var/lib/dokku/.dokku-installer-created || service dokku-installer start
|
||||
test -f /var/lib/dokku/.dokku-installer-created || service nginx reload
|
||||
test -f /var/lib/dokku/.dokku-installer-created || touch /var/lib/dokku/.dokku-installer-created
|
||||
|
||||
16
README.md
@@ -1,4 +1,4 @@
|
||||
# Dokku [](https://circleci.com/gh/progrium/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://webchat.freenode.net/?channels=dokku) [](http://progrium.viewdocs.io/dokku/)
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://webchat.freenode.net/?channels=dokku) [](http://dokku.viewdocs.io/dokku/) [](https://gratipay.com/dokku/)
|
||||
|
||||
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. Sponsored by our friends at [Deis](http://deis.io/).
|
||||
|
||||
@@ -10,24 +10,24 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
|
||||
|
||||
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
|
||||
|
||||
wget https://raw.github.com/progrium/dokku/v0.3.23/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.3.23 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
[View the docs for upgrading](http://progrium.viewdocs.io/dokku/upgrading) from an older version of Dokku.
|
||||
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/upgrading) from an older version of Dokku.
|
||||
|
||||
## Documentation
|
||||
|
||||
Full documentation - including advanced installation docs - are available online at [docs](http://progrium.viewdocs.io/dokku/)
|
||||
Full documentation - including advanced installation docs - are available online at [docs](http://dokku.viewdocs.io/dokku/)
|
||||
|
||||
## Support
|
||||
|
||||
You can use [Github Issues](https://github.com/progrium/dokku/issues), check [Troubleshooting](http://progrium.viewdocs.io/dokku/troubleshooting) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/troubleshooting) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
|
||||
## Contribution
|
||||
|
||||
After checking [Github Issues](https://github.com/progrium/dokku/issues), the [Troubleshooting Guide](http://progrium.viewdocs.io/dokku/troubleshooting) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/troubleshooting) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general dokku experience for all users.
|
||||
|
||||
@@ -37,4 +37,4 @@ Dokku is currently sponsored by the enterprise grade, multi-host PaaS project [D
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
[MIT License](https://github.com/dokku/dokku/blob/master/LICENSE) © Jeff Lindsay
|
||||
|
||||
3
SPONSORS
@@ -1 +1,2 @@
|
||||
Deis http://deis.io
|
||||
Deis http://deis.io
|
||||
DigitalOcean https://www.digitalocean.com/
|
||||
|
||||
32
Vagrantfile
vendored
@@ -1,7 +1,7 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
BOX_NAME = ENV["BOX_NAME"] || "chef/ubuntu-14.04"
|
||||
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-14.04"
|
||||
BOX_MEMORY = ENV["BOX_MEMORY"] || "1024"
|
||||
DOKKU_DOMAIN = ENV["DOKKU_DOMAIN"] || "dokku.me"
|
||||
DOKKU_IP = ENV["DOKKU_IP"] || "10.0.0.2"
|
||||
@@ -18,7 +18,6 @@ Vagrant::configure("2") do |config|
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
config.vm.box = BOX_NAME
|
||||
config.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
|
||||
|
||||
config.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
|
||||
@@ -28,17 +27,40 @@ Vagrant::configure("2") do |config|
|
||||
vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY]
|
||||
end
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx["memsize"] = BOX_MEMORY
|
||||
end
|
||||
|
||||
config.vm.define "empty", autostart: false
|
||||
|
||||
config.vm.define "dokku", primary: true do |vm|
|
||||
vm.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
vm.vm.provision :shell do |s|
|
||||
s.inline = <<-EOT
|
||||
echo '"\e[5~": history-search-backward' > /root/.inputrc
|
||||
echo '"\e[6~": history-search-forward' >> /root/.inputrc
|
||||
echo 'set show-all-if-ambiguous on' >> /root/.inputrc
|
||||
echo 'set completion-ignore-case on' >> /root/.inputrc
|
||||
EOT
|
||||
end
|
||||
end
|
||||
|
||||
# For windows users. Sharing folder from windows creates problem with sym links and so, sync the repo instead from GOS.
|
||||
config.vm.define "dokku-windows", autostart: false do |vm|
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null"
|
||||
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && bash bootstrap.sh"
|
||||
end
|
||||
|
||||
config.vm.define "dokku-deb", autostart: false do |vm|
|
||||
vm.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
@@ -46,7 +68,11 @@ Vagrant::configure("2") do |config|
|
||||
end
|
||||
|
||||
config.vm.define "build", autostart: false do |vm|
|
||||
vm.vm.provision :shell, :inline => "apt-get update > /dev/null && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make deb-all"
|
||||
end
|
||||
|
||||
|
||||
57
bootstrap.sh
@@ -7,7 +7,7 @@
|
||||
|
||||
# We wrap this whole script in a function, so that we won't execute
|
||||
# until the entire script is downloaded.
|
||||
# That's good because it prevents our output overlapping with curl's.
|
||||
# That's good because it prevents our output overlapping with wget's.
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
|
||||
@@ -16,22 +16,26 @@ bootstrap () {
|
||||
|
||||
set -eo pipefail
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/progrium/dokku.git"}
|
||||
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/dokku/dokku.git"}
|
||||
|
||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||
if ! command -v apt-get &>/dev/null; then
|
||||
echo "This installation script requires apt-get. For manual installation instructions, consult http://progrium.viewdocs.io/dokku/advanced-installation ."
|
||||
echo "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
which curl > /dev/null || apt-get install -qq -y curl
|
||||
hostname -f > /dev/null 2>&1 || {
|
||||
echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
||||
exit 1
|
||||
}
|
||||
|
||||
apt-get update -qq > /dev/null
|
||||
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties
|
||||
|
||||
dokku_install_source() {
|
||||
apt-get install -qq -y git make software-properties-common
|
||||
cd /root
|
||||
if [ ! -d /root/dokku ]; then
|
||||
if [[ ! -d /root/dokku ]]; then
|
||||
git clone $DOKKU_REPO /root/dokku
|
||||
fi
|
||||
|
||||
@@ -42,19 +46,28 @@ dokku_install_source() {
|
||||
}
|
||||
|
||||
dokku_install_package() {
|
||||
curl -sSL https://get.docker.io/gpg | apt-key add -
|
||||
curl -sSL https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "--> Initial apt-get update"
|
||||
apt-get update -qq > /dev/null
|
||||
apt-get install -qq -y apt-transport-https
|
||||
|
||||
echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
|
||||
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 " Installation will continue in 10 seconds."
|
||||
sleep 10
|
||||
fi
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
apt-get update > /dev/null
|
||||
apt-get install -qq -y "linux-image-extra-$(uname -r)" apt-transport-https
|
||||
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
|
||||
apt-get update -qq > /dev/null
|
||||
|
||||
if [[ -n $DOKKU_CHECKOUT ]]; then
|
||||
apt-get install -qq -y dokku=$DOKKU_CHECKOUT
|
||||
apt-get install -y dokku=$DOKKU_CHECKOUT
|
||||
else
|
||||
apt-get install -qq -y dokku
|
||||
apt-get install -y dokku
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -68,15 +81,23 @@ elif [[ -n $DOKKU_TAG ]]; then
|
||||
patch=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[3]}')
|
||||
|
||||
# 0.3.13 was the first version with a debian package
|
||||
if [[ "$major" -eq "0" ]] && [[ "$minor" -lt "4" ]] && [[ "$patch" -lt "13" ]]; then
|
||||
export DOKKU_CHECKOUT="$DOKKU_TAG"
|
||||
dokku_install_source
|
||||
else
|
||||
if [[ "$major" -eq "0" ]] && [[ "$minor" -eq "3" ]] && [[ "$patch" -ge "13" ]]; then
|
||||
export DOKKU_CHECKOUT="$DOKKU_SEMVER"
|
||||
dokku_install_package
|
||||
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
|
||||
export DOKKU_CHECKOUT="$DOKKU_SEMVER"
|
||||
dokku_install_package
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
else
|
||||
export DOKKU_CHECKOUT="$DOKKU_TAG"
|
||||
dokku_install_source
|
||||
fi
|
||||
else
|
||||
dokku_install_package
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
machine:
|
||||
pre:
|
||||
- echo 'DOCKER_OPTS="-s btrfs -e lxc -D --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.8.2-circleci-cp-workaround'
|
||||
- sudo chmod 0755 /usr/bin/docker
|
||||
services:
|
||||
- docker
|
||||
dependencies:
|
||||
|
||||
217
contrib/dokku-installer.py
Executable file
@@ -0,0 +1,217 @@
|
||||
#!/usr/bin/env python2.7
|
||||
|
||||
import cgi
|
||||
import json
|
||||
import os
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.4.8'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'"
|
||||
hostname = subprocess.check_output(command, shell=True)
|
||||
if ':' in hostname:
|
||||
hostname = ''
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
key_file = os.getenv('KEY_FILE', '/root/.ssh/authorized_keys')
|
||||
|
||||
admin_keys = []
|
||||
if os.path.isfile(key_file):
|
||||
try:
|
||||
command = "cat {0}".format(key_file)
|
||||
admin_keys = subprocess.check_output(command, shell=True).strip().split("\n")
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
|
||||
def check_boot():
|
||||
if 'onboot' not in sys.argv:
|
||||
return
|
||||
init_dir = os.getenv('INIT_DIR', '/etc/init')
|
||||
systemd_dir = os.getenv('SYSTEMD_DIR', '/etc/systemd/system')
|
||||
nginx_dir = os.getenv('NGINX_DIR', '/etc/nginx/conf.d')
|
||||
|
||||
if os.path.exists(init_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f:
|
||||
f.write("start on runlevel [2345]\n")
|
||||
f.write("exec {0} selfdestruct\n".format(os.path.abspath(__file__)))
|
||||
if os.path.exists(systemd_dir):
|
||||
with open('{0}/dokku-installer.service'.format(systemd_dir), 'w') as f:
|
||||
f.write("[Unit]\n")
|
||||
f.write("Description=Dokku web-installer\n")
|
||||
f.write("\n")
|
||||
f.write("[Service]\n")
|
||||
f.write("ExecStart={0} selfdestruct\n".format(os.path.abspath(__file__)))
|
||||
f.write("\n")
|
||||
f.write("[Install]\n")
|
||||
f.write("WantedBy=multi-user.target\n")
|
||||
f.write("WantedBy=graphical.target\n")
|
||||
if os.path.exists(nginx_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(nginx_dir), 'w') as f:
|
||||
f.write("upstream dokku-installer { server 127.0.0.1:2000; }\n")
|
||||
f.write("server {\n")
|
||||
f.write(" listen 80;\n")
|
||||
f.write(" location / {\n")
|
||||
f.write(" proxy_pass http://dokku-installer;\n")
|
||||
f.write(" }\n")
|
||||
f.write("}\n")
|
||||
|
||||
subprocess.call('rm -f /etc/nginx/sites-enabled/*', shell=True)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
content = PAGE.replace('{VERSION}', VERSION)
|
||||
content = content.replace('{HOSTNAME}', hostname)
|
||||
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(content)
|
||||
|
||||
def do_POST(self):
|
||||
if self.path not in ['/setup', '/setup/']:
|
||||
return
|
||||
|
||||
params = cgi.FieldStorage(fp=self.rfile,
|
||||
headers=self.headers,
|
||||
environ={
|
||||
'REQUEST_METHOD': 'POST',
|
||||
'CONTENT_TYPE': self.headers['Content-Type']})
|
||||
|
||||
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
|
||||
if 'vhost' in params and params['vhost'].value == 'true':
|
||||
with open('{0}/VHOST'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
else:
|
||||
try:
|
||||
os.remove('{0}/VHOST'.format(dokku_root))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
command = ['sshcommand', 'acl-add', 'dokku', 'admin']
|
||||
for key in params['keys'].value.split("\n"):
|
||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
||||
proc.stdin.write(key)
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(json.dumps({'status': 'ok'}))
|
||||
|
||||
|
||||
class DeleteInstallerThread(object):
|
||||
def __init__(self, interval=1):
|
||||
thread = threading.Thread(target=self.run, args=())
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
def run(self):
|
||||
command = "rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start"
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && stop dokku-installer"
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
check_boot()
|
||||
|
||||
port = int(os.getenv('PORT', 2000))
|
||||
httpd = SocketServer.TCPServer(("", port), GetHandler)
|
||||
print "Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port)
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
PAGE = """
|
||||
<html>
|
||||
<head>
|
||||
<title>Dokku Setup</title>
|
||||
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="width: 640px;">
|
||||
<form id="form" role="form">
|
||||
<h1>Dokku Setup <small>{VERSION}</small></h1>
|
||||
<div class="form-group">
|
||||
<h3><small style="text-transform: uppercase;">Admin Access</small></h3>
|
||||
<label for="key">Public Key</label><br />
|
||||
<textarea class="form-control" name="keys" rows="7" id="key">{ADMIN_KEYS}</textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<h3><small style="text-transform: uppercase;">Hostname Configuration</small></h3>
|
||||
<div class="form-group">
|
||||
<label for="hostname">Hostname</label>
|
||||
<input class="form-control" type="text" id="hostname" name="hostname" value="{HOSTNAME}" />
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input id="vhost" name="vhost" type="checkbox" value="true"> Use <abbr title="Nginx will be run on port 80 and backend to your apps based on hostname">virtualhost naming</abbr> for apps</label>
|
||||
</div>
|
||||
<p>Your app URLs will look like:</p>
|
||||
<pre id="example">http://hostname:port</pre>
|
||||
</div>
|
||||
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span style="padding-left: 20px;" id="result"></span>
|
||||
</form>
|
||||
</div>
|
||||
<div id="error-output"></div>
|
||||
<script>
|
||||
function setup() {
|
||||
if ($.trim($("#key").val()) == "") {
|
||||
alert("Your admin public key cannot be blank.")
|
||||
return
|
||||
}
|
||||
if ($.trim($("#hostname").val()) == "") {
|
||||
alert("Your hostname cannot be blank.")
|
||||
return
|
||||
}
|
||||
data = $("#form").serialize()
|
||||
$("input,textarea,button").prop("disabled", true);
|
||||
$.post('/setup', data)
|
||||
.done(function() {
|
||||
$("#result").html("Success!")
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/application-deployment";
|
||||
})
|
||||
.fail(function(data) {
|
||||
$("#result").html("Something went wrong...")
|
||||
$("#error-output").html(data.responseText)
|
||||
});
|
||||
}
|
||||
function update() {
|
||||
if ($("#vhost").is(":checked") && $("#hostname").val().match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
|
||||
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
||||
$("#vhost").prop('checked', false);
|
||||
}
|
||||
if ($("#vhost").is(':checked')) {
|
||||
$("#example").html("http://<app-name>."+$("#hostname").val())
|
||||
} else {
|
||||
$("#example").html("http://"+$("#hostname").val()+":<app-port>")
|
||||
}
|
||||
}
|
||||
$("#vhost").change(update);
|
||||
$("#hostname").change(update);
|
||||
update();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,125 +0,0 @@
|
||||
#!/usr/bin/env ruby
|
||||
require "sinatra"
|
||||
require "open3"
|
||||
|
||||
if ARGV[0] == "onboot"
|
||||
File.open("/etc/init/dokku-installer.conf", "w") do |f|
|
||||
f.puts "start on runlevel [2345]"
|
||||
f.puts "exec #{File.absolute_path(__FILE__)} selfdestruct"
|
||||
end
|
||||
File.open("/etc/nginx/conf.d/dokku-installer.conf", "w") do |f|
|
||||
f.puts "upstream dokku-installer { server 127.0.0.1:2000; }"
|
||||
f.puts "server {"
|
||||
f.puts " listen 80;"
|
||||
f.puts " location / {"
|
||||
f.puts " proxy_pass http://dokku-installer;"
|
||||
f.puts " }"
|
||||
f.puts "}"
|
||||
end
|
||||
`rm -f /etc/nginx/sites-enabled/*`
|
||||
puts "Installed Upstart service and default Nginx virtualhost for installer to run on boot."
|
||||
exit
|
||||
end
|
||||
|
||||
version = "v0.3.23"
|
||||
dokku_root = ENV["DOKKU_ROOT"] || "/home/dokku"
|
||||
admin_keys = `cat /root/.ssh/authorized_keys`.split("\n")
|
||||
hostname = `bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || curl icanhazip.com'`.strip
|
||||
template = DATA.read
|
||||
|
||||
set :port, 2000
|
||||
set :environment, :production
|
||||
disable :protection
|
||||
|
||||
get "/" do
|
||||
ERB.new(template).result binding
|
||||
end
|
||||
|
||||
post "/setup" do
|
||||
if params[:vhost] == "true"
|
||||
File.open("#{dokku_root}/VHOST", "w") {|f| f.write params[:hostname] }
|
||||
else
|
||||
`rm #{dokku_root}/VHOST`
|
||||
end
|
||||
File.open("#{dokku_root}/HOSTNAME", "w") {|f| f.write params[:hostname] }
|
||||
keys = params[:keys].split("\n")
|
||||
keys.each do |k|
|
||||
Open3.capture2("sshcommand acl-add dokku admin", :stdin_data => k)
|
||||
end
|
||||
Thread.new {
|
||||
`rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start`
|
||||
`rm /etc/init/dokku-installer.conf && stop dokku-installer`
|
||||
}.run if ARGV[0] == "selfdestruct"
|
||||
end
|
||||
|
||||
__END__
|
||||
<html>
|
||||
<head>
|
||||
<title>Dokku Setup</title>
|
||||
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" />
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container" style="width: 640px;">
|
||||
<form id="form" role="form">
|
||||
<h1>Dokku Setup <small><%= version %></small></h1>
|
||||
<div class="form-group">
|
||||
<h3><small style="text-transform: uppercase;">Admin Access</small></h3>
|
||||
<label for="key">Public Key</label><br />
|
||||
<textarea class="form-control" name="keys" rows="7" id="key"><% admin_keys.each do |key| %><%= key + "\n" %><% end %></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<h3><small style="text-transform: uppercase;">Hostname Configuration</small></h3>
|
||||
<div class="form-group">
|
||||
<label for="hostname">Hostname</label>
|
||||
<input class="form-control" type="text" id="hostname" name="hostname" value="<%= hostname %>" />
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label><input id="vhost" name="vhost" type="checkbox" value="true"> Use <abbr title="Nginx will be run on port 80 and backend to your apps based on hostname">virtualhost naming</abbr> for apps</label>
|
||||
</div>
|
||||
<p>Your app URLs will look like:</p>
|
||||
<pre id="example">http://hostname:port</pre>
|
||||
</div>
|
||||
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span style="padding-left: 20px;" id="result"></span>
|
||||
</form>
|
||||
</div>
|
||||
<div id="error-output"></div>
|
||||
<script>
|
||||
function setup() {
|
||||
if ($.trim($("#key").val()) == "") {
|
||||
alert("Your admin public key cannot be blank.")
|
||||
return
|
||||
}
|
||||
if ($.trim($("#hostname").val()) == "") {
|
||||
alert("Your hostname cannot be blank.")
|
||||
return
|
||||
}
|
||||
data = $("#form").serialize()
|
||||
$("input,textarea,button").prop("disabled", true);
|
||||
$.post('/setup', data)
|
||||
.done(function() {
|
||||
$("#result").html("Success!")
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/application-deployment";
|
||||
})
|
||||
.fail(function(data) {
|
||||
$("#result").html("Something went wrong...")
|
||||
$("#error-output").html(data.responseText)
|
||||
});
|
||||
}
|
||||
function update() {
|
||||
if ($("#vhost").is(":checked") && $("#hostname").val().match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
|
||||
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
||||
$("#vhost").prop('checked', false);
|
||||
}
|
||||
if ($("#vhost").is(':checked')) {
|
||||
$("#example").html("http://<app-name>."+$("#hostname").val())
|
||||
} else {
|
||||
$("#example").html("http://"+$("#hostname").val()+":<app-port>")
|
||||
}
|
||||
}
|
||||
$("#vhost").change(update);
|
||||
$("#hostname").change(update);
|
||||
update();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,7 +6,7 @@ NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KE
|
||||
|
||||
random_number() {
|
||||
[[ -n "$1" ]] && RANGE="$1"
|
||||
if [[ -n "$RANGE" ]];then
|
||||
if [[ -n "$RANGE" ]]; then
|
||||
number=$RANDOM
|
||||
let "number %= $RANGE"
|
||||
else
|
||||
@@ -23,7 +23,7 @@ random_name() {
|
||||
UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}"
|
||||
|
||||
[[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,}
|
||||
[[ -z "$lower_appname" ]] && lower_appname=$(echo $UPPER_APPNAME | tr '[:upper:]' '[:lower:]')
|
||||
[[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]')
|
||||
echo "$lower_appname"
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
appname=""
|
||||
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
|
||||
set +e
|
||||
appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
set -e
|
||||
else
|
||||
echo "This is not a git repository"
|
||||
@@ -58,7 +58,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
true
|
||||
;;
|
||||
apps:destroy)
|
||||
if [[ -z "$2" ]] || [[ "$2" == "force" ]];then
|
||||
if [[ -z "$2" ]] || [[ "$2" == "force" ]]; then
|
||||
donotshift="YES"
|
||||
fi
|
||||
;;
|
||||
@@ -72,7 +72,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
appname=$(random_name)
|
||||
counter=0
|
||||
while ssh "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do
|
||||
if [[ $counter -ge 100 ]];then
|
||||
if [[ $counter -ge 100 ]]; then
|
||||
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
|
||||
ssh "dokku@$DOKKU_HOST" apps
|
||||
exit 1
|
||||
@@ -81,8 +81,7 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
counter=$((counter+1))
|
||||
fi
|
||||
done
|
||||
if git remote add dokku "dokku@$DOKKU_HOST:$appname"
|
||||
then
|
||||
if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then
|
||||
echo "-----> Dokku remote added at $DOKKU_HOST"
|
||||
echo "-----> Application name is $appname"
|
||||
else
|
||||
@@ -94,7 +93,8 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
fi
|
||||
|
||||
if [[ -z "$donotshift" ]]; then
|
||||
ssh -t "dokku@$DOKKU_HOST" "$@"
|
||||
# shellcheck disable=SC2029
|
||||
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
@@ -102,16 +102,16 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
if [[ ! "$1" =~ --* ]]; then
|
||||
verb=$1
|
||||
shift
|
||||
|
||||
|
||||
if [[ "$1" == "$appname" ]]; then
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
args="$*"
|
||||
else
|
||||
long_args="--"
|
||||
for arg in "$@";do
|
||||
if [[ "$arg" =~ --* ]];then
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" =~ --* ]]; then
|
||||
long_args+=" $arg"
|
||||
args=("${args[@]/$arg}")
|
||||
else
|
||||
@@ -120,8 +120,8 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
done
|
||||
fi
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
ssh -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
|
||||
# shellcheck disable=SC2086,SC2029
|
||||
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
|
||||
}
|
||||
|
||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"sleep 30",
|
||||
|
||||
"echo '--> Updating apt repositories'",
|
||||
"sudo apt-get update > /dev/null",
|
||||
"sudo apt-get update -qq > /dev/null",
|
||||
|
||||
"echo '--> Installing make requirement'",
|
||||
"sudo apt-get -qq -y install build-essential",
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
#!/bin/bash
|
||||
# <UDF name="hostname" default="" label="Hostname for dokku instance" example="example.com">
|
||||
# <UDF name="ssh_key" default="" label="Public SSH Key for root user" example="Sets the root user's public ssh key, which is also automatically imported into the dokku installer">
|
||||
# <UDF name="notify_email" default="" Label="Send Finish Notification To" example="Email address to send notification to when finished." />
|
||||
|
||||
function logit {
|
||||
# Simple logging function that prepends an easy-to-find marker '=> ' and a timestamp to a message
|
||||
TIMESTAMP=$(date -u +'%m/%d %H:%M:%S')
|
||||
MSG="=> ${TIMESTAMP} $1"
|
||||
echo ${MSG}
|
||||
}
|
||||
|
||||
function set_ssh_key {
|
||||
if [ -n "${SSH_KEY}" ]; then
|
||||
logit "Setting root ssh key"
|
||||
mkdir -p /root/.ssh
|
||||
chmod 700 /root/.ssh
|
||||
echo "$SSH_KEY" > /root/.ssh/authorized_keys
|
||||
chmod 600 /root/.ssh/authorized_keys
|
||||
chown -R root:root /root/.ssh
|
||||
fi
|
||||
}
|
||||
|
||||
function set_passwordless_ssh {
|
||||
logit "Turn off password authentication and root login for SSH"
|
||||
echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config
|
||||
service ssh restart
|
||||
}
|
||||
|
||||
function system_primary_ip {
|
||||
# returns the primary IP assigned to eth0
|
||||
ifconfig eth0 | awk -F: '/inet addr:/ {print $2}' | awk '{ print $1 }'
|
||||
}
|
||||
|
||||
function set_hostname {
|
||||
logit "Set up hostname"
|
||||
if [ -n "${HOSTNAME}" ]; then
|
||||
echo $HOSTNAME > /etc/hostname
|
||||
echo $IPADDR $FQDN $HOSTNAME >> /etc/hosts
|
||||
else
|
||||
system_primary_ip > /etc/hostname
|
||||
echo "$(system_primary_ip) localhost" >> /etc/hosts
|
||||
fi
|
||||
|
||||
IPADDR=$(/sbin/ifconfig eth0 | awk '/inet / { print $2 }' | sed 's/addr://')
|
||||
hostname -F /etc/hostname
|
||||
}
|
||||
|
||||
function postfix_install_loopback_only {
|
||||
logit "Installing and configuring Postfix"
|
||||
# Installs postfix and configure to listen only on the local interface. Also
|
||||
# allows for local mail delivery
|
||||
|
||||
echo "postfix postfix/destinations string localhost.localdomain, localhost" | debconf-set-selections
|
||||
echo "postfix postfix/mailname string localhost" | debconf-set-selections
|
||||
echo "postfix postfix/main_mailer_type select Internet Site" | debconf-set-selections
|
||||
echo "postfix postfix/myhostname string localhost" | debconf-set-selections
|
||||
sudo apt-get install -qq -y postfix > /dev/null 2>&1
|
||||
/usr/sbin/postconf -e "inet_interfaces = loopback-only"
|
||||
#/usr/sbin/postconf -e "local_transport = error:local delivery is disabled"
|
||||
|
||||
touch /tmp/restart-postfix
|
||||
}
|
||||
|
||||
function notify_install_via_email {
|
||||
if [ -n "${NOTIFY_EMAIL}" ]; then
|
||||
logit "Sending notification email to ${NOTIFY_EMAIL}"
|
||||
/usr/sbin/sendmail "${NOTIFY_EMAIL}" <<EOD
|
||||
To: ${NOTIFY_EMAIL}
|
||||
Subject: Dokku installation is complete
|
||||
From: Dokku StackScript <no-reply@${HOSTNAME}>
|
||||
|
||||
Your Dokku installation is complete and now ready to be configured: http://$(system_primary_ip) . Please visit this url to complete the setup of your Dokku instance.
|
||||
|
||||
Enjoy using Dokku!
|
||||
EOD
|
||||
fi
|
||||
}
|
||||
|
||||
function notify_restart_via_email {
|
||||
if [ -n "${NOTIFY_EMAIL}" ]; then
|
||||
logit "Sending notification email to ${NOTIFY_EMAIL} of required restart"
|
||||
/usr/sbin/sendmail "${NOTIFY_EMAIL}" <<EOD
|
||||
To: ${NOTIFY_EMAIL}
|
||||
Subject: Dokku Linode instance must be restarted
|
||||
From: Dokku StackScript <no-reply@${HOSTNAME}>
|
||||
|
||||
The following linode instance must be restarted:
|
||||
|
||||
${LINODE_LISHUSERNAME}
|
||||
|
||||
Before restarting, please go to this url:
|
||||
|
||||
https://manager.linode.com/linodes/dashboard/${LINODE_LISHUSERNAME}
|
||||
|
||||
Then click "Edit" next to the selected configuration profile and make the following changes:
|
||||
|
||||
- Change the "Kernel" option to the current "pv-grub" release
|
||||
- Set the "Xenify Distro" option to "no"
|
||||
|
||||
Then save your changes. Next, reboot the instance from the Linode Dashboard. You'll receive an email once the instance is available to continue the dokku installation.
|
||||
EOD
|
||||
fi
|
||||
}
|
||||
|
||||
function setup_linode {
|
||||
logit "Installing via linode"
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y linux-virtual
|
||||
DEBIAN_FRONTEND=noninteractive apt-get purge -qq -y grub2 grub-pc
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -qq -y grub
|
||||
mkdir -p /boot/grub
|
||||
update-grub -y
|
||||
sed -i 's/kopt=root=UUID=.* ro/kopt=root=\/dev\/xvda console=hvc0 ro quiet/g' /boot/grub/menu.lst
|
||||
sed -i 's/# groot=(hd0,0)/# groot=(hd0)/g' /boot/grub/menu.lst
|
||||
update-grub
|
||||
|
||||
cp /etc/rc.local /etc/rc.local-bak
|
||||
cat << "EOF" > /etc/rc.local
|
||||
#!/bin/sh -e
|
||||
sudo apt-get update >> /root/setup_linode.txt 2>&1
|
||||
sudo apt-get install -y linux-image-extra-"$(uname -r)" >> /root/setup_linode.txt 2>&1
|
||||
modprobe aufs >> /root/setup_linode.txt 2>&1
|
||||
|
||||
sudo apt-get install -y apparmor cgroup-lite >> /root/setup_linode.txt 2>&1
|
||||
|
||||
sudo apt-get install -y dokku >> /root/setup_linode.txt 2>&1
|
||||
|
||||
# Clean up this script so it only runs once
|
||||
rm -f /etc/rc.local
|
||||
mv /etc/rc.local-bak /etc/rc.local
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x /etc/rc.local
|
||||
}
|
||||
|
||||
function install_prerequisites {
|
||||
sudo apt-get install -qq -y curl > /dev/null 2>&1
|
||||
|
||||
logit "Installing docker gpg key"
|
||||
curl -sSL https://get.docker.com/gpg 2> /dev/null | apt-key add - > /dev/null 2>&1
|
||||
|
||||
logit "Installing dokku gpg key"
|
||||
curl -sSL https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - > /dev/null 2>&1
|
||||
|
||||
logit "Running apt-get update"
|
||||
sudo apt-get update > /dev/null
|
||||
|
||||
logit "Installing pre-requisites"
|
||||
sudo apt-get install -qq -y apt-transport-https > /dev/null 2>&1
|
||||
|
||||
logit "Setting up apt repositories"
|
||||
echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
|
||||
|
||||
logit "Running apt-get update"
|
||||
sudo apt-get update > /dev/null
|
||||
}
|
||||
|
||||
function install_dokku {
|
||||
logit "Installing pre-requisites"
|
||||
sudo apt-get install -qq -y linux-image-extra-"$(uname -r)" > /dev/null 2>&1
|
||||
|
||||
logit "Installing dokku"
|
||||
sudo apt-get install -qq -y dokku > /dev/null 2>&1
|
||||
|
||||
logit "Done!"
|
||||
}
|
||||
|
||||
exec &> /root/stackscript.log
|
||||
|
||||
set_ssh_key
|
||||
set_passwordless_ssh
|
||||
postfix_install_loopback_only
|
||||
set_hostname
|
||||
install_prerequisites
|
||||
|
||||
if [ -n "$LINODE_ID" ]; then
|
||||
setup_linode
|
||||
notify_restart_via_email
|
||||
else
|
||||
install_dokku
|
||||
notify_install_via_email
|
||||
fi
|
||||
134
deb.mk
@@ -1,95 +1,81 @@
|
||||
BUILDSTEP_DESCRIPTION = 'Buildstep uses Docker and Buildpacks to build applications like Heroku'
|
||||
BUILDSTEP_REPO_NAME ?= progrium/buildstep
|
||||
BUILDSTEP_VERSION ?= 0.0.2
|
||||
BUILDSTEP_ARCHITECTURE = amd64
|
||||
BUILDSTEP_PACKAGE_NAME = buildstep_$(BUILDSTEP_VERSION)_$(BUILDSTEP_ARCHITECTURE).deb
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.3.6
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash'
|
||||
DOKKU_REPO_NAME ?= progrium/dokku
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
PLUGINHOOK_DESCRIPTION = 'Simple dispatcher and protocol for shell-based plugins, an improvement to hook scripts'
|
||||
PLUGINHOOK_REPO_NAME ?= progrium/pluginhook
|
||||
PLUGINHOOK_VERSION ?= 0.2.0
|
||||
PLUGINHOOK_ARCHITECTURE = amd64
|
||||
PLUGINHOOK_PACKAGE_NAME = pluginhook_$(PLUGINHOOK_VERSION)_$(PLUGINHOOK_ARCHITECTURE).deb
|
||||
PLUGN_DESCRIPTION = 'Hook system that lets users extend your application with plugins'
|
||||
PLUGN_REPO_NAME ?= dokku/plugn
|
||||
PLUGN_VERSION ?= 0.2.1
|
||||
PLUGN_ARCHITECTURE = amd64
|
||||
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb
|
||||
|
||||
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
|
||||
SSHCOMMAND_REPO_NAME ?= progrium/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.0.1
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.1.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
|
||||
GEM_ARCHITECTURE = amd64
|
||||
|
||||
GOROOT = /usr/lib/go
|
||||
GOBIN = /usr/bin/go
|
||||
GOPATH = /home/vagrant/gocode
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-buildstep deb-dokku deb-gems deb-pluginhook deb-setup deb-sshcommand
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand
|
||||
|
||||
install-from-deb:
|
||||
echo "--> Initial apt-get update"
|
||||
sudo apt-get update > /dev/null
|
||||
sudo apt-get install -y apt-transport-https curl
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y apt-transport-https
|
||||
|
||||
echo "--> Installing docker gpg key"
|
||||
curl -sSL https://get.docker.com/gpg | apt-key add -
|
||||
|
||||
echo "--> Installing dokku gpg key"
|
||||
curl --silent https://packagecloud.io/gpg.key 2> /dev/null | apt-key add - 2>&1 >/dev/null
|
||||
|
||||
echo "--> Setting up apt repositories"
|
||||
echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" > /etc/apt/sources.list.d/dokku.list
|
||||
|
||||
echo "--> Running apt-get update"
|
||||
sudo apt-get update > /dev/null
|
||||
|
||||
echo "--> Installing pre-requisites"
|
||||
sudo apt-get install -y linux-image-extra-`uname -r`
|
||||
echo "--> Installing docker"
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
echo "--> Installing dokku"
|
||||
sudo apt-get install -y 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
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install dokku
|
||||
|
||||
echo "--> Done!"
|
||||
|
||||
deb-all: deb-buildstep deb-dokku deb-gems deb-pluginhook deb-sshcommand
|
||||
deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand
|
||||
mv /tmp/*.deb .
|
||||
echo "Done"
|
||||
|
||||
deb-setup:
|
||||
echo "-> Updating deb repository and installing build requirements"
|
||||
sudo apt-get update > /dev/null
|
||||
sudo apt-get install -qq -y gcc git ruby1.9.1-dev 2>&1 > /dev/null
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1
|
||||
command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||
|
||||
deb-buildstep: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(BUILDSTEP_PACKAGE_NAME)
|
||||
deb-herokuish: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
echo "-> Creating deb files"
|
||||
echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
||||
echo "sleep 5" >> /tmp/tmp/post-install
|
||||
echo "count=\`sudo docker images | grep progrium/buildstep | wc -l\`" >> /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 buildstep image'" >> /tmp/tmp/post-install
|
||||
echo " sudo docker rmi progrium/buildstep" >> /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 buildstep into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
||||
echo "sudo docker build -t progrium/buildstep /var/lib/buildstep 1> /dev/null" >> /tmp/tmp/post-install
|
||||
echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
||||
echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
|
||||
|
||||
echo "-> Cloning repository"
|
||||
git clone -q "git@github.com:$(BUILDSTEP_REPO_NAME).git" /tmp/tmp/buildstep > /dev/null
|
||||
rm -rf /tmp/tmp/buildstep/.git /tmp/tmp/buildstep/.gitignore
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" /tmp/tmp/herokuish > /dev/null
|
||||
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore
|
||||
|
||||
echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/var/lib"
|
||||
cp -rf /tmp/tmp/buildstep /tmp/build/var/lib/buildstep
|
||||
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
|
||||
|
||||
echo "-> Creating $(BUILDSTEP_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n buildstep -v $(BUILDSTEP_VERSION) -a $(BUILDSTEP_ARCHITECTURE) -p $(BUILDSTEP_PACKAGE_NAME) --deb-pre-depends 'lxc-docker-1.6.2' --after-install /tmp/tmp/post-install --url "https://github.com/$(BUILDSTEP_REPO_NAME)" --description $(BUILDSTEP_DESCRIPTION) --license 'MIT License' .
|
||||
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 | docker-engine-cs' --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: deb-setup
|
||||
@@ -98,17 +84,17 @@ deb-dokku: deb-setup
|
||||
|
||||
cp -r debian /tmp/build/DEBIAN
|
||||
mkdir -p /tmp/build/usr/local/bin
|
||||
mkdir -p /tmp/build/var/lib/dokku
|
||||
mkdir -p /tmp/build/var/lib/dokku/core-plugins/available
|
||||
mkdir -p /tmp/build/usr/local/share/man/man1
|
||||
mkdir -p /tmp/build/usr/local/share/dokku/contrib
|
||||
|
||||
cp dokku /tmp/build/usr/local/bin
|
||||
cp -r plugins /tmp/build/var/lib/dokku
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/plugins/$$plugin/.core; done
|
||||
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 touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
|
||||
$(MAKE) help2man
|
||||
$(MAKE) addman
|
||||
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/local/share/man/man1/dokku.1
|
||||
cp contrib/dokku-installer.rb /tmp/build/usr/local/share/dokku/contrib
|
||||
cp contrib/dokku-installer.py /tmp/build/usr/local/share/dokku/contrib
|
||||
git describe --tags > /tmp/build/var/lib/dokku/VERSION
|
||||
cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION
|
||||
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
|
||||
@@ -116,36 +102,26 @@ deb-dokku: deb-setup
|
||||
dpkg-deb --build /tmp/build "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-gems: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build rubygem-*.deb
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp rack -v 1.5.2 > /dev/null
|
||||
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp rack-protection -v 1.5.3 > /dev/null
|
||||
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp sinatra -v 1.4.5 > /dev/null
|
||||
gem install --quiet --no-verbose --no-ri --no-rdoc --install-dir /tmp/tmp tilt -v 1.4.1 > /dev/null
|
||||
|
||||
find /tmp/tmp/cache -name '*.gem' | xargs -rn1 fpm -d ruby -d ruby --prefix /var/lib/gems/1.9.1 -s gem -t deb -a $(GEM_ARCHITECTURE)
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-pluginhook: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGINHOOK_PACKAGE_NAME)
|
||||
deb-plugn: deb-setup
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
echo "-> Cloning repository"
|
||||
git clone -q "git@github.com:$(PLUGINHOOK_REPO_NAME).git" /tmp/tmp/pluginhook > /dev/null
|
||||
rm -rf /tmp/tmp/pluginhook/.git /tmp/tmp/pluginhook/.gitignore
|
||||
git clone -q "https://github.com/$(PLUGN_REPO_NAME).git" /tmp/tmp/plugn > /dev/null
|
||||
rm -rf /tmp/tmp/plugn/.git /tmp/tmp/plugn/.gitignore
|
||||
|
||||
echo "-> Copying files into place"
|
||||
mkdir -p /tmp/build/usr/local/bin $(GOPATH)
|
||||
sudo apt-get update > /dev/null
|
||||
sudo apt-get install -qq -y git golang mercurial 2>&1 > /dev/null
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && go get "golang.org/x/crypto/ssh/terminal"
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH) && cd /tmp/tmp/pluginhook && go build -o pluginhook
|
||||
mv /tmp/tmp/pluginhook/pluginhook /tmp/build/usr/local/bin/pluginhook
|
||||
sudo apt-get clean
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y git golang mercurial > /dev/null 2>&1
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && go get github.com/dokku/plugn
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && cd /home/vagrant/gocode/src/github.com/dokku/plugn && make deps
|
||||
export PATH=$(PATH):$(GOROOT)/bin:$(GOPATH)/bin && export GOROOT=$(GOROOT) && export GOPATH=$(GOPATH):/tmp/tmp/plugn && cd /home/vagrant/gocode/src/github.com/dokku/plugn && rm plugn && go build -o plugn
|
||||
mv /home/vagrant/gocode/src/github.com/dokku/plugn/plugn /tmp/build/usr/local/bin/plugn
|
||||
|
||||
echo "-> Creating $(PLUGINHOOK_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n pluginhook -v $(PLUGINHOOK_VERSION) -a $(PLUGINHOOK_ARCHITECTURE) -p $(PLUGINHOOK_PACKAGE_NAME) --url "https://github.com/$(PLUGINHOOK_REPO_NAME)" --description $(PLUGINHOOK_DESCRIPTION) --license 'MIT License' .
|
||||
echo "-> Creating $(PLUGN_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n plugn -v $(PLUGN_VERSION) -a $(PLUGN_ARCHITECTURE) -p $(PLUGN_PACKAGE_NAME) --url "https://github.com/$(PLUGN_REPO_NAME)" --description $(PLUGN_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sshcommand: deb-setup
|
||||
@@ -153,7 +129,7 @@ deb-sshcommand: deb-setup
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
echo "-> Cloning repository"
|
||||
git clone -q "git@github.com:$(SSHCOMMAND_REPO_NAME).git" /tmp/tmp/sshcommand > /dev/null
|
||||
git clone -q "https://github.com/$(SSHCOMMAND_REPO_NAME).git" /tmp/tmp/sshcommand > /dev/null
|
||||
rm -rf /tmp/tmp/sshcommand/.git /tmp/tmp/sshcommand/.gitignore
|
||||
|
||||
echo "-> Copying files into place"
|
||||
|
||||
13
debian/control
vendored
@@ -1,10 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.3.12
|
||||
Section: base
|
||||
Version: 0.4.8
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, software-properties-common, lxc-docker-1.6.2, gcc, python-software-properties, man-db, buildstep, sshcommand, pluginhook
|
||||
Pre-Depends: nginx, dnsutils, ruby, ruby-dev, rubygem-rack, rubygem-rack-protection, rubygem-sinatra, rubygem-tilt, apparmor, cgroup-lite
|
||||
Provides: dokku
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, docker-engine-cs | docker-engine | lxc-docker (>= 1.6.1) | docker.io (>= 1.6.1) | tutum-agent, software-properties-common, python-software-properties
|
||||
Recommends: herokuish
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker powered mini-Heroku in around 100 lines of Bash
|
||||
Description: A docker-powered PaaS that helps you build and manage the lifecycle of applications
|
||||
|
||||
|
||||
42
debian/postinst
vendored
@@ -4,6 +4,7 @@ set -e
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
case "$1" in
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
@@ -16,9 +17,38 @@ case "$1" in
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
dokku plugins-install
|
||||
rm -f /home/dokku/VERSION
|
||||
cp /var/lib/dokku/STABLE_VERSION /home/dokku/VERSION
|
||||
|
||||
# setup plugin directories
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
|
||||
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
|
||||
# migrate old plugins
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then
|
||||
rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available;
|
||||
fi
|
||||
done
|
||||
|
||||
# enable all core plugins
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin;
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn enable $plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin
|
||||
fi
|
||||
done
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
dokku plugin:install --core
|
||||
|
||||
rm -f ${DOKKU_ROOT}/VERSION
|
||||
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
||||
|
||||
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
|
||||
sudo service dokku-installer start
|
||||
@@ -31,7 +61,7 @@ case "$1" in
|
||||
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" > "${DOKKU_ROOT}/VHOST"
|
||||
else
|
||||
rm -f "${DOKKU_ROOT}/VHOST"
|
||||
@@ -42,7 +72,9 @@ case "$1" in
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
sshcommand acl-add dokku default < "$RET"
|
||||
if [ -f "$RET" ]; then
|
||||
sshcommand acl-add dokku default < "$RET"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
2
debian/preinst
vendored
@@ -13,7 +13,7 @@ case "$1" in
|
||||
rm -f $INIT_CONF
|
||||
touch $INIT_CONF
|
||||
echo 'start on runlevel [2345]' >> $INIT_CONF
|
||||
echo 'exec /usr/local/share/dokku/contrib/dokku-installer.rb selfdestruct' >> $INIT_CONF
|
||||
echo 'exec /usr/local/share/dokku/contrib/dokku-installer.py selfdestruct' >> $INIT_CONF
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
|
||||
|
||||
```shell
|
||||
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
|
||||
wget -qO- https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
|
||||
```
|
||||
|
||||
## Development
|
||||
@@ -16,10 +16,10 @@ cd dokku
|
||||
sudo make install
|
||||
```
|
||||
|
||||
The `Makefile` allows source URLs to be overridden to include customizations from your own repositories. The `DOCKER_URL`, `PLUGINHOOK_URL`, `SSHCOMMAND_URL` and `STACK_URL` environment variables may be set to override the defaults (see the `Makefile` for how these apply). Example:
|
||||
The `Makefile` allows source URLs to be overridden to include customizations from your own repositories. The `DOCKER_URL`, `PLUGN_URL`, `SSHCOMMAND_URL` and `STACK_URL` environment variables may be set to override the defaults (see the `Makefile` for how these apply). Example:
|
||||
|
||||
```shell
|
||||
sudo SSHCOMMAND_URL=https://raw.github.com/yourusername/sshcommand/master/sshcommand make install
|
||||
sudo SSHCOMMAND_URL=https://raw.githubusercontent.com/yourusername/sshcommand/master/sshcommand make install
|
||||
```
|
||||
|
||||
## Bootstrap a server from your own repository
|
||||
@@ -27,19 +27,19 @@ sudo SSHCOMMAND_URL=https://raw.github.com/yourusername/sshcommand/master/sshcom
|
||||
The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from your own clone of dokku using the `DOKKU_REPO` environment variable. Example:
|
||||
|
||||
```shell
|
||||
wget https://raw.github.com/progrium/dokku/master/bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
|
||||
chmod +x bootstrap.sh
|
||||
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
|
||||
```
|
||||
|
||||
## Custom buildstep build
|
||||
## Custom herokuish build
|
||||
|
||||
Dokku ships with a pre-built version of version of the [buildstep](https://github.com/progrium/buildstep) component by default. If you want to build your own version you can specify that with an env variable.
|
||||
Dokku ships with a pre-built version of version of the [herokuish](https://github.com/gliderlabs/herokuish) component by default. If you want to build your own version you can specify that with an env variable.
|
||||
|
||||
```shell
|
||||
git clone https://github.com/progrium/dokku.git
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
cd dokku
|
||||
sudo BUILD_STACK=true STACK_URL=https://github.com/progrium/buildstep.git make install
|
||||
sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make install
|
||||
```
|
||||
|
||||
## Configuring
|
||||
|
||||
@@ -1,105 +1,164 @@
|
||||
# Deploy an App
|
||||
# Deploying to Dokku
|
||||
|
||||
Now you can deploy apps on your Dokku. Let's deploy the [Heroku Node.js sample app](https://github.com/heroku/node-js-sample). All you have to do is add a remote to name the app. It's created on-the-fly.
|
||||
## Deploy tutorial
|
||||
|
||||
```
|
||||
$ cd node-js-sample
|
||||
$ git remote add dokku dokku@dokku.me:node-js-app
|
||||
$ git push dokku master
|
||||
Counting objects: 296, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (254/254), done.
|
||||
Writing objects: 100% (296/296), 193.59 KiB, done.
|
||||
Total 296 (delta 25), reused 276 (delta 13)
|
||||
-----> Building node-js-app ...
|
||||
Node.js app detected
|
||||
-----> Resolving engine versions
|
||||
Once Dokku has been configured with at least one user, applications can be deployed via a `git push` command. To quickly see Dokku deployment in action, you can use the Heroku Ruby on Rails example app.
|
||||
|
||||
... blah blah blah ...
|
||||
|
||||
-----> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
```shell
|
||||
git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
```
|
||||
|
||||
You're done!
|
||||
### Create the app
|
||||
|
||||
Create the application on the Dokku host. You will need to ssh onto the host to run this command.
|
||||
|
||||
```shell
|
||||
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/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
|
||||
```shell
|
||||
# install the postgres plugin
|
||||
# plugin installation requires root, hence the user change
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
|
||||
# create a postgres service with the name rails-database
|
||||
dokku postgres:create rails-database
|
||||
```
|
||||
|
||||
> Each services may take a few moments to create.
|
||||
|
||||
### Linking backing services to applications
|
||||
|
||||
Once the service creation is complete, set the `POSTGRES_URL` environment variable by linking the service.
|
||||
|
||||
```shell
|
||||
# each official datastore offers a `link` method to link a service to any application
|
||||
dokku postgres:link rails-database ruby-rails-sample
|
||||
```
|
||||
|
||||
> You can link a single service to multiple applications or use one service per application.
|
||||
|
||||
### Deploy the app
|
||||
|
||||
Now you can deploy the `ruby-rails-sample` app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
|
||||
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
Delta compression using up to 8 threads.
|
||||
Compressing objects: 100% (162/162), done.
|
||||
Writing objects: 100% (231/231), 36.96 KiB | 0 bytes/s, done.
|
||||
Total 231 (delta 93), reused 147 (delta 53)
|
||||
-----> Cleaning up...
|
||||
-----> Building ruby-rails-sample from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Ruby app detected
|
||||
-----> Compiling Ruby/Rails
|
||||
-----> Using Ruby version: ruby-2.2.1
|
||||
-----> Installing dependencies using 1.9.7
|
||||
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
|
||||
Fetching gem metadata from https://rubygems.org/...........
|
||||
Fetching version metadata from https://rubygems.org/...
|
||||
Fetching dependency metadata from https://rubygems.org/..
|
||||
Using rake 10.4.2
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown.
|
||||
|
||||
```shell
|
||||
=====> Application deployed:
|
||||
http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [dockerfile](https://docs.docker.com/reference/builder/).
|
||||
|
||||
### Removing a deployed app
|
||||
|
||||
You can also remove an application from your Dokku installation. This will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
dokku apps:destroy APP
|
||||
```
|
||||
|
||||
This will prompt you to verify the application's name before destroying it. You may also use the `--force` flag to circumvent this verification process:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
dokku --force apps:destroy APP
|
||||
```
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
> New as of 0.4.7
|
||||
|
||||
You can rename a deployed app using the `apps:rename` CLI tool:
|
||||
|
||||
```shell
|
||||
dokku apps:rename OLD_NAME NEW_NAME
|
||||
```
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
|
||||
### Adding deploy users
|
||||
|
||||
While it is possible to use password-based authorization to push to Dokku, it is preferable to use key-based authentication for security. You can add your public key to the dokku user's `authorized_keys` file with the following command:
|
||||
|
||||
```shell
|
||||
# replace dokku.me with your domain name or the host's IP
|
||||
# replace root with your server's root user
|
||||
cat ~/.ssh/id_rsa.pub | ssh root@dokku.com "sudo sshcommand acl-add dokku [description]"
|
||||
```
|
||||
|
||||
### Deploying non-master branch
|
||||
|
||||
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku <local branch>:master```
|
||||
|
||||
Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)!
|
||||
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
You can also support pushing multiple branches using the [receive-branch](/dokku/development/plugin-triggers/#receive-branch) plugin trigger in a custom plugin.
|
||||
|
||||
## Deploying to server over SSH
|
||||
### Skipping deployment
|
||||
|
||||
Pushing to the dokku remote may prompt you to input a password for the dokku user. It's preferable, however, to use key-based authentication, and you can add your public key to the dokku user's authorized_keys file with:
|
||||
If you only want to rebuild and tag a container, you can skip the deployment phase by setting `$DOKKU_SKIP_DEPLOY` to `true` by running:
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub | ssh [sudouser]@[yourdomain].com "sudo sshcommand acl-add dokku [description]"
|
||||
``` shell
|
||||
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
```
|
||||
|
||||
## Deploying with private git submodules
|
||||
### Deploying with private git submodules
|
||||
|
||||
Dokku uses git locally (i.e. not a docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private git submodules, you'll need to drop your deploy key in `~dokku/.ssh` and potentially add github.com (or your VCS host key) into `~dokku/.ssh/known_hosts`. A decent test like this should help confirm you've done it correctly.
|
||||
Dokku uses git locally (i.e. not a docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private git submodules, you'll need to drop your deploy key in `/home/dokku/.ssh/` and potentially add github.com (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
|
||||
|
||||
```
|
||||
```shell
|
||||
su - dokku
|
||||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
ssh -T git@github.com
|
||||
```
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
If buildpack detection isn't working well for you or you want to specify a custom buildpack for one repository you can create & commit a file in the root of your git repository named `.env` containing `export BUILDPACK_URL=<repository>` before pushing. This will tell buildstep to fetch the specified buildpack and use it instead of relying on the built-in buildpacks & their detection methods.
|
||||
|
||||
## Dockerfile deployment
|
||||
|
||||
Deployment of `Dockerfile` repos is supported as of v0.3.15. Simply place a Dockerfile in the root of your repo and push to dokku. If you are converting from a heroku/dokku buildpack deployment, ensure you are not setting `$BUILDPACK_URL` or including a `.buildpacks` file in the root of your repo.
|
||||
|
||||
By default, we will extract the first `EXPOSE` port and tell nginx to proxy your app to that port. Alternatively, you can set `$DOCKERFILE_PORT` in your app's dokku configuration.
|
||||
|
||||
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base nodejs image, with the following `ENTRYPOINT`:
|
||||
|
||||
```
|
||||
ENTRYPOINT ["node"]
|
||||
```
|
||||
|
||||
You can do:
|
||||
|
||||
```
|
||||
dokku config:set DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||
```
|
||||
|
||||
To tell docker what to run.
|
||||
|
||||
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
|
||||
|
||||
## Default vhost
|
||||
|
||||
You might notice the default vhost for Nginx will be one of the apps. If an app doesn't exist, it will use this vhost and it may be confusing for it to go to another app. You can create a default vhost using a configuration under `sites-enabled`. You just have to change one thing in the main nginx.conf:
|
||||
|
||||
Swap both conf.d include line and the sites-enabled include line. From:
|
||||
```
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
```
|
||||
to
|
||||
```
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
```
|
||||
|
||||
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
||||
Note that if the buildpack or dockerfile build process require ssh key access for other reasons, the above may not always apply.
|
||||
|
||||
## Deploying to subdomains
|
||||
|
||||
The name of remote repository is used as the name of application to be deployed, as for example above:
|
||||
|
||||
$ git remote add dokku dokku@dokku.me:node-js-app
|
||||
$ git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
$ git push dokku master
|
||||
|
||||
Is deployed to,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://node-js-app.dokku.me
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
|
||||
You can also specify fully qualified names, say `app.dokku.me`, as
|
||||
|
||||
@@ -121,40 +180,26 @@ This is in particular useful, then you want to deploy to root domain, as
|
||||
remote: -----> Application deployed:
|
||||
remote: http://dokku.me
|
||||
|
||||
# Zero downtime deploy
|
||||
## Dokku/Docker Container Management Compatibility
|
||||
|
||||
Following a deploy, dokku will now wait `DOKKU_DEFAULT_CHECKS_WAIT` seconds (default: `10`), and if the container is still running, then route traffic to the new container.
|
||||
Dokku is, at its core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment. This function removes all exited containers and all 'unattached' images.
|
||||
|
||||
This can be problematic for applications whose boot up time can vary and can lead to `502 Bad Gateway` errors.
|
||||
### Specifying a custom buildpack
|
||||
|
||||
Dokku provides a way to run a set of more precise checks against the new container, and only switch traffic over if all checks complete successfully.
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. This is a text file with one line per check. Empty lines and lines starting with `#` are ignored.
|
||||
## Default vhost
|
||||
|
||||
A check is a relative URL and may be followed by expected content from the page, for example:
|
||||
See the [nginx documentation](/dokku/nginx/#default-site).
|
||||
|
||||
```
|
||||
/about Our Amazing Team
|
||||
```
|
||||
## Dockerfile deployment
|
||||
|
||||
Dokku will wait `DOKKU_CHECKS_WAIT` seconds (default: `5`) before running the checks to give server time to start. For shorter/longer wait, change the `DOKKU_CHECKS_WAIT` environment variable. This can also be overridden in the CHECKS file by setting WAIT=nn.
|
||||
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
|
||||
|
||||
Dokku will wait `DOKKU_WAIT_TO_RETIRE` seconds (default: `60`) before stopping the old container such that no existing connections to it are dropped.
|
||||
## Zero downtime deploy
|
||||
|
||||
Dokku will retry the checks DOKKU_CHECKS_ATTEMPTS times until the checks are successful or DOKKU_CHECKS_ATTEMPTS is exceeded. In the latter case, the deployment is considered failed. This can be overridden in the CHECKS file by setting ATTEMPTS=nn.
|
||||
See the [zero-downtime deploy documentation](/dokku/checks-examples/).
|
||||
|
||||
Checks can be skipped entirely by setting `DOKKU_SKIP_ALL_CHECKS` to `true` either globally or per application. You can choose to skip only default checks by setting `DOKKU_SKIP_DEFAULT_CHECKS` to `true` either globally or per application.
|
||||
## Image tagging
|
||||
|
||||
See [checks-examples.md](checks-examples.md) for examples and output.
|
||||
|
||||
# Removing a deployed app
|
||||
|
||||
SSH onto the server, then execute:
|
||||
|
||||
```shell
|
||||
dokku apps:destroy myapp
|
||||
```
|
||||
|
||||
# Dokku/Docker Container Management Compatibility
|
||||
|
||||
Dokku is, at it's core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/progrium/dokku/issues/1220), dokku executes a cleanup function prior to every deployment. This function removes all exited containers and all 'unattached' images.
|
||||
See the [image tagging documentation](/dokku/deployment/images).
|
||||
|
||||
BIN
docs/assets/dokku.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
docs/assets/favicons/android-chrome-144x144.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/assets/favicons/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
docs/assets/favicons/android-chrome-36x36.png
Normal file
|
After Width: | Height: | Size: 829 B |
BIN
docs/assets/favicons/android-chrome-48x48.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
docs/assets/favicons/android-chrome-72x72.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
docs/assets/favicons/android-chrome-96x96.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/apple-touch-icon-114x114.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
docs/assets/favicons/apple-touch-icon-120x120.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
docs/assets/favicons/apple-touch-icon-144x144.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/apple-touch-icon-152x152.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/apple-touch-icon-180x180.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
docs/assets/favicons/apple-touch-icon-57x57.png
Normal file
|
After Width: | Height: | Size: 867 B |
BIN
docs/assets/favicons/apple-touch-icon-60x60.png
Normal file
|
After Width: | Height: | Size: 938 B |
BIN
docs/assets/favicons/apple-touch-icon-72x72.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/assets/favicons/apple-touch-icon-76x76.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
docs/assets/favicons/apple-touch-icon-precomposed.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
docs/assets/favicons/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
12
docs/assets/favicons/browserconfig.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
||||
BIN
docs/assets/favicons/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
docs/assets/favicons/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 790 B |
BIN
docs/assets/favicons/favicon-96x96.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/favicon.ico
Normal file
|
After Width: | Height: | Size: 15 KiB |
41
docs/assets/favicons/manifest.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
docs/assets/favicons/mstile-144x144.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
docs/assets/favicons/mstile-150x150.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/mstile-310x150.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
docs/assets/favicons/mstile-310x310.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
docs/assets/favicons/mstile-70x70.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
@@ -1,12 +1,14 @@
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-weight: 400;
|
||||
padding-bottom: 40px;
|
||||
color: #5a5a5a;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #5a5a5a;
|
||||
font-family: 'montserrat', Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif;
|
||||
font-weight: 700;
|
||||
font-weight: 400;
|
||||
line-height: 1.1;
|
||||
margin-bottom: 12px;
|
||||
margin-top: 12px;
|
||||
@@ -20,12 +22,25 @@ h1 {
|
||||
color: #fff;
|
||||
font-size: 23px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0 0 0 1em;
|
||||
}
|
||||
.header a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/dokku.png);
|
||||
color: #fff;
|
||||
text-indent: 40px;
|
||||
background-position: center left;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-webkit-background-size: contain;
|
||||
-moz-background-size: contain;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -41,7 +56,7 @@ h1 {
|
||||
font-size: 12px;
|
||||
line-height: 1.3em;
|
||||
margin: 45px auto;
|
||||
max-width: 650px;
|
||||
max-width: 750px;
|
||||
padding: 0;
|
||||
}
|
||||
.quickstart-code .title {
|
||||
@@ -87,6 +102,9 @@ h1 {
|
||||
.quickstart-code .command {
|
||||
color: #ffffcc;
|
||||
}
|
||||
.quickstart-code .line .output {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
.marketing .col-lg-4 {
|
||||
margin-bottom: 20px;
|
||||
text-align: center;
|
||||
@@ -107,7 +125,122 @@ h1 {
|
||||
.featurette-heading .text-muted {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
padding: .2rem .5rem;
|
||||
color: #157577;
|
||||
}
|
||||
a.list-group-item {
|
||||
color: #666
|
||||
}
|
||||
.list-group-item.disabled:first-child, .list-group-item.disabled:first-child:focus, .list-group-item.disabled:first-child:hover {
|
||||
margin-top: 0;
|
||||
}
|
||||
.list-group-item.disabled, .list-group-item.disabled:focus, .list-group-item.disabled:hover {
|
||||
background: none;
|
||||
color: #bbb;
|
||||
cursor: default;
|
||||
font-weight: normal;
|
||||
font-size: 11px;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 2em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.anchorjs-link {
|
||||
color: #24cbce;
|
||||
}
|
||||
.markdown-body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
box-sizing: border-box;
|
||||
color: rgb(71, 74, 84);
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
.markdown-body h1 {
|
||||
border-bottom: 1px solid #dfdfdf;
|
||||
color: #444;
|
||||
font-size: 24px;
|
||||
padding-bottom: 1em;
|
||||
margin-top: 0;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
.markdown-body h2 {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
color: #555;
|
||||
margin-top: 3em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.markdown-body h3 {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: #555;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.markdown-body h4 {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: #555;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.markdown-body h1 + h2 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
padding-bottom: 0.2em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: #fff;
|
||||
background-color: rgba(0,0,0,0.06);
|
||||
color: #333;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
}
|
||||
code:before {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0";
|
||||
}
|
||||
code:after {
|
||||
letter-spacing: -0.2em;
|
||||
content: "\00a0";
|
||||
}
|
||||
pre code:before, pre code:after {
|
||||
letter-spacing: 0;
|
||||
content: "";
|
||||
}
|
||||
pre {
|
||||
display: block;
|
||||
line-height: 1.428571429;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 0 0 3px #eee;
|
||||
overflow: auto !important;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
color: #4d4d4c;
|
||||
margin: 2em 0;
|
||||
}
|
||||
blockquote {
|
||||
border-left: 4px solid #5bc0de;
|
||||
background-color: #f4f8fa;
|
||||
padding: 15px 15px 1px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
blockquote.new-as-of {
|
||||
border-left: 4px solid #ef5b58;
|
||||
background-color: #f9ad76;
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.quickstart-code {
|
||||
font-size: 14px;
|
||||
|
||||
@@ -1,4 +1,54 @@
|
||||
# Checks Examples
|
||||
# Zero Downtime Deploys
|
||||
|
||||
> New as of 0.3.0
|
||||
|
||||
Following a deploy, dokku will now wait `10` seconds before routing traffic to the new container. If the container is not running after this time, then the deploy is failed and your old container will continue serving traffic. You can modify this value using the following command:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
```
|
||||
|
||||
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. This is a text file with one line per check. Empty lines and lines starting with `#` are ignored.
|
||||
|
||||
A check is a relative URL and may be followed by expected content from the page, for example:
|
||||
|
||||
```
|
||||
/about Our Amazing Team
|
||||
```
|
||||
|
||||
Dokku will wait `5` seconds before running the checks to give the server time to start. This value can be overridden on a per-app basis in the `CHECKS` file by setting `WAIT=nn`. You may also override this for the global dokku installation:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_WAIT=15
|
||||
```
|
||||
|
||||
Dokku will wait `60` seconds before stopping the old container so that existing connections are given a chance to complete. This value is also configurable globally:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_WAIT_TO_RETIRE=120
|
||||
```
|
||||
|
||||
> Note that during this time, multiple containers may be running on your server, which can be an issue for memory-hungry applications on memory-constrained servers.
|
||||
|
||||
Dokku will retry the checks `5` times until the checks are successful. If all 5 checks fail, the deployment is considered failed. This can be overridden in the `CHECKS` file by setting `ATTEMPTS=nn`. This number is also configurable globally:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_ATTEMPTS=2
|
||||
```
|
||||
|
||||
You can also choose to skip checks completely either globally or on a per-application basis:
|
||||
|
||||
```shell
|
||||
# globally
|
||||
dokku config:set --global DOKKU_SKIP_ALL_CHECKS=true
|
||||
|
||||
# for APP
|
||||
dokku config:set APP DOKKU_SKIP_ALL_CHECKS=true
|
||||
```
|
||||
|
||||
## Checks Examples
|
||||
|
||||
The CHECKS file may contain empty lines, comments (lines starting with #),
|
||||
settings (NAME=VALUE) and check instructions.
|
||||
@@ -6,36 +56,49 @@ settings (NAME=VALUE) and check instructions.
|
||||
The format of a check instruction is a path, optionally followed by the
|
||||
expected content. For example:
|
||||
|
||||
/ My Amazing App
|
||||
/stylesheets/index.css .body
|
||||
/scripts/index.js $(function()
|
||||
/images/logo.png
|
||||
```
|
||||
/ My Amazing App
|
||||
/stylesheets/index.css .body
|
||||
/scripts/index.js $(function()
|
||||
/images/logo.png
|
||||
```
|
||||
|
||||
To check an application that supports multiple hostnames, use relative URLs
|
||||
that include the hostname, for example:
|
||||
|
||||
//admin.example.com Admin Dashboard
|
||||
//static.example.com/logo.png
|
||||
```
|
||||
//admin.example.com Admin Dashboard
|
||||
//static.example.com/logo.png
|
||||
```
|
||||
|
||||
You can also specify the protocol to explicitly check HTTPS requests.
|
||||
|
||||
The default behavior is to wait for 5 seconds before running the first check,
|
||||
and timeout each check to 30 seconds.
|
||||
|
||||
```
|
||||
https://admin.example.com Admin Dashboard
|
||||
https://static.example.com/logo.png
|
||||
```
|
||||
|
||||
The default behavior is to wait for 5 seconds before running the first check, and timeout each check to 30 seconds.
|
||||
|
||||
By default, checks will be attempted 5 times. (Retried 4 times)
|
||||
|
||||
You can change these by setting WAIT, TIMEOUT and ATTEMPTS to different values, for
|
||||
You can change these by setting `WAIT`, `TIMEOUT` and `ATTEMPTS` to different values, for
|
||||
example:
|
||||
|
||||
WAIT=30 # Wait 1/2 minute
|
||||
TIMEOUT=60 # Timeout after a minute
|
||||
ATTEMPTS=10 # attempt checks 10 times
|
||||
```
|
||||
WAIT=30 # Wait 1/2 minute
|
||||
TIMEOUT=60 # Timeout after a minute
|
||||
ATTEMPTS=10 # attempt checks 10 times
|
||||
|
||||
# Example: Successful Rails Deployment
|
||||
In this example, a rails applicaiton is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful.
|
||||
ATTEMPTS is set to 6, but the third attempt succeeds.
|
||||
/ My Amazing App
|
||||
```
|
||||
|
||||
## CHECKS file
|
||||
## Example: Successful Rails Deployment
|
||||
|
||||
In this example, a rails applicaiton is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful. `ATTEMPTS` is set to 6, but the third attempt succeeds.
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
WAIT=5
|
||||
@@ -45,7 +108,7 @@ ATTEMPTS=6
|
||||
|
||||
> check.txt is a text file returning the string 'simple_check'
|
||||
|
||||
## Deploy Output
|
||||
### Deploy Output
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
@@ -53,7 +116,7 @@ ATTEMPTS=6
|
||||
git push dokku master
|
||||
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from buildstep...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Ruby app detected
|
||||
-----> Compiling Ruby/Rails
|
||||
@@ -71,13 +134,13 @@ git push dokku master
|
||||
http://localhost/check.txt => "simple_check"
|
||||
!
|
||||
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
! Check attempt 1/6 failed.
|
||||
! Check attempt 1/6 failed.
|
||||
-----> Attempt 2/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/check.txt => "simple_check"
|
||||
!
|
||||
curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
! Check attempt 2/6 failed.
|
||||
! Check attempt 2/6 failed.
|
||||
-----> Attempt 3/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/check.txt => "simple_check"
|
||||
@@ -101,12 +164,12 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
http://myapp.dokku.example.com
|
||||
````
|
||||
|
||||
# Example: Failing Rails Deployment
|
||||
## Example: Failing Rails Deployment
|
||||
In this example, a Rails application fails to deploy. The reason for the failure is that the postgres database connection fails. The initial checks will fail while we wait for the server to start up, just like in the above example. However, once the server does start accepting connections, we will see an error 500 due to the postgres database connection failure.
|
||||
|
||||
Once the attempts have been exceeded, the deployment fails and we see the container output, which shows the Postgres connection errors.
|
||||
|
||||
## CHECKS file
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
WAIT=5
|
||||
@@ -116,7 +179,7 @@ ATTEMPTS=6
|
||||
|
||||
> The check to the root url '/' would normally access the database.
|
||||
|
||||
## Deploy Output
|
||||
### Deploy Output
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
@@ -124,7 +187,7 @@ ATTEMPTS=6
|
||||
git push dokku master
|
||||
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from buildstep...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Ruby app detected
|
||||
-----> Compiling Ruby/Rails
|
||||
@@ -142,38 +205,38 @@ Running pre-flight checks
|
||||
http://localhost/ => ""
|
||||
!
|
||||
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
|
||||
! Check attempt 1/6 failed.
|
||||
! Check attempt 1/6 failed.
|
||||
-----> Attempt 2/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
!
|
||||
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
|
||||
! Check attempt 2/6 failed.
|
||||
! Check attempt 2/6 failed.
|
||||
-----> Attempt 3/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 3/6 failed.
|
||||
! Check attempt 3/6 failed.
|
||||
-----> Attempt 4/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 4/6 failed.
|
||||
! Check attempt 4/6 failed.
|
||||
-----> Attempt 5/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 5/6 failed.
|
||||
! Check attempt 5/6 failed.
|
||||
-----> Attempt 6/6 Waiting for 5 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
Could not start due to 1 failed checks.
|
||||
! Check attempt 6/6 failed.
|
||||
! Check attempt 6/6 failed.
|
||||
=====> myapp container output:
|
||||
=> Booting Thin
|
||||
=> Rails 4.2.0 application starting in production on http://0.0.0.0:5000
|
||||
|
||||
@@ -11,7 +11,7 @@ Of all methods, this is the *most* official method of interacting with your dokk
|
||||
To install, simply clone the dokku repository down and add the `dokku` alias pointing at the script:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:progrium/dokku.git ~/.dokku
|
||||
git clone git@github.com:dokku/dokku.git ~/.dokku
|
||||
|
||||
# add the following to either your
|
||||
# .bashrc, .bash_profile, or .profile file
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Components
|
||||
|
||||
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
|
||||
* [Buildstep](https://github.com/progrium/buildstep) - Buildpack builder
|
||||
* [pluginhook](https://github.com/progrium/pluginhook) - Shell based plugins and hooks
|
||||
* [sshcommand](https://github.com/progrium/sshcommand) - Fixed commands over SSH
|
||||
* [Herokuish](https://github.com/gliderlabs/herokuish) - Buildpack builder
|
||||
* [plugn](https://github.com/dokku/plugn) - Shell based plugins and hooks
|
||||
* [sshcommand](https://github.com/dokku/sshcommand) - Fixed commands over SSH
|
||||
|
||||
Looking to keep codebase as simple and hackable as possible, so try to keep your line count down.
|
||||
|
||||
@@ -1,16 +1,57 @@
|
||||
# Configuration management
|
||||
# Environment Variables
|
||||
|
||||
Typically an application will require some configuration to run properly. Dokku supports application configuration via environment variables. Environment variables may contain private data, such as passwords or API keys, so it is not recommended to store them in your application's repository.
|
||||
|
||||
The `config` plugin provides the following commands to manage your variables:
|
||||
|
||||
```
|
||||
config <app> - display the config vars for an app
|
||||
config:get <app> KEY - display a config value for an app
|
||||
config:set <app> KEY1=VALUE1 [KEY2=VALUE2 ...] - set one or more config vars
|
||||
config:unset <app> 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
|
||||
```
|
||||
|
||||
The variables are available both at run time and during the application build/compilation step. You no longer need a `user-env` plugin as Dokku handles this functionality in a way equivalent to how Heroku handles it.
|
||||
The variables are available both at run time and during the application build/compilation step.
|
||||
|
||||
> Note: Global `BUILD_ENV` files are currently migrated into a global `ENV` file and sourced before app-specific variables. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
|
||||
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
|
||||
|
||||
You can set multiple environment variables at once:
|
||||
|
||||
```shell
|
||||
dokku config:set node-js-app ENV=prod COMPILE_ASSETS=1
|
||||
```
|
||||
|
||||
When setting variables with whitespaces, you need to escape them:
|
||||
|
||||
```shell
|
||||
dokku config:set node-js-app KEY=\"VAL\ WITH\ SPACES\"
|
||||
```
|
||||
|
||||
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:
|
||||
|
||||
```shell
|
||||
dokku --no-restart config:set node-js-app ENV=prod
|
||||
```
|
||||
|
||||
If you wish to have the variables output in an `eval`-compatible form, you can use the `--export` flag:
|
||||
|
||||
```shell
|
||||
dokku config node-js-app --export
|
||||
# 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)
|
||||
```
|
||||
|
||||
You can also output the variables in a single-line for usage in command-line utilities with the `--shell` flag:
|
||||
|
||||
```shell
|
||||
dokku config node-js-app --shell
|
||||
|
||||
# outputs variables in the form:
|
||||
#
|
||||
# ENV='prod' COMPILE_ASSETS='1'
|
||||
```
|
||||
|
||||
72
docs/deployment/buildpacks.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# Buildpack Deployment
|
||||
|
||||
Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, though this may be overridden by committing a valid `Dockerfile` to the root of your repository and pushing the repository to your Dokku installation. To avoid this automatic `Dockerfile` deployment detection, you may do one of the following:
|
||||
|
||||
- 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.
|
||||
- Create a `.buildpacks` file in the root of your repository.
|
||||
|
||||
## 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.
|
||||
|
||||
To use a specific buildpack, you can run the following dokku command:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
# replace REPOSITORY_URL with your buildpack's url
|
||||
dokku config:set APP BUILDPACK_URL=REPOSITORY_URL
|
||||
```
|
||||
|
||||
Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
|
||||
## Using multiple buildpacks
|
||||
|
||||
You can only set a single buildpack using the `BUILDPACK_URL`, though there may be times when you wish to use multiple buildpacks. To do so, simply create a `.buildpacks` file in the base of your repository. This file should list all the buildpacks, one-per-line. For instance, if you wish to use both the `nodejs` and `ruby` buildpacks, your `.buildpacks` file should contain the following:
|
||||
|
||||
```shell
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
You may also choose to set just a single buildpack in this file, though that is up to you.
|
||||
|
||||
Please check the documentation for your particular buildpack(s) as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
|
||||
## Using a specific buildpack version
|
||||
|
||||
As Dokku pins all buildpacks via herokuish releases, there may be occasions where a local buildpack version is out of date. If you wish to use a more recent version of the buildpack, you may use any of the above methods to specify a buildpack **without** the git sha attached like so:
|
||||
|
||||
```shell
|
||||
# using the latest nodejs buildpack
|
||||
# replace APP with the name of your application
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs
|
||||
```
|
||||
|
||||
You may also wish to use a **specific** version of a buildpack, which is also simple
|
||||
|
||||
```shell
|
||||
# using v87 of the nodejs buildpack
|
||||
# replace APP with the name of your application
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
## Clearing buildpack cache
|
||||
|
||||
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
sudo rm -rf /home/dokku/APP/cache/*
|
||||
```
|
||||
|
||||
### Curl Build Timeouts
|
||||
|
||||
Certain buildpacks may time out in retrieving dependencies via curl. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a curl command.
|
||||
|
||||
If you see output similar this when deploying , you may need to override the curl timeouts to increase the length of time allotted to those tasks. You can do so via the `config` plugin:
|
||||
|
||||
```shell
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
41
docs/deployment/dockerfiles.md
Normal file
@@ -0,0 +1,41 @@
|
||||
# Dockerfile Deployment
|
||||
|
||||
> New as of 0.3.15
|
||||
|
||||
While Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use docker's native `Dockerfile` system to define a container.
|
||||
|
||||
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:
|
||||
|
||||
- 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
|
||||
|
||||
By default, Dokku will extract the first `EXPOSE` tcp port and use said port with nginx to proxy your app to that port. For applications that have multiple ports exposed, you may override this port via the following command:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
dokku config:set APP DOKKU_DOCKERFILE_PORT=8000
|
||||
```
|
||||
|
||||
Dokku will not expose other ports on your application without a [custom docker-option](/dokku/docker-options/).
|
||||
|
||||
If you do not have a port explicitly exposed, Dokku will automatically expose port `5000` for your application.
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base nodejs image, with the following `ENTRYPOINT`:
|
||||
|
||||
```
|
||||
ENTRYPOINT ["node"]
|
||||
```
|
||||
|
||||
You can do:
|
||||
|
||||
```
|
||||
dokku config:set APP DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||
```
|
||||
|
||||
To tell docker what to run.
|
||||
|
||||
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
|
||||
57
docs/deployment/images.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Image Tagging
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
The dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
```
|
||||
tags <app> List all app image tags
|
||||
tags:create <app> <tag> Add tag to latest running app image
|
||||
tags:deploy <app> <tag> Deploy tagged app image
|
||||
tags:destroy <app> <tag> Remove app image tag
|
||||
```
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
root@dokku:~# dokku tags node-js-app
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
|
||||
root@dokku:~# dokku tags:create node-js-app v0.9.0
|
||||
=====> Added v0.9.0 tag to dokku/node-js-app
|
||||
|
||||
root@dokku:~# dokku tags node-js-app
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v0.9.0 936a42f25901 About a minute ago 1.025 GB
|
||||
|
||||
root@dokku:~# dokku tags:deploy node-js-app v0.9.0
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
|
||||
```
|
||||
147
docs/deployment/one-off-processes.md
Normal file
@@ -0,0 +1,147 @@
|
||||
# One-off Processes
|
||||
|
||||
Sometimes you need to either inspect running containers or run a one-off command under an application. In those cases, Dokku makes it easy to either connect to a running container or run a fresh container.
|
||||
|
||||
## Run a command in an app environment
|
||||
|
||||
```
|
||||
run <app> <cmd> Run a command in the environment of an application
|
||||
```
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
||||
|
||||
```shell
|
||||
# runs `ls -lah` in the `/app` directory of the application `node-js-app`
|
||||
dokku run node-js-app ls -lah
|
||||
```
|
||||
|
||||
If you want to remove the container after a command has started, you can run the following command:
|
||||
|
||||
```shell
|
||||
# keep `run` containers around
|
||||
dokku config:set --global DOKKU_RM_CONTAINER=1
|
||||
|
||||
# revert the above setting and keep containers around
|
||||
dokku config:unset --global DOKKU_RM_CONTAINER
|
||||
```
|
||||
|
||||
You may also use the `--rm-container` or `--rm` dokku flags to remove the containers automatically:
|
||||
|
||||
```shell
|
||||
dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
### Using `run` for cron tasks
|
||||
|
||||
You can always use a one-off container to run an application task:
|
||||
|
||||
```shell
|
||||
dokku --rm run node-js-app some-command
|
||||
dokku --rm-container run node-js-app some-command
|
||||
```
|
||||
|
||||
For tasks that should not be interrupted, run is the **preferred** method of handling cron tasks, as the container will continue running even during a deploy or scaling event. The trade-off is that there will be an increase in memory usage if there are multiple concurrent tasks running.
|
||||
|
||||
## Entering existing containers
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
enter <app> [<container-type> || --container-id <container-id>] Connect to a specific app container
|
||||
```
|
||||
|
||||
The `enter` command can be used to enter a running container. The following variations of the command exist:
|
||||
|
||||
```shell
|
||||
dokku enter node-js-app web
|
||||
dokku enter node-js-app web.1
|
||||
dokku enter node-js-app --container-id ID
|
||||
```
|
||||
|
||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
||||
|
||||
```shell
|
||||
# just echo hi
|
||||
dokku enter node-js-app web echo hi
|
||||
|
||||
# run a long-running command, as one might for a cron task
|
||||
dokku enter node-js-app web python script/background-worker.py
|
||||
```
|
||||
|
||||
### Using `enter` for cron tasks
|
||||
|
||||
Your procfile can have the following entry:
|
||||
|
||||
```
|
||||
cron: while true; do sleep 10; done
|
||||
```
|
||||
|
||||
With the `cron` process scaled to `1`:
|
||||
|
||||
```shell
|
||||
dokku ps:scale node-js-app cron=1
|
||||
```
|
||||
|
||||
You can now run all your commands in that container:
|
||||
|
||||
```shell
|
||||
dokku enter api cron some-command
|
||||
```
|
||||
|
||||
Note that you can also run multiple commands at the same time to reduce memory usage, though that may result in polluting the container environment.
|
||||
|
||||
For tasks that will properly resume, you **should** use the above method, as running tasks will be interrupted during deploys and scaling events, and subsequent commands will always run with the latest container. Note that if you scale the cron container down, this may interrupt proper running of the task.
|
||||
|
||||
## General Cron Recommendations
|
||||
|
||||
Regularly scheduled tasks can be a bit of a pain with dokku. The following are general recommendations to follow to help ensure successful task runs.
|
||||
|
||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
||||
- Add a `SHELL` environment variable to specify bash when running commands.
|
||||
- Keep your cron tasks in time-sorted order.
|
||||
- Keep your server time in UTC so you don't need to translate daylight saving's time when reading the cronfile.
|
||||
- Run tasks at the lowest traffic times if possible.
|
||||
- Use cron to **trigger** jobs, not run them. Use a real queuing system such as rabbitmq to actually process jobs.
|
||||
- Try to keep tasks quiet so that mails only send on errors.
|
||||
- Do not silence standard error or standard out. If you silence the former, you will miss failures. Silencing the latter means you should actually make application changes to handle log levels.
|
||||
- Use a service such as [Dead Man's Snitch](https://deadmanssnitch.com) to verify that cron tasks completed successfully.
|
||||
- Add lots of comments to your cronfile, including what a task is doing, so that you don't spend time deciphering the file later.
|
||||
- Place your cronfiles in a pattern such as `/etc/cron.d/APP`.
|
||||
- Do not use non-ascii characters in your cronfile names. Cron is finicky.
|
||||
- Remember to have trailing newlines in your cronfile! Cron is finicky.
|
||||
|
||||
The following is a sample cronfile that you can use for your applications:
|
||||
|
||||
```
|
||||
# server cron jobs
|
||||
MAILTO="mail@example.com"
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
|
||||
# m h dom mon dow username command
|
||||
# * * * * * dokku command to be executed
|
||||
# - - - - -
|
||||
# | | | | |
|
||||
# | | | | +----- day of week (0 - 6) (Sunday=0)
|
||||
# | | | +------- month (1 - 12)
|
||||
# | | +--------- day of month (1 - 31)
|
||||
# | +----------- hour (0 - 23)
|
||||
# +----------- min (0 - 59)
|
||||
|
||||
### HIGH TRAFFIC TIME IS B/W 00:00 - 04:00 AND 14:00 - 23:59
|
||||
### RUN YOUR TASKS FROM 04:00 - 14:00
|
||||
### KEEP SORTED IN TIME ORDER
|
||||
|
||||
### PLACE ALL CRON TASKS BELOW
|
||||
|
||||
# removes unresponsive users from the subscriber list to decrease bounce rates
|
||||
0 0 * * * dokku dokku --rm run node-js-app some-command
|
||||
|
||||
# sends out our email alerts to users
|
||||
0 1 * * * dokku dokku ps:scale node-js-app cron=1 && dokku enter node-js-app cron some-other-command && dokku ps:scale node-js-app cron=0
|
||||
|
||||
### PLACE ALL CRON TASKS ABOVE, DO NOT REMOVE THE WHITESPACE AFTER THIS LINE
|
||||
|
||||
```
|
||||
120
docs/deployment/ssl-configuration.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# SSL Configuration
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
Dokku supports SSL/TLS certificate inspection and CSR/Self-signed certificate generation via the `certs` plugin. Note that whenever SSL/TLS support is enabled SPDY is also enabled.
|
||||
|
||||
```
|
||||
certs:add <app> CRT KEY Add an ssl endpoint to an app. Can also import from a tarball on stdin.
|
||||
certs:generate <app> DOMAIN Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app> Show certificate information for an ssl endpoint.
|
||||
certs:remove <app> Remove an SSL Endpoint from an app.
|
||||
certs:update <app> CRT KEY Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
|
||||
# for 0.3.x
|
||||
dokku nginx:import-ssl <app> < certs.tar
|
||||
```
|
||||
|
||||
## Per-application certificate management
|
||||
|
||||
Dokku provides built-in support for managing SSL certificates on a per-application basis. SSL is managed via nginx outside of application containers, and as such can be updated on-the-fly without rebuilding containers. At this time, applications only support a single SSL certificate at a time. To support multiple domains for a single application, wildcard certificate usage is encouraged.
|
||||
|
||||
### Certificate setting
|
||||
|
||||
The `certs:add` command can be used to push a `tar` containing a certificate `.crt` and `.key` file to a single application. The command should correctly handle cases where the `.crt` and `.key` are not named properly or are nested in a subdirectory of said `tar` file. You can import it as follows:
|
||||
|
||||
```shell
|
||||
tar cvf cert-key.tar server.crt server.key
|
||||
# replace APP with the name of your application
|
||||
dokku certs:add <app> < cert-key.tar
|
||||
```
|
||||
|
||||
> Note: If your `.crt` file came alongside a `.ca-bundle`, you'll want to concatenate those into a single `.crt` file before adding it to the `.tar`.
|
||||
|
||||
```shell
|
||||
cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
||||
```
|
||||
|
||||
### Certificate generation
|
||||
|
||||
> Note: Using this method will create a self-signed certificate, which is only recommended for development or staging use, not production environments.
|
||||
|
||||
The `certs:generate` command will walk you through the correct `openssl` commands to create a key, csr and a self-signed cert for a given app/domain. We automatically put the self-signed cert in place as well as add the specified domain to the application configuration.
|
||||
|
||||
If you decide to obtain a CA signed certficate, you can import that certificate using the aformentioned `dokku certs:add` command.
|
||||
|
||||
### Certificate information
|
||||
|
||||
The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists.
|
||||
|
||||
```
|
||||
root@dokku:~/dokku# dokku certs:info node-js-app
|
||||
-----> Fetching SSL Endpoint info for node-js-app...
|
||||
-----> Certificate details:
|
||||
=====> Common Name(s):
|
||||
=====> test.dokku.me
|
||||
=====> Expires At: Aug 24 23:32:59 2016 GMT
|
||||
=====> Issuer: C=US, ST=California, L=San Francisco, O=dokku.me, CN=test.dokku.me
|
||||
=====> Starts At: Aug 25 23:32:59 2015 GMT
|
||||
=====> Subject: C=US; ST=California; L=San Francisco; O=dokku.me; CN=test.dokku.me
|
||||
=====> SSL certificate is self signed.
|
||||
```
|
||||
|
||||
### Certificate removal
|
||||
|
||||
The `certs:remove` command only works on app-specific certificates. It will `rm` the app-specific tls directory, rebuild the nginx configuration, and reload nginx.
|
||||
|
||||
## Global Certification
|
||||
|
||||
Global certificate management is a manual process. To enable TLS connections for all your applications at once you will need a wildcard TLS certificate.
|
||||
|
||||
To enable TLS across all apps, you can run the following commands:
|
||||
|
||||
```shell
|
||||
mkdir -p /home/dokku/tls
|
||||
cp server.crt /home/dokku/tls/server.crt
|
||||
cp server.key /home/dokku/tls/server.key
|
||||
```
|
||||
|
||||
Next, you will want to enable the certificates by editing `/etc/nginx/conf.d/dokku.conf` and uncommenting these two lines (remove the `#`):
|
||||
|
||||
```
|
||||
ssl_certificate /home/dokku/tls/server.crt;
|
||||
ssl_certificate_key /home/dokku/tls/server.key;
|
||||
```
|
||||
|
||||
The settings will take affect at the next deploy. If you would like to propagate the change to all apps immediately, you can also run the following command:
|
||||
|
||||
```shell
|
||||
dokku ps:restartall
|
||||
```
|
||||
|
||||
Once TLS is enabled, the application will be accessible by `https://` (redirection from `http://` is applied as well).
|
||||
|
||||
> Note: TLS will not be enabled unless the application's VHOST matches the certificate's name. (i.e. if you have a cert for `*.example.com` TLS won't be enabled for `something.example.org` or `example.net`)
|
||||
|
||||
## HSTS Header
|
||||
|
||||
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
|
||||
|
||||
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.
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
> New as of 0.3.17
|
||||
|
||||
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-For` and `X-Forwarded-Port`. 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 setting the `DOKKU_SSL_TERMINATED` environment variable:
|
||||
|
||||
```shell
|
||||
dokku config:set myapp DOKKU_SSL_TERMINATED=1
|
||||
```
|
||||
|
||||
Only use this option if:
|
||||
1. All requests are terminated at the load balancer, and forwarded to Nginx
|
||||
2. The load balancer is configured to send the `X-Forwarded-` headers (this may be off by default)
|
||||
|
||||
If it's possible to make HTTP/S requests directly to Nginx, bypassing the load balancer, or if the load balancer is not configured to set these headers, then it becomes possible for a client to set these headers to arbitrary values.
|
||||
|
||||
This could result in security issue, for example, if your application looks at the value of the `X-Forwarded-Proto` to determine if the request was made over HTTPS.
|
||||
@@ -3,9 +3,9 @@
|
||||
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 hooks](http://progrium.viewdocs.io/dokku/development/pluginhooks) your plugin can implement.
|
||||
2. Check out the [list of triggers](http://dokku.viewdocs.io/dokku/development/plugin-triggers) 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](http://progrium.viewdocs.io/dokku/plugins) and add a link to it.
|
||||
4. Edit [this page](http://dokku.viewdocs.io/dokku/plugins) and add a link to it.
|
||||
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
|
||||
|
||||
### Sample plugin
|
||||
@@ -15,13 +15,13 @@ The below plugin is a dummy `dokku hello` plugin. If your plugin exposes command
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
hello)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
APP="$2";
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
APP="$2"; IMAGE_TAG=$(get_running_image_tag $APP); IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
echo "Hello $APP"
|
||||
;;
|
||||
@@ -31,7 +31,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
cat<<EOF
|
||||
hello <app>, Says "Hello <app>"
|
||||
hello:world, Says "Hello world"
|
||||
EOF
|
||||
@@ -44,6 +44,15 @@ EOF
|
||||
esac
|
||||
```
|
||||
|
||||
Each plugin requires a `plugin.toml` descriptor file with the following required fields:
|
||||
|
||||
```shell
|
||||
[plugin]
|
||||
description = "dokku hello plugin"
|
||||
version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
A few notes:
|
||||
|
||||
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
|
||||
@@ -56,8 +65,7 @@ A few notes:
|
||||
```shell
|
||||
IMAGE=$(docker images | grep "user/repo" | awk '{print $3}')
|
||||
if [[ -z $IMAGE ]]; then
|
||||
echo "user/repo image not found... Did you run 'dokku plugins-install'?"
|
||||
exit 1
|
||||
dokku_log_fail "user/repo image not found... Did you run 'dokku plugin:install'?"
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -77,6 +85,8 @@ A few notes:
|
||||
- As some plugins require access to set app config settings and do not want/require the default Heroku-style behavior of a restart, we have the following "internal" commands that provide this functionality :
|
||||
|
||||
```shell
|
||||
dokku config:set-norestart APP KEY1=VALUE1 [KEY2=VALUE2 ...]
|
||||
dokku config:unset-norestart APP KEY1 [KEY2 ...]
|
||||
dokku config:set --no-restart APP KEY1=VALUE1 [KEY2=VALUE2 ...]
|
||||
dokku config:unset --no-restart 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](http://dokku.viewdocs.io/dokku/development/plugin-triggers) doc for examples.
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# Pluginhooks
|
||||
# Plugin triggers
|
||||
|
||||
[Pluginhooks](https://github.com/progrium/pluginhook) are a good way to jack into existing dokku infrastructure. You can use them to modify the output of various dokku commands or override internal configuration.
|
||||
[Plugin triggers](https://github.com/dokku/plugn) (formerly [pluginhooks](https://github.com/progrium/pluginhook)) are a good way to jack into existing dokku infrastructure. You can use them to modify the output of various dokku commands or override internal configuration.
|
||||
|
||||
Pluginhooks are simply scripts that are executed by the system. You can use any language you want, so long as the script:
|
||||
Plugin triggers are simply scripts that are executed by the system. You can use any language you want, so long as the script:
|
||||
|
||||
- Is executable
|
||||
- Has the proper language requirements installed
|
||||
|
||||
For instance, if you wanted to write a pluginhook in PHP, you would need to have `php` installed and available on the CLI prior to pluginhook invocation.
|
||||
For instance, if you wanted to write a plugin trigger in PHP, you would need to have `php` installed and available on the CLI prior to plugin trigger invocation.
|
||||
|
||||
The following is an example for the `nginx-hostname` pluginhook. It reverses the hostname that is provided to nginx during deploys. If you created an executable file named `nginx-hostname` with the following code in your plugin, it would be invoked by dokku during the normal app deployment process:
|
||||
The following is an example for the `nginx-hostname` plugin trigger. It reverses the hostname that is provided to nginx during deploys. If you created an executable file named `nginx-hostname` with the following code in your plugin trigger, it would be invoked by dokku during the normal app deployment process:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -21,18 +21,18 @@ NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
## Available Pluginhooks
|
||||
## Available plugin triggers
|
||||
|
||||
There are a number of plugin-related pluginhooks. These can be optionally implemented by plugins and allow integration into the standard dokku plugin setup/backup/teardown process.
|
||||
There are a number of plugin-related triggers. These can be optionally implemented by plugins and allow integration into the standard dokku setup/backup/teardown process.
|
||||
|
||||
The following pluginhooks describe those available to a dokku installation. As well, there is an example for each pluginhook that you can use as templates for your own plugin development.
|
||||
The following plugin triggers describe those available to a dokku installation. As well, there is an example for each trigger that you can use as templates for your own plugin development.
|
||||
|
||||
> The example pluginhook code is not guaranteed to be implemented as in within dokkku, and are merely simplified examples. Please look at the dokku source for larger, more in-depth examples.
|
||||
> The example plugin trigger code is not guaranteed to be implemented as in within dokkku, and are merely simplified examples. Please look at the dokku source for larger, more in-depth examples.
|
||||
|
||||
### `install`
|
||||
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
- Invoked by: `dokku plugins-install`.
|
||||
- Invoked by: `dokku plugin:install`.
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
@@ -50,8 +50,8 @@ fi
|
||||
|
||||
### `dependencies`
|
||||
|
||||
- Description: Used to install system-level dependencies. Invoked by `plugins-install-dependencies`.
|
||||
- Invoked by: `dokku plugins-install-dependencies`
|
||||
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
|
||||
- Invoked by: `dokku plugin:install-dependencies`
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
@@ -62,9 +62,10 @@ fi
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
ubuntu)
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
debian|ubuntu)
|
||||
apt-get install --force-yes -qq -y nginx
|
||||
;;
|
||||
|
||||
@@ -77,13 +78,13 @@ esac
|
||||
### `update`
|
||||
|
||||
- Description: Can be used to run plugin updates on a regular interval. You can schedule the invoker in a cron-task to ensure your system gets regular updates.
|
||||
- Invoked by: `dokku plugins-update`.
|
||||
- Invoked by: `dokku plugin:update`.
|
||||
- Arguments: None
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Update the buildstep image from git source
|
||||
# Update the herokuish image from git source
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
@@ -93,7 +94,7 @@ sudo BUILD_STACK=true make install
|
||||
|
||||
### `commands help`
|
||||
|
||||
- Description: Used to aggregate all plugin `help` output. Your plugin should implement a `help` command in your `commands` file to take advantage of this pluginhook. This must be implemented inside the `commands` pluginhook file.
|
||||
- Description: Used to aggregate all plugin `help` output. Your plugin should implement a `help` command in your `commands` file to take advantage of this plugin trigger. This must be implemented inside the `commands` plugin file.
|
||||
- Invoked by: `dokku help`
|
||||
- Arguments: None
|
||||
- Example:
|
||||
@@ -106,7 +107,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | derp:help)
|
||||
cat && cat<<EOF
|
||||
cat<<EOF
|
||||
derp:herp, Herps the derp
|
||||
derp:serp [file], Shows the file's serp
|
||||
EOF
|
||||
@@ -121,7 +122,7 @@ esac
|
||||
|
||||
### `backup-export`
|
||||
|
||||
- Description: Used to backup files for a given plugin. If your plugin writes files to disk, this pluginhook should be used to echo out their full paths. Any files listed will be copied by the backup plugin to the backup tar.gz.
|
||||
- Description: Used to backup files for a given plugin. If your plugin writes files to disk, this plugin trigger should be used to echo out their full paths. Any files listed will be copied by the backup plugin to the backup tar.gz.
|
||||
- Invoked by: `dokku backup:export`
|
||||
- Arguments: `$VERSION $DOKKU_ROOT`
|
||||
- Example:
|
||||
@@ -180,9 +181,9 @@ for file in */REDIRECT; do
|
||||
done
|
||||
```
|
||||
|
||||
### `pre-build-buildstep`
|
||||
### `pre-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildstep.
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
@@ -195,9 +196,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-build-buildstep`
|
||||
### `post-build-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildstep.
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
@@ -240,11 +241,11 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `pre-release-buildstep`
|
||||
### `pre-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildstep.
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -252,8 +253,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# Installs the graphicsmagick package into the container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing GraphicsMagick..."
|
||||
|
||||
@@ -266,11 +268,11 @@ test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
|
||||
### `post-release-buildstep`
|
||||
### `post-release-buildpack`
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildstep.
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -278,8 +280,9 @@ docker commit $ID $IMAGE > /dev/null
|
||||
# Installs a package specified by the `CONTAINER_PACKAGE` env var
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
|
||||
|
||||
@@ -296,13 +299,16 @@ docker commit $ID $IMAGE > /dev/null
|
||||
|
||||
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -311,13 +317,16 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
|
||||
- Invoked by: `dokku release`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -335,10 +344,11 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
|
||||
|
||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source $DOKKU_ROOT/$APP/ENV
|
||||
eval "$(config_export app $APP)"
|
||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||
|
||||
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
|
||||
@@ -351,7 +361,7 @@ fi
|
||||
|
||||
- Description: Allows the running of code before the container's process is started.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -359,11 +369,9 @@ fi
|
||||
# Runs gulp in our container
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
source "$(dirname $0)/../common/functions"
|
||||
|
||||
APP="$1"
|
||||
IMAGE="dokku/$APP"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
id=$(docker run -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
@@ -372,6 +380,27 @@ docker commit $id $IMAGE > /dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
```
|
||||
|
||||
### `post-create`
|
||||
|
||||
- Description: Can be used to run commands after an application is created.
|
||||
- Invoked by: `dokku apps:create`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Runs a command to ensure that an app
|
||||
# has a postgres database when it is starting
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
POSTGRES="$1"
|
||||
|
||||
dokku postgres:create $POSTGRES
|
||||
dokku postgres:link $POSTGRES $APP
|
||||
```
|
||||
|
||||
### `post-deploy`
|
||||
|
||||
- Description: Allows running of commands after a deploy has completed. Dokku core currently uses this to switch traffic on nginx.
|
||||
@@ -392,7 +421,7 @@ curl "http://httpstat.us/200"
|
||||
|
||||
- Description: Can be used to run commands before an app is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -400,8 +429,10 @@ curl "http://httpstat.us/200"
|
||||
# Clears out the gulp asset build cache for applications
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; IMAGE="dokku/$APP"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"
|
||||
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
@@ -412,7 +443,7 @@ fi
|
||||
|
||||
- Description: Can be used to run commands after an application is deleted.
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -427,11 +458,29 @@ APP="$1";
|
||||
dokku postgres:destroy $APP
|
||||
```
|
||||
|
||||
### `post-stop`
|
||||
|
||||
- Description: Can be used to run commands after an application is manually stopped
|
||||
- Invoked by: `dokku ps:stop`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Marks an application as manually stopped
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1";
|
||||
|
||||
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
|
||||
```
|
||||
|
||||
### `docker-args-build`
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku build`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_SOURCE_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -446,13 +495,16 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -461,13 +513,16 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -491,9 +546,9 @@ echo false
|
||||
|
||||
### `post-domains-update`
|
||||
|
||||
- Description: Allows you to run commands once the domain for an application has been updated.
|
||||
- Description: Allows you to run commands once the domain for an application has been updated. It also sends in the command that has been used. This can be "add", "clear" or "remove". The third argument will be the optional list of domains
|
||||
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP` `action name` `domains`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -572,6 +627,25 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
nginx -t
|
||||
```
|
||||
|
||||
### `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]`
|
||||
- Invoked by: `dokku git-hook`, `dokku tar-build-locked`
|
||||
- Arguments: `$APP $IMAGE_SOURCE_TYPE $TMP_WORK_DIR $REV`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Adds a file called `dokku-is-awesome` to the repository
|
||||
# the contents will be the application name
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$2"; TMP_WORK_DIR="$3"; REV="$4"
|
||||
|
||||
echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
|
||||
```
|
||||
|
||||
### `receive-app`
|
||||
|
||||
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build.
|
||||
@@ -611,5 +685,99 @@ if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
REFERENCE_REPO="$DOKKU_ROOT/$reference_app
|
||||
git clone --bare --shared --reference "$REFERENCE_REPO" "$REFERENCE_REPO" "$DOKKU_ROOT/$APP" > /dev/null
|
||||
fi
|
||||
pluginhook receive-app $APP $newrev
|
||||
plugn trigger receive-app $APP $newrev
|
||||
```
|
||||
|
||||
### `tags-create`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an application image has been added
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Upload an application image to docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
IMAGE_ID=$(docker inspect --format '{{ .Id }}' $IMAGE)
|
||||
docker tag -f $IMAGE_ID $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
```
|
||||
|
||||
### `tags-destroy`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an application image has been removed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Remove an image tag from docker hub
|
||||
|
||||
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....
|
||||
```
|
||||
|
||||
### `retire-container-failed`
|
||||
|
||||
- Description: Allows you to run commands if/when retiring old containers has failed
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Send an email when a container failed to retire
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; HOSTNAME=$(hostname -s)
|
||||
|
||||
mail -s "$APP containers on $HOSTNAME failed to retire" ops@example.com
|
||||
```
|
||||
|
||||
### `user-auth`
|
||||
|
||||
This is a special plugin trigger that is executed on *every* command run. As dokku sometimes internally invokes the `dokku` command, special care should be taken to properly handle internal command redirects.
|
||||
|
||||
Note that the trigger should exit as follows:
|
||||
|
||||
- `0` to continue running as normal
|
||||
- `1` to halt execution of the command
|
||||
|
||||
The `SSH_USER` is the original ssh user. If you are running remote commands, this user will typically be `dokku`, and as such should not be trusted when checking permissions. If you are connected via ssh as a different user who then invokes `dokku`, the value of this variable will be that user's name (`root`, `myuser`, etc.).
|
||||
|
||||
The `SSH_NAME` is the `NAME` variable set via the `sshcommand acl-add` command. If you have set a user via the `dokku-installer`, this value will be set to `admin`. For installs via debian package, this value *may* be `default`. For reference, the following command can be run as the root user to specify a specific `NAME` for a given ssh key:
|
||||
|
||||
```shell
|
||||
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`
|
||||
- Arguments: `$SSH_USER $SSH_NAME $DOKKU_COMMAND`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Allow root/admin users to do everything
|
||||
# Deny plugin access to default users
|
||||
# Allow access to all other commands
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
SSH_USER=$1
|
||||
SSH_NAME=$2
|
||||
shift 2
|
||||
[[ "$SSH_USER" == "root" ]] && exit 0
|
||||
[[ "$SSH_NAME" == "admin" ]] && exit 0
|
||||
[[ "$SSH_NAME" == "default" && $1 == plugin:* ]] && exit 1
|
||||
exit 0
|
||||
```
|
||||
@@ -4,9 +4,20 @@ Dokku is released in intervals *at most* three weeks apart, though may be releas
|
||||
|
||||
To propose a release, the following tasks need to be performed:
|
||||
|
||||
- The installable version must be changed in the `contrib/dokku-installer.py` file.
|
||||
- The installable version must be changed in the `debian/control` file.
|
||||
- The installable version must be changed in the `docs/home.html` file
|
||||
- The installable version must be changed in the `docs/index.md` file
|
||||
- The installable version must be changed in the `docs/installation.md` file.
|
||||
- The installable version must be changed in the `docs/template.html` file.
|
||||
- The installable version must be changed in the `README.md` file.
|
||||
- The installable version must be changed in the `contrib/dokku-installer.rb` file.
|
||||
- The embedded css should be cleared in the `docs/template.html` file.
|
||||
- The versioned links should be updated in the `docs/assets/favicons/browserconfig.xml` file.
|
||||
- The versioned links should be updated in the `docs/assets/favicons/manifest.json` file.
|
||||
- The versioned links should be updated in the `docs/assets/style.css` file.
|
||||
- The versioned links should be updated in the `docs/home.html` file.
|
||||
- The versioned links should be updated in the `docs/template.html` file.
|
||||
- The versioned links should be updated in the `docs/template.html` file.
|
||||
- A list of changes must be made in the `HISTORY.md`.
|
||||
- A tag must be created locally with your release version
|
||||
- Debian packages *must* be created via `vagrant up build`
|
||||
|
||||
@@ -14,7 +14,7 @@ Example apps can be found here:
|
||||
|
||||
### Executing tests locally
|
||||
|
||||
- Setup dokku in a [vagrant vm](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- Setup dokku in a [vagrant vm](http://dokku.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- Test setup and execution
|
||||
|
||||
```shell
|
||||
|
||||
59
docs/dns.md
@@ -1,52 +1,52 @@
|
||||
# Overview
|
||||
# DNS Configuration
|
||||
|
||||
This is a work in progress.
|
||||
> Note: This is a work in progress.
|
||||
|
||||
## DNS Versions
|
||||
### DNS Versions
|
||||
|
||||
There are many different DNS servers 'in the wild'. Some of the popular ones on Linux are BIND, dnsmasq, and pdns. Windows has its own built-in DNS server as well as Unbound, Posadis, and more. A full list of DNS packages can be found on Wikipedia under [Comparison of DNS Server Software](http://en.wikipedia.org/wiki/Comparison_of_DNS_server_software). In addition to the various DNS packages, there are tens of thousands of [Managed DNS Providers](http://en.wikipedia.org/wiki/List_of_managed_DNS_providers) out that all have different DNS interfaces.
|
||||
|
||||
## Focus
|
||||
### Focus
|
||||
|
||||
Because there are so many different DNS server packages out there as well as a tremendous number of Managed DNS Providers, we will focus on the concepts of DNS as well as providing examples in the 'BIND' format so you can adapt the information to your own server package or managed DNS provider.
|
||||
|
||||
## Assumptions
|
||||
### Assumptions
|
||||
|
||||
* We assume you have a passing familiarity with DNS. If not, you can read an [in-depth article](http://www.diaryofaninja.com/blog/2012/03/03/devops-dns-for-developers-ndash-now-therersquos-no-excuse-not-to-know) on DNS. But basically you need to know that DNS changes names (like example.tld) into addresses (like 127.0.0.1)
|
||||
* We assume you already have a domain name registered and pointed to your favorite Managed DNS Provider or have your own BIND DNS server running.
|
||||
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/progrium/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
|
||||
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
|
||||
|
||||
|
||||
## HELP!
|
||||
### HELP!
|
||||
|
||||
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/progrium/dokku/issues) and someone will be glad to assist you.
|
||||
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'.
|
||||
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
|
||||
|
||||
Dokku uses a DNS to differentiate between apps on your dokku-powered server. If you are using the domain 'example.tld', and you have two apps 'myapp1' and 'myapp2', dokku will make them available at 'myapp1.example.tld' and 'myapp2.example.tld'.
|
||||
Dokku uses DNS to differentiate between apps on your dokku-powered server. If you are using the domain `example.tld`, and you have two apps `myapp1` and `myapp2`, dokku will make them available at `myapp1.example.tld` and `myapp2.example.tld`.
|
||||
|
||||
To get started, you need to know the IP address of your dokku server. Connect in to it and run 'ifconfig' or 'ip addr' to see the IP address.
|
||||
To get started, you need to know the IP address of your dokku server. Connect to it and run `ifconfig` or `ip addr` to see the IP address.
|
||||
|
||||
# Caching
|
||||
|
||||
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to 'propagate'. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
|
||||
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to propagate. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
|
||||
|
||||
## The two methods
|
||||
|
||||
Now you have to make a decision about your domain. Do you want everything and anything at example.tld to go to your dokku server, or would you rather use a 'sub domain' for your dokku server?
|
||||
Now you have to make a decision about your domain. Do you want everything and anything at `example.tld` to go to your dokku server, or would you rather use a 'sub domain' for your dokku server?
|
||||
|
||||
In other words, do you want your applications on your dokku server accessible via myapp.example.tld or via myapp.myserver.example.tld?
|
||||
In other words, do you want your applications on your dokku server accessible via `myapp.example.tld` or via `myapp.myserver.example.tld`?
|
||||
|
||||
### Using a sub-domain (myapp.myserver.example.tld)
|
||||
|
||||
Using a sub-domain is easy. When you set up your server, you probably gave it a name like myserver.example.tld.
|
||||
Using a sub-domain is easy. When you set up your server, you probably gave it a name like `myserver.example.tld`.
|
||||
|
||||
Go in to your Managed DNS provider and create an 'A' record named 'myserver' and put in the IP address you got from your server a few moments ago.
|
||||
Go in to your Managed DNS provider and create an `A` record named `myserver` and put in the IP address you got from your server a few moments ago.
|
||||
|
||||
Hopefully your managed DNS provider also supports wildcards. Create a second 'A' record named '*.myserver' along with the IP address you got from your server a few moments ago.
|
||||
Hopefully your managed DNS provider also supports wildcards. Create a second `A` record named `*.myserver` along with the IP address you got from your server a few moments ago.
|
||||
|
||||
If you are using BIND, your zone file will look similar to this:
|
||||
|
||||
@@ -55,28 +55,25 @@ $ORIGIN example.tld
|
||||
$TTL 5m
|
||||
|
||||
myserver IN A 127.0.0.1
|
||||
*.myserver IN A 127.0.0.1
|
||||
*.myserver IN A 127.0.0.1
|
||||
```
|
||||
|
||||
You can verify your changes in Linux by trying one or more of the following commands:
|
||||
|
||||
* host myserver.example.tld
|
||||
|
||||
* dig -t A myserver.example.tld
|
||||
|
||||
* nslookup myserver.example.tld
|
||||
* `host myserver.example.tld`
|
||||
* `dig -t A myserver.example.tld`
|
||||
* `nslookup myserver.example.tld`
|
||||
|
||||
Now is a good time to remind you that the answers you get MAY BE CACHED.
|
||||
|
||||
If everything is working correctly, you should also be able to query for any other name 'under' myserver.example.tld and get back the IP address of your server. Try:
|
||||
If everything is working correctly, you should also be able to query for any other name under `myserver.example.tld` and get back the IP address of your server. Try:
|
||||
|
||||
* host test.myserver.example.tld
|
||||
* `host test.myserver.example.tld`
|
||||
* `host xyzzy.myserver.example.tld`
|
||||
|
||||
* host xyzzy.myserver.example.tld
|
||||
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.
|
||||
|
||||
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 [README](https://github.com/progrium/dokku/blob/master/README.md)
|
||||
Proceed with the setup instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md)
|
||||
|
||||
### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
@@ -84,5 +81,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
|
||||
* Need to modify `/home/dokku/HOSTNAME` and `/home/dokku/VHOST`
|
||||
|
||||
@@ -1,68 +1,72 @@
|
||||
docker-options
|
||||
========================
|
||||
# Docker Container Options
|
||||
|
||||
Usage
|
||||
-----
|
||||
> New as of 0.3.17
|
||||
|
||||
```bash
|
||||
$ dokku help
|
||||
...
|
||||
docker-options <app> Display apps docker options for all phases
|
||||
docker-options <app> <phase(s)> Display apps docker options for phase (comma-separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION Add docker option to app for phase (comma-separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION Remove docker option from app for phase (comma-separated phase list)
|
||||
...
|
||||
````
|
||||
Pass [options](http://docs.docker.io/en/latest/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
Add some options (first, for the deployed/running app and second when executing `dokku run`)
|
||||
|
||||
```bash
|
||||
$ dokku docker-options:add myapp deploy "-v /host/path:/container/path"
|
||||
$ dokku docker-options:add myapp run "-v /another/container/path"
|
||||
```
|
||||
docker-options <app> Display app's Docker options for all phases
|
||||
docker-options <app> <phase(s)> Display app's Docker options for phase (comma-separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION Add Docker option to app for phase (comma-separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION Remove Docker option from app for phase (comma-separated phase list)
|
||||
```
|
||||
|
||||
Check what we added
|
||||
## About Dokku phases
|
||||
|
||||
```bash
|
||||
$ dokku docker-options myapp
|
||||
Deploy options:
|
||||
-v /host/path:/container/path
|
||||
Run options:
|
||||
-v /another/container/path
|
||||
```
|
||||
Dokku deploys your application in multiple "phases" and the `docker-options` plugin allows you to pass arguments to their underlying docker container:
|
||||
|
||||
Remove an option
|
||||
```bash
|
||||
$ dokku docker-options:remove myapp run "--link container_name:alias"
|
||||
```
|
||||
|
||||
Note about `dokku` phases and `docker-options`
|
||||
------------
|
||||
`dokku` deploys your application in multiple "phases" and the `docker-options` plugin allows you to pass arguments to the underlying docker container in the following 3 phases/containers
|
||||
- `build`: the container that executes the appropriate buildpack
|
||||
- `deploy`: the container that executes your running/deployed application
|
||||
- `run`: the container that executes any arbitrary command via `dokku run myapp`
|
||||
|
||||
## Examples
|
||||
|
||||
Advanced Usage (avoid if possible)
|
||||
------------
|
||||
### Add Docker options
|
||||
|
||||
In your applications folder (`/home/dokku/app_name`) create a file called `DOCKER_OPTIONS_RUN` (or `DOCKER_OPTIONS_BUILD` or `DOCKER_OPTIONS_DEPLOY`).
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](deployment/one-off-processes/):
|
||||
|
||||
Inside this file list one docker option per line. For example:
|
||||
```shell
|
||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||
dokku docker-options:add myapp deploy "-v /home/dokku/logs/myapp:/app/logs"
|
||||
dokku docker-options:add myapp run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
```
|
||||
|
||||
```bash
|
||||
> Note: When [mounting a host directory](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) in a Dokku app you should first create that directory as user `dokku` and then mount the directory under `/app` in the container using `docker-options` as above. Otherwise the app will lack write permission in the directory.
|
||||
|
||||
### Output Docker options
|
||||
|
||||
```shell
|
||||
dokku docker-options myapp
|
||||
# Deploy options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
# Run options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
```
|
||||
|
||||
### Remove a Docker option
|
||||
|
||||
```shell
|
||||
dokku docker-options:remove myapp run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
```
|
||||
|
||||
## Advanced usage
|
||||
|
||||
In your applications folder `/home/dokku/app_name` create a file called `DOCKER_OPTIONS_RUN` (or `DOCKER_OPTIONS_BUILD` or `DOCKER_OPTIONS_DEPLOY`).
|
||||
|
||||
Inside this file list one Docker option per line. For example:
|
||||
|
||||
```shell
|
||||
--link container_name:alias
|
||||
-v /host/path:/container/path
|
||||
-v /another/container/path
|
||||
```
|
||||
|
||||
The above example will result in the following options being passed to docker during `dokku run`:
|
||||
The above example will result in the following options being passed to Docker during `dokku run`:
|
||||
|
||||
```bash
|
||||
```shell
|
||||
--link container_name:alias -v /host/path:/container/path -v /another/container/path
|
||||
```
|
||||
|
||||
You may also include comments (lines beginning with a #) and blank lines in the DOCKER_OPTIONS file.
|
||||
|
||||
Move information on docker options can be found here: http://docs.docker.io/en/latest/reference/run/ .
|
||||
Move information on Docker options can be found here: http://docs.docker.io/en/latest/reference/run/ .
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
# Dokku Event Logs
|
||||
|
||||
> New as of 0.3.21
|
||||
|
||||
Docker provides an _events_ command to show system's real time events. Likewise, Dokku can record events as syslog entries and also provides a plugin to display the last ones.
|
||||
|
||||
```
|
||||
events [-t] Show the last events (-t follows)
|
||||
events:list List logged events
|
||||
events:on Enable events logger
|
||||
events:off Disable events logger
|
||||
events [-t] Show the last events (-t follows)
|
||||
events:list List logged events
|
||||
events:on Enable events logger
|
||||
events:off Disable events logger
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -21,10 +23,10 @@ Enabling dokku events logger
|
||||
Dokku will then write log entries to ``/var/log/syslog`` as well as a Dokku-specific logs sub-directory ``/var/log/dokku/events.log``, which can be easily displayed with the command `dokku events`:
|
||||
|
||||
```
|
||||
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildstep( pythonapp )
|
||||
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildpack( pythonapp )
|
||||
Jul 3 16:10:02 dokku.me dokku[128095]: INVOKED: docker-args-run( rubyapp )
|
||||
Jul 3 16:10:02 dokku.me dokku[128114]: INVOKED: docker-args-run( nhl )
|
||||
Jul 3 16:10:03 dokku.me dokku[128136]: INVOKED: post-release-buildstep( pythonapp )
|
||||
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 )
|
||||
@@ -47,10 +49,10 @@ docker-args-build
|
||||
pre-delete
|
||||
post-deploy
|
||||
receive-app
|
||||
pre-release-buildstep
|
||||
pre-release-buildpack
|
||||
nginx-pre-reload
|
||||
docker-args-deploy
|
||||
post-build-buildstep
|
||||
post-build-buildpack
|
||||
post-domains-update
|
||||
post-release-dockerfile
|
||||
check-deploy
|
||||
@@ -63,10 +65,10 @@ bind-external-ip
|
||||
pre-deploy
|
||||
post-delete
|
||||
dependencies
|
||||
pre-build-buildstep
|
||||
pre-build-buildpack
|
||||
docker-args-run
|
||||
pre-build-dockerfile
|
||||
post-release-buildstep
|
||||
post-release-buildpack
|
||||
post-build-dockerfile
|
||||
pre-release-dockerfile
|
||||
update
|
||||
|
||||
11
docs/getting-started/install/azure.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Microsoft Azure
|
||||
|
||||
- If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
|
||||
|
||||
- Go to the [dokku on azure deployment page](https://azure.microsoft.com/en-us/documentation/templates/dokku-vm/) and click **Deploy to Azure**.
|
||||
|
||||
- You'll be prompted to enter a few parameters, including a unique storage account name and a unique name for the sub-domain used for your public IP address. For the `sshKeyData` parameter, copy and paste the contents of the **public** key file you just created. After a few minutes the Dokku instance will be deployed.
|
||||
|
||||
- In your browser of choice, navigate to `http://[[dnsNameForPublicIP]].[[location]].cloudapp.azure.com`. Where `[[dnsNameForPublicIP]]` and `[[location]]` are template parameters you used to deploy the template.
|
||||
|
||||
- Finish your dokku setup like you normally would by creating a **new** public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select 'Use Virtual Host Naming' and set the `Hostname` to a **public dns name** that you own such as one you would purchase from [namecheap](http://namecheap.com). Alternatively thanks to [xip.io]( http://xip.io/) you can just use yourAzurePublicIP.xip.io for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.
|
||||
@@ -3,15 +3,19 @@
|
||||
As of 0.3.18, dokku defaults to being installed via debian package. 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
|
||||
curl -sL https://get.docker.io/gpg 2> /dev/null | sudo apt-key add - 2>&1 >/dev/null
|
||||
curl -sL https://packagecloud.io/gpg.key 2> /dev/null | sudo apt-key add - 2>&1 >/dev/null
|
||||
# install prerequisites
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y apt-transport-https
|
||||
|
||||
echo "deb http://get.docker.io/ubuntu docker main" | sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list >/dev/null
|
||||
# install docker
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq -y linux-image-extra-`uname -r` apt-transport-https
|
||||
sudo apt-get install -qq -y dokku
|
||||
# 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
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
```
|
||||
|
||||
## Unattended installation
|
||||
|
||||
@@ -1,36 +1,39 @@
|
||||
# Installing on Linode
|
||||
|
||||
Due to how Linode installs custom kernels, Linode instances *require* a reboot before they can fully work with Docker/Dokku. The Official Dokku StackScript should take care of this process for you, and will email notify you when the instance is running and you can proceed with installation.
|
||||
When installing Dokku on a Linode server, you'll likely see an error during Docker installation:
|
||||
|
||||
## Using StackScript
|
||||
> 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.
|
||||
|
||||
Deploy using the following (experimental) Official StackScript:
|
||||
After 10 seconds, the installation will continue as normal.
|
||||
|
||||
- https://www.linode.com/stackscripts/view/11348
|
||||
This warning is the result of Linode using its own kernel, which does not support AUFS, instead of using the kernel supplied by 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.
|
||||
|
||||
## Without StackScript
|
||||
If you would like to use AUFS, follow the steps below to install Ubuntu's kernel and configure your server to boot it instead of Linode's.
|
||||
|
||||
* Build a Ubuntu 13.04 instance
|
||||
## Preparing your Linode for AUFS
|
||||
|
||||
* Follow these instructions: https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-distributionsupplied-kernel-with-pvgrub#ubuntu-1304-raring
|
||||
__Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
* If `apt-get update` no longer works:
|
||||
1. Open your server's dashboard in the [Linode Manager](https://manager.linode.com/).
|
||||
|
||||
* Verify if apt-get is trying to use ipv6 instead of ipv4 (e.g. you read something like "[Connecting to us.archive.ubuntu.com (2001:67c:1562::14)]" and apt-get would not proceed). In that case, follow these instructions: http://unix.stackexchange.com/questions/9940/convince-apt-get-not-to-use-ipv6-method (append "precedence ::ffff:0:0/96 100" to /etc/gai.conf)
|
||||
2. Make sure your Linode is [using KVM](https://www.linode.com/docs/platform/kvm#how-to-enable-kvm), not Xen, for virtualization.
|
||||
|
||||
* OR: change `/etc/apt/sources.list` to one mentioned in http://mirrors.ubuntu.com/mirrors.txt
|
||||
3. In the "Rebuild" tab, select "Ubuntu 14.04 LTS", set a root password, and rebuild.
|
||||
|
||||
* Run the following commands:
|
||||
4. Once your Linode has been created, click "Boot" and wait for it to complete.
|
||||
|
||||
```shell
|
||||
apt-get update
|
||||
5. SSH into your Linode as root and run the following commands:
|
||||
|
||||
apt-get install lxc wget bsdtar linux-image-extra-$(uname -r)
|
||||
apt-get update
|
||||
apt-get -qq upgrade
|
||||
apt-get -qq install linux-image-virtual linux-image-extra-virtual
|
||||
|
||||
modprobe aufs
|
||||
```
|
||||
* After this, you can install dokku the default way:
|
||||
6. When prompted, install Grub onto the first hard drive.
|
||||
|
||||
```shell
|
||||
wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
|
||||
```
|
||||
7. Back in your server's dashboard, click "Edit" on its Configuration Profile
|
||||
|
||||
8. Change the "Kernel" option to "GRUB 2" and save your changes.
|
||||
|
||||
9. Lastly, reboot the Linode.
|
||||
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](http://dokku.viewdocs.io/dokku/installation) and `bootstrap.sh` will take care of everything else.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- Clone Dokku
|
||||
|
||||
```
|
||||
git clone https://github.com/progrium/dokku.git
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
```
|
||||
|
||||
- Setup SSH hosts in your `/etc/hosts`
|
||||
|
||||
@@ -4,7 +4,7 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
## The Official Dokku Website
|
||||
|
||||
[http://progrium.viewdocs.io/dokku](http://progrium.viewdocs.io/dokku)
|
||||
[http://dokku.viewdocs.io/dokku](http://dokku.viewdocs.io/dokku)
|
||||
|
||||
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.
|
||||
|
||||
@@ -18,8 +18,8 @@ If you’re stumped, give us a holler in the Dokku IRC channel. Someone from the
|
||||
|
||||
If [here](http://webchat.freenode.net/?channels=dokku) for a web-based client IRC client.
|
||||
|
||||
## Stackoverflow
|
||||
## Stack Overflow
|
||||
|
||||
http://stackoverflow.com/
|
||||
|
||||
Tag your questions with `dokku` to enable existing users of stackoverflow to find your questions.
|
||||
Tag your questions with `dokku` to enable existing users of Stack Overflow to find your questions.
|
||||
|
||||
@@ -10,6 +10,28 @@
|
||||
<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.4.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/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.4.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body{padding-bottom:40px;color:#5a5a5a}
|
||||
@@ -18,11 +40,12 @@
|
||||
.header .heading{color:#fff;font-size:23px;margin:0;padding:0}
|
||||
.blurb{color:#424242;background-color:#ededed;background-image:url(./assets/gplaypattern.png);padding:45px 0;text-align:center}
|
||||
.blurb p{font-size:17px;font-weight:300;margin:18px 0;text-align:center}
|
||||
.quickstart-code{display:block;font-size:12px;line-height:1.3em;margin:45px auto;max-width:650px;padding:0}
|
||||
.quickstart-code{display:block;font-size:12px;line-height:1.3em;margin:45px auto;max-width:750px;padding:0}
|
||||
.quickstart-code .title{background-color:#dfdfdf;background-image:linear-gradient(top,#f7f7f7 0%,#dfdfdf 7%,#ccc 100%);border-bottom:1px solid #111;color:#444;display:block;font-weight:400;font-size:14px;margin:0 20px;padding:3px 0;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-radius:5px 5px 0 0;box-shadow:0 3px 0 rgba(0,0,0,0.5)}
|
||||
.quickstart-code .shell{background-color:#171717;font-family:Menlo,Consolas,"Courier New",Courier,"Liberation Mono",monospace;margin:0 20px;padding:20px;text-shadow:none;border-radius:0 0 5px 5px;box-shadow:0 5px 30px rgba(0,0,0,0.3)}
|
||||
.quickstart-code .line{display:block;margin:0;padding:0}
|
||||
.quickstart-code .line span{display:inline-block}
|
||||
.quickstart-code .line .output{color:#aaaaaa;}
|
||||
.quickstart-code .path{color:#2a8fbd;user-select:none}
|
||||
.quickstart-code .prompt{color:#f90;user-select:none}
|
||||
.quickstart-code .command{color:#ffc}
|
||||
@@ -52,7 +75,7 @@
|
||||
<h2>The smallest PaaS implementation you've ever seen</h2>
|
||||
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
|
||||
<div class="blurb-buttons">
|
||||
<a class="btn btn-lg btn-warning" href="http://progrium.viewdocs.io/dokku/installation">View Documentation</a>
|
||||
<a class="btn btn-lg btn-warning" href="/dokku/installation">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,12 +87,12 @@
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.github.com/progrium/dokku/v0.3.23/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.3.23 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<h2>The smallest PaaS implementation you've ever seen</h2>
|
||||
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
|
||||
<div class="blurb-buttons">
|
||||
<a class="btn btn-lg btn-warning" href="http://progrium.viewdocs.io/dokku/installation">View Documentation</a>
|
||||
<a class="btn btn-lg btn-warning" href="/dokku/installation">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -15,12 +15,12 @@
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.github.com/progrium/dokku/v0.3.23/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.3.23 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -1,32 +1,49 @@
|
||||
# Installation
|
||||
# Getting Started with Dokku
|
||||
|
||||
## Requirements
|
||||
## What is Dokku?
|
||||
|
||||
- A fresh VM running Ubuntu `14.04 x64`
|
||||
- At least `1GB` of system memory ([workaround for 512MB machines](http://progrium.viewdocs.io/dokku/advanced-installation))
|
||||
Dokku is an extensible, open source Platform as a Service that runs on a single server of your choice.
|
||||
|
||||
Ubuntu 14.04 x64 x64. Ideally have a domain ready to point to your host. It's designed for and is probably best to use a fresh VM. The bootstrapper will install everything it needs.
|
||||
To start using Dokku, you'll need a system with that meets the following minimum requirements:
|
||||
|
||||
## Installing the latest Stable version
|
||||
- A fresh installation of [Ubuntu 14.04 x64](http://www.ubuntu.com/download/) with the FQDN set <sup>[1]</sup>
|
||||
- At least `1GB` of system memory <sup>[2]</sup>
|
||||
|
||||
To install the latest stable version of dokku, you can run the following bootstrapper command:
|
||||
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
|
||||
|
||||
Dokku is designed for usage on a fresh installation of Ubuntu, and should install all necessary dependencies if installing via the bootstrap method.
|
||||
|
||||
### Installing the latest stable version
|
||||
|
||||
To install the latest stable version of dokku, you can run the following shell commands:
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.github.com/progrium/dokku/v0.3.23/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.3.23 bash bootstrap.sh
|
||||
|
||||
# By default, this will do cli-based setup, though you may *also*
|
||||
# go to your server's IP and follow the web installer
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
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.
|
||||
|
||||
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](http://progrium.viewdocs.io/dokku/getting-started/install/digitalocean)
|
||||
- [Linode Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/linode)
|
||||
- [Digital Ocean Installation Notes](http://dokku.viewdocs.io/dokku/getting-started/install/digitalocean)
|
||||
- [Linode Installation Notes](http://dokku.viewdocs.io/dokku/getting-started/install/linode/)
|
||||
- [Microsoft Azure Installation Notes](http://dokku.viewdocs.io/dokku/getting-started/install/azure/)
|
||||
|
||||
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](http://progrium.viewdocs.io/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](http://progrium.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](http://progrium.viewdocs.io/dokku/advanced-installation)
|
||||
- [Debian Package Installation Notes](http://dokku.viewdocs.io/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](http://dokku.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](http://dokku.viewdocs.io/dokku/advanced-installation)
|
||||
|
||||
---
|
||||
|
||||
- <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](http://dokku.viewdocs.io/dokku/advanced-installation)).</sup>
|
||||
|
||||
131
docs/nginx.md
@@ -1,65 +1,27 @@
|
||||
# Nginx
|
||||
# Nginx Configuration
|
||||
|
||||
Dokku uses nginx as it's server for routing requests to specific applications. By default, access and error logs are written for each app to `/var/log/nginx/${APP}-access.log` and `/var/log/nginx/${APP}-error.log` respectively
|
||||
|
||||
## TLS/SPDY support
|
||||
|
||||
Dokku provides easy TLS/SPDY support out of the box. This can be done app-by-app or for all subdomains at once. Note that whenever TLS support is enabled SPDY is also enabled.
|
||||
|
||||
### Per App
|
||||
|
||||
To enable TLS connections to to one of your applications, do the following:
|
||||
|
||||
* Create a key file and a cert file.
|
||||
* You can find detailed steps for generating a self-signed certificate at https://devcenter.heroku.com/articles/ssl-certificate-self
|
||||
* If you are not paranoid and need it just for a DEV or STAGING app, you can use http://www.selfsignedcertificate.com/ to generate your 2 files more easily.
|
||||
* Rename your files to server.key and server.crt
|
||||
* tar these 2 files together, *without* subdirectories. Example: tar cvf cert-key.tar server.crt server.key
|
||||
* Install the pair for your app, like this: ssh dokku@ip-of-your-dokku-server nginx:import-ssl < cert-key.tar
|
||||
|
||||
You will need to repeat the steps above for each domain used to serve your app. You can't simply create a single tar with all key/cert files in it (see https://github.com/progrium/dokku/issues/1195).
|
||||
|
||||
|
||||
### All Subdomains
|
||||
|
||||
To enable TLS connections for all your applications at once you will need a wildcard TLS certificate.
|
||||
|
||||
To enable TLS across all apps, copy or symlink the `.crt` and `.key` files into the `/home/dokku/tls` folder (create this folder if it doesn't exist) as `server.crt` and `server.key` respectively. Then, enable the certificates by editing `/etc/nginx/conf.d/dokku.conf` and uncommenting these two lines (remove the #):
|
||||
Dokku uses nginx as its server for routing requests to specific applications. By default, access and error logs are written for each app to `/var/log/nginx/${APP}-access.log` and `/var/log/nginx/${APP}-error.log` respectively
|
||||
|
||||
```
|
||||
ssl_certificate /home/dokku/tls/server.crt;
|
||||
ssl_certificate_key /home/dokku/tls/server.key;
|
||||
nginx:access-logs <app> [-t] Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> (Re)builds nginx config for given app
|
||||
nginx:disable <app> Disable nginx for an application (forces container binding to external interface)
|
||||
nginx:enable <app> Enable nginx for an application
|
||||
nginx:error-logs <app> [-t] Show the nginx error logs for an application (-t follows)
|
||||
```
|
||||
|
||||
The nginx configuration will need to be reloaded in order for the updated TLS configuration to be applied. This can be done either via the init system or by re-deploying the application. Once TLS is enabled, the application will be accessible by `https://` (redirection from `http://` is applied as well).
|
||||
|
||||
**Note**: TLS will not be enabled unless the application's VHOST matches the certificate's name. (i.e. if you have a cert for *.example.com TLS won't be enabled for something.example.org or example.net)
|
||||
|
||||
### HSTS Header
|
||||
|
||||
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
|
||||
|
||||
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.
|
||||
|
||||
### Importing ssl certificates
|
||||
|
||||
You can import ssl certificates via tarball using the following command:
|
||||
|
||||
``` bash
|
||||
dokku nginx:import-ssl myapp < archive-of-certs.tar
|
||||
```
|
||||
|
||||
This archive should is expanded via `tar xvf`. It should contain `server.crt` and `server.key`.
|
||||
|
||||
## Customizing the nginx configuration
|
||||
|
||||
> New as of 0.3.17.
|
||||
|
||||
Dokku currently templates out an nginx configuration that is included in the `nginx-vhosts` plugin. If you'd like to provide a custom template for your application, you should copy the existing template - ssl or non-ssl - into your application repository's root directory as the file `nginx.conf.template`. The next time you deploy, Nginx will use your template instead of the default.
|
||||
|
||||
> New as of 0.3.10.
|
||||
|
||||
You may also place this file on disk at the path `/home/dokku/myapp/nginx.conf.template`. If placed on disk on the dokku server, the template file **must** be owned by the user `dokku:dokku`.
|
||||
Dokku currently templates out an nginx configuration that is included in the `nginx-vhosts` plugin. If you'd like to provide a custom template for your application, there are a few options:
|
||||
|
||||
- Copy the existing pertinent (ssl or non-ssl) template found (by default) in `/var/lib/dokku/plugins/available/nginx-vhosts/templates`, place it either in `/home/dokku/APP` or check it into the root of your app repo, and name it one of the following:
|
||||
- `nginx.conf.template` (since 0.3.10)
|
||||
- `nginx.conf.ssl_terminated.template` (since 0.4.0)
|
||||
- `nginx.ssl.conf.template` (since 0.4.2)
|
||||
|
||||
> If placed on the dokku server, the template file **must** be owned by user and group `dokku:dokku`.
|
||||
|
||||
For instance - assuming defaults - to customize the nginx template in use for the `myapp` application, create the file `nginx.conf.template` in your repo or on disk with the with the following contents:
|
||||
|
||||
@@ -103,14 +65,18 @@ After your changes a `dokku deploy myapp` will regenerate the `/home/dokku/myapp
|
||||
|
||||
The default nginx.conf- templates will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
|
||||
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
|
||||
```
|
||||
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
|
||||
```
|
||||
|
||||
. That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabytes, do
|
||||
That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabytes, do
|
||||
|
||||
mkdir /home/dokku/myapp/nginx.conf.d/
|
||||
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
|
||||
```shell
|
||||
mkdir /home/dokku/myapp/nginx.conf.d/
|
||||
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
|
||||
```
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
@@ -122,7 +88,7 @@ scheme://subdomain.domain.tld
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain` is set during initial configuration in the `$DOKKU_ROOT/VHOST` file.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` pluginhook. For example, you can reverse the subdomain with the following sample `nginx-hostname` pluginhook:
|
||||
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:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -140,18 +106,25 @@ You can also use the built-in `domains` plugin to handle:
|
||||
|
||||
### Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts by setting the `NO_VHOST` environment variable:
|
||||
If desired, it is possible to disable vhosts by setting the environment variable `NO_VHOST=1`:
|
||||
|
||||
```shell
|
||||
dokku config:set myapp NO_VHOST=1
|
||||
```
|
||||
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable.
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
|
||||
|
||||
### Domains plugin
|
||||
|
||||
> New as of 0.3.10
|
||||
|
||||
```shell
|
||||
domains:add <app> DOMAIN Add a custom domain to app
|
||||
domains <app> List custom domains for app
|
||||
domains:clear <app> Clear all custom domains for app
|
||||
domains:remove <app> DOMAIN Remove a custom domain from app
|
||||
```
|
||||
|
||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `nginx:import-ssl`. Be aware that setting `NO_VHOST` will override any custom domains.
|
||||
|
||||
Custom domains are also backed up via the built-in `backup` plugin
|
||||
@@ -172,7 +145,7 @@ dokku domains:clear myapp
|
||||
dokku domains:remove myapp example.com
|
||||
```
|
||||
|
||||
### Container network interface binding
|
||||
## Container network interface binding
|
||||
|
||||
> New as of 0.3.13
|
||||
|
||||
@@ -191,12 +164,11 @@ root@dokku:~/dokku# docker inspect --format '{{ .NetworkSettings.IPAddress }}' g
|
||||
root@dokku:/home/dokku# 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 nostalgic_tesla
|
||||
|
||||
```
|
||||
|
||||
# Default site
|
||||
## Default site
|
||||
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to nginx. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
|
||||
|
||||
```
|
||||
server {
|
||||
@@ -208,3 +180,30 @@ server {
|
||||
log_not_found off;
|
||||
}
|
||||
```
|
||||
|
||||
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
|
||||
|
||||
```
|
||||
# Swap both conf.d include line and the sites-enabled include line. From:
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
|
||||
# to the following
|
||||
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
```
|
||||
|
||||
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
See the [load balancer documentation](/dokku/deployment/ssl-configuration/#running-behind-a-load-balancer).
|
||||
|
||||
## HSTS Header
|
||||
|
||||
See the [HSTS documentation](/dokku/deployment/ssl-configuration/#hsts-header).
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/dokku/deployment/ssl-configuration/).
|
||||
|
||||
164
docs/plugins.md
@@ -1,10 +1,11 @@
|
||||
# Plugins
|
||||
|
||||
Dokku itself is built out of plugins and uses [pluginhook](https://github.com/progrium/pluginhook) for its plugin system. In essence a plugin is a collection of scripts that will be run based on naming convention.
|
||||
Dokku itself is built out of plugins and uses [plugn](https://github.com/dokku/plugn) for its plugin system. In essence a plugin is a collection of scripts that will be run based on naming convention.
|
||||
|
||||
Let's take a quick look at the current dokku nginx plugin that's shipped with dokku by default.
|
||||
|
||||
nginx-vhosts/
|
||||
├── plugin.toml # plugin metadata
|
||||
├── commands # contains additional commands
|
||||
├── install # runs on dokku installation
|
||||
└── post-deploy # runs after an app is deployed
|
||||
@@ -12,13 +13,42 @@ Let's take a quick look at the current dokku nginx plugin that's shipped with do
|
||||
## Installing a plugin
|
||||
|
||||
```shell
|
||||
# This command requires `root` permissions as the `install` and `install-dependencies`
|
||||
# plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please
|
||||
# inspect those plugins before running the following command as `root` user.
|
||||
sudo dokku plugin:install <git_url>
|
||||
|
||||
# previous versions (0.3.x and below) of dokku require a manual process to install plugins
|
||||
cd /var/lib/dokku/plugins
|
||||
git clone <git url>
|
||||
dokku plugins-install
|
||||
```
|
||||
|
||||
## Creating your own plugin
|
||||
|
||||
[See the full documentation](http://progrium.viewdocs.io/dokku/development/plugin-creation).
|
||||
[See the full documentation](http://dokku.viewdocs.io/dokku/development/plugin-creation).
|
||||
|
||||
## Official Plugins (Beta)
|
||||
|
||||
The following plugins are available and provided by dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [CouchDB (beta)](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
|
||||
| [Elasticsearch (beta)](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [MariaDB (beta)](https://github.com/dokku/dokku-mariadb-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Memcached (beta)](https://github.com/dokku/dokku-memcached-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Mongo (beta)](https://github.com/dokku/dokku-mongo-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [MySQL (beta)](https://github.com/dokku/dokku-mysql-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Nats (beta)](https://github.com/dokku/dokku-nats) | [dokku][] | 0.4.0+ |
|
||||
| [Postgres (beta)](https://github.com/dokku/dokku-postgres-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [RabbitMQ (beta)](https://github.com/dokku/dokku-rabbitmq-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Redis (beta)](https://github.com/dokku/dokku-redis-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [RethinkDB (beta)](https://github.com/dokku/dokku-rethinkdb-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Copy Files to Image](https://github.com/dokku/dokku-copyfiles-to-image) | [dokku][] | 0.4.0+ |
|
||||
| [HTTP Auth (beta)](https://github.com/dokku/dokku-http-auth) | [dokku][] | 0.4.0+ |
|
||||
| [Maintenance mode (beta)](https://github.com/dokku/dokku-maintenance) | [dokku][] | 0.4.0+ |
|
||||
| [Redirect (beta)](https://github.com/dokku/dokku-redirect) | [dokku][] | 0.4.0+ |
|
||||
|
||||
## Community plugins
|
||||
|
||||
@@ -44,6 +74,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[heichblatt]: https://github.com/heichblatt
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
@@ -52,6 +83,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[matto1990]: https://github.com/matto1990
|
||||
[mbriskar]: https://github.com/mbriskar
|
||||
[michaelshobbs]: https://github.com/michaelshobbs
|
||||
[mikecsh]: https://github.com/mikecsh
|
||||
[mikexstudios]: https://github.com/mikexstudios
|
||||
@@ -82,6 +114,9 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
||||
[abossard]: https://github.com/dudagroup
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[dokku]: https://github.com/dokku
|
||||
[sgulseth]: https://github.com/sgulseth
|
||||
[sseemayer]: https://github.com/sseemayer
|
||||
|
||||
### Datastores
|
||||
|
||||
@@ -89,44 +124,33 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | Compatible with 0.2.0 |
|
||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | Compatible with 0.2.0 |
|
||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||
| [PostgreSQL](https://github.com/Kloadut/dokku-pg-plugin) | [Kloadut][] | Compatible with 0.2.0 |
|
||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
|
||||
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
|
||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | Compatible with 0.2.0 |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | Single Postgresql container with official Postgresql docker image. Compatible with 0.3.16 |
|
||||
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
|
||||
|
||||
#### Caching
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Memcached](https://github.com/jlachowski/dokku-memcached-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
|
||||
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | A better Redis plugin with automatic instance creation and Dokku Link support
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | Compatible with 0.2.0 |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||
|
||||
#### Queuing
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
|
||||
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | IP & PORT available directly in linked app container env variables (requires link plugin)|
|
||||
| [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 |
|
||||
|
||||
#### Other
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
||||
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
||||
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 2014-02-22: targeting dokku @ [latest][217d00a]; will fail with Dokku earlier than [28de3ec][]. |
|
||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
|
||||
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
|
||||
|
||||
@@ -136,38 +160,39 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | |
|
||||
| [Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | Compatible with 0.2.x |
|
||||
| [Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | Works with dokku @ [c77cbf1][] - no 0.2.0 compatibility |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | |
|
||||
| [Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | Compatible with 0.2.0 |
|
||||
| [Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | Compatible with 0.2.0 |
|
||||
| [Forego](https://github.com/Flink/dokku-forego) | [Flink][] | 0.4.0+ |
|
||||
| [Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | 0.4.0+ |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
|
||||
| [Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | 0.3.x |
|
||||
| [Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | 0.3.x |
|
||||
|
||||
[c77cbf1]: https://github.com/progrium/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
|
||||
[28de3ec]: https://github.com/progrium/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
|
||||
[c77cbf1]: https://github.com/dokku/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
|
||||
[28de3ec]: https://github.com/dokku/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
|
||||
|
||||
### Dokku Features
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
|
||||
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/heichblatt/dokku-supply-config) | [heichblatt][] | |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | Compatible with 0.3.0 |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | dokku >= v0.3.14 |
|
||||
| [HTTP Auth](https://github.com/Flink/dokku-http-auth) | [Flink][] | |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | Works with v0.2.3 |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | |
|
||||
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | dokku >= [c77cbf1][] |
|
||||
| [Maintenance mode](https://github.com/Flink/dokku-maintenance) | [Flink][] | |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Lets Encrypt](https://github.com/sseemayer/dokku-letsencrypt) | [sseemayer][] | 0.4.0+ |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
|
||||
| [Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 2014-01-17: compatible with upstream/master |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 2014-01-17: compatible with upstream/master |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | Compatible with 0.2.0 |
|
||||
| [App Configfiles](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Nuke Containers](https://github.com/heichblatt/dokku-nuke) | [heichblatt][] | |
|
||||
| [Open App Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.3.x |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | 0.3.x |
|
||||
|
||||
[217d00a]: https://github.com/progrium/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
|
||||
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
|
||||
|
||||
<sup>1</sup> On Heroku similar functionality is offered by the [heroku-labs pipeline feature](https://devcenter.heroku.com/articles/labs-pipelines), which allows you to promote builds across multiple environments (staging -> production)
|
||||
|
||||
@@ -179,24 +204,26 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | |
|
||||
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | |
|
||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | 0.4.0+ |
|
||||
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.2.0+ (tag 0.2.0), 0.3.0+ (tag 0.3.0), 0.4.0+ |
|
||||
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
|
||||
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | |
|
||||
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | |
|
||||
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | |
|
||||
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | |
|
||||
| [Docker auto volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.3.17+, auto-persist docker volumes |
|
||||
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
|
||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
|
||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski] | <0.4.0 |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-grafana) | [jlachowski] | 0.4.0+, graphite & statsd plugin with grafana dashboard frontend |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.3.26+ |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
|
||||
| [Rails logs](https://github.com/Flink/dokku-rails-logs) | [Flink][] | |
|
||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | 0.3.15+, Dockerfile support |
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | |
|
||||
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | |
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
|
||||
|
||||
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
||||
@@ -208,22 +235,45 @@ The following plugins have been removed as their functionality is now in Dokku C
|
||||
| Plugin | Author | In Dokku Since |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------- |
|
||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
|
||||
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
|
||||
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [Events Logger](https://github.com/alessio/dokku-events) | [alessio][] | v0.3.21 (events plugin) |
|
||||
| [Host Port binding](https://github.com/stuartpb/dokku-bind-port) | [stuartpb][] | v0.3.17 (docker-options plugin) |
|
||||
| [List Containers](https://github.com/heichblatt/dokku-list) | [heichblatt][] | v0.3.14 (ps plugin |
|
||||
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
|
||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
|
||||
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
|
||||
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
|
||||
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
|
||||
|
||||
|
||||
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
|
||||
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
|
||||
|
||||
[a043e98]: https://github.com/stuartpb/dokku-bind-port/commit/a043e9892f4815b6525c850131e09fd64db5c1fa
|
||||
|
||||
|
||||
### Unmaintained Plugins
|
||||
|
||||
The following plugins are no longer maintained by their developers.
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
||||
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
||||
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
|
||||
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
|
||||
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
|
||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
|
||||
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
||||
|
||||
@@ -1,38 +1,42 @@
|
||||
# Process/Container management
|
||||
|
||||
> New as of 0.3.14
|
||||
|
||||
Dokku supports rudimentary process (really container) management via the `ps` plugin.
|
||||
|
||||
```
|
||||
ps <app> List processes running in app container(s)
|
||||
ps:rebuildall Rebuild all apps
|
||||
ps:rebuild <app> Rebuild an app
|
||||
ps:restartall Restart all deployed app containers
|
||||
ps:restart <app> Restart app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>] Set how many processes of a given process to run
|
||||
ps:start <app> Start app container(s)
|
||||
ps:stop <app> Stop app container(s)
|
||||
ps <app> List processes running in app container(s)
|
||||
ps:rebuildall Rebuild all apps
|
||||
ps:rebuild <app> Rebuild an app
|
||||
ps:restartall Restart all deployed app containers
|
||||
ps:restart <app> Restart app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>] Set how many processes of a given process to run
|
||||
ps:start <app> Start app container(s)
|
||||
ps:stop <app> Stop app container(s)
|
||||
```
|
||||
|
||||
*NOTE*: As of v0.3.14, `dokku deploy:all` in now deprecated by `ps:restartall` and will be removed in a future version.
|
||||
|
||||
|
||||
## Scaling
|
||||
|
||||
Dokku allows you to run multiple process types at different container counts. For example, if you had an app that contained 1 web app listener and 1 background job processor, dokku can, spin up 1 container for each process type defined in the Procfile. By default we will only start the web process. However, if you wanted 2 job processors running simultaneously, you can modify this behavior in a few ways.
|
||||
Dokku allows you to run multiple process types at different container counts. For example, if you had an app that contained 1 web app listener and 1 background job processor, dokku can, spin up 1 container for each process type defined in the Procfile. *By default, dokku will only start a single web process (if defined.)* However, if you wanted, for example, 2 job processors running simultaneously, you can modify this behavior in one of the following ways.
|
||||
|
||||
## Include a DOKKU_SCALE file in your repo
|
||||
### DOKKU_SCALE file
|
||||
|
||||
Dokku expects this file to contain one line for every process defined in your Procfile. Example:
|
||||
You can optionally create a `DOKKU_SCALE` file in the root of your repository. Dokku expects this file to contain one line for every process defined in your Procfile.
|
||||
|
||||
Example:
|
||||
```
|
||||
web=1
|
||||
worker=2
|
||||
```
|
||||
|
||||
### `ps:scale` command
|
||||
|
||||
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
|
||||
|
||||
## Use the ps:scale command. Example:
|
||||
```
|
||||
dokku ps:scale app_name web=1 worker=2
|
||||
```
|
||||
|
||||
*NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Remote commands
|
||||
# Remote Commands
|
||||
|
||||
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@dokku.me <command>`
|
||||
The `-t` is used to request a pty. It is highly recommended to do so.
|
||||
@@ -9,15 +9,6 @@ Host dokku.me
|
||||
RequestTTY yes
|
||||
```
|
||||
|
||||
## Run a command in the app environment
|
||||
|
||||
It's possible to run commands in the environment of the deployed application:
|
||||
|
||||
```shell
|
||||
dokku run node-js-app ls -alh
|
||||
dokku run <app> <cmd>
|
||||
```
|
||||
|
||||
## Behavioral modifiers
|
||||
|
||||
Dokku also supports certain command-line arguments that augment it's behavior. If using these over ssh, you must use the form `ssh -t dokku@dokku.me -- <command>`
|
||||
@@ -27,5 +18,11 @@ in order to avoid ssh interpretting dokku arguments for itself.
|
||||
--quiet suppress output headers
|
||||
--trace enable DOKKU_TRACE for current execution only
|
||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
||||
--force force flag. currently used in apps:destroy
|
||||
--force force flag. currently used in apps:destroy and other ":destroy" commands
|
||||
```
|
||||
|
||||
## Clients
|
||||
|
||||
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.
|
||||
|
||||
@@ -7,95 +7,112 @@
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400:sans-serif|Open+Sans:400:sans-serif" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
|
||||
<style type="text/css">
|
||||
body{padding-bottom:40px;color:#5a5a5a}
|
||||
h1{color:#5a5a5a;font-family:'montserrat',Optima,Segoe,"Segoe UI",Candara,Calibri,Arial,sans-serif;font-weight:700;line-height:1.1;margin-bottom:12px;margin-top:12px;text-rendering:optimizelegibility}
|
||||
.header{background-color:#2a8fbd;padding:22px 0}
|
||||
.header .heading{color:#fff;font-size:23px;margin:0;padding:0}
|
||||
.blurb{color:#424242;background-color:#ededed;background-image:url(gplaypattern.png);padding:45px 0;text-align:center}
|
||||
.blurb p{font-size:17px;font-weight:300;margin:18px 0;text-align:center}
|
||||
.quickstart-code{display:block;font-size:12px;line-height:1.3em;margin:45px auto;max-width:650px;padding:0}
|
||||
.quickstart-code .title{background-color:#dfdfdf;background-image:linear-gradient(top,#f7f7f7 0%,#dfdfdf 7%,#ccc 100%);border-bottom:1px solid #111;color:#444;display:block;font-weight:400;font-size:14px;margin:0 20px;padding:3px 0;text-align:center;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-radius:5px 5px 0 0;box-shadow:0 3px 0 rgba(0,0,0,0.5)}
|
||||
.quickstart-code .shell{background-color:#171717;font-family:Menlo,Consolas,"Courier New",Courier,"Liberation Mono",monospace;margin:0 20px;padding:20px;text-shadow:none;border-radius:0 0 5px 5px;box-shadow:0 5px 30px rgba(0,0,0,0.3)}
|
||||
.quickstart-code .line{display:block;margin:0;padding:0}
|
||||
.quickstart-code .line span{display:inline-block}
|
||||
.quickstart-code .path{color:#2a8fbd;user-select:none}
|
||||
.quickstart-code .prompt{color:#f90;user-select:none}
|
||||
.quickstart-code .command{color:#ffc}
|
||||
.marketing .col-lg-4{margin-bottom:20px;text-align:center}
|
||||
.marketing .col-lg-4 p{margin-right:10px;margin-left:10px}
|
||||
.featurette-divider{margin:20px 0}
|
||||
.featurette-heading{font-weight:400;line-height:1;letter-spacing:-1px}
|
||||
.featurette-heading .text-muted{font-weight:300}
|
||||
@media (min-width: 768px) {
|
||||
.quickstart-code{font-size:14px;line-height:22px}
|
||||
.featurette-heading{font-size:50px}
|
||||
}
|
||||
@media (min-width: 992px) {
|
||||
.featurette-heading{margin-top:120px}
|
||||
}
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/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.4.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.8/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/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/style.css" rel="stylesheet">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<h1 class="heading">Dokku</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-2">
|
||||
<h1 class="heading navbar-brand">
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-2" style="padding-top:16px">
|
||||
<div class="col-xs-8 col-md-6 col-md-push-4 markdown-body" style="padding-top:16px">
|
||||
{{CONTENT}}
|
||||
</div>
|
||||
<div class="col-xs-4 col-md-2 col-md-pull-6 col-md-offset-2" style="padding-top:16px">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item disabled">Getting Started</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/installation" class="list-group-item">Installation</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/upgrading" class="list-group-item">Upgrading</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/troubleshooting" class="list-group-item">Troubleshooting</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/getting-started/where-to-get-help" class="list-group-item">Getting Help</a>
|
||||
<a href="/dokku/installation/" class="list-group-item">Getting Started with Dokku</a>
|
||||
<a href="/dokku/upgrading/" class="list-group-item">Upgrading</a>
|
||||
<a href="/dokku/troubleshooting/" class="list-group-item">Troubleshooting</a>
|
||||
<a href="/dokku/getting-started/where-to-get-help/" class="list-group-item">Getting Help</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment</a>
|
||||
|
||||
<a href="http://progrium.viewdocs.io/dokku/application-deployment" class="list-group-item">Application Deployment</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/configuration-management" class="list-group-item">Configuration management</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/process-management" class="list-group-item">Process management</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/dns" class="list-group-item">DNS Configuration</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/nginx" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/remote-commands" class="list-group-item">Running Remote commands</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/docker-options" class="list-group-item">Container Options</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/dokku-events-logs" class="list-group-item">Dokku Event Logs</a>
|
||||
<a href="/dokku/application-deployment/" class="list-group-item">Deploying an Application</a>
|
||||
<a href="/dokku/deployment/buildpacks/" class="list-group-item">Buildpack Deployment</a>
|
||||
<a href="/dokku/deployment/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/dokku/deployment/images/" class="list-group-item">Image Tagging</a>
|
||||
<a href="/dokku/remote-commands/" class="list-group-item">Remote Commands</a>
|
||||
<a href="/dokku/deployment/one-off-processes/" class="list-group-item">One Off Processes</a>
|
||||
<a href="/dokku/process-management/" class="list-group-item">Scaling Apps</a>
|
||||
<a href="/dokku/checks-examples/" class="list-group-item">Zero Downtime Deploys</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Configuration</a>
|
||||
|
||||
<a href="/dokku/configuration-management/" class="list-group-item">Environment Variables</a>
|
||||
<a href="/dokku/dns" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/dokku/nginx/" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="/dokku/deployment/ssl-configuration/" class="list-group-item">SSL Configuration</a>
|
||||
<a href="/dokku/docker-options/" class="list-group-item">Docker Container Options</a>
|
||||
<a href="/dokku/dokku-events-logs/" class="list-group-item">Dokku Event Logs</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
|
||||
<a href="http://progrium.viewdocs.io/dokku/community/clients" class="list-group-item">Clients</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/plugins" class="list-group-item">Plugins</a>
|
||||
<a href="/dokku/community/clients/" class="list-group-item">Clients</a>
|
||||
<a href="/dokku/plugins/" class="list-group-item">Plugins</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Development</a>
|
||||
|
||||
<a href="http://progrium.viewdocs.io/dokku/development/plugin-creation" class="list-group-item">Plugin Creation</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/development/pluginhooks" class="list-group-item">Pluginhooks</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/development/testing" class="list-group-item">Test Suite</a>
|
||||
<a href="http://progrium.viewdocs.io/dokku/development/release-process" class="list-group-item">Release Process</a>
|
||||
<a href="/dokku/development/plugin-creation/" class="list-group-item">Plugin Creation</a>
|
||||
<a href="/dokku/development/plugin-triggers/" class="list-group-item">Plugin Triggers</a>
|
||||
<a href="/dokku/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/dokku/development/release-process/" class="list-group-item">Release Process</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-8 col-md-10">
|
||||
{{CONTENT}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p class="pull-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2013 Dokku</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/1.3.0/anchor.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function (e) {
|
||||
var elements = document.querySelectorAll('table'),
|
||||
var markdownBody = document.querySelectorAll('.markdown-body')[0],
|
||||
isRedirect = markdownBody.innerHTML.trim().indexOf('<p>See the <a href=') === 0;
|
||||
if (isRedirect) {
|
||||
var redirectUrl = markdownBody.getElementsByTagName('a')[0].href;
|
||||
window.location.replace(redirectUrl);
|
||||
}
|
||||
anchors.options.visible = 'always';
|
||||
anchors.add('.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6');
|
||||
|
||||
var tables = document.querySelectorAll('table'),
|
||||
blockquotes = document.querySelectorAll('blockquote'),
|
||||
classNames = ['table', 'table-striped', 'table-hover', 'table-condensed'],
|
||||
addClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
@@ -105,8 +122,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
Array.prototype.forEach.call(blockquotes, function (el, i) {
|
||||
if (el.innerHTML.indexOf('New as of') !== -1) {
|
||||
addClass(el, 'new-as-of');
|
||||
}
|
||||
});
|
||||
Array.prototype.forEach.call(classNames, function (className, i) {
|
||||
Array.prototype.forEach.call(elements, function (el, i) {
|
||||
Array.prototype.forEach.call(tables, function (el, i) {
|
||||
addClass(el, className);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -27,9 +27,9 @@ A value of 64 would allow domains with up to 64 characters. Set it to 128 if you
|
||||
Save the file and try stopping nginx and starting it again:
|
||||
|
||||
```
|
||||
root@dockerapps:~/dokku/buildstep# /etc/init.d/nginx stop
|
||||
root@dockerapps:~/dokku# /etc/init.d/nginx stop
|
||||
* Stopping nginx nginx [ OK ]
|
||||
root@dockerapps:~/dokku/buildstep# /etc/init.d/nginx start
|
||||
root@dockerapps:~/dokku# /etc/init.d/nginx start
|
||||
* Starting nginx nginx [ OK ]
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ The `remote rejected` error does not give enough information. Anything could hav
|
||||
To enable dokku tracing, simply run the following command:
|
||||
|
||||
# Since 0.3.9
|
||||
dokku trace
|
||||
dokku trace on
|
||||
|
||||
In versions older than 0.3.9, you can create a `/home/dokku/dokkurc` file containing the following :
|
||||
|
||||
@@ -65,8 +65,8 @@ __Solution (Less solution, more helpful troubleshooting steps):__
|
||||
Find the failed phase's container image (*077581956a92* in this example)
|
||||
|
||||
```
|
||||
root@dokku:~# docker ps -a | grep builder
|
||||
94d9515e6d93 077581956a92 "/build/builder" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
|
||||
root@dokku:~# docker ps -a | grep build
|
||||
94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
|
||||
```
|
||||
|
||||
Start a new container with the failed image and poke around (i.e. ensure you can access the internet from within the container or attempt the failed command, if known)
|
||||
@@ -87,7 +87,7 @@ __Solution (Less solution, more helpful troubleshooting steps):__
|
||||
root@dokku:~# resolvconf -u
|
||||
```
|
||||
|
||||
Please see https://github.com/progrium/dokku/issues/841 and https://github.com/progrium/dokku/issues/649
|
||||
Please see https://github.com/dokku/dokku/issues/841 and https://github.com/dokku/dokku/issues/649
|
||||
|
||||
***
|
||||
|
||||
@@ -105,27 +105,7 @@ You have to point ssh to the correct secret key for your domain name. Add the fo
|
||||
Host DOKKU_HOSTNAME
|
||||
IdentityFile "~/.ssh/KEYNAME"
|
||||
|
||||
Also see [issue #116](https://github.com/progrium/dokku/issues/116)
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I want to deploy my nodejs app on dokku and use a postinstall script within the package.json but I keep getting this error:
|
||||
|
||||
npm WARN cannot run in wd app@1.0.0 echo blah (wd=/build/app)
|
||||
|
||||
__Solution:__
|
||||
|
||||
This is a permissions problem as dokku (buildstep) uses a root account for running the application. (This may change please see this thread: https://github.com/progrium/buildstep/pull/42).
|
||||
|
||||
To allow npm to work as root account one must set the configuration option of ```unsafe-perm``` to true. There are many ways to set this configuration option but the one I've found works most consistently with the heroku-nodejs-buildpack is as a .npmrc file. The file should contain
|
||||
|
||||
```
|
||||
unsafe-perm = true
|
||||
```
|
||||
|
||||
Note that this is NOT required on heroku as heroku does not use a root account for running the application.
|
||||
|
||||
Please see https://github.com/progrium/dokku/issues/420 and https://github.com/heroku/heroku-buildpack-nodejs/issues/92.
|
||||
Also see [issue #116](https://github.com/dokku/dokku/issues/116)
|
||||
|
||||
***
|
||||
|
||||
@@ -139,7 +119,7 @@ When specifying your port you may want to use something similar to:
|
||||
|
||||
var port = process.env.PORT || 3000
|
||||
|
||||
Please see https://github.com/progrium/dokku/issues/282
|
||||
Please see https://github.com/dokku/dokku/issues/282
|
||||
|
||||
***
|
||||
|
||||
@@ -158,14 +138,13 @@ If you see output similar this when deploying:
|
||||
! tar: Error is not recoverable: exiting now
|
||||
```
|
||||
|
||||
it might that the curl command that is supposed to fetch the buildpack (anything in the low megabyte file size range) takes too long to finish, due to slowish connection. To overwrite the default values (connection timeout: 3 seconds, total maximum time for operation: 30 seconds), edit `/home/dokku/ENV` like the following:
|
||||
it might that the curl command that is supposed to fetch the buildpack (anything in the low megabyte file size range) takes too long to finish, due to slowish connection. To overwrite the default values (connection timeout: 3 seconds, total maximum time for operation: 30 seconds), set the following environment variables:
|
||||
|
||||
```
|
||||
#/home/dokku/ENV
|
||||
export CURL_TIMEOUT=600
|
||||
export CURL_CONNECT_TIMEOUT=30
|
||||
```shell
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
|
||||
References
|
||||
* https://github.com/progrium/dokku/issues/509
|
||||
* https://github.com/dokku/dokku/issues/509
|
||||
* https://github.com/dokku-alt/dokku-alt/issues/169
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Upgrading
|
||||
|
||||
This document covers upgrades for the 0.3.0 series and up. If upgrading from previous versions, we recommend [a fresh install](http://progrium.viewdocs.io/dokku/installation) on a new server.
|
||||
This document covers upgrades for the 0.3.0 series and up. If upgrading from older versions, we recommend [a fresh install](http://dokku.viewdocs.io/dokku/installation) on a new server.
|
||||
|
||||
> As of 0.3.18, dokku is installed by default via a debian package. Source-based installations are still available, though not recommended.
|
||||
|
||||
@@ -37,26 +37,26 @@ All changes will take effect upon next application deployment. To trigger a rebu
|
||||
dokku ps:rebuildall
|
||||
```
|
||||
|
||||
## Buildstep image
|
||||
## Herokuish image
|
||||
|
||||
If dokku was installed via a debian package, you can upgrade buildstep via the following command:
|
||||
If dokku was installed via a debian package, you can upgrade herokuish via the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install buildstep
|
||||
sudo apt-get install herokuish
|
||||
```
|
||||
|
||||
For unattended upgrades, you may run the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -qq -y buildstep
|
||||
sudo apt-get install -qq -y herokuish
|
||||
```
|
||||
|
||||
In some cases, it may be desirable to run a specific version of buildstep. To install/upgrade buildstep from source, run the following commands:
|
||||
In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands:
|
||||
|
||||
```shell
|
||||
cd /tmp
|
||||
git clone https://github.com/progrium/buildstep.git
|
||||
cd buildstep
|
||||
git clone https://github.com/gliderlabs/herokuish.git
|
||||
cd herokuish
|
||||
git pull origin master
|
||||
sudo make build
|
||||
IMAGE_NAME=gliderlabs/herokuish BUILD_TAG=latest VERSION=master make -e build-in-docker
|
||||
```
|
||||
|
||||
152
dokku
@@ -2,18 +2,34 @@
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
export DOKKU_DISTRO=${DOKKU_DISTRO:="ubuntu"}
|
||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="progrium/buildstep"}
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
case "$(lsb_release -si)" in
|
||||
Debian)
|
||||
export DOKKU_DISTRO=${DOKKU_DISTRO:="debian"}
|
||||
;;
|
||||
*)
|
||||
export DOKKU_DISTRO=${DOKKU_DISTRO:="ubuntu"}
|
||||
;;
|
||||
esac
|
||||
|
||||
export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
|
||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"}
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||
|
||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
||||
export PLUGIN_AVAILABLE_PATH=${PLUGIN_AVAILABLE_PATH:="$PLUGIN_PATH/available"}
|
||||
export PLUGIN_ENABLED_PATH=${PLUGIN_ENABLED_PATH:="$PLUGIN_PATH/enabled"}
|
||||
export PLUGIN_CORE_PATH=${PLUGIN_CORE_PATH:="$DOKKU_LIB_ROOT/core-plugins"}
|
||||
export PLUGIN_CORE_AVAILABLE_PATH=${PLUGIN_CORE_AVAILABLE_PATH:="$PLUGIN_CORE_PATH/available"}
|
||||
export PLUGIN_CORE_ENABLED_PATH=${PLUGIN_CORE_ENABLED_PATH:="$PLUGIN_CORE_PATH/enabled"}
|
||||
|
||||
export DOKKU_API_VERSION=1
|
||||
export DOKKU_NOT_IMPLEMENTED_EXIT=10
|
||||
export DOKKU_VALID_EXIT=0
|
||||
|
||||
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
|
||||
|
||||
source "$PLUGIN_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
[[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] && for f in $DOKKU_ROOT/.dokkurc/*; do source $f; done
|
||||
@@ -24,7 +40,7 @@ parse_args "$@"
|
||||
args=("$@")
|
||||
if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" =~ ^--.* ]];then
|
||||
if [[ "$arg" =~ ^--.* ]]; then
|
||||
shift 1
|
||||
else
|
||||
break
|
||||
@@ -33,77 +49,93 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||
fi
|
||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||
|
||||
if [[ $(id -un) != "dokku" && $1 != plugins-install* && $1 != "plugins-update" ]]; then
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]]; then
|
||||
export SSH_USER=$(id -un)
|
||||
sudo -u dokku -E -H $0 "$@"
|
||||
exit
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $(id -un) != "root" && $1 =~ plugin:.* ]]; then
|
||||
dokku_log_fail "plugin:* commands must be run as root"
|
||||
fi
|
||||
|
||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||
export -n SSH_ORIGINAL_COMMAND
|
||||
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]];then
|
||||
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]]; then
|
||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
||||
exit $?
|
||||
else
|
||||
set -f
|
||||
$0 $SSH_ORIGINAL_COMMAND
|
||||
set +f
|
||||
exit $?
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! dokku_auth "$@" ; then
|
||||
dokku_log_fail "Access denied"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
receive)
|
||||
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||
APP="$2"; IMAGE=$(get_app_image_name $APP); IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||
dokku_log_info1 "Cleaning up..."
|
||||
dokku cleanup
|
||||
docker_cleanup
|
||||
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
||||
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
||||
dokku_log_info1 "Releasing $APP..."
|
||||
dokku release "$APP" "$IMAGE_SOURCE_TYPE"
|
||||
dokku_log_info1 "Deploying $APP..."
|
||||
dokku deploy "$APP"
|
||||
dokku_log_info2 "Application deployed:"
|
||||
dokku urls "$APP" | sed "s/^/ /"
|
||||
echo
|
||||
release_and_deploy "$APP"
|
||||
;;
|
||||
|
||||
deploy)
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to deploy"
|
||||
APP="$2"; IMAGE="dokku/$APP"
|
||||
APP="$2"; IMAGE_TAG="$3"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
plugn trigger pre-deploy $APP $IMAGE_TAG
|
||||
|
||||
pluginhook pre-deploy $APP
|
||||
|
||||
is_image_buildstep_based "$IMAGE" && DOKKU_BUILDSTEP=true
|
||||
is_image_herokuish_based "$IMAGE" && DOKKU_HEROKUISH=true
|
||||
DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
|
||||
oldids=$(get_app_container_ids $APP)
|
||||
|
||||
while read line || [ -n "$line" ]
|
||||
do
|
||||
PROC_TYPE=${line%%=*}
|
||||
PROC_COUNT=${line#*=}
|
||||
DOKKU_APP_SKIP_ALL_CHECKS=$(dokku config:get $APP DOKKU_SKIP_ALL_CHECKS || true)
|
||||
DOKKU_APP_SKIP_DEFAULT_CHECKS=$(dokku config:get $APP DOKKU_SKIP_DEFAULT_CHECKS || true)
|
||||
DOKKU_GLOBAL_SKIP_ALL_CHECKS=$(dokku config:get --global DOKKU_SKIP_ALL_CHECKS || true)
|
||||
DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS=$(dokku config:get --global DOKKU_SKIP_DEFAULT_CHECKS || true)
|
||||
|
||||
DOKKU_SKIP_ALL_CHECKS=${DOKKU_APP_SKIP_ALL_CHECKS:="$DOKKU_GLOBAL_SKIP_ALL_CHECKS"}
|
||||
DOKKU_SKIP_DEFAULT_CHECKS=${DOKKU_APP_SKIP_DEFAULT_CHECKS:="$DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS"}
|
||||
|
||||
DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy $APP $IMAGE_TAG)
|
||||
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
[[ "$line" =~ ^#.* ]] && continue
|
||||
TRIM=${line%#*}
|
||||
PROC_TYPE=${TRIM%%=*}
|
||||
PROC_COUNT=${TRIM#*=}
|
||||
CONTAINER_INDEX=1
|
||||
|
||||
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]];do
|
||||
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do
|
||||
id=""; port=""; ipaddr=""
|
||||
DOKKU_CONTAINER_ID_FILE="$DOKKU_ROOT/$APP/CONTAINER.$PROC_TYPE.$CONTAINER_INDEX"
|
||||
DOKKU_IP_FILE="$DOKKU_ROOT/$APP/IP.$PROC_TYPE.$CONTAINER_INDEX"
|
||||
DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_TYPE.$CONTAINER_INDEX"
|
||||
|
||||
# start the app
|
||||
DOCKER_ARGS=$(: | pluginhook docker-args $APP deploy)
|
||||
DOCKER_ARGS+=" -e DYNO=$PROC_TYPE "
|
||||
DOCKER_ARGS+=$(: | pluginhook docker-args-deploy $APP)
|
||||
BIND_EXTERNAL=$(pluginhook bind-external-ip $APP)
|
||||
DOCKER_ARGS="$DOKKU_DEFAULT_DOCKER_ARGS"
|
||||
DOCKER_ARGS+=" -e DYNO='$PROC_TYPE.$CONTAINER_INDEX' "
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
BIND_EXTERNAL=$(plugn trigger bind-external-ip $APP)
|
||||
|
||||
[[ -n "$DOKKU_BUILDSTEP" ]] && START_CMD="/start $PROC_TYPE"
|
||||
[[ -n "$DOKKU_HEROKUISH" ]] && START_CMD="/start $PROC_TYPE"
|
||||
|
||||
if [[ -z "$DOKKU_BUILDSTEP" ]];then
|
||||
if [[ -z "$DOKKU_HEROKUISH" ]]; then
|
||||
DOKKU_DOCKERFILE_PORT=$(dokku config:get $APP DOKKU_DOCKERFILE_PORT || true)
|
||||
START_CMD=$(dokku config:get $APP DOKKU_DOCKERFILE_START_CMD || $START_CMD)
|
||||
fi
|
||||
|
||||
if [[ "$PROC_TYPE" == "web" ]]; then
|
||||
port=${DOKKU_DOCKERFILE_PORT:=5000}
|
||||
if [[ "$BIND_EXTERNAL" = "true" ]];then
|
||||
if [[ "$BIND_EXTERNAL" = "true" ]]; then
|
||||
id=$(docker run -d -p $port -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
port=$(docker port $id $port | sed 's/[0-9.]*://')
|
||||
ipaddr=127.0.0.1
|
||||
@@ -122,21 +154,13 @@ case "$1" in
|
||||
kill -9 $$
|
||||
}
|
||||
|
||||
DOKKU_APP_SKIP_ALL_CHECKS=$(dokku config:get $APP DOKKU_SKIP_ALL_CHECKS || true)
|
||||
DOKKU_APP_SKIP_DEFAULT_CHECKS=$(dokku config:get $APP DOKKU_SKIP_DEFAULT_CHECKS || true)
|
||||
DOKKU_GLOBAL_SKIP_ALL_CHECKS=$(dokku config:get --global DOKKU_SKIP_ALL_CHECKS || true)
|
||||
DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS=$(dokku config:get --global DOKKU_SKIP_DEFAULT_CHECKS || true)
|
||||
|
||||
DOKKU_SKIP_ALL_CHECKS=${DOKKU_APP_SKIP_ALL_CHECKS:="$DOKKU_GLOBAL_SKIP_ALL_CHECKS"}
|
||||
DOKKU_SKIP_DEFAULT_CHECKS=${DOKKU_APP_SKIP_DEFAULT_CHECKS:="$DOKKU_GLOBAL_SKIP_DEFAULT_CHECKS"}
|
||||
|
||||
# run checks first, then post-deploy hooks, which switches Nginx traffic
|
||||
if [[ "$DOKKU_SKIP_ALL_CHECKS" = "true" ]]; then
|
||||
dokku_log_info1 "Skipping pre-flight checks"
|
||||
else
|
||||
trap kill_new INT TERM EXIT
|
||||
dokku_log_info1 "Running pre-flight checks"
|
||||
pluginhook check-deploy $APP $id $PROC_TYPE $port $ipaddr
|
||||
plugn trigger check-deploy $APP $id $PROC_TYPE $port $ipaddr
|
||||
trap - INT TERM EXIT
|
||||
fi
|
||||
|
||||
@@ -164,12 +188,12 @@ case "$1" in
|
||||
done < "$DOKKU_SCALE_FILE"
|
||||
|
||||
dokku_log_info1 "Running post-deploy"
|
||||
pluginhook post-deploy $APP $port $ipaddr
|
||||
plugn trigger post-deploy $APP $port $ipaddr
|
||||
|
||||
# kill the old container
|
||||
if [[ -n "$oldids" ]]; then
|
||||
|
||||
if [[ -z "$DOKKU_WAIT_TO_RETIRE" ]];then
|
||||
if [[ -z "$DOKKU_WAIT_TO_RETIRE" ]]; then
|
||||
DOKKU_APP_DOKKU_WAIT_TO_RETIRE=$(dokku config:get $APP DOKKU_WAIT_TO_RETIRE || true)
|
||||
DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE=$(dokku config:get --global DOKKU_WAIT_TO_RETIRE || true)
|
||||
DOKKU_WAIT_TO_RETIRE=${DOKKU_APP_DOKKU_WAIT_TO_RETIRE:="$DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE"}
|
||||
@@ -186,8 +210,12 @@ case "$1" in
|
||||
trap '' INT HUP
|
||||
sleep $WAIT
|
||||
for oldid in $oldids; do
|
||||
docker stop $oldid &> /dev/null
|
||||
docker kill $oldid &> /dev/null # force a kill as docker seems to not send SIGKILL as the docs would indicate
|
||||
# Attempt to stop, if that fails, then force a kill as docker seems
|
||||
# to not send SIGKILL as the docs would indicate. If that fails, move
|
||||
# on to the next.
|
||||
docker stop $oldid \
|
||||
|| docker kill $oldid \
|
||||
|| plugn trigger retire-container-failed $APP # plugin trigger for event logging
|
||||
done
|
||||
) & disown -a
|
||||
# Use trap since disown/nohup don't seem to keep child alive
|
||||
@@ -197,28 +225,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
cleanup)
|
||||
# delete all non-running container
|
||||
# shellcheck disable=SC2046
|
||||
docker rm $(docker ps -a -f 'status=exited' -q) &> /dev/null || true
|
||||
# delete unused images
|
||||
# shellcheck disable=SC2046
|
||||
docker rmi $(docker images -f 'dangling=true' -q) &> /dev/null &
|
||||
;;
|
||||
|
||||
plugins)
|
||||
ls -1 -d $PLUGIN_PATH/*/
|
||||
;;
|
||||
|
||||
plugins-install)
|
||||
pluginhook install
|
||||
;;
|
||||
|
||||
plugins-install-dependencies)
|
||||
pluginhook dependencies
|
||||
;;
|
||||
|
||||
plugins-update)
|
||||
pluginhook update
|
||||
docker_cleanup
|
||||
;;
|
||||
|
||||
# DEPRECATED as of v0.3.14
|
||||
@@ -232,17 +239,14 @@ case "$1" in
|
||||
echo ""
|
||||
echo "Options:"
|
||||
|
||||
cat<<EOF | pluginhook commands help | sort | column -c2 -t -s,
|
||||
cat<<EOF | plugn trigger commands help | sort | column -c2 -t -s,
|
||||
help, Print the list of commands
|
||||
plugins, Print active plugins
|
||||
plugins-install, Install active plugins
|
||||
plugins-update, Update active plugins
|
||||
EOF
|
||||
;;
|
||||
|
||||
*)
|
||||
implemented=0
|
||||
for script in $PLUGIN_PATH/*/commands; do
|
||||
for script in $PLUGIN_ENABLED_PATH/*/commands; do
|
||||
set +e; $script "$@" ; exit_code=$? ; set -e
|
||||
if [[ "$exit_code" -eq "$DOKKU_NOT_IMPLEMENTED_EXIT" ]]; then
|
||||
continue
|
||||
|
||||
@@ -1,51 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " build release trace delete ls run url urls version help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
|
||||
case "$1" in
|
||||
build)
|
||||
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||
APP="$2"; IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"; IMAGE=$(get_app_image_name $APP)
|
||||
verify_app_name "$APP"
|
||||
|
||||
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
|
||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
|
||||
eval "$(config_export app $APP)"
|
||||
pushd "$TMP_WORK_DIR" &> /dev/null
|
||||
|
||||
case "$IMAGE_SOURCE_TYPE" in
|
||||
buildstep)
|
||||
herokuish)
|
||||
id=$(tar -c . | docker run -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
|
||||
# *DEPRECATED* in v0.4.0: `pluginhook pre-build` will be removed in future releases
|
||||
pluginhook pre-build "$APP"
|
||||
pluginhook pre-build-buildstep "$APP"
|
||||
plugn trigger pre-build-buildpack "$APP"
|
||||
|
||||
# *DEPRECATED* in v0.3.14: `pluginhook docker-args` will be removed in future releases
|
||||
# https://github.com/progrium/dokku/issues/896 & https://github.com/progrium/dokku/issues/906
|
||||
DOCKER_ARGS=$(: | pluginhook docker-args $APP build)
|
||||
DOCKER_ARGS+=$(: | pluginhook docker-args-build $APP)
|
||||
id=$(docker run -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build/builder)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
id=$(docker run -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
|
||||
docker attach $id
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
|
||||
# *DEPRECATED* in v0.4.0: `pluginhook post-build` will be removed in future releases
|
||||
pluginhook post-build "$APP"
|
||||
pluginhook post-build-buildstep "$APP"
|
||||
plugn trigger post-build-buildpack "$APP"
|
||||
;;
|
||||
|
||||
dockerfile)
|
||||
# extract first port from Dockerfile
|
||||
DOCKERFILE_PORT=$(get_dockerfile_exposed_port Dockerfile)
|
||||
[[ -n "$DOCKERFILE_PORT" ]] && dokku config:set-norestart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT
|
||||
|
||||
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
|
||||
pluginhook pre-build-dockerfile "$APP"
|
||||
[[ -n "$DOCKERFILE_PORT" ]] && config_set --no-restart $APP DOKKU_DOCKERFILE_PORT=$DOCKERFILE_PORT
|
||||
plugn trigger pre-build-dockerfile "$APP"
|
||||
|
||||
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
||||
docker build $DOKKU_DOCKER_BUILD_OPTS -t "$IMAGE" .
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
docker build $DOCKER_ARGS $DOKKU_DOCKER_BUILD_OPTS -t "$IMAGE" .
|
||||
|
||||
pluginhook post-build-dockerfile "$APP"
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -55,31 +53,29 @@ case "$1" in
|
||||
;;
|
||||
|
||||
release)
|
||||
APP="$2"; IMAGE="dokku/$APP"; IMAGE_SOURCE_TYPE="$3"
|
||||
APP="$2"; IMAGE_SOURCE_TYPE="$3"; IMAGE_TAG="$4"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
case "$IMAGE_SOURCE_TYPE" in
|
||||
buildstep)
|
||||
# *DEPRECATED* in v0.4.0: `pluginhook pre-release` will be removed in future releases
|
||||
pluginhook pre-release "$APP"
|
||||
pluginhook pre-release-buildstep "$APP"
|
||||
if [[ -f "$DOKKU_ROOT/ENV" ]]; then
|
||||
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh" < "$DOKKU_ROOT/ENV")
|
||||
herokuish)
|
||||
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
if [[ -n $(config_export global) ]]; then
|
||||
id=$(config_export global | docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
fi
|
||||
if [[ -f "$DOKKU_ROOT/$APP/ENV" ]]; then
|
||||
id=$(docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh" < "$DOKKU_ROOT/$APP/ENV")
|
||||
if [[ -n $(config_export app $APP) ]]; then
|
||||
id=$(config_export app $APP | docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
fi
|
||||
# *DEPRECATED* in v0.4.0: `pluginhook post-release` will be removed in future releases
|
||||
pluginhook post-release "$APP"
|
||||
pluginhook post-release-buildstep "$APP"
|
||||
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
;;
|
||||
|
||||
dockerfile)
|
||||
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
|
||||
pluginhook pre-release-dockerfile "$APP"
|
||||
pluginhook post-release-dockerfile "$APP"
|
||||
# buildstep plugins don't necessarily make sense for dockerfiles. call the new breed!!!
|
||||
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -91,8 +87,7 @@ case "$1" in
|
||||
trace)
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
|
||||
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
|
||||
echo "Valid trace options are [on/off]"
|
||||
exit 1
|
||||
dokku_log_fail "Valid trace options are [on/off]"
|
||||
}
|
||||
|
||||
if [[ "$2" == "on" ]]; then
|
||||
@@ -111,11 +106,11 @@ case "$1" in
|
||||
;;
|
||||
|
||||
ls)
|
||||
dokku_apps=$(ls -d $DOKKU_ROOT/*/ 2>/dev/null) || (echo "You haven't deployed any applications yet" && exit 1)
|
||||
installed_apps=$(dokku_apps)
|
||||
|
||||
dokku_col_log_info1_quiet "App Name" "Container Type" "Container Id" "Status"
|
||||
|
||||
for dokku_app in $dokku_apps; do
|
||||
for dokku_app in $installed_apps; do
|
||||
APP=$(basename $dokku_app)
|
||||
DOKKU_APP_CIDS=$(get_app_container_ids $APP)
|
||||
DOCKER_RUNNING_CONTAINERS=$(docker ps -q --no-trunc)
|
||||
@@ -132,55 +127,30 @@ case "$1" in
|
||||
done
|
||||
;;
|
||||
|
||||
logs)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
APP="$2";
|
||||
|
||||
if (is_deployed $APP); then
|
||||
CONTAINER_IDS=( $(get_app_container_ids $APP) )
|
||||
LAST_CONTAINER_ID=${CONTAINER_IDS[${#CONTAINER_IDS[@]} - 1]}
|
||||
|
||||
if [[ $3 == "-t" ]]; then
|
||||
DOKKU_LOGS_ARGS="--follow"
|
||||
else
|
||||
DOKKU_LOGS_ARGS="--tail 100"
|
||||
fi
|
||||
for CID in "${CONTAINER_IDS[@]}";do
|
||||
if [[ "$CID" != "$LAST_CONTAINER_ID" ]];then
|
||||
DOKKU_LOGS_CMD+="docker logs $DOKKU_LOGS_ARGS $CID& "
|
||||
else
|
||||
DOKKU_LOGS_CMD+="docker logs $DOKKU_LOGS_ARGS $CID; "
|
||||
fi
|
||||
done
|
||||
bash -c "($DOKKU_LOGS_CMD)"
|
||||
else
|
||||
echo "Application's container not found"
|
||||
fi
|
||||
;;
|
||||
|
||||
run)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
APP="$2"; IMAGE="dokku/$APP"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
APP="$2"; IMAGE_TAG=$(get_running_image_tag $APP); IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
shift 2
|
||||
|
||||
DOCKER_ARGS=$(: | pluginhook docker-args $APP run)
|
||||
DOCKER_ARGS+=$(: | pluginhook docker-args-run $APP)
|
||||
[[ $DOKKU_RM_CONTAINER ]] && DOKKU_RUN_OPTS="--rm"
|
||||
DOKKU_APP_RM_CONTAINER=$(dokku config:get $APP DOKKU_RM_CONTAINER || true)
|
||||
DOKKU_GLOBAL_RM_CONTAINER=$(dokku config:get --global DOKKU_RM_CONTAINER || true)
|
||||
DOKKU_RM_CONTAINER=${DOKKU_APP_RM_CONTAINER:="$DOKKU_GLOBAL_RM_CONTAINER"}
|
||||
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-run $APP $IMAGE_TAG)
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
[[ "$DOKKU_RM_CONTAINER" ]] && DOKKU_RUN_OPTS="--rm"
|
||||
has_tty && DOKKU_RUN_OPTS+=" -i -t"
|
||||
is_image_buildstep_based "$IMAGE" && EXEC_CMD="/exec"
|
||||
is_image_herokuish_based "$IMAGE" && EXEC_CMD="/exec"
|
||||
|
||||
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
;;
|
||||
|
||||
url | urls)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
APP="$2";
|
||||
|
||||
[[ -f "$DOKKU_ROOT/$APP/ENV" ]] && source "$DOKKU_ROOT/$APP/ENV"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
APP="$2"; verify_app_name "$2"
|
||||
eval "$(config_export app $APP)"
|
||||
|
||||
if [[ -s "$DOKKU_ROOT/$APP/URLS" ]]; then
|
||||
case "$1" in
|
||||
@@ -200,27 +170,36 @@ case "$1" in
|
||||
SCHEME="https"
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" ]] && [[ "$NO_VHOST" != "1" ]]; then
|
||||
echo "$SCHEME://$(< "$DOKKU_ROOT/VHOST")"
|
||||
else
|
||||
if [[ "$(is_app_vhost_enabled $APP)" == "false" ]]; then
|
||||
shopt -s nullglob
|
||||
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do
|
||||
echo "$SCHEME://$(< "$DOKKU_ROOT/HOSTNAME"):$(< "$PORT_FILE")"
|
||||
echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$(< "$PORT_FILE") (container)"
|
||||
done
|
||||
shopt -u nullglob
|
||||
|
||||
DOKKU_NGINX_PORT=$(config_get $APP DOKKU_NGINX_PORT || true)
|
||||
DOKKU_NGINX_SSL_PORT=$(config_get $APP DOKKU_NGINX_SSL_PORT || true)
|
||||
|
||||
if [[ -n "$DOKKU_NGINX_PORT" ]]; then
|
||||
echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$DOKKU_NGINX_PORT (nginx)"
|
||||
fi
|
||||
if [[ -n "$DOKKU_NGINX_SSL_PORT" ]]; then
|
||||
echo "https://$(< "$DOKKU_ROOT/HOSTNAME"):$DOKKU_NGINX_SSL_PORT (nginx-ssl)"
|
||||
fi
|
||||
else
|
||||
echo "$SCHEME://$(< "$DOKKU_ROOT/VHOST")"
|
||||
fi
|
||||
;;
|
||||
|
||||
version)
|
||||
cat "$DOKKU_ROOT/VERSION" || {
|
||||
echo "Unable to determine dokku's version" 2>&1
|
||||
exit 1
|
||||
}
|
||||
cat "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
||||
;;
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
cat<<EOF
|
||||
ls, Pretty listing of deployed applications and containers
|
||||
logs <app> [-t], Show the last logs for an application (-t follows)
|
||||
run <app> <cmd>, Run a command in the environment of an application
|
||||
trace [on/off], Enable dokku tracing
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
version, Print dokku's version
|
||||
|
||||
@@ -9,7 +9,7 @@ if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
[[ $(dig +short "$(< "$DOKKU_ROOT/HOSTNAME")") ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
|
||||
# temporary hack for https://github.com/progrium/dokku/issues/82
|
||||
# temporary hack for https://github.com/dokku/dokku/issues/82
|
||||
# redeploys all apps after a reboot
|
||||
case "$DOKKU_DISTRO" in
|
||||
ubuntu)
|
||||
@@ -20,12 +20,12 @@ start on filesystem and started docker
|
||||
|
||||
script
|
||||
sleep 2 # give docker some time
|
||||
sudo -i -u dokku /usr/local/bin/dokku ps:restartall
|
||||
sudo -i -u dokku /usr/local/bin/dokku ps:restore
|
||||
end script
|
||||
EOF
|
||||
;;
|
||||
|
||||
opensuse)
|
||||
debian|opensuse)
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
[Unit]
|
||||
Description=Dokku app redeploy service
|
||||
@@ -34,15 +34,16 @@ After=docker.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=dokku
|
||||
ExecStart=/usr/local/bin/dokku ps:restartall
|
||||
ExecStart=/usr/local/bin/dokku ps:restore
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable dokku-redeploy
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
mkdir -p /etc/update-motd.d
|
||||
cat<<EOF > /etc/update-motd.d/99-dokku
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
4
plugins/00_dokku-standard/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.4.0"
|
||||
[plugin.config]
|
||||
@@ -1,14 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " events events:on events:off events:list help events:help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
|
||||
PLUGIN_DIR="$(dirname $0)"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
events)
|
||||
if [[ -f $DOKKU_EVENTS_LOGFILE ]] ; then
|
||||
if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then
|
||||
if [[ $2 == "-t" ]]; then
|
||||
tail -f $DOKKU_EVENTS_LOGFILE
|
||||
tail -F $DOKKU_EVENTS_LOGFILE
|
||||
else
|
||||
tail -n 100 $DOKKU_EVENTS_LOGFILE
|
||||
fi
|
||||
@@ -27,10 +26,11 @@ case "$1" in
|
||||
;;
|
||||
|
||||
events:list)
|
||||
PLUGIN_DIR="$(dirname $0)"
|
||||
if [[ "$DOKKU_EVENTS" ]]; then
|
||||
logged="$(find $PLUGIN_DIR -type l -printf '%f ' | sort)"
|
||||
dokku_col_log_info2_quiet "Events currently logged"
|
||||
for hook in $logged ; do
|
||||
for hook in $logged; do
|
||||
dokku_col_log_msg "$hook"
|
||||
done
|
||||
else
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@"
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename $0)" "$@"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
DOKKU_RSYSLOG_FILTER=/etc/rsyslog.d/99-dokku.conf
|
||||
DOKKU_LOGROTATE_FILE=/etc/logrotate.d/dokku
|
||||
@@ -10,12 +10,26 @@ flag_rsyslog_needs_restart=n
|
||||
# This can be done unconditionally as mkdir -p
|
||||
# exits gracefully if the path already exists
|
||||
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
|
||||
chown syslog:dokku "$DOKKU_LOGS_DIR"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
chgrp dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
*)
|
||||
chown syslog:dokku "$DOKKU_LOGS_DIR"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
|
||||
touch "$DOKKU_EVENTS_LOGFILE"
|
||||
# chown syslog:root might not work on SUSE
|
||||
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
*)
|
||||
# chown syslog:root might not work on SUSE
|
||||
chown syslog:dokku "$DOKKU_EVENTS_LOGFILE"
|
||||
;;
|
||||
esac
|
||||
chmod 664 "$DOKKU_EVENTS_LOGFILE"
|
||||
fi
|
||||
|
||||
@@ -49,6 +63,6 @@ if [[ "$flag_rsyslog_needs_restart" == "y" ]]; then
|
||||
service rsyslog restart
|
||||
fi
|
||||
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_pluginhook_call "$(basename $0)" "$@"
|
||||
[[ ! "$DOKKU_EVENTS" ]] || dokku_log_plugn_trigger_call "$(basename $0)" "$@"
|
||||
|
||||
exit 0
|
||||
|
||||
4
plugins/20_events/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.4.0"
|
||||
[plugin.config]
|
||||
1
plugins/20_events/pre-release-buildpack
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/retire-container-failed
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/tags-create
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/tags-destroy
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
Please note that the hooks in Dokku are experimental and are likely to change quite a bit.
|
||||