Compare commits
614 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdd2b4bfe5 | ||
|
|
ecd47dcdeb | ||
|
|
3762b7b9f9 | ||
|
|
a79cd7aebf | ||
|
|
aa345fad01 | ||
|
|
ed06b8961e | ||
|
|
8e2a3783ce | ||
|
|
d9ab4d1424 | ||
|
|
833db67f25 | ||
|
|
01f370ab82 | ||
|
|
9d4a288579 | ||
|
|
b6f9672d40 | ||
|
|
8f8ee9c5da | ||
|
|
9effe275bd | ||
|
|
c1ae280a78 | ||
|
|
ce3aa4b93e | ||
|
|
fcefd4a29b | ||
|
|
4f8c1b64c9 | ||
|
|
2ece0e1bf8 | ||
|
|
1216a5e65a | ||
|
|
aca2540651 | ||
|
|
2cb20f3fd0 | ||
|
|
946756bd43 | ||
|
|
d74006b51a | ||
|
|
e6dfdc0732 | ||
|
|
21d0859253 | ||
|
|
2b19881f01 | ||
|
|
39375342e0 | ||
|
|
ab94a9fc67 | ||
|
|
ff18e0d6be | ||
|
|
6c1d6225f9 | ||
|
|
99c56ccd6d | ||
|
|
f99aa2b128 | ||
|
|
a43fc39d9a | ||
|
|
6be1fd33cd | ||
|
|
5e9df3a92d | ||
|
|
5c741696fc | ||
|
|
8e30722c1e | ||
|
|
cd48505922 | ||
|
|
24cab65d9c | ||
|
|
dc8acc0da6 | ||
|
|
0297dd9e1f | ||
|
|
e4268148cf | ||
|
|
f226dc7c27 | ||
|
|
b71c5b668f | ||
|
|
30ae651a59 | ||
|
|
d2ee0994c0 | ||
|
|
1e5a8b146c | ||
|
|
6bf9ef0aa5 | ||
|
|
100afca1ca | ||
|
|
9a29cc59a8 | ||
|
|
6c08b9b343 | ||
|
|
48965e05bd | ||
|
|
2c1f32199a | ||
|
|
1e0c585b74 | ||
|
|
0c58aeaa52 | ||
|
|
2cedc19b2a | ||
|
|
9bb554e5bc | ||
|
|
4aab4dcfcf | ||
|
|
d4660d9fe9 | ||
|
|
9a7d4fb402 | ||
|
|
d302316549 | ||
|
|
327db3d07a | ||
|
|
1cba46f3a1 | ||
|
|
54c5d0dfa6 | ||
|
|
ef59ff38f6 | ||
|
|
683113ef78 | ||
|
|
79a7342808 | ||
|
|
eab69bd6d5 | ||
|
|
b1deb45c81 | ||
|
|
5ff73995f2 | ||
|
|
e0f6435d86 | ||
|
|
2565ea1543 | ||
|
|
cb8a9648c9 | ||
|
|
17f7708226 | ||
|
|
166f7f38e4 | ||
|
|
74e861417e | ||
|
|
0487083f37 | ||
|
|
3c6982a942 | ||
|
|
6760a2d143 | ||
|
|
a9fd2cdbf6 | ||
|
|
377412f9f8 | ||
|
|
848f92ef7f | ||
|
|
8bbb210a10 | ||
|
|
401a42f5c4 | ||
|
|
5a99b8f0ed | ||
|
|
346efbfdd8 | ||
|
|
498f0eda22 | ||
|
|
c268432bc3 | ||
|
|
a833688355 | ||
|
|
4917330b79 | ||
|
|
4d91b2085e | ||
|
|
29c69f9f86 | ||
|
|
476429a7db | ||
|
|
2d045d1ae1 | ||
|
|
9bd0c69dac | ||
|
|
b232f7cd49 | ||
|
|
904dfb64aa | ||
|
|
a5ef53f2f5 | ||
|
|
88db4daa62 | ||
|
|
56dde3ff31 | ||
|
|
2da58ff351 | ||
|
|
af48605054 | ||
|
|
66790e3d82 | ||
|
|
2c201a7d6f | ||
|
|
78d2b3e7d2 | ||
|
|
9b60f0c3c6 | ||
|
|
668437a9e5 | ||
|
|
5f30115796 | ||
|
|
5c6e39d2c0 | ||
|
|
6a9d9f212f | ||
|
|
599bd59c6f | ||
|
|
e4dd40bbcc | ||
|
|
325b9258e4 | ||
|
|
8cef6b2074 | ||
|
|
fe00835aa7 | ||
|
|
ad0d2b1f6d | ||
|
|
c27b0c08ed | ||
|
|
c73094615e | ||
|
|
989ea72490 | ||
|
|
d9e1548683 | ||
|
|
e474d49320 | ||
|
|
e4d916c308 | ||
|
|
e30c01c234 | ||
|
|
9ae9c7ad11 | ||
|
|
ea240f117e | ||
|
|
68fb0e7b98 | ||
|
|
9d74f1ecf2 | ||
|
|
2356dbd594 | ||
|
|
7aa48d3426 | ||
|
|
b8b4f6fedf | ||
|
|
25a2801cb1 | ||
|
|
86ef6ae5d1 | ||
|
|
4e99078ac1 | ||
|
|
7de160b64d | ||
|
|
99030a110c | ||
|
|
ee18909935 | ||
|
|
4f621916a7 | ||
|
|
f89f946c40 | ||
|
|
8e34477c96 | ||
|
|
5940e43c85 | ||
|
|
c1c76362e7 | ||
|
|
a034ec9803 | ||
|
|
2da4f5ef03 | ||
|
|
d7386317fc | ||
|
|
851ca592d5 | ||
|
|
9d584ed145 | ||
|
|
ac1c4dc571 | ||
|
|
32505b14e7 | ||
|
|
1bcd76ffe9 | ||
|
|
565cd5c0e8 | ||
|
|
8597b692ee | ||
|
|
e9447a26d9 | ||
|
|
17a602efe8 | ||
|
|
7b1bc522f6 | ||
|
|
64f83f976e | ||
|
|
cb9efa3322 | ||
|
|
28f83ab0d5 | ||
|
|
be13b0149a | ||
|
|
e73c89abc8 | ||
|
|
7a36ecf196 | ||
|
|
33dd90a091 | ||
|
|
c67a4dcc7d | ||
|
|
546551e6e9 | ||
|
|
bd4aee0864 | ||
|
|
06d18b4cbd | ||
|
|
075de78442 | ||
|
|
3cead25acf | ||
|
|
559347f985 | ||
|
|
613679352b | ||
|
|
d6c7682068 | ||
|
|
4cd847fb27 | ||
|
|
58e3556e0e | ||
|
|
500a6dd73b | ||
|
|
7d3571757d | ||
|
|
26ee0d7ae2 | ||
|
|
13f7727fe3 | ||
|
|
8a14b34446 | ||
|
|
6a39fd70e1 | ||
|
|
fff050c71d | ||
|
|
61327620da | ||
|
|
80cc57caa0 | ||
|
|
55f38414d1 | ||
|
|
96da38a8e4 | ||
|
|
25b144e496 | ||
|
|
478f5e34d3 | ||
|
|
47dfa921cd | ||
|
|
c162f57dbd | ||
|
|
92073eda12 | ||
|
|
bb9b36b291 | ||
|
|
8b93d9bf54 | ||
|
|
d7566daacc | ||
|
|
7b8cefbadc | ||
|
|
579ffa5a62 | ||
|
|
c6fa061604 | ||
|
|
fd811b020a | ||
|
|
9ae2ab105b | ||
|
|
1a94a62fe3 | ||
|
|
a13a0df35e | ||
|
|
f6bdd948b1 | ||
|
|
1ceee12fc4 | ||
|
|
dbacfed855 | ||
|
|
3ac21ae9a3 | ||
|
|
7985e93e29 | ||
|
|
4230e816df | ||
|
|
ae3aae9af8 | ||
|
|
67d7a64a51 | ||
|
|
cdc327b777 | ||
|
|
3c9a1d488b | ||
|
|
72d46ba64b | ||
|
|
d9feca5606 | ||
|
|
f29f4294c7 | ||
|
|
db94fcb6b4 | ||
|
|
4945bd79ca | ||
|
|
22d053c9d0 | ||
|
|
6482ae164c | ||
|
|
7900a2e97e | ||
|
|
95993955c5 | ||
|
|
6b48b250a7 | ||
|
|
66ad41f814 | ||
|
|
a36d35d752 | ||
|
|
89d1a9751c | ||
|
|
841c8c22d7 | ||
|
|
cb9d98a819 | ||
|
|
a62bae8c7c | ||
|
|
344a63b956 | ||
|
|
0ea44cfafb | ||
|
|
1948a41949 | ||
|
|
50e928b685 | ||
|
|
7352cd05c5 | ||
|
|
94980c8394 | ||
|
|
ba66a42891 | ||
|
|
1ec1a6cd7d | ||
|
|
58eb6f3c54 | ||
|
|
78e106cff2 | ||
|
|
1cf82a6020 | ||
|
|
7938bd08ae | ||
|
|
20312ffa4b | ||
|
|
539b765e21 | ||
|
|
36edeb2401 | ||
|
|
58af2417e2 | ||
|
|
5fc97e9553 | ||
|
|
3e868a41e9 | ||
|
|
2e7dde73ab | ||
|
|
c72d337f69 | ||
|
|
a8c1b728d2 | ||
|
|
f328a9940b | ||
|
|
1ef5b92910 | ||
|
|
1dd07aeda9 | ||
|
|
1628f60553 | ||
|
|
970f4489d4 | ||
|
|
997cec4b9b | ||
|
|
127b7a15b5 | ||
|
|
bbf310147e | ||
|
|
858240874c | ||
|
|
7bddd8751e | ||
|
|
0540c254d0 | ||
|
|
6caed369d7 | ||
|
|
9da47d84e0 | ||
|
|
6450f9332a | ||
|
|
722564b2da | ||
|
|
a93e180a89 | ||
|
|
8cbc36fd22 | ||
|
|
8d84721882 | ||
|
|
c739c770f7 | ||
|
|
d01961424d | ||
|
|
e114ab3f20 | ||
|
|
ebd185a798 | ||
|
|
eb4e5957cd | ||
|
|
429eb4af83 | ||
|
|
fb88783f9d | ||
|
|
aa2f02b1d2 | ||
|
|
9dfe14fe33 | ||
|
|
71b040cabe | ||
|
|
4a310dc53f | ||
|
|
e7e249d1d3 | ||
|
|
af97275139 | ||
|
|
9ce7470b87 | ||
|
|
8a4b2f9a2e | ||
|
|
823b5c27da | ||
|
|
7e1516bdf5 | ||
|
|
3eb9a50921 | ||
|
|
6ed457d1f7 | ||
|
|
3b076f6f01 | ||
|
|
45551c3c5b | ||
|
|
8c31c8105e | ||
|
|
9ccbc834b5 | ||
|
|
2c409687d5 | ||
|
|
6c51115e14 | ||
|
|
088ee071ca | ||
|
|
c245ba3a5d | ||
|
|
8cf20db7e1 | ||
|
|
8c39685ef6 | ||
|
|
20dfd20416 | ||
|
|
12ca7adcd1 | ||
|
|
a4e8efedc8 | ||
|
|
d86ed5d6ee | ||
|
|
668dc0e7a5 | ||
|
|
f5b454e110 | ||
|
|
aefd5bb251 | ||
|
|
8b8df9e093 | ||
|
|
cdd62b09d3 | ||
|
|
107697dc95 | ||
|
|
cae5030804 | ||
|
|
f073ebe4cd | ||
|
|
5bc3e14eb4 | ||
|
|
6548cc4477 | ||
|
|
e64daa18cf | ||
|
|
4357e529ce | ||
|
|
7becc749aa | ||
|
|
de9b1f6273 | ||
|
|
14a1d06c03 | ||
|
|
f864017cc5 | ||
|
|
0f4ff8b724 | ||
|
|
024f98c2c8 | ||
|
|
1b78f5c882 | ||
|
|
693297ac9e | ||
|
|
ff6677b932 | ||
|
|
aaad577a68 | ||
|
|
b315fcfbdd | ||
|
|
e011ed0b3e | ||
|
|
4b253c80f7 | ||
|
|
9b9872db60 | ||
|
|
7682fb0029 | ||
|
|
fc63061eaf | ||
|
|
43759985f2 | ||
|
|
2eb1f256fb | ||
|
|
49cf31baad | ||
|
|
b97fbde7e2 | ||
|
|
391f9358a6 | ||
|
|
2d99da59c4 | ||
|
|
097d0e67bc | ||
|
|
9da1d5d0ea | ||
|
|
f930a974a5 | ||
|
|
a3b1730719 | ||
|
|
273cfc1013 | ||
|
|
111bac03ab | ||
|
|
a33b4ee99a | ||
|
|
4474236780 | ||
|
|
846d1fef2b | ||
|
|
34a881f917 | ||
|
|
d521932dcb | ||
|
|
b255b6a700 | ||
|
|
9bd092b6ec | ||
|
|
65e3b8d0f7 | ||
|
|
5507db1d18 | ||
|
|
502d4c9e51 | ||
|
|
01430cd618 | ||
|
|
3e1a9abe9b | ||
|
|
63db85b244 | ||
|
|
f2050b6a11 | ||
|
|
6abdf34054 | ||
|
|
091489b503 | ||
|
|
0616e77584 | ||
|
|
6ed64724c0 | ||
|
|
770c088507 | ||
|
|
9af8389616 | ||
|
|
7704175f0d | ||
|
|
27ec5f0f6d | ||
|
|
900fcded9b | ||
|
|
9193e8c29d | ||
|
|
ca2ff001a5 | ||
|
|
f810b5cd06 | ||
|
|
a91165d3e6 | ||
|
|
1e3f29ad98 | ||
|
|
2f0e52abe1 | ||
|
|
95eee5369d | ||
|
|
e69b471134 | ||
|
|
cf77ee1d2a | ||
|
|
ec2a21c766 | ||
|
|
f385efbbfc | ||
|
|
8bf666f56d | ||
|
|
173a87a53e | ||
|
|
45c180368f | ||
|
|
37bfdbbbe0 | ||
|
|
40e169043a | ||
|
|
6eaa06f613 | ||
|
|
d8c5b7f484 | ||
|
|
60cd04c36a | ||
|
|
ede399e95c | ||
|
|
b721661e2c | ||
|
|
4452fcda98 | ||
|
|
37584be044 | ||
|
|
42520a6126 | ||
|
|
987c5cfb9c | ||
|
|
ed98616b83 | ||
|
|
19141460b5 | ||
|
|
d8e00f4f8a | ||
|
|
3bffba945a | ||
|
|
4204d210c1 | ||
|
|
62731aa434 | ||
|
|
7dd8d635bc | ||
|
|
718b129041 | ||
|
|
3aa8bbd629 | ||
|
|
aa2415eeb8 | ||
|
|
89f289b433 | ||
|
|
76e27f0333 | ||
|
|
a35e690a62 | ||
|
|
8a4926515b | ||
|
|
bd5a7dea3a | ||
|
|
6a25c8b675 | ||
|
|
2acd2c294a | ||
|
|
b8c264f173 | ||
|
|
2df9bbeb83 | ||
|
|
7d60e160ab | ||
|
|
7d73f61cd3 | ||
|
|
9de5965dd1 | ||
|
|
b92fe46387 | ||
|
|
da1d362203 | ||
|
|
93e8078a93 | ||
|
|
f5ab02ac20 | ||
|
|
78bb76249e | ||
|
|
405c23f2bd | ||
|
|
aeaf12a7a2 | ||
|
|
85dab3b6ef | ||
|
|
fa018d3e8c | ||
|
|
80d2bf9e8f | ||
|
|
aabe456aa6 | ||
|
|
1848ea5d15 | ||
|
|
ec0306278e | ||
|
|
ecc40c7ea3 | ||
|
|
63fb33d03d | ||
|
|
3cbf2e0138 | ||
|
|
9a1f8fb161 | ||
|
|
a765789c4d | ||
|
|
a0543dfccf | ||
|
|
fb45f221b7 | ||
|
|
633e81848e | ||
|
|
84df69b387 | ||
|
|
86b4987588 | ||
|
|
8c01fa8480 | ||
|
|
ccb74f968b | ||
|
|
56e9b22e1c | ||
|
|
87d2196cde | ||
|
|
fd059da29b | ||
|
|
95080fee69 | ||
|
|
62b9748269 | ||
|
|
7d71521851 | ||
|
|
ac5944ec79 | ||
|
|
1b6973665a | ||
|
|
a0ad88372f | ||
|
|
7a9cf8abb1 | ||
|
|
a146849a58 | ||
|
|
d1b87bd7b7 | ||
|
|
ff9bb2cbd7 | ||
|
|
9b8f002aa8 | ||
|
|
42f2f6b334 | ||
|
|
676e8782ed | ||
|
|
d125ec5230 | ||
|
|
f7d85b41cc | ||
|
|
86f9ba3b34 | ||
|
|
a9de2994bf | ||
|
|
48f2dc074c | ||
|
|
a4bfb46d6d | ||
|
|
55a4cb3274 | ||
|
|
9842d7498b | ||
|
|
4404e145c0 | ||
|
|
6a01abb905 | ||
|
|
8e297cd38e | ||
|
|
9531a7afb7 | ||
|
|
5588357589 | ||
|
|
b74a77ace0 | ||
|
|
7cda485afe | ||
|
|
0cd1243e7a | ||
|
|
1f1d95b689 | ||
|
|
4f51432211 | ||
|
|
2b5397b639 | ||
|
|
964c1ee983 | ||
|
|
a0253efc27 | ||
|
|
111a93ad82 | ||
|
|
c268fa840e | ||
|
|
8b8b689858 | ||
|
|
fae4d8b8bf | ||
|
|
653dc1c518 | ||
|
|
7c67350e15 | ||
|
|
5f8a9dc76c | ||
|
|
0f4774bf60 | ||
|
|
174b5b74ad | ||
|
|
a6d79b20bd | ||
|
|
7031682d6a | ||
|
|
0ddc4ba496 | ||
|
|
05378f53db | ||
|
|
c62e384b47 | ||
|
|
d8a7450f6b | ||
|
|
4cf87c50de | ||
|
|
21d343b3ad | ||
|
|
bfcf834b07 | ||
|
|
8a0b299af7 | ||
|
|
543642eb5f | ||
|
|
bf1e9ddaee | ||
|
|
71351f1a02 | ||
|
|
33c6e56030 | ||
|
|
a0e1416027 | ||
|
|
c79a43f38a | ||
|
|
3630cc2a99 | ||
|
|
309cdc6ab6 | ||
|
|
2b7e327e09 | ||
|
|
db300f06da | ||
|
|
a2b775af42 | ||
|
|
999cbc0739 | ||
|
|
eb9d659361 | ||
|
|
99ce2fa51d | ||
|
|
d3a6e39b4e | ||
|
|
bc00acb5ff | ||
|
|
9a966f6f08 | ||
|
|
34a5766ce3 | ||
|
|
be9ab06116 | ||
|
|
2a4155aefc | ||
|
|
4dde70abdc | ||
|
|
7eeb6a2b95 | ||
|
|
6931c3df5a | ||
|
|
0ad650fb91 | ||
|
|
72135f8fbf | ||
|
|
546522264e | ||
|
|
353f96cb93 | ||
|
|
7a72146e82 | ||
|
|
f3627d4f84 | ||
|
|
d98ed122a6 | ||
|
|
30be9b7959 | ||
|
|
8562afde38 | ||
|
|
09936b37fa | ||
|
|
8051fb86e7 | ||
|
|
c29ae712f3 | ||
|
|
88b0fc5d22 | ||
|
|
889555bb43 | ||
|
|
50194e5923 | ||
|
|
bfecd3beb4 | ||
|
|
74fd7e22d0 | ||
|
|
2b97d9d677 | ||
|
|
546010246c | ||
|
|
f002a662bd | ||
|
|
fde47dfa80 | ||
|
|
f7e8c9be90 | ||
|
|
606e27653f | ||
|
|
28633003d5 | ||
|
|
dcf9e0ae58 | ||
|
|
5b526a52fc | ||
|
|
729a2246c6 | ||
|
|
c8c3381dd6 | ||
|
|
9767b90826 | ||
|
|
68b02c40a7 | ||
|
|
16544a77e2 | ||
|
|
1c6916c68f | ||
|
|
d7b5d6e904 | ||
|
|
fdefff329a | ||
|
|
39bba0b36e | ||
|
|
17e7869150 | ||
|
|
fec6db13fb | ||
|
|
fc512b3231 | ||
|
|
1805f41918 | ||
|
|
7562610c7d | ||
|
|
95d96ce1ab | ||
|
|
16365a5a44 | ||
|
|
f13c77d50d | ||
|
|
245718f236 | ||
|
|
07aace9975 | ||
|
|
244bb25e6a | ||
|
|
2a94bf267b | ||
|
|
b22b366fb1 | ||
|
|
5387bce2d9 | ||
|
|
f2c1cd8a35 | ||
|
|
188694fb29 | ||
|
|
84fba7ff2b | ||
|
|
6c7d34a773 | ||
|
|
61f9ae6e67 | ||
|
|
5a74d5c247 | ||
|
|
bb525a3cf1 | ||
|
|
933a5c0abf | ||
|
|
a2f0962b76 | ||
|
|
73b3c4af40 | ||
|
|
51a50fb571 | ||
|
|
40047f0f8b | ||
|
|
89d96dfee1 | ||
|
|
cac272a247 | ||
|
|
932e8191ad | ||
|
|
63d961afa0 | ||
|
|
7c88cecad4 | ||
|
|
389d677392 | ||
|
|
70b29590b9 | ||
|
|
f7a1f5c095 | ||
|
|
220923071c | ||
|
|
3fb59fd04d | ||
|
|
5667f9cef1 | ||
|
|
b8630b45d7 | ||
|
|
4cb713cebf | ||
|
|
b962221b41 | ||
|
|
1d22f8c897 | ||
|
|
b0a32dfd1b | ||
|
|
1314b3942d | ||
|
|
55b2aba3a8 | ||
|
|
9da11dc8f8 | ||
|
|
1581884c6d | ||
|
|
2b1929fc33 | ||
|
|
6c50e62f32 | ||
|
|
3f0a6a99da | ||
|
|
94b2a6a014 | ||
|
|
ae2b2febe9 | ||
|
|
908f551e0f | ||
|
|
07506f1f53 | ||
|
|
2b624ac485 | ||
|
|
f73dfe0672 | ||
|
|
e3b5024ca3 | ||
|
|
a0c4f1fc1f | ||
|
|
399b3ecfe3 | ||
|
|
29ce25a040 | ||
|
|
8832a9dd58 | ||
|
|
c561a8b900 | ||
|
|
eacb27d70b | ||
|
|
a2359d6994 | ||
|
|
67b4170e43 | ||
|
|
01f5c93585 | ||
|
|
f6306deb0a | ||
|
|
f6a4521e19 | ||
|
|
803ef7d9f3 |
1
.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
.vagrant
|
||||
.DS_Store
|
||||
stack.tgz
|
||||
build
|
||||
tmp
|
||||
*.deb
|
||||
.ruby-version
|
||||
|
||||
@@ -1,50 +1,74 @@
|
||||
# Contributor Code of Conduct
|
||||
# Contributor Covenant 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.
|
||||
## Our Pledge
|
||||
|
||||
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.
|
||||
In the interest of fostering an open and welcoming environment, we as
|
||||
contributors and maintainers pledge to making participation in our project and
|
||||
our community a harassment-free experience for everyone, regardless of age, body
|
||||
size, disability, ethnicity, gender identity and expression, level of experience,
|
||||
nationality, personal appearance, race, religion, or sexual identity and
|
||||
orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* 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
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
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,
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable
|
||||
behavior and are expected to take appropriate and fair corrective action in
|
||||
response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or
|
||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
||||
permanently any contributor for other behaviors that they deem inappropriate,
|
||||
threatening, offensive, or harmful.
|
||||
|
||||
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.
|
||||
## Scope
|
||||
|
||||
This code of conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community.
|
||||
This Code of Conduct applies both within project spaces and in public spaces
|
||||
when an individual is representing the project or its community. Examples of
|
||||
representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event. Representation of a project may be
|
||||
further defined and clarified by project maintainers.
|
||||
|
||||
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.
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at dokku@josediazgonzalez.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
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]
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
||||
available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/3/0/
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# How to contribute
|
||||
|
||||
Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
The Dokku project would love 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
|
||||
@@ -8,6 +9,8 @@ Dokku loves to welcome your contributions. There are several ways to help out:
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
@@ -58,53 +61,15 @@ etc). Please include:
|
||||
* 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 `sigil -v`.
|
||||
* The output of `docker run --rm -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:
|
||||
```
|
||||
Our Issue Report Template is available [here](https://github.com/dokku/dokku/blob/master/ISSUE_TEMPLATE.md)
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
470
HISTORY.md
@@ -1,7 +1,473 @@
|
||||
# History
|
||||
|
||||
## 0.6.2
|
||||
|
||||
This release is a minor bugfix for the web setup, and also reverts a previous addition to the persistent storage. Please see the pull requests for more details.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2256: @michaelshobbs Revert automatically binding storage mounts in build phase
|
||||
- #2259: @andrewsomething Don't run DeleteInstallerThread() until after set_debconf_selection
|
||||
|
||||
## 0.6.1
|
||||
|
||||
This release is a minor bugfix to fix an issue with ssl support for spdy-enabled nginx servers. Users are encouraged to upgrade if they have an older version of nginx installed.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2250: @michaelshobbs Fix missing $ sign in default nginx template
|
||||
|
||||
## 0.6.0
|
||||
|
||||
The big-six-o. This release is largely comprised of new features that should allow for easier management of dokku. The highlights of this release are:
|
||||
|
||||
- The proxy plugin has been enhanced to allow users to map container ports to host ports. In the 0.5.0 release, we changed the semantics of how Dockerfile `EXPOSE` calls work to better follow Docker's lead, which ended up breaking how some applications were deployed to dokku. Please read our documentation surrounding [port management](http://dokku.viewdocs.io/dokku/proxy/) for more details.
|
||||
- Zero-downtime deploys can be disabled on a per-app and per-process basis. This can be used to speed up deploys when there are non-web processes being deployed, or when a user wishes to completely avoid any such waiting period. Please see the [checks documentation](http://dokku.viewdocs.io/dokku/checks-examples/) for further information.
|
||||
|
||||
Thanks to all the contributors who helped with this release, and a special thanks to @michaelshobbs for ferrying the majority of our new functionality to it's current state!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2241: @josegonzalez Set debconf selections from dokku-installer.py
|
||||
- #2242: @michaelshobbs Avoid calling dokku binary
|
||||
- #2243: @josegonzalez Nginx 1.9.5+ support
|
||||
|
||||
### New Features
|
||||
|
||||
- #2018: @pascalw Support running Procfile commands using `dokku run`
|
||||
- #2050: @josegonzalez Implement repo:gc and repo:purge-cache
|
||||
- #2109: @josegonzalez Allow user to modify the repository and tag when deploying an app
|
||||
- #2168: @michaelshobbs Allow zero-downtime deploys to be completely disabled
|
||||
- #2248: @michaelshobbs Allow users to map container ports to host ports via the proxy plugin
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2209: @piamancini Added backers and sponsors from OpenCollective
|
||||
- #2244: @basgys Add InfluxDB to plugins
|
||||
|
||||
## 0.5.8
|
||||
|
||||
This release is the last release in the `0.5.x` series, and as such is mainly a bugfix release. Users are highly encouraged to upgrade to this release *before* moving to the upcoming `0.6.x` release, as we will be removing deprecated features at that point.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2214: @michaelshobbs Remove git push from client
|
||||
- #2220: @josegonzalez Remove DOKKU_PROCFILE before attempting to extract it
|
||||
- #2227: @michaelshobbs Pass image tag from release_and_deploy down through extract_procfile
|
||||
- #2228: @michaelshobbs Support WORKDIR location for DOKKU_SCALE
|
||||
- #2229: @hansmi Fix removal of domains with schema
|
||||
- #2234: @michaelshobbs Cleanup container state files when a process type is removed from app
|
||||
- #2236: @michaelshobbs Hide unnecessary output from is_image_herokuish_based()
|
||||
- #2233: @josegonzalez Lintian cleanup
|
||||
|
||||
### New Features
|
||||
|
||||
- #2205: @josegonzalez Fix lintian errors in built debian packages
|
||||
- #2223: @josegonzalez De-duplicate nginx restarting
|
||||
- #2237: @michaelshobbs Reject invalid domains in domains:add
|
||||
- #2238: @michaelshobbs Mount storage mounts on build for buildpack deploys
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2212: @jbothma Warn and instruct users about unsafe publicly-accessible web installer
|
||||
- #2222: @michaelshobbs Move nginx upstream blocks to the bottom in docs examples
|
||||
|
||||
## 0.5.7
|
||||
|
||||
0.5.7 includes quite a few documentation updates, and a few minor changes in how we handle certain edge-cases in day-to-day dokku tasks.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2157: @michaelshobbs test detached container is running
|
||||
- #2170: @jvanbaarsen Do not fail domains:add when adding a duplicated domain
|
||||
- #2171: @tobru Continue to restore applications during boot when any given application does not start
|
||||
- #2173: @michaelshobbs Add test for ps:restore with undeployed app
|
||||
- #2202: @michaelshobbs Attempt to bypass inconsistencies in nginx start behavior
|
||||
|
||||
### New Features
|
||||
|
||||
- #2155: @josegonzalez Add the ability to run containers in detached mode
|
||||
- #2163: @michaelshobbs Support deployment of arbitrary docker images not built by dokku build
|
||||
- #2175: @michaelshobbs Show available types and ids on dokku enter error
|
||||
- #2193: @josegonzalez Upgrade herokuish version built via deb packaging
|
||||
- #2203: Allow specifying NO_INSTALL_RECOMMENDS via DOKKU_NO_INSTALL_RECOMMENDS in bootstrapped installs
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2164: @iloveitaly Adding longtimeout and hostname to dokku plugin list
|
||||
- #2167: @iloveitaly Adding link to rollbar plugin
|
||||
- #2182: @cu12 Add link to FakeSNS plugin
|
||||
- #2183: @Epigene Update nginx docs to mirror generated nginx.conf from core
|
||||
- #2187: @pltchuong Add missing trigger to plugin triggers documentation
|
||||
- #2190: @cu12 Add ElasticMQ plugin to documentation
|
||||
- #2191: @josegonzalez Clarify upgrade docs for bootstrap.sh installations
|
||||
- #2192: @josegonzalez Clarify that the checks are only run against the web process
|
||||
- #2194: @josegonzalez Clarify the role of process types for buildpack deployment
|
||||
- #2195: @josegonzalez Clarify when certain plugin triggers are invoked
|
||||
|
||||
## 0.5.6
|
||||
|
||||
Release 0.5.6 is mostly a documentation release. Please note, however, that we now inject application environment variables into sigil-generated nginx configurations. You can use this to further improve your generated nginx configuration files.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2120: @u2mejc Add apex help_content for certs,nginx,storage,tar plugins
|
||||
- #2122: @michaelshobbs Add 10.0.0.2 so *.dokku.me works
|
||||
- #2145: @michaelshobbs Fix dockerfile-procfile test
|
||||
|
||||
### New Features
|
||||
|
||||
- #2150: @michaelshobbs export app config vars into sigil environment for use in nginx templates
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2099: @ojosdegris Added clarification on configuration via separate files
|
||||
- #2107: @simenbrekken Add CI deployment recipe
|
||||
- #2112: @josegonzalez Alphabetize triggers
|
||||
- #2114: @josegonzalez Add table of contents to sidebar when there is a table of contents
|
||||
- #2115: @josegonzalez Document potential dockerfile/nginx.conf.sigil issues
|
||||
- #2116: @josegonzalez Warn users when there is a low memory condition on installation
|
||||
- #2127: @crisward Added dokku require plugin
|
||||
- #2129: @christiangenco Condense upgrading instructions
|
||||
- #2136: @josegonzalez Use `sleep infinity` for enter cron task
|
||||
- #2142: @Aluxian Add dokku-nginx-cache to the list of plugins
|
||||
|
||||
## 0.5.5
|
||||
|
||||
Release 0.5.5 is mostly a documentation release, further clarifying how our default proxy implementation (nginx) interacts with Dockerfiles. Note that we also updated how ssl certificates interact with application domains, so please check out our domains and ssl documentation.
|
||||
|
||||
We've also added a small section to the [dokku homepage](http://dokku.viewdocs.io/dokku/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
|
||||
|
||||
Finally, we've started an [Official Dokku Blog](https://dokku.github.io/), where we will post about dokku internals, roadmaps, potential use-cases, etc. An rss feed is available [here](https://dokku.github.io/feed.xml).
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2094: @josegonzalez Create storage directories on install. Closes #2091
|
||||
- #2102: @josegonzalez Only strip .git directory from end of url
|
||||
|
||||
### New Features
|
||||
|
||||
- #2088: @josegonzalez Upgrade herokuish package
|
||||
- #2089: @michaelshobbs Update how ssl and multiple domains interact
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2076: @josegonzalez Add a note to dockerfile deploys concerning ports being exposed as http
|
||||
- #2080: @michaelshobbs Clarify the need for contents of dockerfile when debugging
|
||||
- #2082: @michaelshobbs Add use case example for ssl redirect
|
||||
- #2083: @louisbl Clarify 0.5.0 migration guide about `EXPOSE`
|
||||
- #2084: @louisbl Clarify where to put nginx custom template without `WORKDIR`
|
||||
- #2093: @fwolfst Fix path in storage example
|
||||
- #2098: @josegonzalez Add a blog link to the header area
|
||||
- #2100: @kane-c Fix docs navigation link to domain configuration
|
||||
- #2104: @crisward Added new clone plugin
|
||||
- #2105: @josegonzalez Add a note about how disabling the proxy affects the host port an application is deployed to
|
||||
|
||||
## 0.5.4
|
||||
|
||||
This release continues on our tradition of making bugfixes in patch releases. Also note that we now release dokku with `sshcommand` version `0.4.0`, which should increase usability of that package quite a bit.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2055: @tobru Move nginx include to server section
|
||||
- #2060: @michaelshobbs Filter restart policies from exec-app-json containers
|
||||
- #2061: @znz Fix ignored settings in the CHECKS file
|
||||
- #2065: @michaelshobbs Fix pre/post deploy support for dockerfile apps
|
||||
|
||||
### New Features
|
||||
|
||||
- #2052: @josegonzalez Use upstream releases when creating deb packages. Closes #2048
|
||||
- #2068: @josegonzalez Use latest sshcommand when installing via debian
|
||||
- #2070: @josegonzalez Upgrade sshcommand to 0.4.0
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2049: @mmlkrx Fix typo in deployment-tasks.md
|
||||
- #2051: @plieningerweb Clarify installation instructions in docs
|
||||
- #2058: @michaelshobbs Remove references to global TLS certs
|
||||
- #2072: @michaelshobbs Note that we only support one EXPOSE port per line in dockerfiles
|
||||
|
||||
## 0.5.3
|
||||
|
||||
This release sorts out a few minor bugs introduced in the 0.5.0 release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2030: @josegonzalez Fix setting of APPS in checks command when $1 is left unspecified
|
||||
- #2035: @stesie Fix ps_restart to not exit early
|
||||
- #2042: @michaelshobbs Ensure CHECKS file has trailing newline
|
||||
- #2046: @michaelshobbs Strip inline comments and trailing whitespace from CHECKS and Procfile
|
||||
- #2047: @michaelshobbs Remove deprecated mktemp args and name vars more clearly
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2032: @josegonzalez Fix upstream positioning in docs. Closes #2031
|
||||
- #2039: @christiangenco Clarify upgrading documentation
|
||||
- #2043: @michaelshobbs Clarify dockerfile port exposure documentation
|
||||
- #2045: @u2mejc Reword dockerfiles docs to clarify EXPOSE handling in 0.5.x
|
||||
|
||||
## 0.5.2
|
||||
|
||||
This is a packaging fix release.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2027: @michaelshobbs Add sigil to debian control file
|
||||
|
||||
## 0.5.1
|
||||
|
||||
That was quick! This is a bugfix release to fix issues in the packaging and release phases of dokku.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2023: @josegonzalez Fix sigil packaging
|
||||
- #2024: @josegonzalez Delete bad symlinks without confirmation
|
||||
|
||||
## 0.5.0
|
||||
|
||||
This is our largest, most feature-packed release in the history of the dokku project. Lots of delicious things, including:
|
||||
|
||||
- Support for docker 1.10/1.11. You *must* have docker 1.9.1+ to install dokku.
|
||||
- Revamped documentation website
|
||||
- [Deployment Tasks](http://dokku.viewdocs.io/dokku/deployment/deployment-tasks/)
|
||||
- Heroku-style management of [dockerfile processes](http://dokku.viewdocs.io/dokku/deployment/dockerfiles/#procfiles-and-multiple-processes)
|
||||
- Official [persistent storage plugin](http://dokku.viewdocs.io/dokku/dokku-storage/)
|
||||
|
||||
We'd also love it if you welcomed a few new core developers:
|
||||
|
||||
- @MorrisJobke: Maintainer of our new arch linux support
|
||||
- @u2mejc: Contributed the help refactor and persistent storage plugins
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
## Refactor
|
||||
|
||||
- #1892: @michaelshobbs Refactor nginx proxy plugin to add usage flexibility
|
||||
- #1925: @josegonzalez Simplify bootstrap.sh installation method
|
||||
- #1953: @michaelshobbs Refactor commands into subcommands and add support for --app argument
|
||||
- #1983: @u2mejc Collapse help into expandable command topics
|
||||
- #1936: @michaelshobbs Cleanup shellcheck SC2086
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1934: @michaelshobbs Fix get_running_image_tag() with docker 1.10.x
|
||||
- #1935: @michaelshobbs Remove unnecessary nginx test
|
||||
- #1941: @cu12 Fix issue with plugins having plugins command
|
||||
- #1980: @cu12 Fix issue when Dockerfile present but BUILDPACK_URL is set
|
||||
- #1991: @MorrisJobke Only chown of existing files
|
||||
- #1993: @istarkov Fix bash incorrect test command
|
||||
- #2006: @baob Fix too many redirects
|
||||
- #2012: @michaelshobbs minor bug fixes around app.json and docker-options
|
||||
|
||||
### New Features
|
||||
|
||||
- #1830: @u2mejc Add core storage plugin to manage docker bind mounts
|
||||
- #1836: @michaelshobbs Support scripts.dokku. in app.json
|
||||
- #1918: @MorrisJobke Adds support for ArchLinux as host OS
|
||||
- #1924: @pmclanahan Use Procfile for process types in Dockerfile apps
|
||||
- #1939: @pmclanahan Add dokku git remote when specifying app name in bash client
|
||||
- #1958: @u2mejc Enable debug output for dokku global exports in trace
|
||||
- #1959: @josegonzalez Allow customizing ssh port for the default client
|
||||
- #1981: @josegonzalez Only remove containers with dokku label
|
||||
- #1987: @josegonzalez Do not restart stopped processes on config:set/unset
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1687: @u2mejc Deprecate and remove dokku backup plugin, replace with documentation.
|
||||
- #1931: @josegonzalez Standardize on "relative" doc links
|
||||
- #1938: @npazo Add information about Slack channel
|
||||
- #1947: @basgys Add etcd to the list of plugins
|
||||
- #1951: @znz Fix typos
|
||||
- #1960: @josegonzalez Clarify which commands should be run where. Closes #1890
|
||||
- #1963: @josegonzalez Add floating sidebar on documentation linking to released versions
|
||||
- #1965: @trevorturk Clarify checks documentation
|
||||
- #1974: @simenbrekken Update link in Azure installation instructions. Fixes #1973
|
||||
- #1979: @josegonzalez Add specific documentation around user management. Closes #1978
|
||||
- #1985: @MikeSchroll Make history readable in github
|
||||
- #1990: @ligthyear Highlight features that are yet to come
|
||||
- #1992: @Sureiya Improved documentation for using official dokku_client.sh
|
||||
- #2000: @iamale Add dokku-monorepo to the plugin list in docs
|
||||
- #2002: @michaelshobbs clarify deployment tasks are supported in both buildpack and dockerfile apps
|
||||
- #2003: @michaelshobbs Add more useful post-deploy task and make blockquote
|
||||
- #2004: @josegonzalez Document 0.5.x container removal strategy. Closes #1982
|
||||
- #2007: @josegonzalez Document when configuration variables are available. Closes #1860
|
||||
- #2009: @samholmes1337 Clarify purpose and potential penalties of primary vhost
|
||||
- #2011: @josegonzalez Updated installation docs
|
||||
- #2013: @michaelshobbs Make help desc local consistent
|
||||
|
||||
## 0.4.14
|
||||
|
||||
Hah you got us. We have to ship another 0.4.x release to fix issues with
|
||||
running commands via `dokku run`. For quite a few releases, we've been
|
||||
ignoring the `--rm` flag, meaning containers were lying around if you were
|
||||
using `dokku run` in cron. This release fixes it, and is important enough
|
||||
to warrant a 0.4.x release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1888: @u2mejc Remove broken symlinks when using copyfiles
|
||||
- #1887: @u2mejc Fix <command>:help hangs for certs, enter, tags, tar
|
||||
- #1901: @josegonzalez Add shebang to config/functions so editors see it as a shell script
|
||||
- #1907: @michaelshobbs Fix dokku run --rm regression
|
||||
- #1911: @2mia Add support for github url patterns when installing plugins
|
||||
- #1912: @mattberther Pass -i -t to docker exec only if tty present
|
||||
- #1923: @michaelshobbs Fix typo in generate_scale_file()
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1882: @josegonzalez Add a note to warn users to peg to specific versions of buildpacks
|
||||
- #1883: @michaelshobbs Show plugn version when listing plugins
|
||||
- #1900: @josegonzalez Upgrade our CoC to 1.4 of the Contributor Covenant
|
||||
- #1913: @michaelshobbs document appropriate crontab usage
|
||||
- #1921: @josegonzalez Create ISSUE_TEMPLATE.md
|
||||
- #1922: @josegonzalez Link to our new ISSUE_TEMPLATE.md
|
||||
|
||||
## 0.4.13
|
||||
|
||||
We lied. *This* is the final 0.4.x release. This specific release fixes support for bash `4.2`, which may be the only bash version available for certain testing environments.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1871: @michaelshobbs Support bash 4.2 so we don't have to modify all plugin test envs
|
||||
- #1872: @kenips Update log to better reflect what's going on with CHECKS
|
||||
|
||||
## 0.4.12
|
||||
|
||||
This is a small bugfix release, which will be the final release before the 0.5.x line. You can follow along on bugs/features we hope to cleanup for 0.5.x [here](https://github.com/dokku/dokku/milestones/v0.5.0).
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1868: @alessio Prevent dokku to hang on events:help
|
||||
- #1870: @u2mejc Remove arg check from docker-options/functions, global var cleanup
|
||||
|
||||
## 0.4.11
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1840: @alessio Append trailing slash '/' to $PLUGIN_DIR
|
||||
- #1841: @michaelshobbs Don't build nginx config if the app has not been deployed
|
||||
- #1844: @michaelshobbs Handle multiple old containers and don't attempt to rename a dead container
|
||||
- #1845: @michaelshobbs Update nodejs in test apps
|
||||
- #1849: @floriangosse Fix logrotate file for debian system
|
||||
- #1862: @michaelshobbs Install bash 4.3.x on circleci
|
||||
- #1863: @znz Fix a typo in IPV6 detection
|
||||
|
||||
### New Features
|
||||
|
||||
- #1842: @michaelshobbs skip cleanup in ci to speed up tests
|
||||
- #1848: @u2mejc Move docker-options functions to functions file, rework phase_file_path
|
||||
- #1855: @jvanbaarsen Add skip_keyfile option for deb package
|
||||
- #1864: @znz Remove nullglob from ps commands
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1838: @Epigene Fixed typo in installation documentation
|
||||
- #1843: @sseemayer Move let's encrypt plugin to official plugins
|
||||
- #1854: @fedosov Update year in footer (2013-2016)
|
||||
- #1856: @madflow Fixed dead documentation link
|
||||
- #1859: @dhinus Fix command for debconf-set-selections
|
||||
|
||||
## 0.4.10
|
||||
|
||||
This release is mostly a bugfix release, though we have a few important changes:
|
||||
|
||||
- `dokku plugin:update` can now be used to update a specific plugin. Previously, this could potentially result in an error a user would have to manually resolve.
|
||||
- We have started labeling all dokku-managed containers. In a future minor release, triggering a `dokku cleanup` will remove *only* exited containers that are managed by dokku. This change allows users to start containers outside of dokku and be assured that dokku would not inadvertently remove them.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1818: @josegonzalez Fix pre-receive git-hook in apps:rename
|
||||
- #1819: @andrewsomething Write out /home/dokku/HOSTNAME as specified by the web installer.
|
||||
- #1823: @josegonzalez Fix output formatting of dokku apps
|
||||
- #1827: @michaelshobbs Use docker 1.9.0 on circleci
|
||||
- #1834: @jvanbaarsen Make sure we ignore hidden files in the SSL cert check
|
||||
- #1835: @josegonzalez Add support to herokuish for more versions of docker-engine
|
||||
- #1837: @michaelshobbs Add back some deploy tests that test dokku functionality
|
||||
|
||||
### New Features
|
||||
|
||||
- #1826: @michaelshobbs Implement plugn update
|
||||
- #1828: @michaelshobbs Label all dokku-managed containers
|
||||
- #1829: @michaelshobbs Implement dokku report command
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1822: --no-restart option after config:set not before
|
||||
|
||||
## 0.4.9
|
||||
|
||||
This release is significant for two reasons:
|
||||
|
||||
- A bugfix for git submodule support that was broken in 0.4.7
|
||||
- Improved and tested support for modern variants of Ubuntu/Debian. This should also improve support for docker-based deployments of dokku, as well as potential support for the upcoming Ubuntu 16.04 release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1810: @josegonzalez Fix debian packaging for usage inside of docker containers
|
||||
- #1814: @blackxored Add support for new method of extracting container IP
|
||||
- #1807: @josegonzalez Allow updating submodules at any revision
|
||||
|
||||
### New Features
|
||||
|
||||
- #1812: @josegonzalez Fully-tested debian packaging for modern Ubuntu/Debian distributions
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1811: @josegonzalez Add dokku haproxy to plugins
|
||||
|
||||
## 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
|
||||
@@ -17,7 +483,7 @@
|
||||
- #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: @michaelshobbs Make it possible to skip a deploy
|
||||
- #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
|
||||
@@ -82,6 +548,7 @@ Thanks to all the contributors who helped with this release!
|
||||
|
||||
- #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
|
||||
@@ -96,7 +563,6 @@ Thanks to all the contributors who helped with this release!
|
||||
- #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
|
||||
- @1682: @michaelshobbs Aet nullglob when looking for PORT files
|
||||
|
||||
### New Features
|
||||
|
||||
|
||||
45
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,45 @@
|
||||
Description of problem:
|
||||
|
||||
|
||||
Output of the following commands
|
||||
|
||||
- `uname -a`:
|
||||
- `free -m`:
|
||||
- `docker version`:
|
||||
- `docker -D info`:
|
||||
- `sigil -v`:
|
||||
- `docker run -ti gliderlabs/herokuish:latest herokuish version`:
|
||||
- `dokku version`:
|
||||
- `dokku plugin`:
|
||||
- `docker inspect CONTAINER_ID` (if applicable):
|
||||
(BEWARE: `docker inspect` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Link to the exact repository being deployed (if possible/applicable):
|
||||
- If a deploy is failing or behaving unexpectedly:
|
||||
- Application name
|
||||
- The type of application being deployed (node, php, python, ruby, etc.)
|
||||
- If using buildpacks, which custom buildpacks are in use
|
||||
- If using a `Dockerfile`, the contents of that file
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing dokku commands after running `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
|
||||
Environment details (AWS, VirtualBox, physical, etc.):
|
||||
|
||||
How was dokku installed?:
|
||||
|
||||
How reproducible:
|
||||
|
||||
|
||||
Steps to Reproduce:
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
Actual Results:
|
||||
|
||||
|
||||
Expected Results:
|
||||
|
||||
|
||||
Additional info:
|
||||
18
Makefile
@@ -1,7 +1,8 @@
|
||||
DOKKU_VERSION = master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/master/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/dokku/releases/download/v0.4.0/plugn_0.2.0_linux_x86_64.tgz
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.4.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
|
||||
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
||||
@@ -26,6 +27,7 @@ endif
|
||||
|
||||
include tests.mk
|
||||
include deb.mk
|
||||
include arch.mk
|
||||
|
||||
all:
|
||||
# Type "make install" to install.
|
||||
@@ -56,13 +58,14 @@ copyfiles:
|
||||
rm -rf ${PLUGINS_PATH}/$$plugin && \
|
||||
cp -R plugins/$$plugin ${CORE_PLUGINS_PATH}/available && \
|
||||
ln -s ${CORE_PLUGINS_PATH}/available/$$plugin ${PLUGINS_PATH}/available; \
|
||||
find /var/lib/dokku/ -xtype l -delete;\
|
||||
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
|
||||
done
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH}
|
||||
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true
|
||||
$(MAKE) addman
|
||||
|
||||
addman:
|
||||
addman: help2man
|
||||
mkdir -p /usr/local/share/man/man1
|
||||
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
|
||||
mandb
|
||||
@@ -76,7 +79,7 @@ plugin-dependencies: plugn
|
||||
plugins: plugn docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update sshcommand plugn docker help2man man-db
|
||||
dependencies: apt-update sshcommand plugn docker help2man man-db sigil
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
@@ -97,6 +100,10 @@ plugn:
|
||||
wget -qO /tmp/plugn_latest.tgz ${PLUGN_URL}
|
||||
tar xzf /tmp/plugn_latest.tgz -C /usr/local/bin
|
||||
|
||||
sigil:
|
||||
wget -qO /tmp/sigil_latest.tgz ${SIGIL_URL}
|
||||
tar xzf /tmp/sigil_latest.tgz -C /usr/local/bin
|
||||
|
||||
docker: aufs
|
||||
apt-get install -qq -y curl
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
@@ -149,4 +156,3 @@ vagrant-acl-add:
|
||||
|
||||
vagrant-dokku:
|
||||
vagrant ssh -- "sudo -H -u root bash -c 'dokku $(RUN_ARGS)'"
|
||||
|
||||
|
||||
82
README.md
@@ -1,6 +1,9 @@
|
||||
# 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/)
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://webchat.freenode.net/?channels=dokku) [](https://glider-slackin.herokuapp.com/) [](http://dokku.viewdocs.io/dokku/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](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/).
|
||||
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
## Requirements
|
||||
|
||||
@@ -10,8 +13,8 @@ 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.githubusercontent.com/dokku/dokku/v0.4.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.7 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
@@ -33,7 +36,76 @@ While we may not merge your PR as is, they serve to start conversations and impr
|
||||
|
||||
## Sponsors
|
||||
|
||||
Dokku is currently sponsored by the enterprise grade, multi-host PaaS project [Deis](http://deis.io/).
|
||||
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS) file.
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/4/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/5/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/6/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/7/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/8/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/9/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/10/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/11/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/12/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/13/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/14/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/15/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/16/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/17/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/18/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/19/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/20/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/21/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/22/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/23/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/24/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/25/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/26/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/27/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/backer/0/website" target="_blank"><img src="https://opencollective.com/dokku/backer/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/1/website" target="_blank"><img src="https://opencollective.com/dokku/backer/1/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/2/website" target="_blank"><img src="https://opencollective.com/dokku/backer/2/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/3/website" target="_blank"><img src="https://opencollective.com/dokku/backer/3/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/4/website" target="_blank"><img src="https://opencollective.com/dokku/backer/4/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/5/website" target="_blank"><img src="https://opencollective.com/dokku/backer/5/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/6/website" target="_blank"><img src="https://opencollective.com/dokku/backer/6/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/7/website" target="_blank"><img src="https://opencollective.com/dokku/backer/7/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/8/website" target="_blank"><img src="https://opencollective.com/dokku/backer/8/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/9/website" target="_blank"><img src="https://opencollective.com/dokku/backer/9/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/10/website" target="_blank"><img src="https://opencollective.com/dokku/backer/10/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/11/website" target="_blank"><img src="https://opencollective.com/dokku/backer/11/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/12/website" target="_blank"><img src="https://opencollective.com/dokku/backer/12/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/13/website" target="_blank"><img src="https://opencollective.com/dokku/backer/13/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/14/website" target="_blank"><img src="https://opencollective.com/dokku/backer/14/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/15/website" target="_blank"><img src="https://opencollective.com/dokku/backer/15/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/16/website" target="_blank"><img src="https://opencollective.com/dokku/backer/16/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/17/website" target="_blank"><img src="https://opencollective.com/dokku/backer/17/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/18/website" target="_blank"><img src="https://opencollective.com/dokku/backer/18/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/19/website" target="_blank"><img src="https://opencollective.com/dokku/backer/19/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/20/website" target="_blank"><img src="https://opencollective.com/dokku/backer/20/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/21/website" target="_blank"><img src="https://opencollective.com/dokku/backer/21/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/22/website" target="_blank"><img src="https://opencollective.com/dokku/backer/22/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/23/website" target="_blank"><img src="https://opencollective.com/dokku/backer/23/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/24/website" target="_blank"><img src="https://opencollective.com/dokku/backer/24/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/25/website" target="_blank"><img src="https://opencollective.com/dokku/backer/25/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/26/website" target="_blank"><img src="https://opencollective.com/dokku/backer/26/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/27/website" target="_blank"><img src="https://opencollective.com/dokku/backer/27/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/28/website" target="_blank"><img src="https://opencollective.com/dokku/backer/28/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/backer/29/website" target="_blank"><img src="https://opencollective.com/dokku/backer/29/avatar.svg"></a>
|
||||
|
||||
## License
|
||||
|
||||
|
||||
21
Vagrantfile
vendored
@@ -2,6 +2,7 @@
|
||||
# vi: set ft=ruby :
|
||||
|
||||
BOX_NAME = ENV["BOX_NAME"] || "bento/ubuntu-14.04"
|
||||
BOX_CPUS = ENV["BOX_CPUS"] || "1"
|
||||
BOX_MEMORY = ENV["BOX_MEMORY"] || "1024"
|
||||
DOKKU_DOMAIN = ENV["DOKKU_DOMAIN"] || "dokku.me"
|
||||
DOKKU_IP = ENV["DOKKU_IP"] || "10.0.0.2"
|
||||
@@ -24,6 +25,7 @@ Vagrant::configure("2") do |config|
|
||||
# Ubuntu's Raring 64-bit cloud image is set to a 32-bit Ubuntu OS type by
|
||||
# default in Virtualbox and thus will not boot. Manually override that.
|
||||
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"]
|
||||
vb.customize ["modifyvm", :id, "--cpus", BOX_CPUS]
|
||||
vb.customize ["modifyvm", :id, "--memory", BOX_MEMORY]
|
||||
end
|
||||
|
||||
@@ -38,6 +40,13 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
|
||||
# Use the same nameserver as the host machine in order to avoid the "too many redirects" problem.
|
||||
vm.vm.provider :virtualbox do |vb|
|
||||
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
|
||||
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
|
||||
end
|
||||
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
vm.vm.provision :shell do |s|
|
||||
@@ -73,7 +82,17 @@ Vagrant::configure("2") do |config|
|
||||
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"
|
||||
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all"
|
||||
end
|
||||
|
||||
config.vm.define "build-arch", autostart: false do |vm|
|
||||
vm.vm.box = "bugyt/archlinux"
|
||||
vm.vm.synced_folder File.dirname(__FILE__), "/dokku"
|
||||
vm.vm.synced_folder "#{File.dirname(__FILE__)}/../dokku-arch", "/dokku-arch"
|
||||
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 => "cd /dokku && make arch-all", privileged: false
|
||||
end
|
||||
|
||||
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||
|
||||
28
arch.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
.PHONY: arch-all arch-dokku
|
||||
|
||||
arch-all: arch-dokku
|
||||
echo "Done"
|
||||
|
||||
arch-setup:
|
||||
echo "-> Updating pacman repository and installing package helper"
|
||||
sudo pacman -Sy
|
||||
sudo pacman -S --needed --noconfirm pkgbuild-introspection
|
||||
|
||||
echo "-> Download, build and install cower (dependency of pacaur) and pacaur"
|
||||
curl -so /tmp/cower.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/cower.tar.gz
|
||||
curl -so /tmp/pacaur.tar.gz https://aur.archlinux.org/cgit/aur.git/snapshot/pacaur.tar.gz
|
||||
tar -xzf /tmp/cower.tar.gz -C /tmp
|
||||
tar -xzf /tmp/pacaur.tar.gz -C /tmp
|
||||
gpg --recv-key 1EB2638FF56C0C53
|
||||
cd /tmp/cower; makepkg -sri --noconfirm
|
||||
cd /tmp/pacaur; makepkg -sri --noconfirm
|
||||
|
||||
echo "-> Installing build requirements"
|
||||
pacaur --noconfirm --noedit -S plugn
|
||||
|
||||
arch-dokku: arch-setup
|
||||
echo "-> Update package sums, create metadata file and test the build of the package"
|
||||
git describe --tags > /tmp/VERSION
|
||||
cat /tmp/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/STABLE_VERSION
|
||||
sed -i -e "s/pkgver=.*/pkgver=`cat /tmp/STABLE_VERSION`/" /dokku-arch/PKGBUILD
|
||||
cd /dokku-arch; updpkgsums; mksrcinfo; makepkg -fd
|
||||
145
bootstrap.sh
@@ -1,54 +1,99 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
# A script to bootstrap dokku.
|
||||
# It expects to be run on Ubuntu 14.04 via 'sudo'
|
||||
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
|
||||
# It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source.
|
||||
|
||||
# We wrap this whole script in a function, so that we won't execute
|
||||
# We wrap this whole script in functions, so that we won't execute
|
||||
# until the entire script is downloaded.
|
||||
# That's good because it prevents our output overlapping with wget's.
|
||||
# It also means that we can't run a partially downloaded script.
|
||||
|
||||
ensure-environment() {
|
||||
local FREE_MEMORY
|
||||
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://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
bootstrap () {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
set -eo pipefail
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
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://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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
|
||||
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
|
||||
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
|
||||
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
|
||||
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory"
|
||||
fi
|
||||
}
|
||||
|
||||
apt-get update -qq > /dev/null
|
||||
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties
|
||||
install-requirements() {
|
||||
echo "--> Ensuring we have the proper dependencies"
|
||||
apt-get update -qq > /dev/null
|
||||
if [[ $(lsb_release -sr) == "12.04" ]]; then
|
||||
apt-get -qq -y install python-software-properties
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_install_source() {
|
||||
apt-get install -qq -y git make software-properties-common
|
||||
install-dokku() {
|
||||
if [[ -n $DOKKU_BRANCH ]]; then
|
||||
install-dokku-from-source "origin/$DOKKU_BRANCH"
|
||||
elif [[ -n $DOKKU_TAG ]]; then
|
||||
local DOKKU_SEMVER="${DOKKU_TAG//v}"
|
||||
major=$(echo "$DOKKU_SEMVER" | awk '{split($0,a,"."); print a[1]}')
|
||||
minor=$(echo "$DOKKU_SEMVER" | awk '{split($0,a,"."); print a[2]}')
|
||||
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" -eq "3" ]] && [[ "$patch" -ge "13" ]]; then
|
||||
install-dokku-from-package "$DOKKU_SEMVER"
|
||||
echo "--> Running post-install dependency installation"
|
||||
dokku plugins-install-dependencies
|
||||
# 0.4.0 implemented a `plugin` plugin
|
||||
elif [[ "$major" -eq "0" ]] && [[ "$minor" -ge "4" ]] && [[ "$patch" -ge "0" ]]; then
|
||||
install-dokku-from-package "$DOKKU_SEMVER"
|
||||
echo "--> Running post-install dependency installation"
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
else
|
||||
install-dokku-from-source "$DOKKU_TAG"
|
||||
fi
|
||||
else
|
||||
install-dokku-from-package
|
||||
echo "--> Running post-install dependency installation"
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
install-dokku-from-source() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
apt-get -qq -y install git make software-properties-common
|
||||
cd /root
|
||||
if [[ ! -d /root/dokku ]]; then
|
||||
git clone $DOKKU_REPO /root/dokku
|
||||
git clone "$DOKKU_REPO" /root/dokku
|
||||
fi
|
||||
|
||||
cd /root/dokku
|
||||
git fetch origin
|
||||
git checkout $DOKKU_CHECKOUT
|
||||
[[ -n $DOKKU_CHECKOUT ]] && git checkout "$DOKKU_CHECKOUT"
|
||||
make install
|
||||
}
|
||||
|
||||
dokku_install_package() {
|
||||
install-dokku-from-package() {
|
||||
local DOKKU_CHECKOUT="$1"
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
|
||||
if [[ -n $DOKKU_DOCKERFILE ]]; then
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
fi
|
||||
|
||||
echo "--> Initial apt-get update"
|
||||
apt-get update -qq > /dev/null
|
||||
apt-get install -qq -y apt-transport-https
|
||||
apt-get -qq -y install apt-transport-https
|
||||
|
||||
echo "--> Installing docker"
|
||||
if uname -r | grep -q linode; then
|
||||
@@ -64,42 +109,28 @@ dokku_install_package() {
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | tee /etc/apt/sources.list.d/dokku.list
|
||||
apt-get update -qq > /dev/null
|
||||
|
||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $VHOST_ENABLE" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_WEB_CONFIG ]] && echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_KEY_FILE ]] && echo "dokku dokku/key_file string $DOKKU_KEY_FILE" | sudo debconf-set-selections
|
||||
|
||||
if [[ -n $DOKKU_CHECKOUT ]]; then
|
||||
apt-get install -y dokku=$DOKKU_CHECKOUT
|
||||
# shellcheck disable=SC2086
|
||||
apt-get -qq -y $NO_INSTALL_RECOMMENDS install "dokku=$DOKKU_CHECKOUT"
|
||||
else
|
||||
apt-get install -y dokku
|
||||
# shellcheck disable=SC2086
|
||||
apt-get -qq -y $NO_INSTALL_RECOMMENDS install dokku
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -n $DOKKU_BRANCH ]]; then
|
||||
export DOKKU_CHECKOUT="origin/$DOKKU_BRANCH"
|
||||
dokku_install_source
|
||||
elif [[ -n $DOKKU_TAG ]]; then
|
||||
export DOKKU_SEMVER="${DOKKU_TAG//v}"
|
||||
major=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[1]}')
|
||||
minor=$(echo $DOKKU_SEMVER | awk '{split($0,a,"."); print a[2]}')
|
||||
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" -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
|
||||
main() {
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/dokku/dokku.git"}
|
||||
|
||||
ensure-environment
|
||||
install-requirements
|
||||
install-dokku
|
||||
}
|
||||
|
||||
bootstrap
|
||||
main "$@"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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'
|
||||
- echo 'DOCKER_OPTS="-s btrfs -e lxc --userland-proxy=false"' | sudo tee -a /etc/default/docker
|
||||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci-cp-workaround'
|
||||
- sudo chmod 0755 /usr/bin/docker
|
||||
services:
|
||||
- docker
|
||||
@@ -10,8 +10,11 @@ dependencies:
|
||||
- "~/docker"
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
|
||||
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
- sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
post:
|
||||
- sudo -E make -e lint
|
||||
test:
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 1800 }
|
||||
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 3600 }
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.4.7'
|
||||
VERSION = 'v0.6.2'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
@@ -48,7 +48,7 @@ def check_boot():
|
||||
f.write("Description=Dokku web-installer\n")
|
||||
f.write("\n")
|
||||
f.write("[Service]\n")
|
||||
f.write("ExecStart=#{File.absolute_path(__FILE__)} selfdestruct\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")
|
||||
@@ -86,8 +86,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
'REQUEST_METHOD': 'POST',
|
||||
'CONTENT_TYPE': self.headers['Content-Type']})
|
||||
|
||||
vhost_enable = 'false'
|
||||
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
|
||||
if 'vhost' in params and params['vhost'].value == 'true':
|
||||
vhost_enable = 'true'
|
||||
with open('{0}/VHOST'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
else:
|
||||
@@ -95,6 +97,8 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
os.remove('{0}/VHOST'.format(dokku_root))
|
||||
except OSError:
|
||||
pass
|
||||
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
|
||||
command = ['sshcommand', 'acl-add', 'dokku', 'admin']
|
||||
for key in params['keys'].value.split("\n"):
|
||||
@@ -103,6 +107,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
set_debconf_selection('boolean', 'skip_key_file', 'true')
|
||||
set_debconf_selection('boolean', 'vhost_enable', vhost_enable)
|
||||
set_debconf_selection('boolean', 'web_config', 'false')
|
||||
set_debconf_selection('string', 'hostname', params['hostname'].value)
|
||||
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
@@ -111,6 +120,28 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
self.wfile.write(json.dumps({'status': 'ok'}))
|
||||
|
||||
|
||||
def set_debconf_selection(debconf_type, key, value):
|
||||
found = False
|
||||
with open('/etc/os-release', 'r') as f:
|
||||
for line in f:
|
||||
if 'debian' in line:
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
return
|
||||
|
||||
ps = subprocess.Popen(['echo', 'dokku dokku/{0} {1} {2}'.format(
|
||||
key, debconf_type, value
|
||||
)], stdout=subprocess.PIPE)
|
||||
|
||||
try:
|
||||
subprocess.check_output(['debconf-set-selections'], stdin=ps.stdout)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
ps.wait()
|
||||
|
||||
|
||||
class DeleteInstallerThread(object):
|
||||
def __init__(self, interval=1):
|
||||
thread = threading.Thread(target=self.run, args=())
|
||||
|
||||
@@ -41,6 +41,8 @@ if [[ -z $DOKKU_HOST ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
export DOKKU_PORT=${DOKKU_PORT:=22}
|
||||
|
||||
if [[ ! -z $DOKKU_HOST ]]; then
|
||||
_dokku() {
|
||||
appname=""
|
||||
@@ -52,76 +54,41 @@ if [[ ! -z $DOKKU_HOST ]]; then
|
||||
echo "This is not a git repository"
|
||||
fi
|
||||
|
||||
if [[ "$appname" != "" ]] && [[ -n "$*" ]]; then
|
||||
case "$1" in
|
||||
apps|backup*|help|plugins*|ps:restartall|trace|version)
|
||||
true
|
||||
;;
|
||||
apps:destroy)
|
||||
if [[ -z "$2" ]] || [[ "$2" == "force" ]]; then
|
||||
donotshift="YES"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
donotshift="YES"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ "$1" = "apps:create" ]] && [[ -z "$2" ]]; then
|
||||
appname=$(random_name)
|
||||
counter=0
|
||||
while ssh "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do
|
||||
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
|
||||
else
|
||||
case "$1" in
|
||||
apps:create)
|
||||
if [[ -z "$2" ]]; then
|
||||
appname=$(random_name)
|
||||
counter=$((counter+1))
|
||||
counter=0
|
||||
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do
|
||||
if [[ $counter -ge 100 ]]; then
|
||||
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
|
||||
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps
|
||||
exit 1
|
||||
else
|
||||
appname=$(random_name)
|
||||
counter=$((counter+1))
|
||||
fi
|
||||
done
|
||||
else
|
||||
appname="$2"
|
||||
fi
|
||||
done
|
||||
if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then
|
||||
echo "-----> Dokku remote added at $DOKKU_HOST"
|
||||
echo "-----> Application name is $appname"
|
||||
else
|
||||
echo "! Dokku remote not added! Do you already have a dokku remote?"
|
||||
return
|
||||
fi
|
||||
git push dokku master
|
||||
return $?
|
||||
fi
|
||||
|
||||
if [[ -z "$donotshift" ]]; then
|
||||
# shellcheck disable=SC2029
|
||||
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ -z "$verb" ]]; then
|
||||
if [[ ! "$1" =~ --* ]]; then
|
||||
verb=$1
|
||||
shift
|
||||
|
||||
if [[ "$1" == "$appname" ]]; then
|
||||
shift
|
||||
if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then
|
||||
echo "-----> Dokku remote added at $DOKKU_HOST"
|
||||
echo "-----> Application name is $appname"
|
||||
else
|
||||
echo "! Dokku remote not added! Do you already have a dokku remote?"
|
||||
return
|
||||
fi
|
||||
;;
|
||||
apps:destroy)
|
||||
git remote remove dokku
|
||||
;;
|
||||
esac
|
||||
|
||||
args="$*"
|
||||
else
|
||||
long_args="--"
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" =~ --* ]]; then
|
||||
long_args+=" $arg"
|
||||
args=("${args[@]/$arg}")
|
||||
else
|
||||
verb="$arg"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
# shellcheck disable=SC2086,SC2029
|
||||
ssh -o LogLevel=QUIET -t "dokku@$DOKKU_HOST" $long_args "$verb" "$appname" "${args[@]}"
|
||||
[[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname"
|
||||
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@"
|
||||
# shellcheck disable=SC2068,SC2086
|
||||
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@
|
||||
}
|
||||
|
||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
||||
|
||||
212
deb.mk
@@ -1,6 +1,6 @@
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.3.5
|
||||
HEROKUISH_VERSION ?= 0.3.13
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -8,135 +8,207 @@ DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
PLUGN_DESCRIPTION = 'Hook system that lets users extend your application with plugins'
|
||||
define PLUGN_DESCRIPTION
|
||||
Hook system that lets users extend your application with plugins
|
||||
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 and has the proper language requirements installed
|
||||
endef
|
||||
PLUGN_REPO_NAME ?= dokku/plugn
|
||||
PLUGN_VERSION ?= 0.2.0
|
||||
PLUGN_VERSION ?= 0.2.1
|
||||
PLUGN_ARCHITECTURE = amd64
|
||||
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb
|
||||
PLUGN_URL = https://github.com/dokku/plugn/releases/download/v$(PLUGN_VERSION)/plugn_$(PLUGN_VERSION)_linux_x86_64.tgz
|
||||
|
||||
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
|
||||
define SSHCOMMAND_DESCRIPTION
|
||||
Turn SSH into a thin client specifically for your app
|
||||
Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.1.0
|
||||
SSHCOMMAND_VERSION ?= 0.4.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
|
||||
GOROOT = /usr/lib/go
|
||||
GOBIN = /usr/bin/go
|
||||
GOPATH = /home/vagrant/gocode
|
||||
define SIGIL_DESCRIPTION
|
||||
Standalone string interpolator and template processor
|
||||
Sigil is a command line tool for template processing
|
||||
and POSIX-compliant variable expansion. It was created
|
||||
for configuration templating, but can be used for any
|
||||
text processing.
|
||||
endef
|
||||
SIGIL_REPO_NAME ?= gliderlabs/sigil
|
||||
SIGIL_VERSION ?= 0.4.0
|
||||
SIGIL_ARCHITECTURE = amd64
|
||||
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
|
||||
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
endif
|
||||
|
||||
export PLUGN_DESCRIPTION
|
||||
export SIGIL_DESCRIPTION
|
||||
export SSHCOMMAND_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil
|
||||
|
||||
install-from-deb:
|
||||
echo "--> Initial apt-get update"
|
||||
@echo "--> Initial apt-get update"
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install -qq -y apt-transport-https
|
||||
|
||||
echo "--> Installing docker"
|
||||
@echo "--> Installing docker"
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
echo "--> Installing dokku"
|
||||
@echo "--> Installing dokku"
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install dokku
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
|
||||
mv /tmp/*.deb .
|
||||
echo "Done"
|
||||
@echo "Done"
|
||||
|
||||
deb-setup:
|
||||
echo "-> Updating deb repository and installing build requirements"
|
||||
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
|
||||
@echo "-> Updating deb repository and installing build requirements"
|
||||
@sudo apt-get update -qq > /dev/null
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git build-essential wget ruby-dev ruby1.9.1 lintian > /dev/null 2>&1
|
||||
@command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
@ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||
|
||||
deb-herokuish: deb-setup
|
||||
deb-herokuish:
|
||||
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
echo "-> Creating deb files"
|
||||
echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
||||
echo "sleep 5" >> /tmp/tmp/post-install
|
||||
echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install
|
||||
echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install
|
||||
echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install
|
||||
echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
|
||||
echo "fi" >> /tmp/tmp/post-install
|
||||
echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
||||
echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
|
||||
@echo "-> Creating deb files"
|
||||
@echo "#!/usr/bin/env bash" >> /tmp/tmp/post-install
|
||||
@echo "sleep 5" >> /tmp/tmp/post-install
|
||||
@echo "count=\`sudo docker images | grep gliderlabs/herokuish | wc -l\`" >> /tmp/tmp/post-install
|
||||
@echo 'if [ "$$count" -ne 0 ]; then' >> /tmp/tmp/post-install
|
||||
@echo " echo 'Removing old herokuish image'" >> /tmp/tmp/post-install
|
||||
@echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
|
||||
@echo "fi" >> /tmp/tmp/post-install
|
||||
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
|
||||
@echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
|
||||
|
||||
echo "-> Cloning repository"
|
||||
@echo "-> Cloning repository"
|
||||
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"
|
||||
@echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/var/lib"
|
||||
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
|
||||
|
||||
echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine | 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' .
|
||||
@echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1)' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-dokku: deb-setup
|
||||
deb-dokku:
|
||||
rm -rf /tmp/tmp /tmp/build dokku_*_$(DOKKU_ARCHITECTURE).deb
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
|
||||
cp -r debian /tmp/build/DEBIAN
|
||||
mkdir -p /tmp/build/usr/local/bin
|
||||
mkdir -p /tmp/build/usr/bin
|
||||
mkdir -p /tmp/build/usr/share/doc/dokku
|
||||
mkdir -p /tmp/build/usr/share/dokku/contrib
|
||||
mkdir -p /tmp/build/usr/share/lintian/overrides
|
||||
mkdir -p /tmp/build/usr/share/man/man1
|
||||
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 dokku /tmp/build/usr/bin
|
||||
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
|
||||
find . -name ".DS_Store" -depth -exec rm {} \;
|
||||
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.py /tmp/build/usr/local/share/dokku/contrib
|
||||
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1
|
||||
gzip -9 /tmp/build/usr/share/man/man1/dokku.1
|
||||
cp contrib/dokku-installer.py /tmp/build/usr/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
|
||||
ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak
|
||||
endif
|
||||
rm /tmp/build/DEBIAN/lintian-overrides
|
||||
mv debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
|
||||
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
|
||||
sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control
|
||||
dpkg-deb --build /tmp/build "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
mv *.deb /tmp
|
||||
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
deb-plugn: deb-setup
|
||||
deb-plugn:
|
||||
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
echo "-> Cloning repository"
|
||||
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 "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz
|
||||
|
||||
echo "-> Copying files into place"
|
||||
mkdir -p /tmp/build/usr/local/bin $(GOPATH)
|
||||
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 "-> Copying files into place"
|
||||
cp /tmp/tmp/plugn /tmp/build/usr/bin/plugn && chmod +x /tmp/build/usr/bin/plugn
|
||||
|
||||
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' .
|
||||
@echo "-> Creating $(PLUGN_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n plugn \
|
||||
--version $(PLUGN_VERSION) \
|
||||
--architecture $(PLUGN_ARCHITECTURE) \
|
||||
--package $(PLUGN_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(PLUGN_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category utils \
|
||||
--description "$$PLUGN_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sshcommand: deb-setup
|
||||
deb-sshcommand:
|
||||
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
echo "-> Cloning repository"
|
||||
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 "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
||||
|
||||
echo "-> Copying files into place"
|
||||
@echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/usr/local/bin"
|
||||
cp /tmp/tmp/sshcommand/sshcommand /tmp/build/usr/local/bin/sshcommand
|
||||
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand
|
||||
chmod +x /tmp/build/usr/local/bin/sshcommand
|
||||
|
||||
echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand -v $(SSHCOMMAND_VERSION) -a $(SSHCOMMAND_ARCHITECTURE) -p $(SSHCOMMAND_PACKAGE_NAME) --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" --description $(SSHCOMMAND_DESCRIPTION) --license 'MIT License' .
|
||||
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \
|
||||
--version $(SSHCOMMAND_VERSION) \
|
||||
--architecture $(SSHCOMMAND_ARCHITECTURE) \
|
||||
--package $(SSHCOMMAND_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category admin \
|
||||
--description "$$SSHCOMMAND_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-sigil:
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
|
||||
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil
|
||||
|
||||
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
|
||||
--version $(SIGIL_VERSION) \
|
||||
--architecture $(SIGIL_ARCHITECTURE) \
|
||||
--package $(SIGIL_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SIGIL_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category utils \
|
||||
--description "$$SIGIL_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
mv *.deb /tmp
|
||||
|
||||
0
debian/conffiles
vendored
8
debian/config
vendored
@@ -1,6 +1,10 @@
|
||||
#!/bin/sh -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly ACTION="${1:-configure}"
|
||||
readonly VERSION="${2:-dev}"
|
||||
|
||||
11
debian/control
vendored
@@ -1,11 +1,12 @@
|
||||
Package: dokku
|
||||
Version: 0.4.7
|
||||
Version: 0.6.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
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
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
|
||||
Recommends: herokuish
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo
|
||||
Pre-Depends: nginx, dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: A docker-powered PaaS that helps you build and manage the lifecycle of applications
|
||||
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
that runs on a single server of your choice.
|
||||
|
||||
3
debian/lintian-overrides
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:87
|
||||
dokku: changelog-file-missing-in-native-package
|
||||
95
debian/postinst
vendored
@@ -1,9 +1,24 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
call-sshcommand() {
|
||||
if [[ -x /usr/local/bin/sshcommand ]]; then
|
||||
/usr/local/bin/sshcommand "$@"
|
||||
elif [[ -x /usr/bin/sshcommand ]]; then
|
||||
/usr/bin/sshcommand "$@"
|
||||
else
|
||||
echo "Unable to find sshcommand binary" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
@@ -13,48 +28,75 @@ case "$1" in
|
||||
mandb
|
||||
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
|
||||
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
|
||||
# setup plugin directories
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p /var/lib/dokku/core-plugins/available /var/lib/dokku/plugins/available
|
||||
mkdir -p /var/lib/dokku/core-plugins/enabled /var/lib/dokku/plugins/enabled
|
||||
touch /var/lib/dokku/core-plugins/config.toml /var/lib/dokku/plugins/config.toml
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/data
|
||||
|
||||
# migrate old plugins
|
||||
find /var/lib/dokku/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
|
||||
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f /var/lib/dokku/plugins/$plugin/.core ]; then
|
||||
rm -rf /var/lib/dokku/plugins/$plugin
|
||||
elif [ ! -d /var/lib/dokku/plugins/available/$plugin ]; then
|
||||
mv /var/lib/dokku/plugins/$plugin /var/lib/dokku/plugins/available;
|
||||
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 /var/lib/dokku/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ ! -d /var/lib/dokku/plugins/available/$plugin ]; then
|
||||
ln -s /var/lib/dokku/core-plugins/available/$plugin /var/lib/dokku/plugins/available/$plugin;
|
||||
PLUGIN_PATH=/var/lib/dokku/core-plugins plugn enable $plugin
|
||||
PLUGIN_PATH=/var/lib/dokku/plugins plugn enable $plugin
|
||||
echo "Enabling all core plugins"
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ ! -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 /var/lib/dokku/plugins /var/lib/dokku/core-plugins
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' > "${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
fi
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
|
||||
rm -f ${DOKKU_ROOT}/VERSION
|
||||
cp /var/lib/dokku/STABLE_VERSION ${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
|
||||
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2> /dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" > /dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -72,7 +114,7 @@ case "$1" in
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
sshcommand acl-add dokku default < "$RET"
|
||||
call-sshcommand acl-add dokku default < "$RET" || true
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -83,4 +125,5 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
db_stop
|
||||
exit 0
|
||||
|
||||
47
debian/postrm
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
main() {
|
||||
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
|
||||
service dokku-installer stop || true
|
||||
fi
|
||||
|
||||
rm -f /etc/init/dokku-installer.conf
|
||||
rm -f /etc/init/dokku-redeploy.conf
|
||||
rm -f /etc/systemd/system/dokku-installer.conf
|
||||
rm -f /etc/systemd/system/dokku-redeploy.service
|
||||
rm -f /etc/update-motd.d/99-dokku
|
||||
|
||||
(nginx -t && service nginx reload) || true
|
||||
|
||||
if [[ "$1" == "purge" ]]; then
|
||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||
rm -f ${DOKKU_ROOT}/.ssh/authorized_keys ${DOKKU_ROOT}/.sshcommand
|
||||
rm -f ${DOKKU_ROOT}/ENV ${DOKKU_ROOT}/HOSTNAME ${DOKKU_ROOT}/VERSION
|
||||
rm -rf ${DOKKU_ROOT}/.cache
|
||||
rm -rf ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
rm -f ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
if [[ -d ${DOKKU_LIB_ROOT} ]]; then
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
find ${DOKKU_LIB_ROOT} -type d -empty -delete
|
||||
fi
|
||||
|
||||
if [[ -d ${DOKKU_ROOT} ]]; then
|
||||
find -L ${DOKKU_ROOT} -type l -delete
|
||||
find ${DOKKU_ROOT} -type d -empty -delete
|
||||
fi
|
||||
|
||||
db_purge
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
18
debian/preinst
vendored
@@ -1,20 +1,17 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
INIT_CONF="/etc/init/dokku-installer.conf"
|
||||
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
|
||||
|
||||
rm -f $INIT_CONF
|
||||
touch $INIT_CONF
|
||||
echo 'start on runlevel [2345]' >> $INIT_CONF
|
||||
echo 'exec /usr/local/share/dokku/contrib/dokku-installer.py selfdestruct' >> $INIT_CONF
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
@@ -33,7 +30,8 @@ case "$1" in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/skip_key_file"
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ ! -f "$RET" ]; then
|
||||
echo "Error: keyfile '$RET' not found."
|
||||
|
||||
55
debian/prerm
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
ps_backtrace() {
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $0 PID" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -i pid=$1;
|
||||
ppid=0;
|
||||
header_modifier="";
|
||||
while : ; do
|
||||
if [ $ppid -ne 0 ]; then
|
||||
header_modifier=h;
|
||||
fi;
|
||||
ppid=$(ps -o ppid= $pid);
|
||||
ps uww $header_modifier -p $pid;
|
||||
if [ $pid -eq 1 ]; then
|
||||
break;
|
||||
fi;
|
||||
pid=$ppid;
|
||||
done;
|
||||
}
|
||||
|
||||
main() {
|
||||
# HACK: Ensure that we only delete data when purging dokku from the system
|
||||
if ps_backtrace $BASHPID 2> /dev/null | grep dpkg | grep -- "--purge" > /dev/null; then
|
||||
echo "Processing purge"
|
||||
|
||||
echo "Destroying deployed applications"
|
||||
for app in $(DOKKU_QUIET_OUTPUT=1 dokku apps); do
|
||||
dokku --force apps:destroy $app
|
||||
done
|
||||
|
||||
# HACK: Only disable core plugins, as we don't know what data users store in non-core plugin directories
|
||||
echo "Disabling 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
|
||||
rm ${DOKKU_LIB_ROOT}/plugins/available/$plugin;
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn disable $plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn disable $plugin
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Processing $1"
|
||||
fi
|
||||
|
||||
dokku cleanup
|
||||
}
|
||||
|
||||
main "$@"
|
||||
13
debian/templates
vendored
@@ -1,19 +1,24 @@
|
||||
Template: dokku/web_config
|
||||
Description: Use the web-based config page?
|
||||
Description: Enable the web-based config page?
|
||||
Type: boolean
|
||||
Default: true
|
||||
|
||||
Template: dokku/vhost_enable
|
||||
Description: Use vhost based deployments?
|
||||
Description: Enable vhost-based deployments?
|
||||
Type: boolean
|
||||
Default: false
|
||||
|
||||
Template: dokku/hostname
|
||||
Description: Machine's hostname or IP
|
||||
Description: Hostname or IP for server:
|
||||
Type: string
|
||||
Default: dokku.me
|
||||
|
||||
Template: dokku/skip_key_file
|
||||
Description: Skip key file requirement?
|
||||
Type: boolean
|
||||
Default: false
|
||||
|
||||
Template: dokku/key_file
|
||||
Description: Keyfile for initial user
|
||||
Description: Keyfile for initial user:
|
||||
Type: string
|
||||
Default: /root/.ssh/id_rsa.pub
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
|
||||
|
||||
```shell
|
||||
wget -qO- https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
|
||||
# using a branch results in installing from source
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
|
||||
sudo DOKKU_BRANCH=master bash bootstrap.sh
|
||||
```
|
||||
|
||||
## Development
|
||||
@@ -46,15 +48,11 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
|
||||
|
||||
Once dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
|
||||
|
||||
*You should also stop and disable the `dokku-installer` service to remove public access to adding SSH keys.*
|
||||
|
||||
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
|
||||
|
||||
You'll have to add a public key associated with a username by doing something like this from your local machine:
|
||||
|
||||
$ cat ~/.ssh/id_rsa.pub | ssh dokku.me "sudo sshcommand acl-add dokku $USER"
|
||||
|
||||
If you are using the vagrant installation, you can use the following command to add your public key to dokku:
|
||||
|
||||
$ cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
|
||||
Follow the [user management documentation](/dokku/deployment/user-management) in order to add users to dokku.
|
||||
|
||||
That's it!
|
||||
|
||||
|
||||
25
docs/appendices/0.5.0-migration-guide.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 0.5.0 Migration Guide
|
||||
|
||||
## nginx-vhosts
|
||||
|
||||
- The nginx-vhosts template language is now [sigil](https://github.com/gliderlabs/sigil)
|
||||
- No need to escape literal `$` characters (or other "bash-isms")
|
||||
- Template variables are represented as {{ .VARIABLE_NAME }}
|
||||
- A detailed list of template variables can be found [here](/dokku/nginx#available-template-variables)
|
||||
- A custom nginx-vhosts template must be named `nginx.conf.sigil`
|
||||
- The default path for this custom template is the root of your repo (i.e. `/app` in the container or `WORKDIR` if defined in a dockerfile app)
|
||||
- Dokku no longer looks for this file in `/home/dokku/myapp` on the dokku server
|
||||
- Check out an example template [here](/dokku/nginx/)
|
||||
- Support for server-wide SSL certs have been dropped in favor of using the `certs` plugin
|
||||
- `dokku certs:add myapp < certs.tar`
|
||||
- All domains for an SSL-enabled app will be redirected to https by default
|
||||
- This can be overridden with a custom template
|
||||
- Replaced "magic" `NO_VHOST` variable with `domains:enable/disable`
|
||||
- Simplified zero downtime control
|
||||
- `checks:enable/disable`
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/dockerfiles/#exposed-ports)
|
||||
- Note that nginx will proxy the same port numbers to listen publicly
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/proxy/) with `dokku proxy:disable myapp`
|
||||
26
docs/appendices/0.6.0-migration-guide.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# 0.6.0 Migration Guide
|
||||
|
||||
## zero-downtime deployment
|
||||
|
||||
- You can now **actually** disable zero-downtime deployments per-app and per-process-type
|
||||
- Some config variables have been moved around
|
||||
- `DOKKU_CHECKS_ENABLED` has been migrated to `DOKKU_CHECKS_SKIPPED`
|
||||
- `DOKKU_CHECKS_DISABLED` is now a thing
|
||||
- The values for the above can be a comma-separated list of process-types or the literal string `_all_`
|
||||
- See the [updated `checks`](/dokku/checks-examples/) docs for more info
|
||||
|
||||
## proxy port mapping
|
||||
|
||||
- You can now configure host -> container proxy port mappings
|
||||
- The UI is handled by the [proxy](/dokku/proxy/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
|
||||
## calling the dokku binary
|
||||
|
||||
- Plugins should *not* call the dokku binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call dokku internal functions. As a result, the following dokku commands are no longer publicly exposed:
|
||||
- dokku build
|
||||
- dokku receive
|
||||
- dokku release
|
||||
- dokku tar:build
|
||||
- dokku tar:build-locked
|
||||
- dokku git:build
|
||||
- dokku git:build-locked
|
||||
@@ -5,6 +5,7 @@
|
||||
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.
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
```
|
||||
|
||||
@@ -13,6 +14,7 @@ git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
Create the application on the Dokku host. You will need to ssh onto the host to run this command.
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
dokku apps:create ruby-rails-sample
|
||||
```
|
||||
|
||||
@@ -21,6 +23,7 @@ dokku apps:create ruby-rails-sample
|
||||
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
|
||||
# on your dokku host
|
||||
# install the postgres plugin
|
||||
# plugin installation requires root, hence the user change
|
||||
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
@@ -36,6 +39,7 @@ dokku postgres:create rails-database
|
||||
Once the service creation is complete, set the `POSTGRES_URL` environment variable by linking the service.
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# each official datastore offers a `link` method to link a service to any application
|
||||
dokku postgres:link rails-database ruby-rails-sample
|
||||
```
|
||||
@@ -47,6 +51,7 @@ dokku postgres:link rails-database ruby-rails-sample
|
||||
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
|
||||
# from your local machine
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
@@ -89,6 +94,7 @@ Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.
|
||||
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
|
||||
# on your dokku host
|
||||
# replace APP with the name of your application
|
||||
dokku apps:destroy APP
|
||||
```
|
||||
@@ -96,30 +102,24 @@ 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
|
||||
# on your dokku host
|
||||
# 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
|
||||
# on your dokku host
|
||||
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```
|
||||
@@ -131,6 +131,7 @@ You can also support pushing multiple branches using the [receive-branch](/dokku
|
||||
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:
|
||||
|
||||
``` shell
|
||||
# on your dokku host
|
||||
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
```
|
||||
|
||||
@@ -139,6 +140,7 @@ dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
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
|
||||
# on your dokku host
|
||||
su - dokku
|
||||
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
ssh -T git@github.com
|
||||
@@ -180,11 +182,13 @@ This is in particular useful, then you want to deploy to root domain, as
|
||||
|
||||
## Dokku/Docker Container Management Compatibility
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
### Specifying a custom buildpack
|
||||
As of 0.5.x, this function removes all containers with the label `dokku` where the status is either `dead` or `exited`, as well as all `dangling` images. Previous versions would remove `dead` or `exited` containers, regardless of their label.
|
||||
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
## Adding deploy users
|
||||
|
||||
See the [user management documentation](/dokku/deployment/user-management).
|
||||
|
||||
## Default vhost
|
||||
|
||||
@@ -194,10 +198,14 @@ See the [nginx documentation](/dokku/nginx/#default-site).
|
||||
|
||||
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
|
||||
|
||||
## Zero downtime deploy
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [zero-downtime deploy documentation](/dokku/checks-examples/).
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
|
||||
## Image tagging
|
||||
|
||||
See the [image tagging documentation](/dokku/deployment/images).
|
||||
|
||||
## Zero downtime deploy
|
||||
|
||||
See the [zero-downtime deploy documentation](/dokku/checks-examples/).
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.7\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
BIN
docs/assets/slack-logo.png
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
@@ -1,11 +1,11 @@
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
padding-bottom: 40px;
|
||||
color: #5a5a5a;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #5a5a5a;
|
||||
font-weight: 400;
|
||||
@@ -25,9 +25,7 @@ h1 {
|
||||
padding: 0 0 0 1em;
|
||||
}
|
||||
.header a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/dokku.png);
|
||||
color: #fff;
|
||||
text-indent: 40px;
|
||||
background-position: center left;
|
||||
display: block;
|
||||
width: 100%;
|
||||
@@ -37,23 +35,25 @@ h1 {
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
.blurb p {
|
||||
font-size: 17px;
|
||||
font-weight: 300;
|
||||
margin: 18px 0 18px;
|
||||
margin: 18px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.quickstart-code {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 1.3em;
|
||||
margin: 45px auto;
|
||||
max-width: 750px;
|
||||
@@ -62,7 +62,8 @@ h1 {
|
||||
.quickstart-code .title {
|
||||
background-color: #dfdfdf;
|
||||
background-image: linear-gradient(top, #f7f7f7 0%, #dfdfdf 7%, #ccc 100%);
|
||||
border-bottom: 1px solid #111;
|
||||
border-radius: 5px 5px 0 0;
|
||||
box-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
|
||||
color: #444;
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
@@ -70,18 +71,47 @@ h1 {
|
||||
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);
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.quickstart-code .tabs {
|
||||
background-color: #bcbcbc;
|
||||
border-top: 1px solid #686868;
|
||||
color: #444;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
font-weight: bold;
|
||||
margin: 0 20px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
.quickstart-code .tab {
|
||||
border-right: 1px solid #686868;
|
||||
cursor: pointer;
|
||||
flex: 1;
|
||||
-webkit-flex: 1;
|
||||
}
|
||||
.quickstart-code .tab-active {
|
||||
background-color: #ededed;
|
||||
border-radius: 0 0 5px 5px;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.quickstart-code .tab:last-of-type {
|
||||
border-right: none;
|
||||
}
|
||||
.quickstart-code .shell {
|
||||
background-color: #171717;
|
||||
border-radius: 0 0 5px 5px;
|
||||
border-top: 1px solid #bcbcbc;
|
||||
box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
|
||||
display: none;
|
||||
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 .shell-active {
|
||||
display: block;
|
||||
}
|
||||
.quickstart-code .line {
|
||||
display: block;
|
||||
@@ -91,19 +121,28 @@ h1 {
|
||||
.quickstart-code .line span {
|
||||
display: inline-block;
|
||||
}
|
||||
.quickstart-code .line .output {
|
||||
color: #aaa;
|
||||
}
|
||||
.quickstart-code .path {
|
||||
color: #2a8fbd;
|
||||
content: '~';
|
||||
user-select: none;
|
||||
}
|
||||
.quickstart-code .prompt {
|
||||
color: #ff9900;
|
||||
color: #f90;
|
||||
user-select: none;
|
||||
}
|
||||
.quickstart-code .command {
|
||||
color: #ffffcc;
|
||||
color: #ffc;
|
||||
}
|
||||
.quickstart-code .line .output {
|
||||
color: #aaaaaa;
|
||||
.alternate-instructions {
|
||||
display: block;
|
||||
line-height: 1.3em;
|
||||
margin: 45px auto;
|
||||
max-width: 750px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.marketing .col-lg-4 {
|
||||
margin-bottom: 20px;
|
||||
@@ -113,7 +152,6 @@ h1 {
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.featurette-divider {
|
||||
margin: 20px 0;
|
||||
}
|
||||
@@ -125,9 +163,54 @@ h1 {
|
||||
.featurette-heading .text-muted {
|
||||
font-weight: 300;
|
||||
}
|
||||
.featurette img {
|
||||
width: 400px;
|
||||
}
|
||||
.slack-channel {
|
||||
background-color: #EEF1F7;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
margin-bottom: 2.5em;
|
||||
padding: 2.5em 0;
|
||||
text-align: center
|
||||
}
|
||||
.slack-channel .inline-container {
|
||||
display: inline-block;
|
||||
margin-left: 0.5em
|
||||
}
|
||||
.slack-button {
|
||||
background-image: -webkit-linear-gradient(#FCFCFC, #EAEAEA);
|
||||
background-image: linear-gradient(#FCFCFC, #EAEAEA);
|
||||
border: 1px solid #ddd;
|
||||
padding: 0.25rem 0.5rem;
|
||||
}
|
||||
.slack-button img {
|
||||
height: 1em;
|
||||
}
|
||||
.team-members img {
|
||||
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
-webkit-border-radius: 3px;
|
||||
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
border-radius: 3px;
|
||||
border: 8px solid white;
|
||||
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
|
||||
display: block;
|
||||
height: 200px;
|
||||
margin: 20px auto 20px auto;
|
||||
}
|
||||
.team-members .fund-link {
|
||||
display: block;
|
||||
font-size: 80%;
|
||||
}
|
||||
.team-member {
|
||||
min-height: 320px;
|
||||
}
|
||||
.team-member-image img:last-child { display: none }
|
||||
.team-member-image:hover img:first-child { display: none; }
|
||||
.team-member-image:hover img:last-child { display: inline-block; }
|
||||
|
||||
.list-group-item {
|
||||
border: none;
|
||||
font-size: 13px;
|
||||
font-weight: normal;
|
||||
padding: .2rem .5rem;
|
||||
color: #157577;
|
||||
@@ -143,13 +226,21 @@ a.list-group-item {
|
||||
color: #bbb;
|
||||
cursor: default;
|
||||
font-weight: normal;
|
||||
font-size: 11px;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 2em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-of-contents {
|
||||
font-size: 0.8em;
|
||||
padding: 1em;
|
||||
margin: 0 0 0.5em 0.5em;
|
||||
}
|
||||
.table-of-contents ul {
|
||||
margin-bottom: 0;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.anchorjs-link {
|
||||
color: #24cbce;
|
||||
color: #24cbce;
|
||||
}
|
||||
.markdown-body {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@@ -173,7 +264,7 @@ a.list-group-item {
|
||||
font-size: 17px;
|
||||
font-weight: 700;
|
||||
color: #555;
|
||||
margin-top: 3em;
|
||||
margin-top: 2em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.markdown-body h3 {
|
||||
@@ -198,7 +289,7 @@ code {
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: #fff;
|
||||
background-color: rgba(0,0,0,0.06);
|
||||
background-color: rgba(0, 0, 0, 0.06);
|
||||
color: #333;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
@@ -223,9 +314,8 @@ pre {
|
||||
word-wrap: normal;
|
||||
border: 1px solid #cccccc;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
box-shadow: 0 0 0 3px #eee;
|
||||
overflow: auto !important;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
color: #4d4d4c;
|
||||
@@ -237,22 +327,217 @@ blockquote {
|
||||
padding: 15px 15px 1px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
blockquote.new-as-of {
|
||||
.new-as-of {
|
||||
border-left: 4px solid #d1f2a5;
|
||||
background-color: #effab4;
|
||||
}
|
||||
.not-yet-released {
|
||||
border-left: 4px solid #ef5b58;
|
||||
background-color: #f9ad76;
|
||||
}
|
||||
.fa:before {
|
||||
-webkit-font-smoothing: antialiased
|
||||
}
|
||||
.clearfix {
|
||||
*zoom: 1
|
||||
}
|
||||
.clearfix:before, .clearfix:after {
|
||||
display: table;
|
||||
content: ""
|
||||
}
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
a .fa {
|
||||
display: inline-block;
|
||||
text-decoration: inherit
|
||||
}
|
||||
li .fa {
|
||||
display: inline-block
|
||||
}
|
||||
li .fa-large:before, li .fa-large:before {
|
||||
width: 1.875em
|
||||
}
|
||||
ul.fas {
|
||||
list-style-type: none;
|
||||
margin-left: 2em;
|
||||
text-indent: -0.8em
|
||||
}
|
||||
ul.fas li .fa {
|
||||
width: 0.8em
|
||||
}
|
||||
ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
vertical-align: baseline
|
||||
}
|
||||
.rst-versions {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 300px;
|
||||
color: #fcfcfc;
|
||||
background: #15518d;
|
||||
border-top: solid 10px #343131;
|
||||
font-family: "Lato", "proxima-nova", "Helvetica Neue", Arial, sans-serif;
|
||||
z-index: 400
|
||||
}
|
||||
.rst-versions a {
|
||||
color: #7c8e98;
|
||||
text-decoration: none
|
||||
}
|
||||
.rst-versions .rst-badge-small {
|
||||
display: none
|
||||
}
|
||||
.rst-versions .rst-current-version {
|
||||
padding: 12px;
|
||||
background-color: #2475c3;
|
||||
display: block;
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
color: #d8edf8;
|
||||
*zoom: 1
|
||||
}
|
||||
.rst-versions .rst-current-version:before, .rst-versions .rst-current-version:after {
|
||||
display: table;
|
||||
content: ""
|
||||
}
|
||||
.rst-versions .rst-current-version:after {
|
||||
clear: both
|
||||
}
|
||||
.rst-versions .rst-current-version .fa {
|
||||
color: #fcfcfc
|
||||
}
|
||||
.rst-versions .rst-current-version .fa-book {
|
||||
float: left;
|
||||
line-height: 30px
|
||||
}
|
||||
.rst-versions .rst-current-version .icon-book {
|
||||
float: left
|
||||
}
|
||||
.rst-versions .rst-current-version.rst-out-of-date {
|
||||
background-color: #E74C3C;
|
||||
color: #fff
|
||||
}
|
||||
.rst-versions .rst-current-version.rst-active-old-version {
|
||||
background-color: #F1C40F;
|
||||
color: #000
|
||||
}
|
||||
.rst-versions.rst-badge {
|
||||
border: none;
|
||||
bottom: 20px;
|
||||
display: block;
|
||||
left: auto;
|
||||
max-width: 300px;
|
||||
right: 20px;
|
||||
width: auto;
|
||||
}
|
||||
.rst-versions.rst-badge .icon-book {
|
||||
float: none
|
||||
}
|
||||
.rst-versions.rst-badge .fa-book {
|
||||
float: none
|
||||
}
|
||||
.rst-versions.rst-badge.shift-up .rst-current-version {
|
||||
text-align: right
|
||||
}
|
||||
.rst-versions.rst-badge.shift-up .rst-current-version .fa-book {
|
||||
float: left
|
||||
}
|
||||
.rst-versions.rst-badge.shift-up .rst-current-version .icon-book {
|
||||
float: left
|
||||
}
|
||||
.rst-versions.rst-badge .rst-current-version {
|
||||
width: auto;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 6px;
|
||||
display: block;
|
||||
text-align: center
|
||||
}
|
||||
.rst-other-versions {
|
||||
display: none;
|
||||
padding: 12px;
|
||||
text-align: left;
|
||||
}
|
||||
.shift-up .rst-other-versions {
|
||||
display: block;
|
||||
}
|
||||
.rst-other-versions a {
|
||||
border: 0;
|
||||
}
|
||||
.rst-other-versions hr {
|
||||
display: block;
|
||||
border: 0;
|
||||
margin: 20px 0;
|
||||
padding: 0;
|
||||
border-top: solid 1px #d6edf9
|
||||
}
|
||||
.rst-other-versions dl {
|
||||
margin: 0;
|
||||
}
|
||||
.rst-other-versions dd {
|
||||
display: inline-block;
|
||||
margin: 0
|
||||
}
|
||||
.rst-other-versions dd a {
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
color: #fcfcfc
|
||||
}
|
||||
.dev-warning, .outdated-warning {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
padding: 8px 20px 8px;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.04) 75%, transparent 75%, transparent);
|
||||
background-image: -o-linear-gradient(-45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.04) 75%, transparent 75%, transparent);
|
||||
background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.04) 75%, transparent 75%, transparent);
|
||||
background-image: -ms-linear-gradient(-45deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.04) 75%, transparent 75%, transparent);
|
||||
background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.04) 50%, rgba(0, 0, 0, 0.04) 75%, transparent 75%, transparent);
|
||||
font-family: "Roboto", Corbel, Avenir, "Lucida Grande", "Lucida Sans", sans-serif;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
background-color: #ffe761;
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.rst-versions {
|
||||
width: 85%;
|
||||
display: none
|
||||
}
|
||||
.rst-versions.shift {
|
||||
display: block
|
||||
}
|
||||
img {
|
||||
width: 100%;
|
||||
height: auto
|
||||
}
|
||||
}
|
||||
@media (min-width: 768px) {
|
||||
.quickstart-code {
|
||||
.col-md-offset-right-2 {
|
||||
margin-right: 20.666667%;
|
||||
}
|
||||
.quickstart-code shell {
|
||||
font-size: 14px;
|
||||
}
|
||||
.quickstart-code {
|
||||
line-height: 22px;
|
||||
}
|
||||
.featurette-heading {
|
||||
font-size: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.featurette img {
|
||||
width: 300px;
|
||||
}
|
||||
.featurette-heading {
|
||||
margin-top: 120px;
|
||||
margin-top: 30px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.featurette img {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
docs/assets/team/flink-hidden.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
docs/assets/team/flink.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
docs/assets/team/josegonzalez-hidden.jpg
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
docs/assets/team/josegonzalez.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/michaelshobbs-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/michaelshobbs.jpg
Normal file
|
After Width: | Height: | Size: 38 KiB |
BIN
docs/assets/team/morrisjobke-hidden.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
docs/assets/team/morrisjobke.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
docs/assets/team/progrium-hidden.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
docs/assets/team/progrium.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/assets/team/u2mejc-hidden.jpg
Normal file
|
After Width: | Height: | Size: 61 KiB |
BIN
docs/assets/team/u2mejc.jpg
Normal file
|
After Width: | Height: | Size: 6.6 KiB |
8
docs/assets/versions.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"max-versions": [
|
||||
"0.3.26",
|
||||
"0.4.14",
|
||||
"0.5.8",
|
||||
"0.6.2"
|
||||
]
|
||||
}
|
||||
45
docs/backup-recovery.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# Backup and Recovery
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the dokku remote in you local app's repo.
|
||||
|
||||
```
|
||||
$ git remote rm dokku
|
||||
$ git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
$ git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
Some plugins, like the official [dokku-postgres] plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
For [dokku-postgres], use:
|
||||
```
|
||||
dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb] limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
```
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote dokku server (assuming you still have the ssh key).
|
||||
|
||||
```
|
||||
mkdir [app-name] ; cd !$
|
||||
git init && git remote add dokku dokku@[dokku.me:app-name]
|
||||
git pull dokku/master && git checkout dokku/master
|
||||
```
|
||||
|
||||
[dokku-postgres]: <https://github.com/dokku/dokku-postgres>
|
||||
[300mb]: <https://devcenter.heroku.com/articles/slug-compiler#slug-size>
|
||||
@@ -1,60 +1,82 @@
|
||||
# Zero Downtime Deploys
|
||||
|
||||
> New as of 0.3.0
|
||||
> New as of 0.5.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:
|
||||
```
|
||||
checks <app> Show zero-downtime status
|
||||
checks:disable <app> [process-type(s)] Disable zero-downtime deployment for all processes (or comma-separated process-type list) ***WARNING: this will cause downtime during deployments***
|
||||
checks:enable <app> [process-type(s)] Enable zero-downtime deployment for all processes (or comma-separated process-type list)
|
||||
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
```
|
||||
|
||||
Following a deploy, dokku will wait `10` seconds before routing traffic to the new container to give your application time to boot up. If the application is not running after this time, then the deploy is failed and your old container will continue serving traffic. You can modify this value globally or on a per-application basis:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
dokku config:set <app> 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:
|
||||
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_WAIT=15
|
||||
dokku checks:skip <app> worker,web
|
||||
```
|
||||
|
||||
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 checks:disable <app> worker,web
|
||||
```
|
||||
> Note that `checks:disable` will now (as of 0.6.0) cause downtime for that process-type during deployments.
|
||||
|
||||
Additionally, any given process can only be configured to skip OR disable zero-downtime. example:
|
||||
|
||||
```shell
|
||||
$ dokku checks:skip testapp worker,web
|
||||
-----> Skipping zero downtime for app's (testapp) proctypes (worker,web)
|
||||
-----> Unsetting testapp
|
||||
-----> Unsetting DOKKU_CHECKS_DISABLED
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_SKIPPED: worker,web
|
||||
$ dokku checks:disable testapp worker
|
||||
-----> Disabling zero downtime for app's (testapp) proctypes (worker)
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_DISABLED: worker
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_SKIPPED: web
|
||||
```
|
||||
|
||||
Dokku will wait `60` seconds before stopping the old container so that existing connections are given a chance to complete. You can modify this value globally or on a per-application basis:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_WAIT_TO_RETIRE=120
|
||||
dokku config:set <app> 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:
|
||||
## Checks
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_ATTEMPTS=2
|
||||
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.
|
||||
|
||||
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, dokku will fallback to the aforementioned process uptime check.
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
|
||||
|
||||
* Check instructions
|
||||
* Settings (NAME=VALUE)
|
||||
* Comments (lines starting with #)
|
||||
* Empty lines
|
||||
|
||||
> For dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
|
||||
### Check Instructions
|
||||
|
||||
The format of a check instruction is a path or relative URL, optionally followed by the expected content:
|
||||
|
||||
```
|
||||
/about Our Amazing Team
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
The format of a check instruction is a path, optionally followed by the
|
||||
expected content. For example:
|
||||
The `CHECKS` file can contain multiple checks:
|
||||
|
||||
```
|
||||
/ My Amazing App
|
||||
@@ -63,50 +85,65 @@ expected content. For example:
|
||||
/images/logo.png
|
||||
```
|
||||
|
||||
To check an application that supports multiple hostnames, use relative URLs
|
||||
that include the hostname, for example:
|
||||
To check an application that supports multiple hostnames, use relative URLs that include the hostname:
|
||||
|
||||
```
|
||||
//admin.example.com Admin Dashboard
|
||||
//admin.example.com Admin Dashboard
|
||||
//static.example.com/logo.png
|
||||
```
|
||||
|
||||
You can also specify the protocol to explicitly check HTTPS requests.
|
||||
|
||||
You can also specify the protocol to explicitly check HTTPS requests:
|
||||
|
||||
```
|
||||
https://admin.example.com Admin Dashboard
|
||||
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.
|
||||
### Check Settings
|
||||
|
||||
By default, checks will be attempted 5 times. (Retried 4 times)
|
||||
The default behavior is to wait for `5` seconds before running the checks, to timeout the checks after `30` seconds, and to attempt the checks `5` times. If the checks fail `5` times, the deployment is considered failed and the old container will continue serving traffic.
|
||||
|
||||
You can change these by setting `WAIT`, `TIMEOUT` and `ATTEMPTS` to different values, for
|
||||
example:
|
||||
You can change the default behavior by setting `WAIT`, `TIMEOUT`, and `ATTEMPTS` to different values in the `CHECKS` file:
|
||||
|
||||
```
|
||||
WAIT=30 # Wait 1/2 minute
|
||||
TIMEOUT=60 # Timeout after a minute
|
||||
ATTEMPTS=10 # attempt checks 10 times
|
||||
ATTEMPTS=10 # Attempt checks 10 times
|
||||
|
||||
/ My Amazing App
|
||||
/ My Amazing App
|
||||
```
|
||||
|
||||
You can also override the default `WAIT`, `TIMEOUT`, and `ATTEMPTS` variables for the global dokku installation:
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_CHECKS_WAIT=30
|
||||
dokku config:set --global DOKKU_CHECKS_TIMEOUT=60
|
||||
dokku config:set --global DOKKU_CHECKS_ATTEMPTS=10
|
||||
```
|
||||
|
||||
If your application runs multiple processes (a background worker configured in your `Procfile`, for example) and you have checks to ensure that your web application has booted up, you may want to disable the default check wait time for that application to avoid the `10` second wait per non-web process:
|
||||
|
||||
```shell
|
||||
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=0
|
||||
```
|
||||
|
||||
## 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.
|
||||
In this example, a Rails application 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. `WAIT` is set to `10` because our application takes a while to boot up. `ATTEMPTS` is set to `6`, but the third attempt succeeds.
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
WAIT=5
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/check.txt simple_check
|
||||
/check.txt simple_check
|
||||
````
|
||||
|
||||
> check.txt is a text file returning the string 'simple_check'
|
||||
For this check to work, we've added a line to `config/routes.rb` that simply returns a string:
|
||||
|
||||
````
|
||||
get '/check.txt', to: proc {[200, {}, ['simple_check']]}
|
||||
````
|
||||
|
||||
### Deploy Output
|
||||
|
||||
@@ -129,19 +166,19 @@ git push dokku master
|
||||
-----> Releasing myapp...
|
||||
-----> Deploying myapp...
|
||||
-----> Running pre-flight checks
|
||||
-----> Attempt 1/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 1/6 Waiting for 10 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 1/6 failed.
|
||||
-----> Attempt 2/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 2/6 Waiting for 10 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.
|
||||
-----> Attempt 3/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 3/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/check.txt => "simple_check"
|
||||
-----> All checks successful!
|
||||
@@ -165,14 +202,15 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
````
|
||||
|
||||
## 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.
|
||||
|
||||
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
|
||||
|
||||
````
|
||||
WAIT=5
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/
|
||||
````
|
||||
@@ -200,37 +238,37 @@ Procfile declares types -> web
|
||||
Releasing myapp...
|
||||
Deploying myapp...
|
||||
Running pre-flight checks
|
||||
-----> Attempt 1/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 1/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
curl: (7) Failed to connect to 172.17.0.188 port 5000: Connection refused
|
||||
! Check attempt 1/6 failed.
|
||||
-----> Attempt 2/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 2/6 Waiting for 10 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.
|
||||
-----> Attempt 3/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 3/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 3/6 failed.
|
||||
-----> Attempt 4/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 4/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 4/6 failed.
|
||||
-----> Attempt 5/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 5/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
curl: (22) The requested URL returned error: 500 Internal Server Error
|
||||
! Check attempt 5/6 failed.
|
||||
-----> Attempt 6/6 Waiting for 5 seconds ...
|
||||
-----> Attempt 6/6 Waiting for 10 seconds ...
|
||||
CHECKS expected result:
|
||||
http://localhost/ => ""
|
||||
!
|
||||
@@ -259,8 +297,15 @@ Could not start due to 1 failed checks.
|
||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
|
||||
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection
|
||||
=====> end myapp container output
|
||||
/usr/local/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
|
||||
/usr/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
|
||||
To dokku@dokku.example.com:myapp
|
||||
! [remote rejected] dokku -> master (pre-receive hook declined)
|
||||
error: failed to push some refs to 'dokku@dokku.example.com:myapp'
|
||||
````
|
||||
|
||||
### Configuring docker stop timeout
|
||||
|
||||
[By default](https://docs.docker.com/engine/reference/commandline/stop/), docker will wait 10 seconds from the time the `stop` command is passed to a container before it attempts to kill said container. This timeout can be configured on a per-app basis in dokku by setting the `DOKKU_DOCKER_STOP_TIMEOUT` configuration variable. This timeout applies to normal zero-downtime deployments as well as the `ps:stop` and `apps:destroy` commands.
|
||||
```
|
||||
$ dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
|
||||
```
|
||||
|
||||
@@ -13,6 +13,10 @@ To install, simply clone the dokku repository down and add the `dokku` alias poi
|
||||
```shell
|
||||
git clone git@github.com:dokku/dokku.git ~/.dokku
|
||||
|
||||
# optional: make sure that the dokku_client.sh version matches your dokku version
|
||||
cd ~/.dokku
|
||||
git checkout <tag/branch>
|
||||
|
||||
# add the following to either your
|
||||
# .bashrc, .bash_profile, or .profile file
|
||||
alias dokku='$HOME/.dokku/contrib/dokku_client.sh'
|
||||
@@ -33,6 +37,8 @@ alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
|
||||
|
||||
Configure the `DOKKU_HOST` environment variable or run `dokku` from a repository with a git remote named dokku pointed at your dokku host in order to use the script as normal.
|
||||
|
||||
You can also configure a `DOKKU_PORT` environment variable if you are running ssh on a non-standard port. This defaults to `22`.
|
||||
|
||||
## (nodejs) dokku-toolbelt
|
||||
|
||||
Dokku-toolbelt is a node-based cli wrapper that proxies requests to the dokku command running on remote hosts. You can install it via the following shell command (assuming you have nodejs and npm installed):
|
||||
|
||||
@@ -11,7 +11,7 @@ config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config
|
||||
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.
|
||||
The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
|
||||
> 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.
|
||||
|
||||
@@ -30,7 +30,7 @@ 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
|
||||
dokku config:set --no-restart node-js-app ENV=prod
|
||||
```
|
||||
|
||||
If you wish to have the variables output in an `eval`-compatible form, you can use the `--export` flag:
|
||||
|
||||
@@ -16,6 +16,9 @@ To use a specific buildpack, you can run the following dokku command:
|
||||
# replace APP with the name of your application
|
||||
# replace REPOSITORY_URL with your buildpack's url
|
||||
dokku config:set APP BUILDPACK_URL=REPOSITORY_URL
|
||||
|
||||
# example: using a specific ruby buildpack version
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v142
|
||||
```
|
||||
|
||||
Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
@@ -25,10 +28,12 @@ Please check the documentation for your particular buildpack as you may need to
|
||||
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
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git#v87
|
||||
https://github.com/heroku/heroku-buildpack-ruby.git#v142
|
||||
```
|
||||
|
||||
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
||||
|
||||
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.
|
||||
@@ -51,6 +56,31 @@ You may also wish to use a **specific** version of a buildpack, which is also si
|
||||
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
## Specifying commands via Procfile
|
||||
|
||||
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
|
||||
|
||||
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
|
||||
|
||||
The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
|
||||
|
||||
If the file exists, it should not be empty, as doing so may result in a failed deploy.
|
||||
|
||||
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
|
||||
|
||||
```
|
||||
<process type>: <command>
|
||||
```
|
||||
|
||||
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
|
||||
|
||||
```
|
||||
worker: env QUEUE=* bundle exec rake resque:work
|
||||
importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
```
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
|
||||
|
||||
## 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:
|
||||
@@ -60,7 +90,7 @@ Building containers with buildpacks currently results in a persistent `cache` di
|
||||
sudo rm -rf /home/dokku/APP/cache/*
|
||||
```
|
||||
|
||||
### Curl Build Timeouts
|
||||
## 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.
|
||||
|
||||
|
||||
57
docs/deployment/deployment-tasks.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Deployment Tasks
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
Sometimes you need to run a command on at deployment time, but before an app is completely deployed.
|
||||
Common use cases include:
|
||||
|
||||
* Checking a database is initialised
|
||||
* Running database migrations
|
||||
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
||||
|
||||
## `app.json` and `scripts.dokku`
|
||||
|
||||
Dokku accomplishes this by using an `app.json` file. We (mostly) use the same format as Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
|
||||
However, dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
|
||||
Simply place an `app.json` file in the root of your repository or for dockerfile apps, `ADD` it to /app.
|
||||
>NOTE: postdeploy changes are *NOT* committed to the app image.
|
||||
|
||||
### Example app.json
|
||||
|
||||
```
|
||||
{
|
||||
"name": "barebones nodejs",
|
||||
"description": "A barebones Node.js app using Express 4.",
|
||||
"keywords": [
|
||||
"nodejs",
|
||||
"express"
|
||||
],
|
||||
"repository": "https://github.com/michaelshobbs/node-js-sample",
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"predeploy": "touch /app/predeploy.test",
|
||||
"postdeploy": "curl https://some.external.api.service.com/deployment?state=success"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"SECRET_TOKEN": {
|
||||
"description": "A secret key for verifying the integrity of signed cookies.",
|
||||
"value": "secret"
|
||||
},
|
||||
"WEB_CONCURRENCY": {
|
||||
"description": "The number of processes to run.",
|
||||
"generator": "echo 5"
|
||||
}
|
||||
},
|
||||
"image": "gliderlabs/herokuish",
|
||||
"addons": [
|
||||
"dokku-postgres",
|
||||
"dokku-redis"
|
||||
],
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-nodejs"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
While Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use docker's native `Dockerfile` system to define a container.
|
||||
|
||||
> Dockerfile support is considered a **Power User** feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by Buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
|
||||
|
||||
To use a 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.
|
||||
@@ -11,16 +13,15 @@ To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of
|
||||
|
||||
## 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:
|
||||
> Changed as of 0.5.0
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
dokku config:set APP DOKKU_DOCKERFILE_PORT=8000
|
||||
```
|
||||
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
|
||||
|
||||
Dokku will not expose other ports on your application without a [custom docker-option](/dokku/docker-options/).
|
||||
> NOTE: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
|
||||
|
||||
If you do not have a port explicitly exposed, Dokku will automatically expose port `5000` for your application.
|
||||
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
|
||||
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you'd like to investigate alternative proxy methods, please refer to our [proxy documentation](/dokku/proxy/).
|
||||
|
||||
## Customizing the run command
|
||||
|
||||
@@ -39,3 +40,35 @@ 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`.
|
||||
|
||||
### Procfiles and Multiple Processes
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
You can also customize the run command using a `Procfile`, much like you would on Heroku or
|
||||
with a buildpack deployed app. The `Procfile` should contain one or more lines defining [process
|
||||
types and associated commands](https://devcenter.heroku.com/articles/procfile#declaring-process-types).
|
||||
When you deploy your app a Docker image will be built, the `Procfile` will be extracted from the image
|
||||
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
||||
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
||||
|
||||
```
|
||||
web: bin/run-prod.sh
|
||||
worker: bin/run-worker.sh
|
||||
```
|
||||
|
||||
And `Dockerfile`:
|
||||
|
||||
```
|
||||
FROM debian:jessie
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
CMD ["bin/run-dev.sh"]
|
||||
```
|
||||
|
||||
When you deploy this app the `web` process will automatically be scaled to 1 and your Docker container
|
||||
will be started basically using the command `docker run bin/run-prod.sh`. If you want to also run
|
||||
a worker container for this app, you can run `dokku ps:scale worker=1` and a new container will be
|
||||
started by running `docker run bin/run-worker.sh` (the actual `docker run` commands are a bit more
|
||||
complex, but this is the basic idea). If you use an `ENTRYPOINT` in your `Dockerfile`, the lines
|
||||
in your `Procfile` will be passed as arguments to the `ENTRYPOINT` script instead of being executed.
|
||||
|
||||
98
docs/deployment/domain-configuration.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Domain Configuration
|
||||
|
||||
> New as of 0.3.10
|
||||
|
||||
```shell
|
||||
domains:add <app> DOMAIN Add a domain to app
|
||||
domains [<app>] List domains
|
||||
domains:clear <app> Clear all domains for app
|
||||
domains:disable <app> Disable VHOST support
|
||||
domains:enable <app> Enable VHOST support
|
||||
domains:remove <app> DOMAIN Remove a domain from app
|
||||
domains:set-global <domain> Set global domain name
|
||||
```
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
Applications typically have the following structure for their hostname:
|
||||
|
||||
```
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
|
||||
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
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
|
||||
|
||||
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts with the domains plugin.
|
||||
|
||||
```shell
|
||||
dokku domains:disable myapp
|
||||
```
|
||||
|
||||
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.)
|
||||
|
||||
|
||||
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
|
||||
|
||||
```shell
|
||||
# where `myapp` is the name of your app
|
||||
|
||||
# add a domain to an app
|
||||
dokku domains:add myapp example.com
|
||||
|
||||
# list custom domains for app
|
||||
dokku domains myapp
|
||||
|
||||
# clear all custom domains for app
|
||||
dokku domains:clear myapp
|
||||
|
||||
# remove a custom domain from app
|
||||
dokku domains:remove myapp example.com
|
||||
```
|
||||
|
||||
## Default site
|
||||
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This 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 {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
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.
|
||||
@@ -55,3 +55,70 @@ root@dokku:~# dokku tags:deploy node-js-app v0.9.0
|
||||
http://node-js-app.dokku.me
|
||||
|
||||
```
|
||||
|
||||
## Deploying from a Docker Registry
|
||||
|
||||
You can alternatively add image pulled from a docker Registry and deploy app from it by using tagging feature. In this example, we are deploying from Docker Hub.
|
||||
|
||||
1. Create dokku app as usual
|
||||
|
||||
```shell
|
||||
dokku apps:create test-app
|
||||
```
|
||||
|
||||
2. Pull image from Docker Hub
|
||||
|
||||
```shell
|
||||
docker pull demo-repo/some-image:v12
|
||||
```
|
||||
|
||||
3. Retag the image to match the created app
|
||||
|
||||
```shell
|
||||
docker tag demo-repo/some-image:v12 dokku/test-app:v12
|
||||
```
|
||||
|
||||
4. Deploy tag
|
||||
|
||||
```shell
|
||||
dokku tags:deploy test-app v12
|
||||
```
|
||||
|
||||
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
|
||||
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
|
||||
|
||||
## Deploying an image from CI
|
||||
|
||||
To ensure your builds are always reproducible, it's considered bad practice to store build
|
||||
artifacts in your repository. For some projects however, building artifacts during deployment
|
||||
to dokku may affect the performance of running applications.
|
||||
|
||||
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
|
||||
it directly to the host running dokku.
|
||||
|
||||
1. Build image on CI (or locally)
|
||||
|
||||
```shell
|
||||
docker build -t dokku/test-app:v12
|
||||
# Note: The image must be tagged `dokku/<app-name>:<version>`
|
||||
```
|
||||
|
||||
2. Deploy image to dokku host
|
||||
|
||||
```shell
|
||||
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
|
||||
```
|
||||
|
||||
> Note: You can also use a Docker Registry to push and pull
|
||||
> the image rather than uploading it directly.
|
||||
|
||||
Here's a more complete example using the above method:
|
||||
|
||||
```shell
|
||||
# build the image
|
||||
docker build -t dokku/test-app:v12
|
||||
# copy the image to the dokku host
|
||||
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
|
||||
# tag and deploy the image
|
||||
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12 && dokku tags:create test-app latest"
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# One-off Processes
|
||||
# One-off Processes and Cron
|
||||
|
||||
Sometimes you need to either inspect running containers or run a one-off command under an application. In those cases, Dokku makes it easy to either connect to a running container or run a fresh container.
|
||||
|
||||
@@ -15,6 +15,17 @@ The `run` command can be used to run a one-off process for a specific command. T
|
||||
dokku run node-js-app ls -lah
|
||||
```
|
||||
|
||||
The `run` command can also be used to run a command defined in your Procfile:
|
||||
|
||||
```
|
||||
console: bundle exec racksh
|
||||
```
|
||||
|
||||
```shell
|
||||
# runs `bundle exec racksh` in the `/app` directory of the application `my-app`
|
||||
dokku run my-app console
|
||||
```
|
||||
|
||||
If you want to remove the container after a command has started, you can run the following command:
|
||||
|
||||
```shell
|
||||
@@ -32,6 +43,15 @@ dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Finally, you may wish to run a container in "detached" mode via the `--detach` dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as dokku will *not* automatically terminate the container.
|
||||
|
||||
```shell
|
||||
dokku --detach run node-js-app ls -lah
|
||||
# returns the ID of the new container
|
||||
```
|
||||
|
||||
> Note that you may not use the `--rm-container` or `--rm` flags when running containers in detached mode, and attempting to do so will result in the `--detach` flag being ignored.
|
||||
|
||||
### Using `run` for cron tasks
|
||||
|
||||
You can always use a one-off container to run an application task:
|
||||
@@ -59,6 +79,8 @@ dokku enter node-js-app web.1
|
||||
dokku enter node-js-app --container-id ID
|
||||
```
|
||||
|
||||
Additionally, you can run `enter` with no container-type. If only a single container-type is defined in your app, you will be dropped into the only running container. This behavior is not supported when specifying a custom command; as described below.
|
||||
|
||||
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
|
||||
|
||||
```shell
|
||||
@@ -74,7 +96,7 @@ dokku enter node-js-app web python script/background-worker.py
|
||||
Your procfile can have the following entry:
|
||||
|
||||
```
|
||||
cron: while true; do sleep 10; done
|
||||
cron: sleep infinity
|
||||
```
|
||||
|
||||
With the `cron` process scaled to `1`:
|
||||
@@ -97,6 +119,8 @@ For tasks that will properly resume, you **should** use the above method, as run
|
||||
|
||||
Regularly scheduled tasks can be a bit of a pain with dokku. The following are general recommendations to follow to help ensure successful task runs.
|
||||
|
||||
- Use the dokku user's crontab
|
||||
- If you do not, dokku will attempt to execute with sudo dokku, and your cron run with fail with `sudo: no tty present and no askpass program specified`
|
||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
||||
- Add a `SHELL` environment variable to specify bash when running commands.
|
||||
|
||||
@@ -35,6 +35,12 @@ dokku certs:add <app> < cert-key.tar
|
||||
cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
|
||||
```
|
||||
|
||||
#### SSL and Multiple Domains
|
||||
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/dokku/deployment/domain-configuration/).
|
||||
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/dokku/nginx/).
|
||||
|
||||
### Certificate generation
|
||||
|
||||
> Note: Using this method will create a self-signed certificate, which is only recommended for development or staging use, not production environments.
|
||||
@@ -64,34 +70,6 @@ root@dokku:~/dokku# dokku certs:info node-js-app
|
||||
|
||||
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
|
||||
|
||||
@@ -101,14 +79,40 @@ Beware that if you enable the header and a subsequent deploy of your application
|
||||
|
||||
## 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:
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/nginx/#customizing-the-nginx-configuration)
|
||||
|
||||
```shell
|
||||
dokku config:set myapp DOKKU_SSL_TERMINATED=1
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
# set a custom header for requests
|
||||
add_header X-Served-By www-ec2-01;
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Port $http_x_forwarded_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
Only use this option if:
|
||||
|
||||
48
docs/deployment/user-management.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# User Management
|
||||
|
||||
While it is possible to use password-based authorization to push to Dokku, it is preferable to use key-based authentication for security.
|
||||
|
||||
Users in dokku are managed via the `~/dokku/.ssh/authorized_keys` file. While you *can* manually edit this file, it is **highly** recommended that you follow the below steps to manage users on a dokku server.
|
||||
|
||||
## SSHCommand
|
||||
|
||||
Dokku uses the [`sshcommand`](https://github.com/dokku/sshcommand) utility to manage ssh keys for the dokku user. The following is the usage output for sshcommand.
|
||||
|
||||
```
|
||||
sshcommand create <user> <command> # creates a user forced to run command when SSH connects
|
||||
sshcommand acl-add <user> <ssh-key-name> # adds named SSH key to user from STDIN
|
||||
sshcommand acl-remove <user> <ssh-key-name> # removes SSH key by name
|
||||
sshcommand help # displays the usage help message
|
||||
```
|
||||
|
||||
In dokku's case, the `<user>` section is *always* `dokku`, as this is the system user that the dokku binary performs all it's actions. Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization.
|
||||
|
||||
## Adding deploy users
|
||||
|
||||
You can add your public key to the dokku user's `~/dokku/.ssh/authorized_keys` file with the following command:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# replace dokku.me with your domain name or the host's IP
|
||||
# replace root with your server's root user
|
||||
# USER is the username you use to refer to this particular key
|
||||
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me "sudo sshcommand acl-add dokku USER"
|
||||
```
|
||||
|
||||
At it's base, the `sshcommand` *must* be run under a user with sudo access, as it sets keys for the dokku user.
|
||||
|
||||
For instance, if you stored your public key at `~/.ssh/id_rsa.pub-open` and are deploying to EC2 where the default root-enabled user is `ubuntu`, you can run the following command to add your key under the `superuser` username:
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub-open | ssh ubuntu@dokku.me "sudo sshcommand acl-add dokku superuser"
|
||||
```
|
||||
|
||||
If you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to dokku (it will use your host username as the `USER`):
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
|
||||
```
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
See the [user auth plugin trigger documentation](/dokku/development/plugin-triggers/#user-auth).
|
||||
@@ -3,38 +3,102 @@
|
||||
If you create your own plugin:
|
||||
|
||||
1. Take a look at the plugins shipped with dokku and hack away!
|
||||
2. Check out the [list of triggers](http://dokku.viewdocs.io/dokku/development/plugin-triggers) your plugin can implement.
|
||||
2. Check out the [list of triggers](/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://dokku.viewdocs.io/dokku/plugins) and add a link to it.
|
||||
4. Edit [this page](/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
|
||||
|
||||
The below plugin is a dummy `dokku hello` plugin. If your plugin exposes commands, this is a good template for your `commands` file:
|
||||
### Sample plugin
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
|
||||
hello/subcommands/default
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_main_cmd() {
|
||||
declare desc="prints Hello \$APP"
|
||||
local cmd="hello"
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
local argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
[[ ! -z $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
set -- $cmd $@
|
||||
##
|
||||
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
local APP="$2";
|
||||
|
||||
echo "Hello $APP"
|
||||
}
|
||||
|
||||
hello_main_cmd "$@"
|
||||
```
|
||||
|
||||
hello/subcommands/world
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_world_cmd() {
|
||||
declare desc="prints Hello World"
|
||||
local cmd="hello:world"
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
local argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
[[ ! -z $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
set -- $cmd $@
|
||||
##
|
||||
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
verify_app_name "$2"
|
||||
local APP="$2";
|
||||
|
||||
echo "Hello world"
|
||||
}
|
||||
|
||||
hello_world_cmd "$@"
|
||||
```
|
||||
|
||||
hello/commands
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
hello)
|
||||
[[ -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"
|
||||
;;
|
||||
|
||||
hello:world)
|
||||
echo "Hello world"
|
||||
;;
|
||||
|
||||
help)
|
||||
cat<<EOF
|
||||
help | hello:help)
|
||||
help_content_func () {
|
||||
declare desc="return help_content string"
|
||||
cat<<help_content
|
||||
hello <app>, Says "Hello <app>"
|
||||
hello:world, Says "Hello world"
|
||||
EOF
|
||||
help_content
|
||||
}
|
||||
|
||||
if [[ $1 = "hello:help" ]] ; then
|
||||
echo -e 'Usage: dokku hello[:world] [<app>]'
|
||||
echo ''
|
||||
echo 'Say Hello World.'
|
||||
echo ''
|
||||
echo 'Example:'
|
||||
echo ''
|
||||
echo '$ dokku hello:world'
|
||||
echo 'Hello world'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
help_content_func | sort | column -c2 -t -s,
|
||||
else
|
||||
help_content_func
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -89,4 +153,6 @@ A few notes:
|
||||
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.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/dokku/development/plugin-triggers) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
- As of 0.6.0, we advise you to *not* call the dokku binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call dokku internal functions
|
||||
|
||||
@@ -4,10 +4,10 @@ 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:
|
||||
|
||||
- Update all blockquote references of `not yet released and only available in master` to point to release version.
|
||||
- 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.
|
||||
@@ -17,12 +17,13 @@ To propose a release, the following tasks need to be performed:
|
||||
- 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.
|
||||
- The versioned links should be updated or added to the `docs/assets/versions.json` 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`
|
||||
- The packages should be uploaded to packagecloud.io
|
||||
- All changes are pushed to master and the tag should be turned into a release which will contain the changelog.
|
||||
- ArchLinux package description *must* be updated via `vagrant up build-arch` (needs to be done after the tag is pushed to GitHub, because it is based on that)
|
||||
|
||||
## Versioning
|
||||
|
||||
@@ -56,6 +57,24 @@ If new versions of other packages were created, these should also be pushed at t
|
||||
|
||||
> If you are a maintainer and need the PACKAGECLOUD_TOKEN in order to make a release, please contact @josegonzalez to get this information.
|
||||
|
||||
## ArchLinux Packages
|
||||
|
||||
ArchLinux packages are not really build, because all that is needed for an Arch User Repo (AUR) package is the description of how to build the package. To make this process as easy as possible there is a vagrant box called `build-arch` that updates the version of this build description (a file called `PKGBUILD`), then runs some helper scripts to fill all additional information and does test if the package could be build. Then only those changes need to be pushed to the AUR repo and an updated version of the package is ready for usage for our ArchLinux users. For detailed information see the section below.
|
||||
|
||||
The workflow looks like this:
|
||||
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.6.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
git push aur master
|
||||
```
|
||||
|
||||
> If you are a maintainer and need access to the AUR repositories in order to make a release, please contact @morrisjobke or @josegonzalez to get this co-maintainership.
|
||||
|
||||
## Changelog format
|
||||
|
||||
The `HISTORY.md` should be added to based on the changes made since the previous release. This can be done by reviewing all merged pull requests to the master branch on github. The format is as follows:
|
||||
@@ -77,3 +96,28 @@ Some description concerning major changes in this release, or potential incompat
|
||||
|
||||
- #SOME_ID: @pull-request-creator Description
|
||||
```
|
||||
|
||||
## Detailed information for ArchLinux packages
|
||||
|
||||
All of the information to build the ArchLinux package is in the AUR git repository (see [dokku AUR page](https://aur.archlinux.org/packages/dokku/)). The release of a AUR package only consists of pushing the package information into the AUR git repo. Then users could use that information to build the package on their machines.
|
||||
|
||||
To update the package clone the repository and adjust the files in the repository. Then a helper script - `updpkgsums` - to update the SHA sum could be called (check against the original SHA sum). Another helper script - `mksrcinfo` - needs to be called to update the meta information of the package in a file called `.SRCINFO`. The next step builds the package locally for verification - `makepkg`. As last step commit your changes and push the commit.
|
||||
|
||||
* dependencies are defined in the `depends` attribute in `PKGBUILD`
|
||||
* build steps during package build time are defined in the `package()` method in `PKGBUILD`
|
||||
* steps that should be executed during install/update/remove time are defined in the file `dokku.install`
|
||||
* detailed information about all attributes in `PKGBUILD` could be found in the [ArchLinux wiki](https://wiki.archlinux.org/index.php/PKGBUILD)
|
||||
* detailed information about the AUR workflow could be found in the [AUR article](https://wiki.archlinux.org/index.php/Arch_User_Repository) in the ArchLinux wiki
|
||||
|
||||
That is the usual workflow:
|
||||
|
||||
```shell
|
||||
updpkgsums # update sha sums - compare them with the original ones
|
||||
mksrcinfo # update package metadata for AUR
|
||||
makepkg # test package builds
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
git push
|
||||
```
|
||||
|
||||
> If there is something unclear simply ask @morrisjobke for help.
|
||||
|
||||
@@ -14,7 +14,7 @@ Example apps can be found here:
|
||||
|
||||
### Executing tests locally
|
||||
|
||||
- Setup dokku in a [vagrant vm](http://dokku.viewdocs.io/dokku/getting-started/install/vagrant)
|
||||
- Setup dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
|
||||
- Test setup and execution
|
||||
|
||||
```shell
|
||||
@@ -22,15 +22,15 @@ Example apps can be found here:
|
||||
$ sudo su -
|
||||
$ cd ~/dokku
|
||||
$ make ci-dependencies setup-deploy-tests
|
||||
$ make test # run the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$ make test # execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$
|
||||
$ make lint # linter
|
||||
$ make unit-tests # bats tests
|
||||
$ make deploy-tests # app deployment tests
|
||||
$ make lint copyfiles # run linter & update vagrant dokku install from local git clone
|
||||
$ make unit-tests # execute all bats tests
|
||||
$ make deploy-tests # execute all app deployment tests
|
||||
```
|
||||
- Additionally you may run a specific app deployment tests with a target similar to:
|
||||
|
||||
```shell
|
||||
make deploy-test-nodejs-express
|
||||
$ make deploy-test-nodejs-express
|
||||
```
|
||||
- For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
|
||||
|
||||
23
docs/dns.md
@@ -2,27 +2,30 @@
|
||||
|
||||
> 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/dokku/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
|
||||
|
||||
## Caching
|
||||
|
||||
### HELP!
|
||||
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.
|
||||
|
||||
## HELP!
|
||||
|
||||
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
|
||||
## Getting started
|
||||
|
||||
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
|
||||
|
||||
@@ -30,17 +33,11 @@ Dokku uses DNS to differentiate between apps on your dokku-powered server. If y
|
||||
|
||||
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.
|
||||
|
||||
## 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?
|
||||
|
||||
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 (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`.
|
||||
|
||||
@@ -75,7 +72,7 @@ If they all return your IP address, you have set DNS up properly for dokku. You
|
||||
|
||||
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)
|
||||
#### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
This section is a work in progress. It is incomplete.
|
||||
|
||||
|
||||
@@ -2,15 +2,20 @@
|
||||
|
||||
> New as of 0.3.17
|
||||
|
||||
Pass [options](http://docs.docker.io/en/latest/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
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 <app> [phase(s)] Display app's Docker options for all phases (or 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)
|
||||
```
|
||||
|
||||
> When specifying multiple phases, they **must** be comma-separated _without_ spaces in between each phase, like so:
|
||||
>
|
||||
> ```
|
||||
> dokku docker-options:add myapp deploy,run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
> ```
|
||||
|
||||
## About Dokku phases
|
||||
|
||||
Dokku deploys your application in multiple "phases" and the `docker-options` plugin allows you to pass arguments to their underlying docker container:
|
||||
|
||||
@@ -44,7 +44,6 @@ Jul 3 16:30:02 dokku.me dokku[131384]: INVOKED: docker-args-run( rubyapp )
|
||||
You can list all events that are currently being recorded via `dokku events:list`:
|
||||
```
|
||||
=====> Events currently logged
|
||||
backup-check
|
||||
docker-args-build
|
||||
pre-delete
|
||||
post-deploy
|
||||
@@ -56,8 +55,6 @@ post-build-buildpack
|
||||
post-domains-update
|
||||
post-release-dockerfile
|
||||
check-deploy
|
||||
backup-import
|
||||
backup-export
|
||||
git-pre-pull
|
||||
git-post-pull
|
||||
nginx-hostname
|
||||
|
||||
55
docs/dokku-storage.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Dokku Core Storage Plugin
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
The preferred method to mount external containers to a dokku managed container, is to use the dokku storage plugin.
|
||||
|
||||
|
||||
```shell
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Ideology and Background
|
||||
|
||||
The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container.
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside the container:
|
||||
```
|
||||
$ dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
```
|
||||
Dokku will then mount the shared contents of`/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
## Use Cases
|
||||
|
||||
### Persistent storage
|
||||
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
|
||||
### Shared storage between containers
|
||||
|
||||
When scaling your app, you may require a common location to access shared assets between containers, a storage mount can be used in this situation.
|
||||
|
||||
### Shared storage across environments
|
||||
|
||||
Your app may be used in a cluster that requires containers or resources not running on the same host access your data. Mounting a shared file service (like S3FS or EFS) inside your container will give you great flexibility.
|
||||
|
||||
### Backing up
|
||||
|
||||
Your app may have services that are running in memory and need to be backed up locally (like a key store). Mount a non ephemeral storage mount will allow backups that are not lost when the app is shut down.
|
||||
|
||||
### Build phase
|
||||
|
||||
By default, dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
|
||||
```
|
||||
$ dokku docker-options:add <app> "-v /tmp/python-test:/opt/test"
|
||||
```
|
||||
|
||||
NOTE: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase.
|
||||
|
||||
## Docker-Options Note
|
||||
|
||||
The storage plugins is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase.
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
- 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**.
|
||||
- Go to the [dokku on azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/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.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ In case you want to perform an unattended installation of dokku, this is made po
|
||||
You can set any of the below options through the `debconf-set-selections` command, for example to enable vhost-based deployments:
|
||||
|
||||
```bash
|
||||
sudo echo "dokku dokku/vhost_enable boolean true" | debconf-set-selections
|
||||
echo "dokku dokku/vhost_enable boolean true" | sudo debconf-set-selections
|
||||
```
|
||||
|
||||
After setting the desired options, proceed with the installation as described above.
|
||||
@@ -37,4 +37,5 @@ After setting the desired options, proceed with the installation as described ab
|
||||
| dokku/web_config | boolean | true | Use web-based config for below options |
|
||||
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. <app>.dokku.me) |
|
||||
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
|
||||
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: This setting this to true, will require you to manually add an SSH key later on. |
|
||||
| dokku/key_file | string | /root/.ssh/id_rsa.pub | SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
|
||||
|
||||
@@ -36,4 +36,4 @@ __Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
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.
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/installation) and `bootstrap.sh` will take care of everything else.
|
||||
|
||||
@@ -8,12 +8,6 @@
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
```
|
||||
|
||||
- Setup SSH hosts in your `/etc/hosts`
|
||||
|
||||
```
|
||||
10.0.0.2 dokku.me
|
||||
```
|
||||
|
||||
- Create VM
|
||||
```
|
||||
# Optional ENV arguments:
|
||||
@@ -35,6 +29,7 @@
|
||||
|
||||
- Copy your SSH key via `cat ~/.ssh/id_rsa.pub | pbcopy` and paste it into the dokku-installer at http://dokku.me . Change the `Hostname` field on the Dokku Setup screen to your domain and then check the box that says `Use virtualhost naming`. Then click *Finish Setup* to install your key. You'll be directed to application deployment instructions from here.
|
||||
|
||||
Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (ie yourapp.dokku.me). If you change the `DOKKU_IP` in your vagrant setup you'll need to update your `/etc/hosts` file to point your reconfigured ip address.
|
||||
|
||||
You are now ready to deploy an app or install plugins.
|
||||
|
||||
For a different, complete, example see https://github.com/RyanBalfanz/dokku-vagrant-example.
|
||||
|
||||
@@ -4,19 +4,16 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
## The Official Dokku Website
|
||||
|
||||
[http://dokku.viewdocs.io/dokku](http://dokku.viewdocs.io/dokku)
|
||||
[http://dokku.viewdocs.io/dokku](/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.
|
||||
|
||||
## The IRC Channel
|
||||
## The IRC and Slack Channels
|
||||
|
||||
IRC Channel on irc.freenode.net:
|
||||
- [irc.freenode.net/#dokku](https://webchat.freenode.net/?channels=dokku)
|
||||
- [Gliderlabs Slack](https://glider-slackin.herokuapp.com/)
|
||||
|
||||
- #dokku – General Discussion
|
||||
|
||||
If you’re stumped, give us a holler in the Dokku IRC channel. Someone from the development team is usually there, especially during the daylight hours for North and South America users. We’d love to hear from you, whether you need some help, want to find users in your area, or would like to donate your brand new sports car.
|
||||
|
||||
If [here](http://webchat.freenode.net/?channels=dokku) for a web-based client IRC client.
|
||||
If you’re stumped, give us a holler in the Dokku IRC or Slack channels. Someone from the development team is usually there, especially during the daylight hours for North and South America users. We’d love to hear from you, whether you need some help, want to find users in your area, or would like to donate your brand new sports car.
|
||||
|
||||
## Stack Overflow
|
||||
|
||||
|
||||
314
docs/home.html
@@ -10,72 +10,72 @@
|
||||
<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.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/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}
|
||||
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(./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: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}
|
||||
.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 href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="container">
|
||||
<h1 class="heading">Dokku</h1>
|
||||
<div class="row">
|
||||
<div>
|
||||
<h1 class="heading navbar-brand">
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/{{NAME}}/installation/">Docs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://webchat.freenode.net/?channels=dokku">IRC</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blurb">
|
||||
<div class="container">
|
||||
<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="/dokku/installation">View Documentation</a>
|
||||
<div class="row">
|
||||
<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="/dokku/installation/">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,25 +83,109 @@
|
||||
<div class="container marketing">
|
||||
<div class="quickstart-code">
|
||||
<p class="title">Quick-start Instructions</p>
|
||||
<div class="shell">
|
||||
<div class="tabs">
|
||||
<div data-tab="curl" class="tab tab-curl tab-active">curl | bash</div>
|
||||
<div data-tab="apt" class="tab tab-apt">apt</div>
|
||||
<div data-tab="arch" class="tab tab-arch">arch</div>
|
||||
</div>
|
||||
<div class="shell shell-curl shell-active">
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.7/bootstrap.sh</span>
|
||||
<span class="output"> # for debian systems, installs dokku via apt-get</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.7 bash bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="shell shell-apt">
|
||||
<p class="line">
|
||||
<span class="output"> # install docker</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget -nv -O - https://get.docker.com/ | sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # setup dokku apt repository</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">export SOURCE="https://packagecloud.io/dokku/dokku/ubuntu/"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "deb $SOURCE trusty main" | tee /etc/apt/sources.list.d/dokku.list</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">apt-get update</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # install dokku</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">apt-get install dokku</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">dokku plugin:install-dependencies --core <span class="output"># run with root!</span></span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="shell shell-arch">
|
||||
<p class="line">
|
||||
<span class="output"> # install dokku via yaourt</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">yaourt -S dokku</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
<div class="alternate-instructions">
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid slack-channel">
|
||||
Have a question? Join us in our public slack channel!
|
||||
|
||||
<div class="inline-container">
|
||||
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/">
|
||||
<img src="./assets/slack-logo.png" alt="Slack Logo">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container marketing">
|
||||
<!-- START THE FEATURETTES -->
|
||||
|
||||
<div class="row featurette">
|
||||
@@ -137,15 +221,121 @@
|
||||
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="./assets/extend.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
<div class="container-fluid slack-channel team-members">
|
||||
<h3>Meet the core team</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/progrium-hidden.jpg" alt="Jeff Lindsay">
|
||||
<img src="./assets/team/progrium.jpg" alt="Jeff Lindsay">
|
||||
</div>
|
||||
Jeff Lindsay
|
||||
<a class="fund-link" href="https://www.patreon.com/progrium">Sponsor people they sponsor</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/josegonzalez-hidden.jpg" alt="Morris Jobke">
|
||||
<img src="./assets/team/josegonzalez.jpg" alt="Morris Jobke">
|
||||
</div>
|
||||
Jose Diaz-Gonzalez
|
||||
<a class="fund-link" href="http://www.amazon.com/registry/wishlist/36RYHSXCFYDTG/">Buy him something nice</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/u2mejc-hidden.jpg" alt="Justin Clark">
|
||||
<img src="./assets/team/u2mejc.jpg" alt="Justin Clark">
|
||||
</div>
|
||||
Justin Clark
|
||||
<a class="fund-link" href="http://smile.amazon.com/registry/wishlist/3SCPXMNI2EIYV">Feed his dog greenie treats!</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/flink-hidden.jpg" alt="Loïc Guitaut">
|
||||
<img src="./assets/team/flink.jpg" alt="Loïc Guitaut">
|
||||
</div>
|
||||
Loïc Guitaut
|
||||
<a class="fund-link" href="https://www.amazon.com/gp/registry/wishlist/23NWY5AVAGGGO/">Build out his star wars collection</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/michaelshobbs-hidden.jpg" alt="Michael Hobbs">
|
||||
<img src="./assets/team/michaelshobbs.jpg" alt="Michael Hobbs">
|
||||
</div>
|
||||
Michael Hobbs
|
||||
<a class="fund-link" href="https://gratipay.com/~michaelshobbs/">Fund on gratipay</a>
|
||||
</div>
|
||||
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-0 col-sm-4 col-xs-offset-3 col-xs-6">
|
||||
<div class="team-member-image">
|
||||
<img src="./assets/team/morrisjobke-hidden.jpg" alt="Morris Jobke">
|
||||
<img src="./assets/team/morrisjobke.jpg" alt="Morris Jobke">
|
||||
</div>
|
||||
Morris Jobke
|
||||
<a class="fund-link" href="">Get him an ebook</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p class="pull-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2013 Dokku</p>
|
||||
<p>© 2013-2016 Dokku</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
var addClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.add(className);
|
||||
} else {
|
||||
el.className += ' ' + className;
|
||||
}
|
||||
},
|
||||
addListener = function (elem, type, fn) {
|
||||
if (elem.addEventListener) {
|
||||
elem.addEventListener(type, fn, false);
|
||||
} else if (elem.attachEvent) {
|
||||
elem.attachEvent("on" + type, function() {
|
||||
return fn.call(elem, window.event);
|
||||
});
|
||||
} else {
|
||||
elem["on" + type] = fn;
|
||||
}
|
||||
},
|
||||
hasClass = function(el, className) {
|
||||
if (el.classList) {
|
||||
return el.classList.contains(className);
|
||||
} else {
|
||||
return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);
|
||||
}
|
||||
},
|
||||
removeClass = function(el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.remove(className);
|
||||
} else {
|
||||
el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');;
|
||||
}
|
||||
},
|
||||
activateTab = function(tab) {
|
||||
removeClass(document.querySelectorAll('.shell-active')[0], 'shell-active');
|
||||
removeClass(document.querySelectorAll('.tab-active')[0], 'tab-active');
|
||||
addClass(document.querySelectorAll('.shell-' + tab)[0], 'shell-active');
|
||||
addClass(document.querySelectorAll('.tab-' + tab)[0], 'tab-active');
|
||||
window.location.hash = '#install-' + tab;
|
||||
};
|
||||
|
||||
var hash = window.location.hash.replace('#install-', '');
|
||||
if (['curl', 'apt', 'arch'].indexOf(hash) !== -1) {
|
||||
activateTab(hash);
|
||||
}
|
||||
|
||||
Array.prototype.forEach.call(document.querySelectorAll('.tab'), function (el, i) {
|
||||
addListener(el, 'click', function(e) {
|
||||
activateTab(this.getAttribute('data-tab'));
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<div class="blurb">
|
||||
<div class="container">
|
||||
<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="/dokku/installation">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container marketing">
|
||||
<div class="quickstart-code">
|
||||
<p class="title">Quick-start Instructions</p>
|
||||
<div class="shell">
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.7/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.7 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<!-- START THE FEATURETTES -->
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
|
||||
<p class="lead">Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive center-block" alt="Docker Logo" src="assets/docker.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7 col-md-push-5">
|
||||
<h2 class="featurette-heading">Easy Git Deploys. <span class="text-muted">From your command-line to the cloud.</span></h2>
|
||||
<p class="lead">Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.</p>
|
||||
</div>
|
||||
<div class="col-md-5 col-md-pull-7">
|
||||
<img class="featurette-image img-responsive center-block" alt="Git Logo" src="assets/git.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
|
||||
<div class="row featurette">
|
||||
<div class="col-md-7">
|
||||
<h2 class="featurette-heading">Extensible Platform. <span class="text-muted">Customize your PaaS.</span></h2>
|
||||
<p class="lead">Write dokku plugins in any language. Share them online with others, and extend those already available. Dokku's simple core is easy to hack and add the features you need to get your job done.</p>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="assets/extend.png">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="featurette-divider">
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Dokku is an extensible, open source Platform as a Service that runs on a single server of your choice.
|
||||
|
||||
To start using Dokku, you'll need a system with that meets the following minimum requirements:
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- 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>
|
||||
@@ -15,35 +15,42 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
|
||||
|
||||
### Installing the latest stable version
|
||||
|
||||
#### 1. Install dokku
|
||||
|
||||
To install the latest stable version of dokku, you can run the following shell commands:
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.7 bash bootstrap.sh
|
||||
# for debian systems, installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
|
||||
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure dokku via the web admin.
|
||||
|
||||
*If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your dokku installation will remain vulnerable to anyone finding the setup page and inserting their key.*
|
||||
|
||||
#### 3. Deploy your first application
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the dokku installation.
|
||||
|
||||
### Installing via other methods
|
||||
|
||||
For various reasons, certain hosting providers may have other steps that should be preferred to the above. If hosted on any of the following popular hosts, please follow the linked to instructions:
|
||||
|
||||
- [Digital Ocean Installation Notes](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/)
|
||||
- [Digital Ocean Installation Notes](/dokku/getting-started/install/digitalocean)
|
||||
- [Linode Installation Notes](/dokku/getting-started/install/linode/)
|
||||
- [Microsoft Azure Installation Notes](/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://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)
|
||||
- [Debian Package Installation Notes](/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](/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>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||
|
||||
308
docs/nginx.md
@@ -3,70 +3,186 @@
|
||||
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
|
||||
|
||||
```
|
||||
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)
|
||||
nginx:access-logs <app> [-t] Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t] Show the nginx error logs for an application (-t follows)
|
||||
```
|
||||
|
||||
## Customizing the nginx configuration
|
||||
|
||||
> New as of 0.3.10.
|
||||
> New as of 0.5.0
|
||||
|
||||
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:
|
||||
Dokku uses a templating library by the name of [sigil](https://github.com/gliderlabs/sigil) to generate nginx configuration for each app. If you'd like to provide a custom template for your application, there are a couple 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)
|
||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||
- check it into the root of your app repo
|
||||
- `ADD` it to your dockerfile `WORKDIR`
|
||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
||||
|
||||
> If placed on the dokku server, the template file **must** be owned by user and group `dokku:dokku`.
|
||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||
|
||||
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:
|
||||
### Example Custom Template
|
||||
|
||||
Use case: add an `X-Served-By` header to requests
|
||||
```
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name $NOSSL_SERVER_NAME;
|
||||
access_log /var/log/nginx/${APP}-access.log;
|
||||
error_log /var/log/nginx/${APP}-error.log;
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
# set a custom header for requests
|
||||
add_header X-Served-By www-ec2-01;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
location / {
|
||||
proxy_pass http://$APP;
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade \$http_upgrade;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host \$http_host;
|
||||
proxy_set_header X-Forwarded-Proto \$scheme;
|
||||
proxy_set_header X-Forwarded-For \$remote_addr;
|
||||
proxy_set_header X-Forwarded-Port \$server_port;
|
||||
proxy_set_header X-Request-Start \$msec;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
The above is a sample http configuration that adds an `X-Served-By` header to requests.
|
||||
### Available template variables
|
||||
```
|
||||
{{ .APP }} Application name
|
||||
{{ .APP_SSL_PATH }} Path to SSL certificate and key
|
||||
{{ .DOKKU_ROOT }} Global dokku root directory (ex: app dir would be `{{ .DOKKU_ROOT }}/{{ .APP }}`)
|
||||
{{ .DOKKU_APP_LISTENERS }} List of IP:PORT pairs of app containers
|
||||
{{ .NGINX_PORT }} Non-SSL nginx listener port (same as `DOKKU_NGINX_PORT` config var)
|
||||
{{ .NGINX_SSL_PORT }} SSL nginx listener port (same as `DOKKU_NGINX_SSL_PORT` config var)
|
||||
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
|
||||
{{ .PROXY_PORT_MAP }} List of port mappings (same as `DOKKU_PROXY_PORT_MAP` config var)
|
||||
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from `DOKKU_PROXY_PORT_MAP` config var)
|
||||
{{ .RAW_TCP_PORTS }} List of exposed tcp ports as defined by Dockerfile `EXPOSE` directive (**Dockerfile apps only**)
|
||||
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
|
||||
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
|
||||
```
|
||||
|
||||
A few tips for custom nginx templates:
|
||||
> NOTE: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
|
||||
|
||||
- Special characters - dollar signs, spaces inside of quotes, etc. - should be escaped with a single backslash or can cause deploy failures.
|
||||
- Templated files will be validated via `nginx -t`.
|
||||
- Application environment variables can be used within your nginx configuration.
|
||||
|
||||
After your changes a `dokku deploy myapp` will regenerate the `/home/dokku/myapp/nginx.conf` file which is then used.
|
||||
### Example HTTP to HTTPS Custom Template
|
||||
Use case: a simple dockerfile app that includes `EXPOSE 80`
|
||||
```
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
server_name {{ .NOSSL_SERVER_NAME }};
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
return 301 https://$host:443$request_uri;
|
||||
}
|
||||
server {
|
||||
listen [::]:443 ssl spdy;
|
||||
listen 443 ssl spdy;
|
||||
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
|
||||
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
|
||||
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
|
||||
|
||||
keepalive_timeout 70;
|
||||
add_header Alternate-Protocol 443:npn-spdy/2;
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
upstream {{ .APP }} {
|
||||
{{ range .DOKKU_APP_LISTENERS | split " " }}
|
||||
server {{ . }};
|
||||
{{ end }}
|
||||
}
|
||||
```
|
||||
|
||||
### Example using new proxy port mapping
|
||||
```
|
||||
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
||||
{{ $port_map_list := $port_map | split ":" }}
|
||||
{{ $scheme := index $port_map_list 0 }}
|
||||
{{ $listen_port := index $port_map_list 1 }}
|
||||
{{ $upstream_port := index $port_map_list 2 }}
|
||||
|
||||
server {
|
||||
listen [::]:{{ $listen_port }};
|
||||
listen {{ $listen_port }};
|
||||
server_name {{ $.NOSSL_SERVER_NAME }};
|
||||
access_log /var/log/nginx/{{ $.APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ $.APP }}-error.log;
|
||||
|
||||
location / {
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1100;
|
||||
gzip_buffers 4 32k;
|
||||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
|
||||
gzip_vary on;
|
||||
gzip_comp_level 6;
|
||||
|
||||
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Port $server_port;
|
||||
proxy_set_header X-Request-Start $msec;
|
||||
}
|
||||
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
|
||||
}
|
||||
|
||||
{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
|
||||
upstream {{ $.APP }}-{{ $upstream_port }} {
|
||||
{{ range $listeners := $.DOKKU_APP_LISTENERS | split " " }}
|
||||
{{ $listener_list := $listeners | split ":" }}
|
||||
{{ $listener_ip := index $listener_list 0 }}
|
||||
{{ $listener_port := index $listener_list 1 }}
|
||||
server {{ $listener_ip }}:{{ $upstream_port }};{{ end }}
|
||||
}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
### Customizing via configuration files included by the default templates
|
||||
|
||||
The default nginx.conf- templates will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
|
||||
```
|
||||
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
|
||||
@@ -78,123 +194,23 @@ chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
|
||||
service nginx reload
|
||||
```
|
||||
|
||||
The example above uses additional configuration files directly on the dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
|
||||
|
||||
## Domains plugin
|
||||
|
||||
See the [domain-configuration documentation](/dokku/deployment/domain-configuration/).
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
Applications typically have the following structure for their hostname:
|
||||
See the [customizing hostnames documentation](/dokku/deployment/domain-configuration/#customizing-hostnames).
|
||||
|
||||
```
|
||||
scheme://subdomain.domain.tld
|
||||
```
|
||||
## Disabling VHOSTS
|
||||
|
||||
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` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
|
||||
|
||||
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
|
||||
|
||||
You can also use the built-in `domains` plugin to handle:
|
||||
|
||||
### Disabling VHOSTS
|
||||
|
||||
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. 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
|
||||
|
||||
```shell
|
||||
# where `myapp` is the name of your app
|
||||
|
||||
# add a domain to an app
|
||||
dokku domains:add myapp example.com
|
||||
|
||||
# list custom domains for app
|
||||
dokku domains myapp
|
||||
|
||||
# clear all custom domains for app
|
||||
dokku domains:clear myapp
|
||||
|
||||
# remove a custom domain from app
|
||||
dokku domains:remove myapp example.com
|
||||
```
|
||||
|
||||
## Container network interface binding
|
||||
|
||||
> New as of 0.3.13
|
||||
|
||||
The deployed docker container running your app's web process will bind to either the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`) or an external interface (i.e. 0.0.0.0) depending on dokku's VHOST configuration. Dokku will attempt to bind to the internal docker network interface unless you specifically set NO_VHOST for the given app or your dokku installation is not setup to use VHOSTS (i.e. $DOKKU_ROOT/VHOST is missing or $DOKKU_ROOT/HOSTNAME is set to an IPv4 or IPv6 address)
|
||||
|
||||
```shell
|
||||
# container bound to docker interface
|
||||
root@dokku:~/dokku# docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute goofy_albattani
|
||||
|
||||
root@dokku:~/dokku# docker inspect --format '{{ .NetworkSettings.IPAddress }}' goofy_albattani
|
||||
172.17.0.6
|
||||
|
||||
# container bound to all interfaces (previous default)
|
||||
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
|
||||
```
|
||||
See the [disabling vhosts documentation](/dokku/deployment/domain-configuration/#disabling-vhosts).
|
||||
|
||||
## Default site
|
||||
|
||||
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This 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 {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
server_name _;
|
||||
return 410;
|
||||
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.
|
||||
See the [default site documentation](/dokku/deployment/domain-configuration/#default-site).
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
@@ -207,3 +223,7 @@ See the [HSTS documentation](/dokku/deployment/ssl-configuration/#hsts-header).
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/dokku/deployment/ssl-configuration/).
|
||||
|
||||
## Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/dokku/proxy/).
|
||||
|
||||
@@ -16,7 +16,7 @@ Let's take a quick look at the current dokku nginx plugin that's shipped with do
|
||||
# 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>
|
||||
sudo dokku plugin:install <git_url> [--committish tag/branch/commit|--name custom-plugin-name]
|
||||
|
||||
# previous versions (0.3.x and below) of dokku require a manual process to install plugins
|
||||
cd /var/lib/dokku/plugins
|
||||
@@ -26,7 +26,7 @@ dokku plugins-install
|
||||
|
||||
## Creating your own plugin
|
||||
|
||||
[See the full documentation](http://dokku.viewdocs.io/dokku/development/plugin-creation).
|
||||
[See the full documentation](/dokku/development/plugin-creation).
|
||||
|
||||
## Official Plugins (Beta)
|
||||
|
||||
@@ -47,6 +47,7 @@ The following plugins are available and provided by dokku maintainers. Where not
|
||||
| [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+ |
|
||||
| [Let's Encrypt (beta)](https://github.com/dokku/dokku-letsencrypt) | [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+ |
|
||||
|
||||
@@ -54,39 +55,52 @@ The following plugins are available and provided by dokku maintainers. Where not
|
||||
|
||||
Note: The following plugins have been supplied by our community and may not have been tested by dokku maintainers.
|
||||
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[256dpi]: https://github.com/256dpi
|
||||
[abossard]: https://github.com/dudagroup
|
||||
[ademuk]: https://github.com/ademuk
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[alessio]: https://github.com/alessio
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[Aluxian]: https://github.com/Aluxian
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[basgys]: https://github.com/basgys
|
||||
[blag]: https://github.com/blag
|
||||
[cameron-martin]: https://github.com/cameron-martin
|
||||
[cedricziel]: https://github.com/cedricziel
|
||||
[cef]: https://github.com/cef
|
||||
[cjblomqvist]: https://github.com/cjblomqvist
|
||||
[crisward]: https://github.com/crisward
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dyson]: https://github.com/dyson
|
||||
[F4-Group]: https://github.com/F4-Group
|
||||
[fermuch]: https://github.com/fermuch
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[Flink]: https://github.com/Flink
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[heichblatt]: https://github.com/heichblatt
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[iamale]: https://github.com/iamale
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[Kloadut]: https://github.com/Kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[Maciej Łebkowski]: 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
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[motin]: https://github.com/motin
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
@@ -96,27 +110,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[pauldub]: https://github.com/pauldub
|
||||
[pnegahdar]: https://github.com/pnegahdar
|
||||
[RaceHub]: https://github.com/racehub
|
||||
[ribot]: https://github.com/ribot
|
||||
[rlaneve]: https://github.com/rlaneve
|
||||
[robv]: https://github.com/robv
|
||||
[scottatron]: https://github.com/scottatron
|
||||
[sehrope]: https://github.com/sehrope
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[sgulseth]: https://github.com/sgulseth
|
||||
[sseemayer]: https://github.com/sseemayer
|
||||
[statianzo]: https://github.com/statianzo
|
||||
[stuartpb]: https://github.com/stuartpb
|
||||
[thrashr888]: https://github.com/thrashr888
|
||||
[wmluke]: https://github.com/wmluke
|
||||
[Zenedith]: https://github.com/Zenedith
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[Flink]: https://github.com/Flink
|
||||
[ribot]: https://github.com/ribot
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[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
|
||||
|
||||
@@ -135,7 +141,8 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.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|
|
||||
|
||||
@@ -145,12 +152,16 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [ElasticMQ (SQS compatible)](https://github.com/cu12/dokku-elasticmq) | [cu12][] | 0.5.0+ |
|
||||
|
||||
#### Other
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
|
||||
| [FakeSNS](https://github.com/cu12/dokku-fake_sns) | [cu12][] | 0.5.0+ |
|
||||
| [InfluxDB](https://github.com/basgys/dokku-influxdb) | [basgys][] | 0.4.x |
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
|
||||
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
|
||||
|
||||
@@ -174,32 +185,37 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
|
||||
| [App User](https://github.com/expa/dokku-app-user) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||
| [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/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][] | 0.4.0+ |
|
||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
| [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 (Zero-Downtime)](https://github.com/sseemayer/dokku-letsencrypt) | [sseemayer][] | 0.4.0+ |
|
||||
| [Lets Encrypt](https://github.com/sgulseth/dokku-letsencrypt) | [sgulseth][] | 0.4.0+ |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
|
||||
| [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 |
|
||||
| [Proctype Filter](https://github.com/expa/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>4</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | 0.3.x |
|
||||
|
||||
[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)
|
||||
|
||||
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
<sup>2</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
||||
|
||||
<sup>3</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
||||
<sup>3</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
|
||||
<sup>4</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
|
||||
|
||||
### Other Plugins
|
||||
|
||||
@@ -218,14 +234,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [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+ |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
|
||||
| [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][] | 0.4.0+ |
|
||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 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][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
|
||||
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
|
||||
|
||||
<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.
|
||||
|
||||
@@ -236,18 +257,18 @@ 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 |
|
||||
| [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) |
|
||||
@@ -266,11 +287,11 @@ 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 (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+ |
|
||||
| [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][] | |
|
||||
|
||||
38
docs/proxy.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Proxy plugin
|
||||
|
||||
> New as of 0.5.0
|
||||
> Port handling functionality is new as of 0.6.0
|
||||
|
||||
As of dokku 0.5.0, the proxy functionality has been decoupled from the nginx-vhosts plugin into the proxy plugin. In the future this will allow other proxy software (HAproxy for example) to be used instead of nginx.
|
||||
|
||||
```
|
||||
proxy <app> Show proxy settings for app
|
||||
proxy:disable <app> Disable proxy for app
|
||||
proxy:enable <app> Enable proxy for app
|
||||
proxy:ports <app> List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] Set proxy port mappings for app
|
||||
proxy:ports-clear <app> Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>...] Unset proxy port mappings for app
|
||||
proxy:set <app> <proxy-type> Set proxy type for app
|
||||
```
|
||||
|
||||
## Container network interface binding
|
||||
|
||||
By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. 0.0.0.0) and your app container will be directly accessible by other hosts on your network.
|
||||
|
||||
> If a proxy is disabled, dokku will bind your container's port to a random port on the host, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
|
||||
```shell
|
||||
# container bound to docker interface
|
||||
root@dokku:~/dokku# docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1
|
||||
|
||||
root@dokku:~/dokku# docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
|
||||
172.17.0.6
|
||||
|
||||
# container bound to all interfaces
|
||||
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 node-js-app.web.1
|
||||
```
|
||||
@@ -10,34 +10,49 @@
|
||||
<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 rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.4.7/docs/assets/style.css" rel="stylesheet">
|
||||
<script>
|
||||
if ('{{DOC}}' == 'index.md') {
|
||||
var indexLink = '/{{NAME}}/';
|
||||
if ('{{REF}}' !== 'master') {
|
||||
indexLink = '/{{NAME}}~{{REF}}/';
|
||||
}
|
||||
window.location.replace(window.location.origin + indexLink);
|
||||
}
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="dev-warning doc-floating-warning" style="display:none">
|
||||
This document is for dokku's development version, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page.
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@@ -45,6 +60,23 @@
|
||||
<h1 class="heading navbar-brand">
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right col-md-offset-right-2">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/{{NAME}}/installation/">Docs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://webchat.freenode.net/?channels=dokku">IRC</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +91,7 @@
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item disabled">Getting Started</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/upgrading/" class="list-group-item">Upgrading Dokku</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>
|
||||
|
||||
@@ -70,19 +102,28 @@
|
||||
<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/deployment/one-off-processes/" class="list-group-item">One Off Processes/Cron</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="/dokku/deployment/user-management/" class="list-group-item">User Management</a>
|
||||
<a href="/dokku/checks-examples/" class="list-group-item">Zero Downtime Deploy Checks</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/dns/" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/dokku/deployment/domain-configuration/" class="list-group-item">Domain 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">Advanced Usage</a>
|
||||
|
||||
<a href="/dokku/backup-recovery/" class="list-group-item">Backup and Recovery</a>
|
||||
<a href="/dokku/deployment/deployment-tasks/" class="list-group-item">Deployment Tasks</a>
|
||||
<a href="/dokku/docker-options/" class="list-group-item">Docker Container Options</a>
|
||||
<a href="/dokku/dokku-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/dokku/proxy/" class="list-group-item">Proxy Management</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
|
||||
<a href="/dokku/community/clients/" class="list-group-item">Clients</a>
|
||||
@@ -99,9 +140,39 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rst-versions rst-badge" data-toggle="rst-versions">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version" data-doc="{{DOC}}" data-ref="{{REF}}">
|
||||
<span class="fa fa-book"> </span>
|
||||
v: {{REF}}
|
||||
<span class="fa fa-caret-down"></span>
|
||||
</span>
|
||||
<div class="rst-other-versions">
|
||||
<dl>
|
||||
<dt>Versions</dt>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>On GitHub</dt>
|
||||
<dd>
|
||||
<a href="https://github.com/{{USER}}/{{NAME}}/blob/master/docs/{{DOC}}" target="_blank">View</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="https://github.com/{{USER}}/{{NAME}}/edit/master/docs/{{DOC}}" target="_blank">Edit</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
|
||||
Free document hosting provided by <a href="http://progrium.viewdocs.io/viewdocs/">Viewdocs</a>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dev-warning doc-floating-warning" style="display:none">
|
||||
This document is for dokku's development version, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page.
|
||||
</div>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/1.3.0/anchor.js"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function (e) {
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
var markdownBody = document.querySelectorAll('.markdown-body')[0],
|
||||
isRedirect = markdownBody.innerHTML.trim().indexOf('<p>See the <a href=') === 0;
|
||||
if (isRedirect) {
|
||||
@@ -113,18 +184,107 @@
|
||||
|
||||
var tables = document.querySelectorAll('table'),
|
||||
blockquotes = document.querySelectorAll('blockquote'),
|
||||
versionList = document.querySelectorAll('.rst-other-versions dl')[0],
|
||||
currentVersionEl = document.querySelectorAll('.rst-current-version')[0],
|
||||
currentVersion = currentVersionEl.getAttribute('data-ref'),
|
||||
versionContainer = document.querySelectorAll('.rst-versions.rst-badge')[0],
|
||||
pageHeader = document.querySelectorAll('.markdown-body p')[0],
|
||||
headers = document.querySelectorAll('h2, h3, h4'),
|
||||
classNames = ['table', 'table-striped', 'table-hover', 'table-condensed'],
|
||||
localPath = location.pathname.split('/').splice(2).join("/"),
|
||||
addClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.add(className);
|
||||
} else {
|
||||
el.className += ' ' + className;
|
||||
}
|
||||
},
|
||||
addListener = function (elem, type, fn) {
|
||||
if (elem.addEventListener) {
|
||||
elem.addEventListener(type, fn, false);
|
||||
} else if (elem.attachEvent) {
|
||||
elem.attachEvent("on" + type, function() {
|
||||
return fn.call(elem, window.event);
|
||||
});
|
||||
} else {
|
||||
elem["on" + type] = fn;
|
||||
}
|
||||
},
|
||||
hasClass = function(el, className) {
|
||||
if (el.classList) {
|
||||
return el.classList.contains(className);
|
||||
} else {
|
||||
return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);
|
||||
}
|
||||
},
|
||||
removeClass = function(el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.remove(className);
|
||||
} else {
|
||||
el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');;
|
||||
}
|
||||
};
|
||||
|
||||
var ls2 = {
|
||||
save : function(key, jsonData, expirationMS) {
|
||||
if (typeof (Storage) == "undefined") { return false; }
|
||||
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime()/1000 + expirationMS}
|
||||
localStorage.setItem(key, JSON.stringify(record));
|
||||
return jsonData;
|
||||
},
|
||||
load : function(key) {
|
||||
if (typeof (Storage) == "undefined") { return false; }
|
||||
var record = JSON.parse(localStorage.getItem(key));
|
||||
if (!record){return false;}
|
||||
return (new Date().getTime()/1000 < record.timestamp && JSON.parse(record.value));
|
||||
}
|
||||
};
|
||||
|
||||
var ToC =
|
||||
"<nav role='navigation' class='table-of-contents'>" +
|
||||
"<ul>";
|
||||
|
||||
var newLine, el, title, link, currentDepth, count = 0, lastNodeDepth = null;
|
||||
Array.prototype.forEach.call(headers, function (el, i) {
|
||||
count++;
|
||||
title = el.innerText || element.textContent;
|
||||
link = "#" + el.getAttribute('id');
|
||||
currentDepth = parseInt(el.nodeName.replace('H', ''), 10);
|
||||
|
||||
newLine =
|
||||
"<li>" +
|
||||
"<a href='" + link + "' class='current-depth-" + currentDepth + "'>" +
|
||||
title +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
|
||||
if (currentDepth === lastNodeDepth || lastNodeDepth === null) {
|
||||
} else if (currentDepth > lastNodeDepth) {
|
||||
newLine = '<ul>' + newLine;
|
||||
} else if (currentDepth < lastNodeDepth) {
|
||||
newLine = '</ul>' + newLine;
|
||||
}
|
||||
ToC += newLine;
|
||||
|
||||
lastNodeDepth = currentDepth;
|
||||
});
|
||||
ToC += "</ul></nav>";
|
||||
|
||||
if (count > 1) {
|
||||
var navItems = document.querySelectorAll('.list-group-item');
|
||||
Array.prototype.forEach.call(navItems, function(el, i){
|
||||
if (el.getAttribute('href') == location.pathname) {
|
||||
el.insertAdjacentHTML('afterEnd', ToC);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Array.prototype.forEach.call(blockquotes, function (el, i) {
|
||||
if (el.innerHTML.indexOf('New as of') !== -1) {
|
||||
if (el.innerHTML.toLowerCase().indexOf('new as of') !== -1) {
|
||||
addClass(el, 'new-as-of');
|
||||
} else if (el.innerHTML.toLowerCase().indexOf('not yet released') !== -1) {
|
||||
addClass(el, 'not-yet-released');
|
||||
}
|
||||
});
|
||||
Array.prototype.forEach.call(classNames, function (className, i) {
|
||||
@@ -132,6 +292,102 @@
|
||||
addClass(el, className);
|
||||
});
|
||||
});
|
||||
|
||||
addListener(currentVersionEl, 'click', function() {
|
||||
if (hasClass(versionContainer, 'shift-up')) {
|
||||
removeClass(versionContainer, 'shift-up');
|
||||
} else {
|
||||
addClass(versionContainer, 'shift-up');
|
||||
}
|
||||
});
|
||||
|
||||
var range = function(start, count) {
|
||||
return Array.apply(0, Array(count))
|
||||
.map(function (element, index) {
|
||||
return index + start;
|
||||
});
|
||||
}
|
||||
|
||||
var parseVersions = function(version, versions) {
|
||||
var pieces = version.split('.'),
|
||||
prefix = pieces.slice(0, 2).join('.') + '.',
|
||||
maxPatchVersion = parseInt(pieces.slice(2, 3)[0], 10),
|
||||
versionRange = range(0, maxPatchVersion + 1);
|
||||
|
||||
for (var i in versionRange) {
|
||||
versions.push(prefix.concat(versionRange[i]));
|
||||
}
|
||||
return versions;
|
||||
}
|
||||
|
||||
var addVersionLink = function(version) {
|
||||
var a = document.createElement('a'),
|
||||
dd = document.createElement('dd'),
|
||||
ref = 'dokku~v' + version,
|
||||
versionName = 'v' + version;
|
||||
if (version == 'master') {
|
||||
ref = 'dokku';
|
||||
versionName = 'master';
|
||||
}
|
||||
|
||||
a.setAttribute('href', "/" + ref + "/" + localPath);
|
||||
a.appendChild(document.createTextNode(versionName));
|
||||
if (versionName == currentVersion) {
|
||||
var strong = document.createElement('strong');
|
||||
strong.appendChild(a);
|
||||
dd.appendChild(strong);
|
||||
} else {
|
||||
dd.appendChild(a);
|
||||
}
|
||||
versionList.appendChild(dd);
|
||||
};
|
||||
|
||||
var processVersions = function(data) {
|
||||
var versions = [];
|
||||
for (var key in data['max-versions']) {
|
||||
if (!data['max-versions'].hasOwnProperty(key)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
versions = parseVersions(data['max-versions'][key], versions);
|
||||
}
|
||||
|
||||
addVersionLink('master');
|
||||
Array.prototype.forEach.call(versions, function (version, i) {
|
||||
addVersionLink(version);
|
||||
});
|
||||
};
|
||||
|
||||
if (currentVersion === 'master') {
|
||||
document.querySelectorAll('.dev-warning')[0].style.position = 'relative';
|
||||
Array.prototype.forEach.call(document.querySelectorAll('.dev-warning'), function (el, i) {
|
||||
el.style.display = '';
|
||||
});
|
||||
}
|
||||
|
||||
data = ls2.load('max-versions');
|
||||
if (!data) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', '/dokku/assets/versions.json', true);
|
||||
request.setRequestHeader("Cache-Control", "no-cache, no-store");
|
||||
|
||||
request.onload = function() {
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
var data = JSON.parse(request.responseText);
|
||||
// store for 1 day
|
||||
ls2.save('max-versions', data, 86400);
|
||||
processVersions(data);
|
||||
}
|
||||
};
|
||||
|
||||
request.onerror = function() {
|
||||
// There was a connection error of some sort
|
||||
};
|
||||
|
||||
request.send();
|
||||
} else {
|
||||
processVersions(data);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Troubleshooting
|
||||
# Troubleshooting
|
||||
|
||||
__Symptom:__ I deployed my app but I am getting the default nginx page
|
||||
|
||||
|
||||
@@ -1,26 +1,33 @@
|
||||
# Upgrading
|
||||
|
||||
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.
|
||||
If your version of dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/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.
|
||||
## Migration Guides
|
||||
|
||||
## Dokku
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
If dokku was installed via a debian package, you can upgrade dokku via the following command:
|
||||
- [0.5 Migration Guide](/dokku/appendices/0.5.0-migration-guide/)
|
||||
- [0.6 Migration Guide](/dokku/appendices/0.6.0-migration-guide/)
|
||||
|
||||
## Upgrade Instructions
|
||||
|
||||
If dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
|
||||
|
||||
```shell
|
||||
sudo apt-get install dokku
|
||||
sudo apt-get update
|
||||
dokku apps
|
||||
dokku ps:stop <app> # repeat to shut down each running app
|
||||
sudo apt-get install -qq -y dokku herokuish
|
||||
dokku ps:rebuildall # restart all applications
|
||||
```
|
||||
|
||||
For unattended upgrades, you may run the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -qq -y dokku
|
||||
```
|
||||
|
||||
If you have installed dokku from source, you may run the following commands to upgrade:
|
||||
### Upgrade From Source
|
||||
|
||||
If you installed dokku from source (less common), upgrade with:
|
||||
|
||||
```shell
|
||||
dokku apps
|
||||
dokku ps:stop <app> # repeat to shut down each running app
|
||||
cd ~/dokku
|
||||
git pull --tags origin master
|
||||
|
||||
@@ -29,29 +36,10 @@ sudo DOKKU_BRANCH=master make install
|
||||
|
||||
# upgrade to debian package-based installation
|
||||
sudo make install
|
||||
dokku ps:rebuildall # restart all applications
|
||||
```
|
||||
|
||||
All changes will take effect upon next application deployment. To trigger a rebuild of every application, simply run the following command:
|
||||
|
||||
```shell
|
||||
dokku ps:rebuildall
|
||||
```
|
||||
|
||||
## Herokuish image
|
||||
|
||||
If dokku was installed via a debian package, you can upgrade herokuish via the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install herokuish
|
||||
```
|
||||
|
||||
For unattended upgrades, you may run the following command:
|
||||
|
||||
```shell
|
||||
sudo apt-get install -qq -y herokuish
|
||||
```
|
||||
|
||||
In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands:
|
||||
To upgrade herokuish from source, upgrade with:
|
||||
|
||||
```shell
|
||||
cd /tmp
|
||||
|
||||
295
dokku
@@ -2,7 +2,15 @@
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
|
||||
[[ -f $DOKKU_ROOT/dokkurc ]] && source "$DOKKU_ROOT/dokkurc"
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] && for f in $DOKKU_ROOT/.dokkurc/*; do source "$f"; done
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$(lsb_release -si)" in
|
||||
Arch)
|
||||
export DOKKU_DISTRO=${DOKKU_DISTRO:="arch"}
|
||||
;;
|
||||
Debian)
|
||||
export DOKKU_DISTRO=${DOKKU_DISTRO:="debian"}
|
||||
;;
|
||||
@@ -12,7 +20,6 @@ case "$(lsb_release -si)" in
|
||||
esac
|
||||
|
||||
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"}
|
||||
@@ -29,18 +36,18 @@ 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"}
|
||||
|
||||
export DOKKU_CONTAINER_LABEL=dokku
|
||||
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL"
|
||||
|
||||
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
|
||||
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
parse_args "$@"
|
||||
args=("$@")
|
||||
if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" =~ ^--.* ]]; then
|
||||
if [[ "$arg" == "--app" ]]; then
|
||||
shift 2
|
||||
elif [[ "$arg" =~ ^--.* ]]; then
|
||||
shift 1
|
||||
else
|
||||
break
|
||||
@@ -51,21 +58,23 @@ fi
|
||||
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]]; then
|
||||
export SSH_USER=$(id -un)
|
||||
sudo -u dokku -E -H $0 "$@"
|
||||
sudo -u dokku -E -H "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $(id -un) != "root" && $1 =~ plugin:.* ]]; then
|
||||
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
|
||||
# shellcheck disable=SC2086
|
||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
||||
exit $?
|
||||
else
|
||||
set -f
|
||||
# shellcheck disable=SC2086
|
||||
$0 $SSH_ORIGINAL_COMMAND
|
||||
set +f
|
||||
exit $?
|
||||
@@ -77,192 +86,126 @@ if ! dokku_auth "$@" ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
receive)
|
||||
APP="$2"; IMAGE=$(get_app_image_name $APP); IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||
dokku_log_info1 "Cleaning up..."
|
||||
docker_cleanup
|
||||
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
||||
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
||||
release_and_deploy "$APP"
|
||||
;;
|
||||
execute_dokku_cmd() {
|
||||
declare desc="executes dokku sub-commands"
|
||||
local PLUGIN_NAME="$1"
|
||||
local PLUGIN_CMD=$PLUGIN_NAME
|
||||
local implemented=0; local script
|
||||
local argv=("$@")
|
||||
|
||||
deploy)
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to deploy"
|
||||
APP="$2"; IMAGE_TAG="$3"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
plugn trigger pre-deploy $APP $IMAGE_TAG
|
||||
case "$PLUGIN_NAME" in
|
||||
events|events:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/events/20_events}
|
||||
;;
|
||||
nginx|nginx:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
|
||||
;;
|
||||
deploy|delete|ls|run|cleanup)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
trace|url|urls|report|version)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
esac
|
||||
|
||||
is_image_herokuish_based "$IMAGE" && DOKKU_HEROKUISH=true
|
||||
DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
|
||||
oldids=$(get_app_container_ids $APP)
|
||||
|
||||
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
|
||||
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="$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_HEROKUISH" ]] && START_CMD="/start $PROC_TYPE"
|
||||
|
||||
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
|
||||
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
|
||||
else
|
||||
id=$(docker run -d -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
ipaddr=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $id)
|
||||
fi
|
||||
else
|
||||
id=$(docker run -d $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
fi
|
||||
|
||||
# if we can't post-deploy successfully, kill new container
|
||||
kill_new() {
|
||||
docker inspect $id &> /dev/null && docker stop $id > /dev/null && docker kill $id > /dev/null
|
||||
trap - INT TERM EXIT
|
||||
kill -9 $$
|
||||
}
|
||||
|
||||
# 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"
|
||||
plugn trigger check-deploy $APP $id $PROC_TYPE $port $ipaddr
|
||||
trap - INT TERM EXIT
|
||||
fi
|
||||
|
||||
# now using the new container
|
||||
[[ -n "$id" ]] && echo $id > "$DOKKU_CONTAINER_ID_FILE"
|
||||
[[ -n "$ipaddr" ]] && echo $ipaddr > "$DOKKU_IP_FILE"
|
||||
[[ -n "$port" ]] && echo $port > "$DOKKU_PORT_FILE"
|
||||
[[ -n "$port" ]] && echo "http://$(< "$DOKKU_ROOT/HOSTNAME"):$port" > "$DOKKU_ROOT/$APP/URL"
|
||||
|
||||
# cleanup pre-migration files
|
||||
rm -f $DOKKU_ROOT/$APP/CONTAINER $DOKKU_ROOT/$APP/IP $DOKKU_ROOT/$APP/PORT
|
||||
|
||||
CONTAINER_INDEX=$(( CONTAINER_INDEX + 1 ))
|
||||
done
|
||||
# cleanup when we scale down
|
||||
if [[ "$PROC_COUNT" == 0 ]]; then
|
||||
CONTAINER_IDX_OFFSET=0
|
||||
if [[ "$(readlink -f "$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}")" == *core-plugins* ]] ; then
|
||||
[[ ${argv[0]} == "$PLUGIN_CMD" ]] && shift 1
|
||||
if [[ ! -z $DOKKU_APP_NAME ]]; then
|
||||
if [[ "$PLUGIN_CMD" == config* ]] && [[ ${argv[1]} == "--no-restart" ]]; then
|
||||
shift 1
|
||||
set -- "--no-restart" "$DOKKU_APP_NAME" "$@"
|
||||
else
|
||||
CONTAINER_IDX_OFFSET=$((PROC_COUNT + 1))
|
||||
set -- "$DOKKU_APP_NAME" "$@"
|
||||
fi
|
||||
for container_state_filetype in CONTAINER IP PORT; do
|
||||
cd $DOKKU_ROOT/$APP
|
||||
find . -maxdepth 1 -name "$container_state_filetype.$PROC_TYPE.*" -printf "%f\n" | sort -t . -k 3 -n | tail -n +$CONTAINER_IDX_OFFSET | xargs rm -f
|
||||
done
|
||||
done < "$DOKKU_SCALE_FILE"
|
||||
|
||||
dokku_log_info1 "Running post-deploy"
|
||||
plugn trigger post-deploy $APP $port $ipaddr
|
||||
|
||||
# kill the old container
|
||||
if [[ -n "$oldids" ]]; 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"}
|
||||
fi
|
||||
|
||||
# Let the old container finish processing requests, before terminating it
|
||||
WAIT="${DOKKU_WAIT_TO_RETIRE:-60}"
|
||||
dokku_log_info1 "Shutting down old containers in $WAIT seconds"
|
||||
for oldid in $oldids; do
|
||||
dokku_log_info2 "$oldid"
|
||||
done
|
||||
(
|
||||
exec >/dev/null 2>/dev/null </dev/null
|
||||
trap '' INT HUP
|
||||
sleep $WAIT
|
||||
for oldid in $oldids; do
|
||||
# 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
|
||||
# Give child process just enough time to set the traps
|
||||
sleep 0.1
|
||||
fi
|
||||
;;
|
||||
set -- "$PLUGIN_CMD" "$@"
|
||||
fi
|
||||
|
||||
cleanup)
|
||||
docker_cleanup
|
||||
;;
|
||||
if [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/default ]]; then
|
||||
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/default" "$@"
|
||||
implemented=1
|
||||
elif [[ -x $PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD ]]; then
|
||||
"$PLUGIN_ENABLED_PATH/$PLUGIN_NAME/subcommands/$PLUGIN_CMD" "$@"
|
||||
implemented=1
|
||||
elif [[ -x $PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:} ]]; then
|
||||
"$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}/subcommands/${1#*:}" "$@"
|
||||
implemented=1
|
||||
fi
|
||||
|
||||
# DEPRECATED as of v0.3.14
|
||||
deploy:all)
|
||||
echo "*DEPRECATED* in v0.3.14: deploy:all will be removed in future versions"
|
||||
dokku ps:restartall
|
||||
;;
|
||||
|
||||
help|'')
|
||||
echo "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
|
||||
echo ""
|
||||
echo "Options:"
|
||||
|
||||
cat<<EOF | plugn trigger commands help | sort | column -c2 -t -s,
|
||||
help, Print the list of commands
|
||||
EOF
|
||||
;;
|
||||
|
||||
*)
|
||||
implemented=0
|
||||
if [[ $implemented -eq 0 ]];then
|
||||
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
|
||||
fi
|
||||
|
||||
implemented=1
|
||||
if [[ "$exit_code" -ne "$DOKKU_VALID_EXIT" ]]; then
|
||||
exit $exit_code
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$implemented" -eq 0 ]]; then
|
||||
dokku_log_warn "\`$*\` is not a dokku command."
|
||||
dokku_log_warn "See \`dokku help\` for a list of available commands."
|
||||
exit 1
|
||||
if [[ "$implemented" -eq 0 ]]; then
|
||||
dokku_log_warn "\`$*\` is not a dokku command."
|
||||
dokku_log_warn "See \`dokku help\` for a list of available commands."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
help|'')
|
||||
export LC_ALL=C # so sort will respect non alpha characters
|
||||
ALL_PLUGIN_COMMANDS=$(find -L "$PLUGIN_PATH/enabled" -name commands 2> /dev/null || true)
|
||||
|
||||
# build list of core plugin command files
|
||||
for plugin_command in $ALL_PLUGIN_COMMANDS;do
|
||||
if [[ "$(readlink -f "$plugin_command")" == *core-plugins* ]]; then
|
||||
CORE_PLUGIN_COMMANDS+="$plugin_command "
|
||||
fi
|
||||
done
|
||||
# build list of non-core plugin command files
|
||||
for plugin_command in $ALL_PLUGIN_COMMANDS;do
|
||||
if [[ "$(readlink -f "$plugin_command")" != *core-plugins* ]]; then
|
||||
COMMUNITY_PLUGIN_COMMANDS+="$plugin_command "
|
||||
fi
|
||||
done
|
||||
|
||||
# New lines are blank echos for readability
|
||||
echo "Usage: dokku [--quiet|--trace|--rm-container|--rm|--force] COMMAND <app> [command-specific-options]"
|
||||
echo ""
|
||||
echo "Primary help options, type \"dokku COMMAND:help\" for more details, or dokku help --all to see all commands."
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo ""
|
||||
|
||||
if [[ "$2" == "--all" ]] ; then
|
||||
for core_plugin_command in $CORE_PLUGIN_COMMANDS; do
|
||||
$core_plugin_command help
|
||||
done | sort | column -c2 -t -s,
|
||||
echo ""
|
||||
echo "Community plugin commands:"
|
||||
echo ""
|
||||
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
||||
$community_plugin_command help
|
||||
done | sort | column -c2 -t -s,
|
||||
else
|
||||
for core_plugin_command in $CORE_PLUGIN_COMMANDS; do
|
||||
$core_plugin_command help
|
||||
# When done, sort, sed cuts arugments out of strings and colum make it pretty
|
||||
done | sort | sed -e '/^.*:/d' -e 's/\s[\[\<\-\(].*,/,/' | column -c2 -t -s,
|
||||
if [[ -n "$COMMUNITY_PLUGIN_COMMANDS" ]]; then
|
||||
echo ""
|
||||
echo "Community plugin commands:"
|
||||
echo ""
|
||||
for community_plugin_command in $COMMUNITY_PLUGIN_COMMANDS; do
|
||||
$community_plugin_command help
|
||||
done | sort | column -c2 -t -s,
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
execute_dokku_cmd "$@"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
VERSION="$1"
|
||||
IMPORT_DIR="$2"
|
||||
TARGET_DIR="$3"
|
||||
APPS="$(< $4 )"
|
||||
|
||||
ret=0
|
||||
|
||||
for app in $APPS; do
|
||||
if [[ -d $TARGET_DIR/$app ]]; then
|
||||
ret=1
|
||||
echo "Trying to import application $app which already exists." 2>&1
|
||||
fi
|
||||
done
|
||||
|
||||
exit $ret
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
VERSION="$1"
|
||||
BASE_DIR="$2"
|
||||
|
||||
cat;
|
||||
[[ -f $BASE_DIR/.sshcommand ]] && echo "$BASE_DIR/.sshcommand"
|
||||
[[ -f $BASE_DIR/.ssh/authorized_keys ]] && echo "$BASE_DIR/.ssh/authorized_keys"
|
||||
[[ -f $BASE_DIR/HOSTNAME ]] && echo "$BASE_DIR/HOSTNAME"
|
||||
[[ -f $BASE_DIR/VHOST ]] && echo "$BASE_DIR/VHOST"
|
||||
@@ -1,16 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
VERSION="$1"
|
||||
IMPORT_DIR="$2"
|
||||
TARGET_DIR="$3"
|
||||
|
||||
[[ -f $IMPORT_DIR/.sshcommand ]] && mv $IMPORT_DIR/.sshcommand $TARGET_DIR/.sshcommand
|
||||
if [[ -f $IMPORT_DIR/.ssh/authorized_keys ]]; then
|
||||
mkdir -p $TARGET_DIR/.ssh
|
||||
cat $IMPORT_DIR/.ssh/authorized_keys $TARGET_DIR/.ssh/authorized_keys | uniq > tmpfile && mv tmpfile $TARGET_DIR/.ssh/authorized_keys
|
||||
chmod 0700 $TARGET_DIR/.ssh
|
||||
chmod 0600 $TARGET_DIR/.ssh/*
|
||||
fi
|
||||
[[ -f $IMPORT_DIR/HOSTNAME ]] && mv $IMPORT_DIR/HOSTNAME $TARGET_DIR/HOSTNAME
|
||||
[[ -f $IMPORT_DIR/VHOST ]] && mv $IMPORT_DIR/VHOST $TARGET_DIR/VHOST
|
||||
@@ -1,213 +1,32 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " build release trace delete ls run url urls version help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
[[ " help help:help ls:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
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_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"; IMAGE=$(get_app_image_name $APP)
|
||||
verify_app_name "$APP"
|
||||
|
||||
CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
|
||||
eval "$(config_export app $APP)"
|
||||
pushd "$TMP_WORK_DIR" &> /dev/null
|
||||
|
||||
case "$IMAGE_SOURCE_TYPE" in
|
||||
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
|
||||
plugn trigger pre-build-buildpack "$APP"
|
||||
|
||||
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
|
||||
|
||||
plugn trigger post-build-buildpack "$APP"
|
||||
;;
|
||||
|
||||
dockerfile)
|
||||
# extract first port from Dockerfile
|
||||
DOCKERFILE_PORT=$(get_dockerfile_exposed_port Dockerfile)
|
||||
[[ -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_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
docker build $DOCKER_ARGS $DOKKU_DOCKER_BUILD_OPTS -t "$IMAGE" .
|
||||
|
||||
plugn trigger post-build-dockerfile "$APP"
|
||||
;;
|
||||
|
||||
*)
|
||||
dokku_log_fail "Building image source type $IMAGE_SOURCE_TYPE not supported!"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
release)
|
||||
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
|
||||
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 [[ -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
|
||||
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
;;
|
||||
|
||||
dockerfile)
|
||||
# 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"
|
||||
;;
|
||||
|
||||
*)
|
||||
dokku_log_fail "Releasing image source type $IMAGE_SOURCE_TYPE not supported!"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
trace)
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
|
||||
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
|
||||
dokku_log_fail "Valid trace options are [on/off]"
|
||||
}
|
||||
|
||||
if [[ "$2" == "on" ]]; then
|
||||
echo "Enabling dokku trace"
|
||||
echo "export DOKKU_TRACE=1" > $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
|
||||
fi
|
||||
|
||||
if [[ "$2" == "off" ]]; then
|
||||
echo "Disabling dokku trace"
|
||||
rm -f $DOKKU_ROOT/.dokkurc/DOKKU_TRACE
|
||||
fi
|
||||
;;
|
||||
|
||||
delete)
|
||||
dokku apps:destroy $2
|
||||
;;
|
||||
|
||||
ls)
|
||||
installed_apps=$(dokku_apps)
|
||||
|
||||
dokku_col_log_info1_quiet "App Name" "Container Type" "Container Id" "Status"
|
||||
|
||||
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)
|
||||
if [[ -n $DOKKU_APP_CIDS ]]; then
|
||||
for DOKKU_APP_CID in $DOKKU_APP_CIDS; do
|
||||
DOKKU_APP_CONTAINER_STATUS="stopped"
|
||||
[[ $DOCKER_RUNNING_CONTAINERS =~ $DOKKU_APP_CID ]] && DOKKU_APP_CONTAINER_STATUS="running"
|
||||
DOKKU_APP_CONTAINER_TYPE=$(grep -l $DOKKU_APP_CID $DOKKU_ROOT/$APP/CONTAINER.* | awk -F '/' '{ print $5 }' | awk -F '.' '{ print $2 }')
|
||||
dokku_col_log_msg "$APP" "$DOKKU_APP_CONTAINER_TYPE" "${DOKKU_APP_CID:0:12}" "$DOKKU_APP_CONTAINER_STATUS"
|
||||
done
|
||||
else
|
||||
dokku_col_log_msg "$APP" "NOT_DEPLOYED" "NOT_DEPLOYED" "NOT_DEPLOYED"
|
||||
fi
|
||||
done
|
||||
;;
|
||||
|
||||
run)
|
||||
[[ -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
|
||||
|
||||
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_herokuish_based "$IMAGE" && EXEC_CMD="/exec"
|
||||
|
||||
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
;;
|
||||
|
||||
url | urls)
|
||||
[[ -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
|
||||
url)
|
||||
grep "^http" "$DOKKU_ROOT/$APP/URLS" | head -1
|
||||
;;
|
||||
urls)
|
||||
grep "^http" "$DOKKU_ROOT/$APP/URLS"
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
SCHEME="http"; SSL="$DOKKU_ROOT/$APP/tls"; WILDCARD_SSL="$DOKKU_ROOT/tls"
|
||||
if [[ -e "$SSL/server.crt" && -e "$SSL/server.key" ]] || [[ -e "$WILDCARD_SSL/server.crt" && -e "$WILDCARD_SSL/server.key" ]]; then
|
||||
SCHEME="https"
|
||||
fi
|
||||
|
||||
if [[ "$(is_app_vhost_enabled $APP)" == "false" ]]; then
|
||||
shopt -s nullglob
|
||||
for PORT_FILE in $DOKKU_ROOT/$APP/PORT.*; do
|
||||
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" || dokku_log_fail "Unable to determine dokku's version"
|
||||
;;
|
||||
|
||||
help)
|
||||
cat<<EOF
|
||||
ls, Pretty listing of deployed applications and containers
|
||||
help|ls:help|run:help|trace:help|url:help|urls:help|version:help)
|
||||
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
|
||||
help_content_func () {
|
||||
declare desc="return standard plugin help content"
|
||||
cat<<help_content
|
||||
ls , Pretty listing of deployed applications and containers
|
||||
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
|
||||
EOF
|
||||
version , Print dokku's version
|
||||
help , Print the list of commands
|
||||
help_content
|
||||
}
|
||||
|
||||
if [[ $help_topic ]] ; then
|
||||
help_content_func | sed "/^\s*$help_topic\s/!d" | sort | sed '/^.*:/d' | column -c2 -t -s,
|
||||
else
|
||||
help_content_func
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
80
plugins/00_dokku-standard/exec-app-json-scripts
Executable file
@@ -0,0 +1,80 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
get_phase_script() {
|
||||
declare desc="extracts app.json from app image and returns the appropriate json key/value"
|
||||
local IMAGE="$1"; local PHASE_SCRIPT_KEY="$2"
|
||||
local GET_PHASE_SCRIPT_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_get_phase_script.XXXX")
|
||||
local APP_JSON_FILE="$GET_PHASE_SCRIPT_TMP_WORK_DIR/app.json"
|
||||
trap 'rm -rf "$GET_PHASE_SCRIPT_TMP_WORK_DIR" > /dev/null' RETURN INT TERM
|
||||
|
||||
copy_from_image "$IMAGE" "/app/app.json" "$GET_PHASE_SCRIPT_TMP_WORK_DIR" 2>/dev/null || true
|
||||
|
||||
if [[ -f "$APP_JSON_FILE" ]];then
|
||||
local VALUE=$(get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" < "$APP_JSON_FILE")
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo "$VALUE"
|
||||
}
|
||||
|
||||
execute_script() {
|
||||
declare desc="executes appropriate phase script key from app.json"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local PHASE_SCRIPT_KEY="$3"
|
||||
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
|
||||
if [[ -n "$SCRIPT_CMD" ]];then
|
||||
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
|
||||
local COMMAND
|
||||
COMMAND="set -eo pipefail; [[ \$DOKKU_TRACE ]] && set -x ; "
|
||||
COMMAND+=" if [[ -d '/app' ]]; then "
|
||||
COMMAND+=" export HOME=/app ; "
|
||||
COMMAND+=" cd \$HOME ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" if [[ -d '/app/.profile.d' ]]; then "
|
||||
COMMAND+=" for file in /app/.profile.d/*; do source \$file; done ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo restoring installation cache... ; "
|
||||
COMMAND+=" rm -rf /tmp/cache ; "
|
||||
COMMAND+=" ln -sf /cache /tmp/cache ; "
|
||||
COMMAND+=" fi ; "
|
||||
COMMAND+=" $SCRIPT_CMD ;"
|
||||
COMMAND+=" if [[ -d '/cache' ]]; then "
|
||||
COMMAND+=" echo removing installation cache... ; "
|
||||
COMMAND+=" rm -f /tmp/cache ; "
|
||||
COMMAND+=" fi "
|
||||
|
||||
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
|
||||
# strip --restart args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" $DOCKER_ARGS "$IMAGE" /bin/bash -c "$COMMAND")
|
||||
if test "$(docker wait "$id")" -eq 0; then
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
if [[ "$PHASE_SCRIPT_KEY" != "postdeploy" ]];then
|
||||
if ! is_image_herokuish_based "$IMAGE"; then
|
||||
local DOKKU_DOCKERFILE_ENTRYPOINT=$(config_get "$APP" DOKKU_DOCKERFILE_ENTRYPOINT)
|
||||
local DOKKU_DOCKERFILE_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_CMD)
|
||||
[[ -z "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && DOKKU_DOCKERFILE_ENTRYPOINT="$(get_entrypoint_from_image "$IMAGE")"
|
||||
[[ -z "$DOKKU_DOCKERFILE_CMD" ]] && DOKKU_DOCKERFILE_CMD="$(get_cmd_from_image "$IMAGE")"
|
||||
|
||||
[[ -n "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && local DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_ENTRYPOINT'"
|
||||
[[ -n "$DOKKU_DOCKERFILE_CMD" ]] && local DOCKER_COMMIT_CMD_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_CMD'"
|
||||
|
||||
local DOCKER_COMMIT_ARGS="$DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG $DOCKER_COMMIT_CMD_CHANGE_ARG"
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
eval docker commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" > /dev/null
|
||||
fi
|
||||
else
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -2,31 +2,32 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
|
||||
hostname -f > $DOKKU_ROOT/HOSTNAME
|
||||
hostname -f > "$DOKKU_ROOT/HOSTNAME"
|
||||
fi
|
||||
|
||||
if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
[[ $(dig +short "$(< "$DOKKU_ROOT/HOSTNAME")") ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
|
||||
dokku_path=$(which dokku)
|
||||
|
||||
# temporary hack for https://github.com/dokku/dokku/issues/82
|
||||
# redeploys all apps after a reboot
|
||||
case "$DOKKU_DISTRO" in
|
||||
ubuntu)
|
||||
cat<<EOF > /etc/init/dokku-redeploy.conf
|
||||
if [[ $(/sbin/init --version 2> /dev/null) =~ upstart ]]; then
|
||||
cat<<EOF > /etc/init/dokku-redeploy.conf
|
||||
description "Dokku app redeploy service"
|
||||
|
||||
start on filesystem and started docker
|
||||
|
||||
script
|
||||
sleep 2 # give docker some time
|
||||
sudo -i -u dokku /usr/local/bin/dokku ps:restore
|
||||
sudo -i -u dokku $dokku_path ps:restore
|
||||
end script
|
||||
EOF
|
||||
;;
|
||||
fi
|
||||
|
||||
debian|opensuse)
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
if [[ $(systemctl 2> /dev/null) =~ -\.mount ]]; then
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
[Unit]
|
||||
Description=Dokku app redeploy service
|
||||
After=docker.target
|
||||
@@ -34,14 +35,15 @@ After=docker.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=dokku
|
||||
ExecStart=/usr/local/bin/dokku ps:restore
|
||||
ExecStart=$dokku_path ps:restore
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
if command -v systemctl &>/dev/null; then
|
||||
systemctl enable dokku-redeploy
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p /etc/update-motd.d
|
||||
cat<<EOF > /etc/update-motd.d/99-dokku
|
||||
@@ -57,3 +59,9 @@ if [ ! -f "/home/dokku/HOSTNAME" ]; then
|
||||
fi
|
||||
EOF
|
||||
chmod +x /etc/update-motd.d/99-dokku
|
||||
|
||||
chown dokku:dokku "$DOKKU_ROOT/HOSTNAME"
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
chown dokku:dokku "$DOKKU_ROOT/VHOST"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.4.0"
|
||||
version = "0.6.2"
|
||||
[plugin.config]
|
||||
|
||||
34
plugins/00_dokku-standard/post-deploy
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts"
|
||||
|
||||
exec_app_json_scripts() {
|
||||
declare desc="core app.json scripts execution"
|
||||
local trigger="pre-deploy app_json_scripts"
|
||||
local APP="$1"; local IMAGE_TAG="$4"; local PHASE_SCRIPT_KEY="postdeploy"
|
||||
|
||||
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
|
||||
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
||||
}
|
||||
|
||||
cleanup_container_state() {
|
||||
declare desc="core post-deploy state cleanup"
|
||||
local trigger="post-deploy cleanup_container_state"
|
||||
local APP="$1"; local PROCTYPES="$(egrep -v "^#" "$DOKKU_ROOT/$APP/DOKKU_SCALE" | awk -F '=' '{ print $1 }' | xargs)"
|
||||
local CONTAINER_FILES="$(find "$DOKKU_ROOT/$APP" -maxdepth 1 -name "CONTAINER.*" -printf "%f\n" | sort -t . -k 3 -n | xargs)"
|
||||
|
||||
local CONTAINER_FILE
|
||||
for CONTAINER_FILE in $CONTAINER_FILES; do
|
||||
local CONTAINER_TYPE="$(awk -F '.' '{ print $2 }' <<< "$CONTAINER_FILE")"
|
||||
if [[ "$(is_val_in_list "$CONTAINER_TYPE" "$PROCTYPES" " ")" == "false" ]]; then
|
||||
dokku_log_info1 "Container type ($CONTAINER_TYPE) is no longer defined. Removing state"
|
||||
local IP_FILE="${CONTAINER_FILE//CONTAINER/IP}"
|
||||
local PORT_FILE="${CONTAINER_FILE//CONTAINER/PORT}"
|
||||
rm -f "$DOKKU_ROOT/$APP/$CONTAINER_FILE" "$DOKKU_ROOT/$APP/$IP_FILE" "$DOKKU_ROOT/$APP/$PORT_FILE"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
exec_app_json_scripts "$@"
|
||||
cleanup_container_state "$@"
|
||||
15
plugins/00_dokku-standard/pre-deploy
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts"
|
||||
|
||||
exec_app_json_scripts() {
|
||||
declare desc="core app.json scripts execution"
|
||||
local trigger="pre-deploy app_json_scripts"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local PHASE_SCRIPT_KEY="predeploy"
|
||||
|
||||
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
|
||||
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
|
||||
}
|
||||
|
||||
exec_app_json_scripts "$@"
|
||||
13
plugins/00_dokku-standard/subcommands/cleanup
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_cleanup_cmd(){
|
||||
declare desc="cleans up old deployment cruft"
|
||||
local cmd="cleanup"
|
||||
|
||||
docker_cleanup
|
||||
}
|
||||
|
||||
|
||||
dokku_cleanup_cmd "$@"
|
||||
6
plugins/00_dokku-standard/subcommands/deploy
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
shift 1
|
||||
dokku_deploy_cmd "$@"
|
||||
31
plugins/00_dokku-standard/subcommands/ls
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_ls_cmd() {
|
||||
declare desc="lists installed apps with status"
|
||||
local cmd="ls"
|
||||
local installed_apps=$(dokku_apps)
|
||||
local dokku_app
|
||||
|
||||
dokku_col_log_info1_quiet "App Name" "Container Type" "Container Id" "Status"
|
||||
|
||||
for dokku_app in $installed_apps; do
|
||||
local APP=$(basename "$dokku_app")
|
||||
local DOKKU_APP_CIDS=$(get_app_container_ids "$APP")
|
||||
local DOCKER_RUNNING_CONTAINERS=$(docker ps -q --no-trunc)
|
||||
if [[ -n $DOKKU_APP_CIDS ]]; then
|
||||
local DOKKU_APP_CID
|
||||
for DOKKU_APP_CID in $DOKKU_APP_CIDS; do
|
||||
local DOKKU_APP_CONTAINER_STATUS="stopped"
|
||||
[[ $DOCKER_RUNNING_CONTAINERS =~ $DOKKU_APP_CID ]] && local DOKKU_APP_CONTAINER_STATUS="running"
|
||||
local DOKKU_APP_CONTAINER_TYPE=$(grep -l "$DOKKU_APP_CID" "$DOKKU_ROOT/$APP"/CONTAINER.* | awk -F '/' '{ print $5 }' | awk -F '.' '{ print $2 }')
|
||||
dokku_col_log_msg "$APP" "$DOKKU_APP_CONTAINER_TYPE" "${DOKKU_APP_CID:0:12}" "$DOKKU_APP_CONTAINER_STATUS"
|
||||
done
|
||||
else
|
||||
dokku_col_log_msg "$APP" "NOT_DEPLOYED" "NOT_DEPLOYED" "NOT_DEPLOYED"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
dokku_ls_cmd "$@"
|
||||
24
plugins/00_dokku-standard/subcommands/report
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_report_cmd() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
local cmd="report"
|
||||
|
||||
dokku_log_info1 "uname: $(uname -a)"
|
||||
dokku_log_info1 "memory: "
|
||||
free -m
|
||||
dokku_log_info1 "docker version: "
|
||||
docker version
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
docker -D info
|
||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||
dokku_log_info1 "herokuish version: "
|
||||
docker run --rm -ti gliderlabs/herokuish:latest herokuish version
|
||||
dokku_log_info1 "dokku version: $(dokku version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
dokku plugin
|
||||
}
|
||||
|
||||
dokku_report_cmd "$@"
|
||||
50
plugins/00_dokku-standard/subcommands/run
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/ps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
dokku_run_cmd() {
|
||||
declare desc="runs command in container based on app image"
|
||||
local cmd="run"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
verify_app_name "$APP"
|
||||
|
||||
shift 2
|
||||
|
||||
if [[ -z "$DOKKU_RM_CONTAINER" ]]; then
|
||||
local DOKKU_APP_RM_CONTAINER=$(config_get "$APP" DOKKU_RM_CONTAINER || true)
|
||||
local DOKKU_GLOBAL_RM_CONTAINER=$(config_get --global DOKKU_RM_CONTAINER || true)
|
||||
local DOKKU_RM_CONTAINER=${DOKKU_APP_RM_CONTAINER:="$DOKKU_GLOBAL_RM_CONTAINER"}
|
||||
fi
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-run "$APP" "$IMAGE_TAG")
|
||||
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
|
||||
|
||||
local DOKKU_RUN_OPTS=""
|
||||
if [[ "$DOKKU_RM_CONTAINER" ]]; then
|
||||
DOKKU_RUN_OPTS+=" --rm"
|
||||
elif [[ "$DOKKU_DETACH_CONTAINER" ]]; then
|
||||
DOKKU_RUN_OPTS+=" --detach"
|
||||
fi
|
||||
|
||||
has_tty && DOKKU_RUN_OPTS+=" -i -t"
|
||||
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
|
||||
|
||||
DOKKU_QUIET_OUTPUT=1 extract_procfile "$APP"
|
||||
|
||||
POTENTIAL_PROCFILE_KEY="$1"
|
||||
PROC_CMD=$(get_cmd_from_procfile "$APP" "$POTENTIAL_PROCFILE_KEY" || echo '')
|
||||
remove_procfile "$APP"
|
||||
|
||||
if [ ! -z "$PROC_CMD" ]; then
|
||||
dokku_log_info1 "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
|
||||
set -- "$PROC_CMD" "${@:2}"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
}
|
||||
|
||||
dokku_run_cmd "$@"
|
||||
24
plugins/00_dokku-standard/subcommands/trace
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_trace_cmd() {
|
||||
declare desc="enables/disables DOKKU_TRACE"
|
||||
local cmd="trace"
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p "$DOKKU_ROOT/.dokkurc"
|
||||
[[ "$2" == "on" ]] || [[ "$2" == "off" ]] || {
|
||||
dokku_log_fail "Valid trace options are [on/off]"
|
||||
}
|
||||
|
||||
if [[ "$2" == "on" ]]; then
|
||||
echo "Enabling dokku trace"
|
||||
echo "export DOKKU_TRACE=1" > "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
|
||||
fi
|
||||
|
||||
if [[ "$2" == "off" ]]; then
|
||||
echo "Disabling dokku trace"
|
||||
rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_TRACE"
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_trace_cmd "$@"
|
||||
1
plugins/00_dokku-standard/subcommands/url
Symbolic link
@@ -0,0 +1 @@
|
||||
urls
|
||||
12
plugins/00_dokku-standard/subcommands/urls
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_urls_cmd() {
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"
|
||||
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
dokku_urls_cmd "$@"
|
||||
11
plugins/00_dokku-standard/subcommands/version
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_version_cmd() {
|
||||
declare desc="prints dokku version"
|
||||
local cmd="version"
|
||||
cat "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
||||
}
|
||||
|
||||
dokku_version_cmd "$@"
|
||||
@@ -1,54 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " events events:on events:off events:list help events:help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
[[ " help events:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
case "$1" in
|
||||
events)
|
||||
if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then
|
||||
if [[ $2 == "-t" ]]; then
|
||||
tail -F $DOKKU_EVENTS_LOGFILE
|
||||
else
|
||||
tail -n 100 $DOKKU_EVENTS_LOGFILE
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
events:on)
|
||||
echo "Enabling dokku events logger"
|
||||
[[ -d $DOKKU_ROOT/.dokkurc ]] || mkdir -p $DOKKU_ROOT/.dokkurc
|
||||
echo "export DOKKU_EVENTS=1" > $DOKKU_ROOT/.dokkurc/DOKKU_EVENTS
|
||||
;;
|
||||
|
||||
events:off)
|
||||
echo "Disabling dokku events logger"
|
||||
rm -f $DOKKU_ROOT/.dokkurc/DOKKU_EVENTS
|
||||
;;
|
||||
|
||||
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
|
||||
dokku_col_log_msg "$hook"
|
||||
done
|
||||
else
|
||||
dokku_log_warn "Events logger disabled"
|
||||
fi
|
||||
;;
|
||||
|
||||
help | events:help)
|
||||
cat && cat<<EOF
|
||||
help_content_func () {
|
||||
declare desc="return events plugin help content"
|
||||
cat<<help_content
|
||||
events [-t], Show the last events (-t follows)
|
||||
events:list, List logged events
|
||||
events:on, Enable events logger
|
||||
events:off, Disable events logger
|
||||
EOF
|
||||
help_content
|
||||
}
|
||||
|
||||
if [[ $1 = "events:help" ]] ; then
|
||||
echo 'Usage: dokku events:COMMAND [-t]'
|
||||
echo ''
|
||||
echo 'Interact with Dokku event logger.'
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
help_content_func | sort | column -c2 -t -s,
|
||||
else
|
||||
help_content_func
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||