Compare commits
550 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e2c79c5ed | ||
|
|
a0cece197f | ||
|
|
57858c1788 | ||
|
|
88736c1000 | ||
|
|
48357adac1 | ||
|
|
3b4d101a42 | ||
|
|
c3871e7da9 | ||
|
|
7a4ead4db4 | ||
|
|
c32d0cc791 | ||
|
|
b3c732e487 | ||
|
|
ae14b02cbd | ||
|
|
1532590b50 | ||
|
|
d3cbb730ac | ||
|
|
ffd5c896ed | ||
|
|
6bc960e10c | ||
|
|
2e237041ec | ||
|
|
23798b575b | ||
|
|
b690d9d18d | ||
|
|
cd030f4fa0 | ||
|
|
6db82861e6 | ||
|
|
a637ffc848 | ||
|
|
760be655e9 | ||
|
|
01e317259b | ||
|
|
c74c542b1f | ||
|
|
c4ad455aad | ||
|
|
8c43542f2e | ||
|
|
61f8590553 | ||
|
|
d84c17d9e2 | ||
|
|
c9d10b8a2b | ||
|
|
b43cec2d6b | ||
|
|
e1d5228796 | ||
|
|
fd77f9c7a0 | ||
|
|
f6b03dd55f | ||
|
|
43631e8847 | ||
|
|
afea3b54a8 | ||
|
|
17a2b333f3 | ||
|
|
06e63c8f95 | ||
|
|
1bc8bb2a24 | ||
|
|
1bf8493cd1 | ||
|
|
e705d4eed8 | ||
|
|
6e46bacf92 | ||
|
|
69bb8e3077 | ||
|
|
3aa7d39358 | ||
|
|
867403f589 | ||
|
|
cce7c5cb97 | ||
|
|
6ad8aa7988 | ||
|
|
36294e09a3 | ||
|
|
fddf130abd | ||
|
|
c0b6942392 | ||
|
|
f949fe2a49 | ||
|
|
55554ce9bd | ||
|
|
904894722f | ||
|
|
a8a167f87f | ||
|
|
cd7b8afccb | ||
|
|
6c6e72ca04 | ||
|
|
9616473c3a | ||
|
|
e53e8bb59f | ||
|
|
5cfe7610b2 | ||
|
|
6b50ba66a9 | ||
|
|
685ef90018 | ||
|
|
b48b79f5ca | ||
|
|
8f7f03a7d8 | ||
|
|
d1a16717b3 | ||
|
|
aa77638ca7 | ||
|
|
e893ac2aaa | ||
|
|
1f8c5509cf | ||
|
|
3c6396fbca | ||
|
|
8984b748c5 | ||
|
|
9fc7c49da5 | ||
|
|
650eb57e91 | ||
|
|
33a6c29517 | ||
|
|
ba2126c57a | ||
|
|
00bb9fad9f | ||
|
|
396ba7b1ab | ||
|
|
6fb306eb03 | ||
|
|
d12c9d7362 | ||
|
|
363039fe34 | ||
|
|
ef4eeab029 | ||
|
|
9ffd262801 | ||
|
|
a4318ecdbd | ||
|
|
c335eb9ad6 | ||
|
|
9d883f53c7 | ||
|
|
a25071f02f | ||
|
|
5f5efe2563 | ||
|
|
fa1f3d0a08 | ||
|
|
0720c3ef66 | ||
|
|
ea86a9f2ca | ||
|
|
4cf717baf8 | ||
|
|
bab3e714f7 | ||
|
|
74b2961f8d | ||
|
|
76201aed64 | ||
|
|
9e27b07772 | ||
|
|
51c5c58354 | ||
|
|
2d1b93c354 | ||
|
|
f945696d15 | ||
|
|
4687b96003 | ||
|
|
92524c2da0 | ||
|
|
a5ea0ba896 | ||
|
|
b7c7155852 | ||
|
|
fd28bf53de | ||
|
|
52d9cb6188 | ||
|
|
5dcdce8b62 | ||
|
|
b41b5c0a68 | ||
|
|
a9f820bfaa | ||
|
|
a2e40de597 | ||
|
|
2fa7baa035 | ||
|
|
177f0be21c | ||
|
|
c29def79f3 | ||
|
|
8fb50bbf68 | ||
|
|
ed9d356f60 | ||
|
|
a4be3a06f9 | ||
|
|
e636609fa8 | ||
|
|
1d1cf56692 | ||
|
|
82778a0aad | ||
|
|
3d239344fe | ||
|
|
c266d8c41e | ||
|
|
6f2c218f29 | ||
|
|
abfb0d3977 | ||
|
|
9a1a97d56f | ||
|
|
44caf44ce6 | ||
|
|
e800b8a9a7 | ||
|
|
4d0ff4a834 | ||
|
|
ce4fe7850b | ||
|
|
869a6ce553 | ||
|
|
43b90f1ae8 | ||
|
|
3e694926c9 | ||
|
|
1c277a99cb | ||
|
|
071416ef11 | ||
|
|
5502a61452 | ||
|
|
96924e54c4 | ||
|
|
8cff88dea0 | ||
|
|
fbff08a580 | ||
|
|
9b45aed6f0 | ||
|
|
d9eea74f18 | ||
|
|
301d5a19b0 | ||
|
|
8cb4bb74fa | ||
|
|
61447f9ffd | ||
|
|
06742cfcc4 | ||
|
|
82dfcc01e2 | ||
|
|
892391a7fd | ||
|
|
44a43cb130 | ||
|
|
e00c98546f | ||
|
|
27e2f7ab3d | ||
|
|
eadf9f1f8e | ||
|
|
597fb7d219 | ||
|
|
e27d19a346 | ||
|
|
15bf4a8386 | ||
|
|
003ed01e30 | ||
|
|
db239debf1 | ||
|
|
fccd4e1a20 | ||
|
|
0c8c093cf7 | ||
|
|
f74b702c5e | ||
|
|
75309bf3a0 | ||
|
|
dc310c4ce4 | ||
|
|
0aa3c3fa53 | ||
|
|
2d180f5e0f | ||
|
|
d83471bd46 | ||
|
|
974f601fa9 | ||
|
|
4a8ed5cd06 | ||
|
|
709d8d411c | ||
|
|
e79b750b6d | ||
|
|
bb4a2da52e | ||
|
|
79bb5cb9a7 | ||
|
|
70877e351c | ||
|
|
8877abb83f | ||
|
|
cdc5eb9909 | ||
|
|
e1482df157 | ||
|
|
b45b2db8e7 | ||
|
|
d21efd90b4 | ||
|
|
d82a259bab | ||
|
|
6f64a59f49 | ||
|
|
d67aa94709 | ||
|
|
f8376c8845 | ||
|
|
52f3cf2af0 | ||
|
|
0997fd3347 | ||
|
|
2c4fec77bb | ||
|
|
2a04ed70b6 | ||
|
|
1ea821a6c3 | ||
|
|
3358254212 | ||
|
|
dbde0b2719 | ||
|
|
9ead92a490 | ||
|
|
feb6f2fed6 | ||
|
|
128c442b17 | ||
|
|
162db40370 | ||
|
|
5855fd069f | ||
|
|
c045b1ca6b | ||
|
|
d1319977d6 | ||
|
|
9c073364f5 | ||
|
|
e9554447d6 | ||
|
|
f3f9d37d59 | ||
|
|
0454f3bc8f | ||
|
|
aa81bc0589 | ||
|
|
3f70ee3e54 | ||
|
|
e922615cc7 | ||
|
|
d6a70c7e7b | ||
|
|
c725506d63 | ||
|
|
cafcf5cb7c | ||
|
|
54e6dd59f1 | ||
|
|
bd89c31cb7 | ||
|
|
4136c2682f | ||
|
|
5b8c93fd29 | ||
|
|
0337a21f66 | ||
|
|
407c54757d | ||
|
|
5dbefcbd9c | ||
|
|
70e552535b | ||
|
|
8e6b19c36e | ||
|
|
c379b3e477 | ||
|
|
2271c476e9 | ||
|
|
c70be7a386 | ||
|
|
6c7217b873 | ||
|
|
aa276f0b18 | ||
|
|
c43149f4c9 | ||
|
|
3d4252f43c | ||
|
|
d0219ced67 | ||
|
|
2bc7b7e2cc | ||
|
|
8c42e85fcc | ||
|
|
257abfaee8 | ||
|
|
faf53aa479 | ||
|
|
d9204083f7 | ||
|
|
775e78bd08 | ||
|
|
997cc4f466 | ||
|
|
a825e2678c | ||
|
|
6c6e26712d | ||
|
|
c4985bca67 | ||
|
|
620a36be82 | ||
|
|
7bf61b401f | ||
|
|
10f6d00e04 | ||
|
|
dfae840ace | ||
|
|
f6ec744a1f | ||
|
|
8f1b142949 | ||
|
|
94c298a1e3 | ||
|
|
6e7e69b19d | ||
|
|
e34e36c390 | ||
|
|
5103ee21aa | ||
|
|
c58cb02689 | ||
|
|
72eb61d1fc | ||
|
|
9e18736475 | ||
|
|
7a564f3185 | ||
|
|
e8d9982330 | ||
|
|
e1f1531d42 | ||
|
|
5e6b27a63f | ||
|
|
9f326b3f28 | ||
|
|
66bded4910 | ||
|
|
9c96394369 | ||
|
|
df02a1c1cc | ||
|
|
f0ca3fef54 | ||
|
|
ca680c3aeb | ||
|
|
a1c768b9b3 | ||
|
|
857850b4c6 | ||
|
|
da92be3030 | ||
|
|
e290965acf | ||
|
|
d1b67f1fff | ||
|
|
7c4381bfd5 | ||
|
|
bc410b4111 | ||
|
|
534a5f0898 | ||
|
|
1a2153585e | ||
|
|
547c14d18e | ||
|
|
d0c0543659 | ||
|
|
e0a513650e | ||
|
|
9ecfa843f0 | ||
|
|
afd64c3e04 | ||
|
|
9b3ed8d614 | ||
|
|
79f181cd55 | ||
|
|
d5b14769dd | ||
|
|
bdc89e5907 | ||
|
|
a68234bdf4 | ||
|
|
3f2079b4ea | ||
|
|
ecb8a02356 | ||
|
|
39d8465938 | ||
|
|
b15244e672 | ||
|
|
a9905d3508 | ||
|
|
77340011bd | ||
|
|
5c1d99a04c | ||
|
|
b02f8ba88b | ||
|
|
f973239379 | ||
|
|
f0a125f070 | ||
|
|
5a19cebfd7 | ||
|
|
d5697b9399 | ||
|
|
8f98bbc66f | ||
|
|
d4ec8d3ab5 | ||
|
|
0a08911800 | ||
|
|
30a15aaa7a | ||
|
|
d727dd76ce | ||
|
|
39af6359be | ||
|
|
d1728a4653 | ||
|
|
13608df0ef | ||
|
|
c07b3161fc | ||
|
|
1f2e2ba61d | ||
|
|
93bd3cd9e3 | ||
|
|
9930c0493d | ||
|
|
455a80e09d | ||
|
|
9a845664e1 | ||
|
|
36c96be091 | ||
|
|
1a99271fa8 | ||
|
|
dc04ab912d | ||
|
|
93f819609e | ||
|
|
6480957c4f | ||
|
|
b33cd266e7 | ||
|
|
88cbae2a6d | ||
|
|
3848b467a2 | ||
|
|
e68c04b9a6 | ||
|
|
5d8340d305 | ||
|
|
336e901c1e | ||
|
|
a6e4949264 | ||
|
|
1b325435b8 | ||
|
|
f8edf6b07a | ||
|
|
9e6091e665 | ||
|
|
a755f69e92 | ||
|
|
518337812f | ||
|
|
324e1ad1b5 | ||
|
|
e95384f76b | ||
|
|
111d5c68bf | ||
|
|
25ecbcdbbd | ||
|
|
ca75d4162d | ||
|
|
a8a43812a0 | ||
|
|
7058989941 | ||
|
|
0decb386d5 | ||
|
|
4967cc1d1c | ||
|
|
06cb7a0d55 | ||
|
|
fcd16e849d | ||
|
|
eb55ba5dd0 | ||
|
|
a7593db0c3 | ||
|
|
7502cbd13d | ||
|
|
823629d332 | ||
|
|
401683a305 | ||
|
|
8fc0cb67ec | ||
|
|
a1dcc2c173 | ||
|
|
bd4621070c | ||
|
|
70eb751868 | ||
|
|
ef262c26e8 | ||
|
|
5ad5a29a00 | ||
|
|
46d333df4b | ||
|
|
247698fea6 | ||
|
|
302537efd2 | ||
|
|
a62f04fa7e | ||
|
|
1c98b48e5d | ||
|
|
33bf6f59b3 | ||
|
|
550a0bd07b | ||
|
|
213f7d224c | ||
|
|
c62bff3002 | ||
|
|
31f3c429ab | ||
|
|
fee6773ef3 | ||
|
|
bc49a2e124 | ||
|
|
3fe10efd09 | ||
|
|
772e4286f2 | ||
|
|
b9e30e7e19 | ||
|
|
67317f88df | ||
|
|
c6d99722eb | ||
|
|
bd2aa1bd43 | ||
|
|
6d9520e599 | ||
|
|
9d0bc930a6 | ||
|
|
f63c2d18a3 | ||
|
|
1bdedf1e28 | ||
|
|
14b511d673 | ||
|
|
86a2b7d2e3 | ||
|
|
a91a0f8abb | ||
|
|
5a1a30efeb | ||
|
|
3d913d89f6 | ||
|
|
e0453dbc15 | ||
|
|
1c6f847c55 | ||
|
|
61d4b478ce | ||
|
|
350a84d253 | ||
|
|
618158a0f3 | ||
|
|
dbc3d82017 | ||
|
|
bd3f753d85 | ||
|
|
864562221d | ||
|
|
52f2ce35f6 | ||
|
|
623aa737e0 | ||
|
|
e8c3472581 | ||
|
|
730af2e552 | ||
|
|
04ee7a7020 | ||
|
|
8612f1a926 | ||
|
|
69135ff37e | ||
|
|
0edb027a53 | ||
|
|
18b0c90d0e | ||
|
|
26a3a8fd0a | ||
|
|
97b0aa3eb8 | ||
|
|
745473322a | ||
|
|
0066de604e | ||
|
|
6797dc7df1 | ||
|
|
f9247a9c42 | ||
|
|
20f9fae613 | ||
|
|
84b34b2221 | ||
|
|
69ec927fd7 | ||
|
|
19f9648b40 | ||
|
|
be6c4dc6df | ||
|
|
7292eaefc3 | ||
|
|
84ca9ff7e5 | ||
|
|
24905e74a5 | ||
|
|
4022ebd31c | ||
|
|
135e78c868 | ||
|
|
a22391b7ad | ||
|
|
a4b024d6f9 | ||
|
|
d4016223d5 | ||
|
|
2580ad305c | ||
|
|
377ca5ca22 | ||
|
|
fda75cbaa5 | ||
|
|
441d1c2676 | ||
|
|
0ab135b034 | ||
|
|
5901c57bde | ||
|
|
0bd6970b4b | ||
|
|
bdfb1ee549 | ||
|
|
f62373c3fa | ||
|
|
79cd7e4cab | ||
|
|
326031d289 | ||
|
|
d68473bfc2 | ||
|
|
cb16e11cf5 | ||
|
|
5c04328081 | ||
|
|
913f709c39 | ||
|
|
41f6480834 | ||
|
|
ae6b0b07aa | ||
|
|
a6113f88e7 | ||
|
|
c3ece32145 | ||
|
|
9082c51074 | ||
|
|
da2b54823b | ||
|
|
6d40d52d7d | ||
|
|
fbdb76e705 | ||
|
|
847a405712 | ||
|
|
7cce5b1b79 | ||
|
|
b75dc20a7d | ||
|
|
0c7562c6f8 | ||
|
|
539f08f627 | ||
|
|
4448399e71 | ||
|
|
c50f39b4fa | ||
|
|
4469b7428a | ||
|
|
a108856a98 | ||
|
|
1b216841a8 | ||
|
|
db421c97dc | ||
|
|
93f1a8e59d | ||
|
|
d72c3ac6bf | ||
|
|
a3d9db0e00 | ||
|
|
e8a4a4c89e | ||
|
|
50361505db | ||
|
|
267cc3fd54 | ||
|
|
a086302fc5 | ||
|
|
bd894ceaaf | ||
|
|
3ed019d708 | ||
|
|
012040d5c7 | ||
|
|
8d26d06f5e | ||
|
|
84907be0cd | ||
|
|
21aef2eef1 | ||
|
|
017037586c | ||
|
|
1bb4e4920b | ||
|
|
1ff3b57f88 | ||
|
|
d473352f7f | ||
|
|
bf0d7bc23a | ||
|
|
7fe94596cd | ||
|
|
6135b762af | ||
|
|
cd35f7e545 | ||
|
|
acfdbd5d4d | ||
|
|
37a048d201 | ||
|
|
506ebc3f23 | ||
|
|
6c20d29e55 | ||
|
|
88244b2918 | ||
|
|
30dac07817 | ||
|
|
40e50c9a2f | ||
|
|
5894c334b9 | ||
|
|
9c05854928 | ||
|
|
d666d67877 | ||
|
|
c09444ae39 | ||
|
|
2f10d04452 | ||
|
|
1caa12a526 | ||
|
|
1d7354f8a3 | ||
|
|
8f56787bf1 | ||
|
|
01f90374b7 | ||
|
|
b34ec89871 | ||
|
|
c345882a2a | ||
|
|
b16e5516bf | ||
|
|
5fdae7dc1e | ||
|
|
2757f4157e | ||
|
|
ae8a12a4b4 | ||
|
|
a585b07522 | ||
|
|
3b655fb6a1 | ||
|
|
62ef52a4cd | ||
|
|
135c7d4b2c | ||
|
|
88606e272f | ||
|
|
b00061fa0f | ||
|
|
9562a75351 | ||
|
|
d633f4be06 | ||
|
|
2577233ff0 | ||
|
|
a15797ce6c | ||
|
|
c7700e8cc2 | ||
|
|
248577d4f4 | ||
|
|
46746babd5 | ||
|
|
0759c055d3 | ||
|
|
06eb9e5b02 | ||
|
|
bf7d6f40ce | ||
|
|
49c18e94e8 | ||
|
|
efa34d4bcf | ||
|
|
8f2c1ea389 | ||
|
|
c1df31b106 | ||
|
|
b3d0dfb704 | ||
|
|
28a132ba33 | ||
|
|
29d2113f64 | ||
|
|
6d505fc75a | ||
|
|
8d016faf90 | ||
|
|
f099681e3d | ||
|
|
634c8b48d1 | ||
|
|
244651dcba | ||
|
|
edb5d067b8 | ||
|
|
3687c1800e | ||
|
|
33d6133f49 | ||
|
|
8ac63b9f65 | ||
|
|
8bbeb90f6f | ||
|
|
c969a1a742 | ||
|
|
3d745b7c12 | ||
|
|
e38905765b | ||
|
|
765bc82028 | ||
|
|
c5d329db70 | ||
|
|
6e0dec7aa2 | ||
|
|
f6bc8c7f5b | ||
|
|
5214a3518c | ||
|
|
8b836a4743 | ||
|
|
de3167c146 | ||
|
|
c6404f813d | ||
|
|
8d0977f015 | ||
|
|
f9deab94f9 | ||
|
|
a54b49362d | ||
|
|
360c10d90e | ||
|
|
9201860aa8 | ||
|
|
3a5942b75d | ||
|
|
5bf4c41c1d | ||
|
|
0f1682a9b7 | ||
|
|
1222ff9c92 | ||
|
|
410c3dd103 | ||
|
|
3028dc4182 | ||
|
|
69e449788d | ||
|
|
c3d23103e2 | ||
|
|
e5d626574c | ||
|
|
cce61f52ad | ||
|
|
bfe21844ea | ||
|
|
0532cae666 | ||
|
|
a6b36ae62f | ||
|
|
8766820974 | ||
|
|
85b09e11cf | ||
|
|
5d1d466edb | ||
|
|
a9930fb167 | ||
|
|
b628b68aef | ||
|
|
a1e7f19580 | ||
|
|
f4b4752e20 | ||
|
|
b3d547db30 | ||
|
|
23a54f58b0 | ||
|
|
e16ec3ab9d | ||
|
|
9e8f6a36f5 | ||
|
|
496ea86840 | ||
|
|
b3854eb2c3 | ||
|
|
2be6c8b86d | ||
|
|
3db6dbfcb3 | ||
|
|
dfd55d0eb0 | ||
|
|
ca6ac610a2 |
@@ -1,4 +1,8 @@
|
||||
---
|
||||
engines:
|
||||
duplication:
|
||||
exclude_paths:
|
||||
- "*"
|
||||
exclude_paths:
|
||||
- vendor/**/*
|
||||
- tests/**/*
|
||||
|
||||
19
.devcontainer/Dockerfile
Normal file
19
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM dokku/dokku:latest
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install --no-install-recommends -y build-essential file nano && \
|
||||
apt-get install --no-install-recommends -y help2man shellcheck uuid-runtime wget xmlstarlet && \
|
||||
apt-get clean autoclean && \
|
||||
apt-get autoremove --yes && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD https://raw.githubusercontent.com/dokku/dokku/master/tests/dhparam.pem /mnt/dokku/etc/nginx/dhparam.pem
|
||||
|
||||
COPY .devcontainer/bin/ /usr/local/bin/
|
||||
COPY ["tests.mk", "Makefile"]
|
||||
RUN make ci-dependencies
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV DOKKU_HOSTNAME=dokku.me
|
||||
LABEL org.label-schema.schema-version=1.0 org.label-schema.vendor=dokku com.dokku.devcontainer=true
|
||||
9
.devcontainer/bin/copy-plugin
Executable file
9
.devcontainer/bin/copy-plugin
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main() {
|
||||
declare PLUGIN_NAME="$1"
|
||||
|
||||
make go-build-plugin copyplugin PLUGIN_NAME=$PLUGIN_NAME
|
||||
}
|
||||
|
||||
main "$@"
|
||||
18
.devcontainer/devcontainer.json
Normal file
18
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"context": ".."
|
||||
},
|
||||
"containerEnv": {
|
||||
"DOKKU_HOST_ROOT": "${localWorkspaceFolder}/tmp/data/home/dokku",
|
||||
"GO_ROOT_MOUNT": "${localWorkspaceFolder}:/go/src/github.com/dokku/dokku"
|
||||
},
|
||||
"initializeCommand": ["mkdir", "-p", "tmp/data"],
|
||||
"mounts": [
|
||||
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind",
|
||||
"source=${localWorkspaceFolder}/tmp/data/,target=/mnt/dokku/,type=bind"
|
||||
],
|
||||
"overrideCommand": false,
|
||||
"postCreateCommand": ["make", "setup-deploy-tests"],
|
||||
"runArgs": ["--init"]
|
||||
}
|
||||
@@ -8,7 +8,6 @@ docs
|
||||
tests
|
||||
!build/dokku.deb
|
||||
!tests/dhparam.pem
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/bash-completion
|
||||
!contrib/docker
|
||||
vendor
|
||||
|
||||
@@ -15,7 +15,7 @@ insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[*.go]
|
||||
[*.{go,mod}]
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
14
.github/commands/bump-azure
vendored
14
.github/commands/bump-azure
vendored
@@ -27,16 +27,16 @@ main() {
|
||||
pushd azure-quickstart-templates >/dev/null
|
||||
|
||||
echo "=====> Updating values"
|
||||
contents="$(jq '.githubUsername = "dokku"' dokku-vm/metadata.json)"
|
||||
echo "${contents}" >dokku-vm/metadata.json
|
||||
contents="$(jq --arg DATE_UPDATED "$DATE_UPDATED" '.dateUpdated = $DATE_UPDATED' dokku-vm/metadata.json)"
|
||||
echo "${contents}" >dokku-vm/metadata.json
|
||||
contents="$(jq '.githubUsername = "dokku"' application-workloads/dokku/dokku-vm/metadata.json)"
|
||||
echo "${contents}" >application-workloads/dokku/dokku-vm/metadata.json
|
||||
contents="$(jq --arg DATE_UPDATED "$DATE_UPDATED" '.dateUpdated = $DATE_UPDATED' application-workloads/dokku/dokku-vm/metadata.json)"
|
||||
echo "${contents}" >application-workloads/dokku/dokku-vm/metadata.json
|
||||
|
||||
contents="$(jq --arg VERSION "$VERSION" '.parameters.dokkuVersion.defaultValue = $VERSION' dokku-vm/azuredeploy.json)"
|
||||
echo "${contents}" >dokku-vm/azuredeploy.json
|
||||
contents="$(jq --arg VERSION "$VERSION" '.parameters.dokkuVersion.defaultValue = $VERSION' application-workloads/dokku/dokku-vm/azuredeploy.json)"
|
||||
echo "${contents}" >application-workloads/dokku/dokku-vm/azuredeploy.json
|
||||
|
||||
echo "=====> Updating remote repository"
|
||||
git add dokku-vm
|
||||
git add application-workloads/dokku/dokku-vm
|
||||
git checkout -b dokku-$VERSION
|
||||
git commit -m "Update dokku-vm dokku version to $VERSION"
|
||||
git remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/azure-quickstart-templates.git"
|
||||
|
||||
3
.github/commands/ci-setup
vendored
3
.github/commands/ci-setup
vendored
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
set -x
|
||||
|
||||
echo "=====> set hostname"
|
||||
hostname
|
||||
internal_ip="$(ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')"
|
||||
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
|
||||
sudo hostname "dokku.me"
|
||||
echo "dokku.me" | sudo tee /etc/hostname
|
||||
hostname
|
||||
|
||||
107
.github/dependabot.yml
vendored
Normal file
107
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/ruby"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: bundler
|
||||
directory: "/tests/apps/multi"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/checks-root"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/config"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-dokku-scale"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-noexpose"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile-bad"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile-procfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/dockerfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/gitsubmodules"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tests/apps/gogrpc"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
ignore:
|
||||
- dependency-name: google.golang.org/grpc
|
||||
versions:
|
||||
- "> 1.29.1"
|
||||
- package-ecosystem: pip
|
||||
directory: "/tests/apps/multi"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: maven
|
||||
directory: "/tests/apps/java"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-worker"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noappjson"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/nodejs-express-noprocfile"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: composer
|
||||
directory: "/tests/apps/php"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: pip
|
||||
directory: "/tests/apps/python-flask"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
- package-ecosystem: npm
|
||||
directory: "/tests/apps/.websocket.disabled"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
@@ -13,7 +13,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
strategy:
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
unit-tests:
|
||||
name: unit.${{ matrix.index }}
|
||||
needs: build
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix: ${{fromJson(needs.build.outputs.matrix)}}
|
||||
@@ -67,6 +67,8 @@ jobs:
|
||||
timeout-minutes: 30
|
||||
run: sudo -E ./.github/commands/ci-run ${{ matrix.index }}
|
||||
env:
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
SYNC_GITHUB_PASSWORD: ${{ secrets.SYNC_GITHUB_PASSWORD }}
|
||||
SYNC_GITHUB_USERNAME: ${{ secrets.SYNC_GITHUB_USERNAME }}
|
||||
|
||||
@@ -78,7 +80,7 @@ jobs:
|
||||
docker-deploy-tests:
|
||||
name: docker
|
||||
needs: build
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@@ -103,7 +105,7 @@ jobs:
|
||||
go-tests:
|
||||
name: go.${{ matrix.index }}
|
||||
needs: build
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -143,7 +145,7 @@ jobs:
|
||||
publish-test-results:
|
||||
name: publish-test-results
|
||||
needs: unit-tests
|
||||
runs-on: ubuntu-16.04
|
||||
runs-on: ubuntu-18.04
|
||||
# the build-and-test job might be skipped, we don't need to run this job then
|
||||
if: success() || failure()
|
||||
|
||||
@@ -154,9 +156,9 @@ jobs:
|
||||
path: test-results
|
||||
|
||||
- name: Publish Unit Test Results
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6
|
||||
uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1
|
||||
with:
|
||||
check_name: Unit Test Results
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_token: ${{ secrets.GH_ACCESS_TOKEN }}
|
||||
files: test-results/**/*.xml
|
||||
comment_on_pr: false
|
||||
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -45,7 +45,7 @@ jobs:
|
||||
# 1.0.0 => d586102c117f97e63d7e3b56629d269efc9a7c60
|
||||
env:
|
||||
# keep in sync with tests/shellcheck-exclude
|
||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235
|
||||
SHELLCHECK_OPTS: -e SC1001 -e SC1003 -e SC1090 -e SC1091 -e SC1117 -e SC2029 -e SC2030 -e SC2031 -e SC2034 -e SC2046 -e SC2064 -e SC2068 -e SC2086 -e SC2119 -e SC2120 -e SC2128 -e SC2148 -e SC2153 -e SC2154 -e SC2155 -e SC2162 -e SC2174 -e SC2179 -e SC2191 -e SC2199 -e SC2207 -e SC2219 -e SC2220 -e SC2230 -e SC2231 -e SC2235 -e SC2267
|
||||
|
||||
shfmt:
|
||||
name: shfmt
|
||||
|
||||
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -83,5 +83,6 @@ jobs:
|
||||
run: |
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
# brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
brew tap dokku/repo
|
||||
brew bump-formula-pr -f --no-browse --no-audit --no-fork --debug --verbose --url "https://github.com/dokku/dokku/archive/${{ needs.release.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
|
||||
@@ -3,30 +3,28 @@
|
||||
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
|
||||
* Write [test cases](https://dokku.com/docs/development/testing/) for open bug issues
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](https://dokku.com/docs/)
|
||||
* Come up with new ways, non-commercial to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
* Sponsor the Dokku project financially on [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||
- Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you have found a bug
|
||||
- Write [test cases](https://dokku.com/docs/development/testing/) for open bug issues
|
||||
- Write patches for open bug/feature issues, preferably with test cases included
|
||||
- Contribute to the [documentation](https://dokku.com/docs/)
|
||||
- Come up with new ways, non-commercial to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
- Blog about different ways you are using dokku
|
||||
- Sponsor the Dokku project financially on [Github](https://github.com/sponsors/dokku), [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
|
||||
## Topics
|
||||
|
||||
* [Reporting Security Issues](#reporting-security-issues)
|
||||
* [Reporting Issues](#reporting-other-issues)
|
||||
* [Contributing](#contributing)
|
||||
* [Making Changes](#making-changes)
|
||||
* [Which branch to base the work](#which-branch-to-base-the-work)
|
||||
* [Submitting Changes](#submitting-changes)
|
||||
* [When will my change be merged?](#when-will-my-change-be-merged)
|
||||
* [Running tests locally](#running-tests-locally)
|
||||
* [Additional Resources](#additional-resources)
|
||||
- [Reporting Security Issues](#reporting-security-issues)
|
||||
- [Reporting Issues](#reporting-other-issues)
|
||||
- [Contributing](#contributing)
|
||||
- [Making Changes](#making-changes)
|
||||
- [Which branch to base the work](#which-branch-to-base-the-work)
|
||||
- [Submitting Changes](#submitting-changes)
|
||||
- [When will my change be merged?](#when-will-my-change-be-merged)
|
||||
- [Running tests locally](#running-tests-locally)
|
||||
- [Additional Resources](#additional-resources)
|
||||
|
||||
## Reporting security issues
|
||||
|
||||
@@ -65,37 +63,36 @@ you.
|
||||
Before you contribute to the Dokku project, there are a few things that you'll
|
||||
need to do
|
||||
|
||||
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||
* Submit an [issue](https://github.com/dokku/dokku/issues), assuming one
|
||||
does not already exist.
|
||||
* Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
* Make sure you fill in the earliest version that you know has the issue.
|
||||
* Fork the repository on GitHub.
|
||||
- Make sure you have a [GitHub account](https://github.com/signup/free).
|
||||
- Submit an [issue](https://github.com/dokku/dokku/issues), assuming one does not already exist.
|
||||
- Clearly describe the issue including steps to reproduce when it is a bug.
|
||||
- Make sure you fill in the earliest version that you know has the issue.
|
||||
- Fork the repository on GitHub.
|
||||
|
||||
### Making Changes
|
||||
|
||||
* Create a topic branch from where you want to base your work.
|
||||
* This is usually the master branch.
|
||||
* Only target an existing branch if you are certain your fix must be on that
|
||||
- Create a topic branch from where you want to base your work.
|
||||
- This is usually the master branch.
|
||||
- Only target an existing branch if you are certain your fix must be on that
|
||||
branch.
|
||||
* To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master`.
|
||||
- To quickly create a topic branch based on master; `git checkout -b my_contribution origin/master`.
|
||||
It is best to avoid working directly on the `master` branch. Doing so will
|
||||
help avoid conflicts if you pull in updates from origin.
|
||||
* Make commits of logical units. Implementing a new function and calling it in
|
||||
- Make commits of logical units. Implementing a new function and calling it in
|
||||
another file constitute a single logical unit of work.
|
||||
* Before you make a pull request, squash your commits into logical units of work
|
||||
- Before you make a pull request, squash your commits into logical units of work
|
||||
using `git rebase -i` and `git push -f`.
|
||||
* A majority of submissions should have a single commit, so if in doubt,
|
||||
- A majority of submissions should have a single commit, so if in doubt,
|
||||
squash your commits down to one commit.
|
||||
* Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
* Use descriptive commit messages and reference the #issue number.
|
||||
* Core test cases should continue to pass. You can run tests locally or enable
|
||||
- Check for unnecessary whitespace with `git diff --check` before committing.
|
||||
- Use descriptive commit messages and reference the #issue number.
|
||||
- Core test cases should continue to pass. You can run tests locally or enable
|
||||
[circle-ci](https://circleci.com/gh/dokku/dokku) for your fork, so all
|
||||
tests and codesniffs will be executed.
|
||||
* Your work should apply the [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
* Pull requests must be cleanly rebased on top of master without multiple branches
|
||||
- Your work should apply the [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
- Pull requests must be cleanly rebased on top of master without multiple branches
|
||||
mixed into the PR.
|
||||
* **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
|
||||
- **Git tip**: If your PR no longer merges cleanly, use `rebase master` in your
|
||||
feature branch to update your pull request rather than `merge master`.
|
||||
|
||||
### Which branch to base the work
|
||||
@@ -104,8 +101,8 @@ All changes should be be based on the latest master commit.
|
||||
|
||||
### Submitting Changes
|
||||
|
||||
* Push your changes to a topic branch in your fork of the repository.
|
||||
* Submit a pull request to the repository on github, with the correct target
|
||||
- Push your changes to a topic branch in your fork of the repository.
|
||||
- Submit a pull request to the repository on github, with the correct target
|
||||
branch.
|
||||
|
||||
### When will my change be merged?
|
||||
@@ -132,10 +129,10 @@ requests:
|
||||
Please read the [testing docs](https://dokku.com/docs/development/testing/),
|
||||
which contains test setup information as well as tips for running tests.
|
||||
|
||||
# Additional Resources
|
||||
## Additional Resources
|
||||
|
||||
* [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
* [Existing issues](https://github.com/dokku/dokku/issues)
|
||||
* [General GitHub documentation](https://help.github.com/)
|
||||
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||
* [#dokku IRC channel on freenode.org](https://webchat.freenode.net/?channels=dokku)
|
||||
- [Dokku coding standards](https://github.com/progrium/bashstyle)
|
||||
- [Existing issues](https://github.com/dokku/dokku/issues)
|
||||
- [General GitHub documentation](https://help.github.com/)
|
||||
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
|
||||
- [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/)
|
||||
|
||||
67
Dockerfile
67
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM phusion/baseimage:0.11
|
||||
FROM phusion/baseimage:bionic-1.0.0
|
||||
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
@@ -11,7 +11,7 @@ ARG DOKKU_VHOST_ENABLE=false
|
||||
ARG DOKKU_WEB_CONFIG=false
|
||||
|
||||
RUN addgroup --gid $DOKKU_GID dokku \
|
||||
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
|
||||
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
|
||||
|
||||
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
@@ -19,41 +19,40 @@ COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
# hadolint ignore=DL3005,DL3008
|
||||
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
|
||||
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | debconf-set-selections \
|
||||
&& curl -sSL https://packagecloud.io/dokku/dokku/gpgkey | apt-key add - \
|
||||
&& echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/dokku.list \
|
||||
&& mkdir -p /etc/nginx/ \
|
||||
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get upgrade -qq -y \
|
||||
&& apt-get -qq -y --no-install-recommends --only-upgrade install openssl openssh-server \
|
||||
&& apt-get -qq -y --no-install-recommends install rsync /tmp/dokku.deb \
|
||||
&& apt-get purge -qq -y syslog-ng-core \
|
||||
&& apt-get autoremove -qq -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
|
||||
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
|
||||
&& curl -sSL https://packagecloud.io/dokku/dokku/gpgkey | apt-key add - \
|
||||
&& echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/dokku.list \
|
||||
&& mkdir -p /etc/nginx/ \
|
||||
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get upgrade -qq -y \
|
||||
&& apt-get -qq -y --no-install-recommends --only-upgrade install openssl openssh-server \
|
||||
&& apt-get -qq -y --no-install-recommends install rsync /tmp/dokku.deb \
|
||||
&& apt-get purge -qq -y syslog-ng-core \
|
||||
&& apt-get autoremove -qq -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
COPY ./docker .
|
||||
|
||||
RUN \
|
||||
rsync -a /tmp/ / \
|
||||
&& rm -rf /tmp/* \
|
||||
&& rm /etc/runit/runsvdir/default/sshd/down \
|
||||
&& chown -R dokku:dokku /home/dokku/ \
|
||||
&& mkdir -p /skel/etc /skel/home /skel/var/lib/dokku /var/log/services \
|
||||
&& mv /etc/ssh /skel/etc/ssh \
|
||||
&& mv /home/dokku /skel/home/dokku \
|
||||
&& mv /var/lib/dokku/config /skel/var/lib/dokku/config \
|
||||
&& mv /var/lib/dokku/data /skel/var/lib/dokku/data \
|
||||
&& ln -sf /mnt/dokku/etc/ssh /etc/ssh \
|
||||
&& ln -sf /mnt/dokku/home/dokku /home/dokku \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
|
||||
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
|
||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/*.log /var/log/nginx/* /var/log/openresty/*
|
||||
rsync -a /tmp/ / \
|
||||
&& rm -rf /tmp/* \
|
||||
&& rm /etc/runit/runsvdir/default/sshd/down \
|
||||
&& chown -R dokku:dokku /home/dokku/ \
|
||||
&& mkdir -p /skel/etc /skel/home /skel/var/lib/dokku /var/log/services \
|
||||
&& mv /etc/ssh /skel/etc/ssh \
|
||||
&& mv /home/dokku /skel/home/dokku \
|
||||
&& mv /var/lib/dokku/config /skel/var/lib/dokku/config \
|
||||
&& mv /var/lib/dokku/data /skel/var/lib/dokku/data \
|
||||
&& ln -sf /mnt/dokku/etc/ssh /etc/ssh \
|
||||
&& ln -sf /mnt/dokku/home/dokku /home/dokku \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
|
||||
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
|
||||
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
|
||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/*.log /var/log/nginx/* /var/log/openresty/*
|
||||
|
||||
466
HISTORY.md
466
HISTORY.md
@@ -1,5 +1,469 @@
|
||||
# History
|
||||
|
||||
## 0.26.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4888: @josegonzalez Ensure installations treat raspbian as similar to debian buster as possible
|
||||
- #4887: @josegonzalez Ensure we do not add two debian folders in a single armhf package
|
||||
|
||||
### New Features
|
||||
|
||||
- #4886: @josegonzalez Add created-at time to apps:report output
|
||||
|
||||
## 0.26.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4884: @josegonzalez Correct recommends entry for bash-completion
|
||||
|
||||
### New Features
|
||||
|
||||
- #4885: @josegonzalez Add experimental support for arm devices
|
||||
|
||||
## 0.26.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.26.0 migration guide](/docs/appendices/0.26.0-migration-guide.md) for more information on migrating to 0.26.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4882: @josegonzalez Add missing setup/teardown of builder plugin properties
|
||||
- #4880: @josegonzalez Ensure the null scheduler reports the app as running when in use
|
||||
- #4871: @josegonzalez Do not error when default Procfile path does not exist when using a custom procfile-path
|
||||
- #4861: @josegonzalez Add missing clone/rename code for plugins
|
||||
|
||||
### New Features
|
||||
|
||||
- #4864: @josegonzalez Switch to unauthenticated tap for formula bumping
|
||||
- #4860: @josegonzalez Add ability to increase the max parallelism when deploying a given process type
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4883: @josegonzalez Enable vertical scrolling on the version selector
|
||||
- #4879: @josegonzalez Clarify that the docker-based dokku installation is ready when a certain message appears
|
||||
- #4863: @josegonzalez Clarify what is necessary for implementing a scheduler plugin
|
||||
|
||||
### Other
|
||||
|
||||
- #4874: @josegonzalez Upgrade vector log integration to 0.17.x
|
||||
- #4881: @josegonzalez Drop bindutils as alternative dependency to bind-utils
|
||||
- #4869: @dependabot[bot] chore(deps): bump socket.io from 4.2.0 to 4.3.0 in /tests/apps/.websocket.disabled
|
||||
- #4868: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.6 to 11.0.7 in /tests/apps/java
|
||||
- #4866: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 198 to 199 in /tests/apps/php
|
||||
- #4862: @josegonzalez Set deploy-source and metadata at deploy time
|
||||
- #4853: @josegonzalez Remove dangling images
|
||||
- #4765: @josegonzalez Allow specifying a single process type to restart
|
||||
- #4859: @josegonzalez Remove deprecated tar plugin
|
||||
- #4858: @josegonzalez Remove deprecated tags plugin
|
||||
- #4857: @josegonzalez Implement scheduler management plugin
|
||||
|
||||
## 0.25.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4855: @josegonzalez Output remote client help when there is no remote host
|
||||
|
||||
### New Features
|
||||
|
||||
- #4854: @josegonzalez Fix parallel usage for scheduler-docker-local
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4856: @josegonzalez Add a note to the migration guide regarding using a Procfile for Dockerfile deploys
|
||||
- #4843: @schmijos Clarify that docker-options are not passed to the launched process but instead to the docker run command
|
||||
|
||||
### Other
|
||||
|
||||
- #4844: @dependabot[bot] chore(deps): bump werkzeug from 2.0.1 to 2.0.2 in /tests/apps/python-flask
|
||||
|
||||
## 0.25.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4841: @josegonzalez Ensure pack is run as root user when building apps in docker
|
||||
- #4836: @josegonzalez Fix custom dockerfile path detection
|
||||
- #4839: @josegonzalez Choose the correct app when a named remote is specified in the remote ssh client
|
||||
|
||||
### New Features
|
||||
|
||||
- #4829: @josegonzalez Add ability to schedule process types in parallel
|
||||
- #4837: @josegonzalez Filter --link and --volume flags during Dockerfile builds
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4840: @josegonzalez Explain sha256 image digest alternative when reusing docker image tags for git:from-image deployments
|
||||
|
||||
### Tests
|
||||
|
||||
- #4842: @josegonzalez Set default process list in test cnb buildpacks
|
||||
|
||||
### Other
|
||||
|
||||
- #4832: @dependabot[bot] chore(deps): bump flask from 2.0.1 to 2.0.2 in /tests/apps/python-flask
|
||||
- #4833: @dependabot[bot] chore(deps): bump jinja2 from 3.0.1 to 3.0.2 in /tests/apps/python-flask
|
||||
- #4831: @dependabot[bot] chore(deps): bump flask from 2.0.1 to 2.0.2 in /tests/apps/multi
|
||||
|
||||
## 0.25.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4787: @josegonzalez Do not require double quotes when issuing dokku run commands
|
||||
- #4816: @josegonzalez Set the DOKKU_HOST_ROOT on docker container start
|
||||
- #4810: @josegonzalez Handle udp ports when fetching network config
|
||||
- #4812: @josegonzalez Silence stderr when fetching a command from the Procfile
|
||||
- #4800: @josegonzalez Add help2man os package for copyfiles make target to devcontainer
|
||||
- #4796: @josegonzalez Remove the --restart flag from pre-deploy chown containers
|
||||
|
||||
### New Features
|
||||
|
||||
- #4809: @josegonzalez Implement storage:ensure-directory command
|
||||
- #4801: @josegonzalez Expose git-from-archive and git-from-image plugin triggers
|
||||
- #4785: @josegonzalez Add support for VSCode Dev Containers
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4819: @stephenheron Fixed typo in tar documentation
|
||||
- #4824: @dy3l Fix GitLab case
|
||||
- #4822: @josegonzalez Add a note about using the registry:login command for private image deployments
|
||||
- #4808: @francipvb Added a comment about Dockerfile deployment
|
||||
- #4807: @FinnWoelm Docs: Fix instructions for enabling Docker Buildkit
|
||||
- #4786: @josegonzalez Add missing argument from trigger documentation
|
||||
- #4780: @adam12 Update source for `dokku-update`
|
||||
|
||||
### Tests
|
||||
|
||||
- #4828: @josegonzalez Update golang in test apps to latest version
|
||||
- #4815: @josegonzalez tests: use python3 shebang for shellcheck-to-junit script
|
||||
- #4814: @josegonzalez Add wget to devcontainer to fix shfmt installation
|
||||
- #4791: @josegonzalez Fix test running in devcontainer
|
||||
|
||||
### Other
|
||||
|
||||
- #4813: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 197 to 198 in /tests/apps/php
|
||||
- #4802: @dependabot[bot] chore(deps): bump django from 3.1.12 to 3.1.13 in /tests/apps/dockerfile-release
|
||||
- #4784: @josegonzalez Upgrade vector image to 0.16.x
|
||||
|
||||
## 0.25.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4775: @josegonzalez Add support for url-encoded vector-sink config values …
|
||||
- #4777: @josegonzalez Set correct version for registry plugin
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4776: @josegonzalez Clarify valid values for container-type when entering containers
|
||||
|
||||
### Other
|
||||
|
||||
- #4774: @dependabot[bot] chore(deps): bump sqlparse from 0.4.1 to 0.4.2 in /tests/apps/dockerfile-release
|
||||
|
||||
## 0.25.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4767: @josegonzalez Output logs when container rename fails and continue on
|
||||
- #4764: @josegonzalez Reference correct plugin when setting up app-json plugin
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4741: @josegonzalez Use a Dockerfile to speed up env var injection for herokuish app builds
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4763: @josegonzalez Remove install doc references to removed web installer
|
||||
|
||||
### Other
|
||||
|
||||
- #4766: @josegonzalez Capitalize certain log messages for aesthetic reasons
|
||||
|
||||
## 0.25.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4760: @josegonzalez Add missing rsync to OS dependency list for git:sync command
|
||||
|
||||
### New Features
|
||||
|
||||
- #4761: @josegonzalez Correct permissions for userns support
|
||||
- #4742: @ashkulz bootstrap: add support for Debian 11 (bullseye)
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4747: @erickedji Fix process management references to formation key in app.json
|
||||
|
||||
### Other
|
||||
|
||||
- #4753: @dependabot[bot] chore(deps): bump socket.io from 4.1.3 to 4.2.0 in /tests/apps/.websocket.disabled
|
||||
- #4750: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 196 to 197 in /tests/apps/php
|
||||
- #4758: @ltalirz Fix typo in network docs
|
||||
- #4748: @trival Remove spare backtick in 0.25.0-migration-guide.md
|
||||
|
||||
## 0.25.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4736: @josegonzalez Ensure herokuish deploys respects the env vars during the release process
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4734: @josegonzalez docs: add github sponsorship link to contributing docs
|
||||
|
||||
## 0.25.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.25.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.25.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.25.0 migration guide](/docs/appendices/0.25.0-migration-guide.md) for more information on migrating to 0.25.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4733: @josegonzalez Force grep to run in quiet mode in domains:add call
|
||||
- #4732: @josegonzalez Ensure image cleanup does not impact the stack image and refactor container/image cleanup
|
||||
- #4731: @josegonzalez Respect debconf selections where possible
|
||||
- #4729: @josegonzalez Correct count check for user-auth trigger
|
||||
- #4721: @josegonzalez Recursively sync submodules
|
||||
- #4717: @josegonzalez Silence stderr when checking for ufw on debian systems
|
||||
- #4716: @josegonzalez Suppress dos2unix stderr output during Dockerfile builds
|
||||
- #4686: @josegonzalez Ensure repository is bare when calling git:sync
|
||||
- #4684: @josegonzalez Install gpg-agent in bootstrap script
|
||||
- #4683: @josegonzalez Strip published port flags when triggering deploy tasks
|
||||
- #4651: @josegonzalez Do not attempt to retire when there was no pre-existing container
|
||||
- #4639: @josegonzalez Correct path for azure-vm releases
|
||||
|
||||
### New Features
|
||||
|
||||
- #4730: @josegonzalez Execute motd at the end of the install
|
||||
- #4719: @josegonzalez Add support for routing an app to a specified host:port
|
||||
- #4715: @josegonzalez Switch from xip.io to sslip.io
|
||||
- #4460: @josegonzalez Implement registry plugin
|
||||
- #4711: @josegonzalez Enable installing on RPM systems where bind-utils is bindutils
|
||||
- #4687: @josegonzalez Output message explaining how to remove a deploy lock when a lock is encountered
|
||||
- #4682: @josegonzalez Properly space report output
|
||||
- #4502: @josegonzalez Add monorepo support
|
||||
- #4509: @josegonzalez Add ability to specify initial network
|
||||
- #4641: @dbazile Add initial support for installing onto Fedora
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4508: @josegonzalez Add support for the formation key in app.json
|
||||
- #4507: @josegonzalez Drop support for Ubuntu 16.04
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4723: @josegonzalez Clarify buildkit instructions
|
||||
- #4718: @josegonzalez Update link to azure installation on homepage
|
||||
- #4714: @josegonzalez Swap from freenode to libera.chat
|
||||
- #4712: @josegonzalez Clarify the shape of the command that should be entered in app.json for a cron task
|
||||
- #4709: @josegonzalez Add migration note for deprecation of ubuntu 16.04
|
||||
- #4697: @josegonzalez Specify that run containers use the same image
|
||||
- #4688: @josegonzalez Add a note on recovering networks
|
||||
- #4689: @josegonzalez Add a note about wildcards in the installation doc page
|
||||
- #4680: @josegonzalez Cleanup markdown lint errors
|
||||
- #4679: @josegonzalez Cleanup markdown lint errors
|
||||
- #4678: @josegonzalez Cleanup markdown lint errors
|
||||
- #4677: @josegonzalez Cleanup markdown lint errors
|
||||
- #4672: @bjab Fix typo in pack builder docs
|
||||
- #4668: @RealOrangeOne Make example gitlab-ci script a list
|
||||
- #4673: @eltociear Fix comment typo in dokku binary
|
||||
- #4661: @dy3l Fix case style
|
||||
- #4647: @AngCosmin Fixed unable to find version `v1` for official Github Action
|
||||
|
||||
### Tests
|
||||
|
||||
- #4693: @josegonzalez Add package.lock for test app
|
||||
- #4685: @josegonzalez Remove ci skip note in PULL_REQUEST_TEMPLATE.md
|
||||
- #4681: @josegonzalez Ignore duplication warnings in codacy
|
||||
- #4644: @josegonzalez Update unit test publisher to latest
|
||||
|
||||
### Other
|
||||
|
||||
- #4726: @josegonzalez Drop web installer in favor of setup via cli
|
||||
- #4713: @josegonzalez Make heroku-20/focal the default stack for herokuish builds
|
||||
- #4707: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 195 to 196 in /tests/apps/php
|
||||
- #4701: @josegonzalez Revamp dokku run command
|
||||
- #4671: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 193 to 195 in /tests/apps/php
|
||||
- #4674: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.5 to 11.0.6 in /tests/apps/java
|
||||
- #4652: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.4 to 11.0.5 in /tests/apps/java
|
||||
- #4653: @dependabot[bot] chore(deps): bump maven-dependency-plugin from 3.1.2 to 3.2.0 in /tests/apps/java
|
||||
- #4648: @dependabot[bot] chore(deps): bump django from 3.1.9 to 3.1.12 in /tests/apps/dockerfile-release
|
||||
- #4645: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.3 to 11.0.4 in /tests/apps/java
|
||||
- #4642: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 192 to 193 in /tests/apps/php
|
||||
|
||||
## 0.24.10
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.10/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.10 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4638: @josegonzalez Schedule a retire as early as possible
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4635: @hiepxanh Add buildkit cache example to Dockerfile docs
|
||||
- #4632: @scflode Fix typo in docs for GitHub Actions
|
||||
|
||||
### Other
|
||||
|
||||
- #4637: @dependabot[bot] chore(deps): bump django from 3.1.8 to 3.1.9 in /tests/apps/dockerfile-release
|
||||
|
||||
## 0.24.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4617: @josegonzalez Actually use the null buildpack for the sample python app
|
||||
- #4616: @josegonzalez Update azure-vm file paths to handled azure renames
|
||||
|
||||
### New Features
|
||||
|
||||
- #4629: @josegonzalez Upgrade dokku docker image to latest bionic release
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4622: @allanitis Update nginx logging configuration example to better support AWS Cloudwatch
|
||||
|
||||
### Other
|
||||
|
||||
- #4627: @Tarow Respect custom stack when using cloud native builder
|
||||
- #4619: @dependabot[bot] chore(deps): bump flask from 2.0.0 to 2.0.1 in /tests/apps/python-flask
|
||||
- #4628: @dependabot[bot] chore(deps): bump monolog/monolog from 1.26.0 to 1.26.1 in /tests/apps/php
|
||||
- #4618: @dependabot[bot] chore(deps): bump jetty-servlet from 11.0.2 to 11.0.3 in /tests/apps/java
|
||||
|
||||
## 0.24.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4615: @josegonzalez Remove empty plugin directories during upgrade
|
||||
- #4613: @josegonzalez Correct failing repo test
|
||||
- #4612: @josegonzalez fix: always retire deployment task containers
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4607: @serixscorpio Update link to dokku on Azure deployment page
|
||||
- #4583: @josegonzalez Set correct redirect for installation
|
||||
|
||||
### Other
|
||||
|
||||
- #4610: @dependabot[bot] chore(deps): bump jinja2 from 2.11.3 to 3.0.1 in /tests/apps/python-flask
|
||||
- #4614: @dependabot[bot] chore(deps): bump flask from 2.0.0 to 2.0.1 in /tests/apps/multi
|
||||
- #4611: @dependabot[bot] chore(deps): bump thin from 1.8.0 to 1.8.1 in /tests/apps/ruby
|
||||
- #4609: @dependabot[bot] chore(deps): bump socket.io from 4.0.2 to 4.1.2 in /tests/apps/.websocket.disabled
|
||||
- #4608: @dependabot[bot] chore(deps): bump werkzeug from 1.0.1 to 2.0.1 in /tests/apps/python-flask
|
||||
- #4600: @dependabot[bot] chore(deps): bump flask from 1.1.2 to 2.0.0 in /tests/apps/multi
|
||||
- #4598: @dependabot[bot] chore(deps): bump flask from 1.1.2 to 2.0.0 in /tests/apps/python-flask
|
||||
- #4592: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 191 to 192 in /tests/apps/php
|
||||
- #4581: @dependabot-preview[bot] Upgrade to GitHub-native Dependabot
|
||||
|
||||
## 0.24.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4574: @Cellane Fix alternate-tags content & escaping
|
||||
|
||||
### Other
|
||||
|
||||
- #4575: @Cellane Exclude additional ShellCheck tests
|
||||
|
||||
## 0.24.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
@@ -2984,7 +3448,6 @@ Thanks to all the contributors who helped with this release!
|
||||
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
|
||||
- #2389: @josegonzalez Add plugin management documentation
|
||||
|
||||
|
||||
## 0.7.0
|
||||
|
||||
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
|
||||
@@ -4370,7 +4833,6 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
|
||||
- #749: @vincentfretin Fix app certificate directory in backup-import/export
|
||||
- #750: @th4t Remove unintended phrase repetition in installation.md
|
||||
|
||||
|
||||
## 0.2.0 (2013-11-24)
|
||||
|
||||
* Added DOKKU_TRACE variable for verbose trace information
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
> For problems affecting all applications, the report output for a broken application is useful for our debugging.
|
||||
> In these cases, you may run `dokku report` without any arguments to display the top-level reporting information.
|
||||
|
||||
### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
|
||||
### How (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?
|
||||
|
||||
### Additional information
|
||||
|
||||
|
||||
19
Makefile
19
Makefile
@@ -14,7 +14,7 @@ PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/d
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v${SIGIL_VERSION}/sigil_${SIGIL_VERSION}_Linux_x86_64.tgz
|
||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
|
||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
|
||||
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest-20
|
||||
DOKKU_LIB_ROOT ?= /var/lib/dokku
|
||||
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
|
||||
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
|
||||
@@ -36,7 +36,7 @@ endif
|
||||
|
||||
include common.mk
|
||||
|
||||
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler netrc sshcommand procfile-util plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
|
||||
.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies docker-image-labeler netrc sshcommand procfile-util plugn docker aufs stack count vagrant-acl-add vagrant-dokku go-build
|
||||
|
||||
include tests.mk
|
||||
include package.mk
|
||||
@@ -110,7 +110,11 @@ endif
|
||||
|
||||
addman: help2man man-db
|
||||
mkdir -p /usr/local/share/man/man1
|
||||
ifneq ("$(wildcard /usr/local/share/man/man1/dokku.1-generated)","")
|
||||
cp /usr/local/share/man/man1/dokku.1-generated /usr/local/share/man/man1/dokku.1
|
||||
else
|
||||
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
|
||||
endif
|
||||
mandb
|
||||
|
||||
version:
|
||||
@@ -127,12 +131,15 @@ plugin-dependencies: plugn procfile-util
|
||||
plugins: plugn procfile-util docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update docker-image-labeler netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq
|
||||
dependencies: apt-update docker-image-labeler netrc sshcommand plugn procfile-util docker help2man man-db sigil dos2unix jq parallel
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
apt-get update -qq
|
||||
|
||||
parallel:
|
||||
apt-get -qq -y --no-install-recommends install parallel
|
||||
|
||||
jq:
|
||||
apt-get -qq -y --no-install-recommends install jq
|
||||
|
||||
@@ -206,12 +213,6 @@ count:
|
||||
@echo "Test lines:"
|
||||
@find tests -type f -not -name .DS_Store | xargs cat | sed 's/^$$//g' | wc -l
|
||||
|
||||
dokku-installer:
|
||||
test -f /var/lib/dokku/.dokku-installer-created || python contrib/dokku-installer.py onboot
|
||||
test -f /var/lib/dokku/.dokku-installer-created || service dokku-installer start
|
||||
test -f /var/lib/dokku/.dokku-installer-created || service nginx reload
|
||||
test -f /var/lib/dokku/.dokku-installer-created || touch /var/lib/dokku/.dokku-installer-created
|
||||
|
||||
vagrant-acl-add:
|
||||
vagrant ssh -- sudo sshcommand acl-add dokku $(USER)
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
**Note:** If this PR is just doc changes, please put [ci skip] in the body that way tests do not run.
|
||||
15
README.md
15
README.md
@@ -3,7 +3,6 @@
|
||||
[](https://github.com/dokku/dokku/actions?query=workflow%3ACI)
|
||||
[](https://packagecloud.io/dokku/dokku)
|
||||
[](https://aur.archlinux.org/packages/dokku/)
|
||||
[](https://webchat.freenode.net/?channels=dokku)
|
||||
[](https://glider-slackin.herokuapp.com/)
|
||||
[](https://dokku.com/docs/getting-started/installation/)
|
||||
[](#sponsors)
|
||||
@@ -14,7 +13,7 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
## Sponsors
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||
Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
||||
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
|
||||
@@ -86,7 +85,7 @@ Support us with a monthly donation and help us continue our activities. [[Become
|
||||
|
||||
A fresh VM running any of the following operating systems:
|
||||
|
||||
- Ubuntu 16.04/18.04/20.04 x64 - Any currently supported release
|
||||
- Ubuntu 18.04/20.04 x64 - Any currently supported release
|
||||
- Debian 9+ x64
|
||||
- CentOS 7 x64 *(experimental)*
|
||||
- Arch Linux x64 *(experimental)*
|
||||
@@ -99,11 +98,11 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.24.6 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||
|
||||
If you wish for a more unattended installation method, see [these](https://dokku.com/docs/getting-started/install/debian/#unattended-installation) docs.
|
||||
|
||||
@@ -117,11 +116,11 @@ Full documentation - including advanced installation docs - are available online
|
||||
|
||||
## Support
|
||||
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](https://dokku.com/docs/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku).
|
||||
You can use [GitHub Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](https://dokku.com/docs/getting-started/troubleshooting/) in the documentation, or join us on [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/).
|
||||
|
||||
## Contribution
|
||||
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](https://dokku.com/docs/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
After checking [GitHub Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](https://dokku.com/docs/getting-started/troubleshooting/) or having a chat with us on [Gliderlabs Slack in the #dokku channel](https://glider-slackin.herokuapp.com/), feel free to fork and create a Pull Request.
|
||||
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
|
||||
|
||||
|
||||
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@@ -56,7 +56,6 @@ Vagrant::configure("2") do |config|
|
||||
end
|
||||
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git build-essential >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
vm.vm.provision :shell do |s|
|
||||
s.inline = <<-EOT
|
||||
echo '"\e[5~": history-search-backward' > /root/.inputrc
|
||||
@@ -65,6 +64,10 @@ Vagrant::configure("2") do |config|
|
||||
echo 'set completion-ignore-case on' >> /root/.inputrc
|
||||
EOT
|
||||
end
|
||||
|
||||
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||
vm.vm.provision :shell, :inline => "echo 'Importing ssh key into dokku' && cat /root/.ssh/authorized_keys | dokku ssh-keys:add admin"
|
||||
end
|
||||
end
|
||||
|
||||
# For windows users. Sharing folder from windows creates problem with sym links and so, sync the repo instead from GOS.
|
||||
@@ -74,7 +77,6 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git dos2unix >/dev/null"
|
||||
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && dos2unix bootstrap.sh && bash bootstrap.sh"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
end
|
||||
|
||||
config.vm.define "dokku-deb", autostart: false do |vm|
|
||||
@@ -117,6 +119,6 @@ Vagrant::configure("2") do |config|
|
||||
|
||||
if Pathname.new(PUBLIC_KEY_PATH).exist?
|
||||
config.vm.provision :file, source: PUBLIC_KEY_PATH, destination: '/tmp/id_rsa.pub'
|
||||
config.vm.provision :shell, :inline => "rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
|
||||
config.vm.provision :shell, :inline => "echo 'Copying ssh key into vm' && rm -f /root/.ssh/authorized_keys && mkdir -p /root/.ssh && sudo cp /tmp/id_rsa.pub /root/.ssh/authorized_keys"
|
||||
end
|
||||
end
|
||||
|
||||
34
bootstrap.sh
34
bootstrap.sh
@@ -3,16 +3,16 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
# A script to bootstrap dokku.
|
||||
# It expects to be run on Ubuntu 16.04/18.04/20.04, or CentOS 7 via 'sudo'
|
||||
# It expects to be run on Ubuntu 18.04/20.04, or CentOS 7 via 'sudo'
|
||||
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
|
||||
# It checks out the dokku source code from Github into ~/dokku and then runs 'make install' from dokku source.
|
||||
# It checks out the dokku source code from GitHub into ~/dokku and then runs 'make install' from dokku source.
|
||||
|
||||
# We wrap this whole script in functions, so that we won't execute
|
||||
# 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.
|
||||
|
||||
SUPPORTED_VERSIONS="Debian [9, 10], CentOS [7], Ubuntu [16.04, 18.04, 20.04]"
|
||||
SUPPORTED_VERSIONS="Debian [9, 10, 11], CentOS [7], Fedora (partial) [33, 34], Ubuntu [18.04, 20.04]"
|
||||
|
||||
log-fail() {
|
||||
declare desc="log fail formatter"
|
||||
@@ -44,12 +44,20 @@ install-requirements() {
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
if ! dpkg -l | grep -q gpg-agent; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y --no-install-recommends install gpg-agent
|
||||
fi
|
||||
if ! dpkg -l | grep -q software-properties-common; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||
fi
|
||||
;;
|
||||
ubuntu)
|
||||
if ! dpkg -l | grep -q gpg-agent; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y --no-install-recommends install gpg-agent
|
||||
fi
|
||||
if ! dpkg -l | grep -q software-properties-common; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||
@@ -131,7 +139,7 @@ install-dokku-from-package() {
|
||||
debian | ubuntu)
|
||||
install-dokku-from-deb-package "$@"
|
||||
;;
|
||||
centos | rhel)
|
||||
centos | fedora | rhel)
|
||||
install-dokku-from-rpm-package "$@"
|
||||
;;
|
||||
*)
|
||||
@@ -155,7 +163,7 @@ install-dokku-from-deb-package() {
|
||||
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
|
||||
local OS_ID
|
||||
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "16.04" "18.04" "20.04" "9" "10"; then
|
||||
if ! in-array "$DOKKU_DISTRO_VERSION" "18.04" "20.04" "9" "10" "11"; then
|
||||
log-fail "Unsupported Linux distribution. Only the following versions are supported: $SUPPORTED_VERSIONS"
|
||||
fi
|
||||
|
||||
@@ -181,18 +189,23 @@ install-dokku-from-deb-package() {
|
||||
fi
|
||||
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu"; then
|
||||
if ! in-array "$DOKKU_DISTRO" "debian" "ubuntu" "raspbian"; then
|
||||
DOKKU_DISTRO="ubuntu"
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_DISTRO" == "ubuntu" ]]; then
|
||||
OS_IDS=("xenial" "bionic" "focal")
|
||||
OS_IDS=("bionic" "focal")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="bionic"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "debian" ]]; then
|
||||
OS_IDS=("stretch" "buster")
|
||||
OS_IDS=("stretch" "buster" "bullseye")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="bullseye"
|
||||
fi
|
||||
elif [[ "$DOKKU_DISTRO" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
if ! in-array "$OS_ID" "${OS_IDS[@]}"; then
|
||||
OS_ID="buster"
|
||||
fi
|
||||
@@ -204,7 +217,6 @@ install-dokku-from-deb-package() {
|
||||
apt-get update -qq >/dev/null
|
||||
|
||||
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
|
||||
[[ -n $DOKKU_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
|
||||
@@ -261,6 +273,10 @@ main() {
|
||||
ensure-environment
|
||||
install-requirements
|
||||
install-dokku
|
||||
|
||||
if [[ -f /etc/update-motd.d/99-dokku ]]; then
|
||||
/etc/update-motd.d/99-dokku || true
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -3,7 +3,9 @@ GO_PLUGIN_MAKE_TARGET ?= build
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.15.6
|
||||
GO_BUILD_CACHE ?= /tmp/dokku-go-build-cache
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_MOD_CACHE ?= /tmp/dokku-go-mod-mod
|
||||
GO_ROOT_MOUNT ?= $$PWD/../..:$(GO_REPO_ROOT)
|
||||
GOARCH ?= amd64
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
@@ -12,14 +14,14 @@ build: $(BUILD)
|
||||
build-in-docker: clean
|
||||
mkdir -p /tmp/dokku-go-build-cache
|
||||
docker run --rm \
|
||||
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
||||
-v $(GO_ROOT_MOUNT) \
|
||||
-v $(GO_BUILD_CACHE):/root/.cache \
|
||||
-v $(GO_MOD_CACHE):/go/pkg/mod \
|
||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||
-e GO111MODULE=on \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' CGO_ENABLED=0 GOOS=linux GOARCH=$(GOARCH) make -j4 $(GO_PLUGIN_MAKE_TARGET)" || exit $$?
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM dokku/build-base:0.0.1
|
||||
FROM dokku/build-base:0.0.1 AS builder
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -8,8 +8,8 @@ RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
@@ -22,19 +22,41 @@ RUN make deb-setup rpm-setup sshcommand plugn
|
||||
|
||||
COPY . ${WORKDIR}
|
||||
|
||||
ENV GOPATH=/go
|
||||
|
||||
FROM builder as amd64
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
ENV GOPATH=/go
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
|
||||
FROM builder as armhf
|
||||
|
||||
COPY --from=amd64 /tmp /tmp
|
||||
COPY --from=amd64 /usr/local/share/man/man1/dokku.1 /usr/local/share/man/man1/dokku.1-generated
|
||||
|
||||
RUN rm -rf /tmp/build-dokku
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
ARG DOKKU_GIT_REV
|
||||
ARG IS_RELEASE=false
|
||||
|
||||
RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku rpm-dokku
|
||||
DOKKU_VERSION=${DOKKU_VERSION} \
|
||||
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
|
||||
IS_RELEASE=${IS_RELEASE} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
GOARCH=arm make version copyfiles \
|
||||
&& DOKKU_ARCHITECTURE=armhf GOARCH=arm make deb-dokku
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -16,7 +16,6 @@ def download_file(filename, url):
|
||||
|
||||
def upload_file(filename):
|
||||
versions = [
|
||||
"xenial"
|
||||
"focal"
|
||||
]
|
||||
cmd_template = "package_cloud push dokku/dokku/ubuntu/{0} {1}"
|
||||
|
||||
@@ -1,438 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import cgi
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
try:
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
except ImportError:
|
||||
import http.server as SimpleHTTPServer
|
||||
import socketserver as SocketServer
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.24.6'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
encoding = sys.stdout.encoding
|
||||
if encoding is None:
|
||||
encoding = 'utf-8'
|
||||
b = b.decode(encoding)
|
||||
b = b.strip()
|
||||
return b
|
||||
|
||||
|
||||
def string_to_bytes(s):
|
||||
if type(s) == str:
|
||||
encoding = sys.stdout.encoding
|
||||
if encoding is None:
|
||||
encoding = 'utf-8'
|
||||
s = s.encode(encoding)
|
||||
return s
|
||||
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'"
|
||||
hostname = bytes_to_string(subprocess.check_output(command, shell=True))
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
key_file = os.getenv('KEY_FILE', None)
|
||||
if os.path.isfile('/home/ec2-user/.ssh/authorized_keys'):
|
||||
key_file = '/home/ec2-user/.ssh/authorized_keys'
|
||||
elif os.path.isfile('/home/ubuntu/.ssh/authorized_keys'):
|
||||
key_file = '/home/ubuntu/.ssh/authorized_keys'
|
||||
else:
|
||||
key_file = '/root/.ssh/authorized_keys'
|
||||
|
||||
admin_keys = []
|
||||
if os.path.isfile(key_file):
|
||||
try:
|
||||
command = "cat {0}".format(key_file)
|
||||
admin_keys = bytes_to_string(subprocess.check_output(command, shell=True)).strip().split("\n")
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
ufw_display = 'block'
|
||||
try:
|
||||
command = "sudo ufw status"
|
||||
ufw_output = bytes_to_string(subprocess.check_output(command, shell=True).strip())
|
||||
if "inactive" in ufw_output:
|
||||
ufw_display = 'none'
|
||||
except subprocess.CalledProcessError:
|
||||
ufw_display = 'none'
|
||||
|
||||
|
||||
nginx_dir = '/etc/nginx'
|
||||
nginx_init = '/etc/init.d/nginx'
|
||||
try:
|
||||
command = "test -x /usr/bin/openresty"
|
||||
subprocess.check_output(command, shell=True)
|
||||
nginx_dir = '/usr/local/openresty/nginx/conf'
|
||||
nginx_init = '/etc/init.d/openresty'
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
|
||||
def check_boot():
|
||||
if 'onboot' not in sys.argv:
|
||||
return
|
||||
init_dir = os.getenv('INIT_DIR', '/etc/init')
|
||||
systemd_dir = os.getenv('SYSTEMD_DIR', '/etc/systemd/system')
|
||||
nginx_conf_dir = os.getenv('NGINX_CONF_DIR', '{0}/conf.d'.format(nginx_dir))
|
||||
|
||||
if os.path.exists(init_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f:
|
||||
f.write("start on runlevel [2345]\n")
|
||||
f.write("exec {0} selfdestruct\n".format(os.path.abspath(__file__)))
|
||||
if os.path.exists(systemd_dir):
|
||||
with open('{0}/dokku-installer.service'.format(systemd_dir), 'w') as f:
|
||||
f.write("[Unit]\n")
|
||||
f.write("Description=Dokku web-installer\n")
|
||||
f.write("\n")
|
||||
f.write("[Service]\n")
|
||||
f.write("ExecStart={0} selfdestruct\n".format(os.path.abspath(__file__)))
|
||||
f.write("\n")
|
||||
f.write("[Install]\n")
|
||||
f.write("WantedBy=multi-user.target\n")
|
||||
f.write("WantedBy=graphical.target\n")
|
||||
if os.path.exists(nginx_conf_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(nginx_conf_dir), 'w') as f:
|
||||
f.write("upstream dokku-installer { server 127.0.0.1:2000; }\n")
|
||||
f.write("server {\n")
|
||||
f.write(" listen 80;\n")
|
||||
f.write(" location / {\n")
|
||||
f.write(" proxy_pass http://dokku-installer;\n")
|
||||
f.write(" }\n")
|
||||
f.write("}\n")
|
||||
|
||||
subprocess.call('rm -f {0}/sites-enabled/*'.format(nginx_dir), shell=True)
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
def write_content(self, content):
|
||||
try:
|
||||
self.wfile.write(content)
|
||||
except TypeError:
|
||||
self.wfile.write(string_to_bytes(content))
|
||||
|
||||
|
||||
def do_GET(self):
|
||||
content = PAGE.replace('{VERSION}', VERSION)
|
||||
content = content.replace('{UFW_DISPLAY}', ufw_display)
|
||||
content = content.replace('{HOSTNAME}', hostname)
|
||||
content = content.replace('{AUTHORIZED_KEYS_LOCATION}', key_file)
|
||||
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.write_content(content)
|
||||
|
||||
def do_POST(self):
|
||||
if self.path not in ['/setup', '/setup/']:
|
||||
return
|
||||
|
||||
params = cgi.FieldStorage(fp=self.rfile,
|
||||
headers=self.headers,
|
||||
environ={
|
||||
'REQUEST_METHOD': 'POST',
|
||||
'CONTENT_TYPE': self.headers['Content-Type']})
|
||||
|
||||
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
|
||||
dokku_user = os.getenv('DOKKU_SYSTEM_GROUP', 'dokku')
|
||||
dokku_group = os.getenv('DOKKU_SYSTEM_USER', 'dokku')
|
||||
|
||||
vhost_enable = 'false'
|
||||
vhost_filename = '{0}/VHOST'.format(dokku_root)
|
||||
|
||||
if 'vhost' in params and params['vhost'].value == 'true':
|
||||
vhost_enable = 'true'
|
||||
with open(vhost_filename, 'w') as f:
|
||||
f.write(params['hostname'].value.strip("/"))
|
||||
shutil.chown(vhost_filename, dokku_user, dokku_group)
|
||||
else:
|
||||
try:
|
||||
os.remove(vhost_filename)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
hostname_filename = '{0}/HOSTNAME'.format(dokku_root)
|
||||
|
||||
with open(hostname_filename, 'w') as f:
|
||||
f.write(params['hostname'].value.strip("/"))
|
||||
|
||||
shutil.chown(hostname_filename, dokku_user, dokku_group)
|
||||
|
||||
for (index, key) in enumerate(params['keys'].value.splitlines(), 1):
|
||||
user = 'admin'
|
||||
if self.admin_user_exists() is not None:
|
||||
user = 'web-admin'
|
||||
if self.web_admin_user_exists() is not None:
|
||||
index = int(self.web_admin_user_exists()) + 1
|
||||
elif self.web_admin_user_exists() is None:
|
||||
index = 1
|
||||
elif self.admin_user_exists() is None:
|
||||
pass
|
||||
else:
|
||||
index = int(self.admin_user_exists()) + 1
|
||||
user = user + str(index)
|
||||
command = ['sshcommand', 'acl-add', 'dokku', user]
|
||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
||||
try:
|
||||
proc.stdin.write(key)
|
||||
except TypeError:
|
||||
proc.stdin.write(string_to_bytes(key))
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
set_debconf_selection('boolean', 'nginx_enable', 'true')
|
||||
set_debconf_selection('boolean', 'skip_key_file', 'true')
|
||||
set_debconf_selection('boolean', 'vhost_enable', vhost_enable)
|
||||
set_debconf_selection('boolean', 'web_config', 'false')
|
||||
set_debconf_selection('string', 'hostname', params['hostname'].value)
|
||||
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
content = json.dumps({'status': 'ok'})
|
||||
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.write_content(content)
|
||||
|
||||
def web_admin_user_exists(self):
|
||||
return self.user_exists('web-admin(\d+)')
|
||||
|
||||
def admin_user_exists(self):
|
||||
return self.user_exists('admin(\d+)')
|
||||
|
||||
def user_exists(self, name):
|
||||
command = 'dokku ssh-keys:list'
|
||||
pattern = re.compile(r'NAME="' + name + '"')
|
||||
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
|
||||
max_num = 0
|
||||
exists = False
|
||||
for line in proc.stdout:
|
||||
m = pattern.search(bytes_to_string(line))
|
||||
if m:
|
||||
# User of the form `user` or `user#` exists
|
||||
exists = True
|
||||
max_num = max(max_num, int(m.group(1)))
|
||||
if exists:
|
||||
return max_num
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def set_debconf_selection(debconf_type, key, value):
|
||||
found = False
|
||||
with open('/etc/os-release', 'r') as f:
|
||||
for line in f:
|
||||
if 'debian' in line:
|
||||
found = True
|
||||
|
||||
if not found:
|
||||
return
|
||||
|
||||
ps = subprocess.Popen(['echo', 'dokku dokku/{0} {1} {2}'.format(
|
||||
key, debconf_type, value
|
||||
)], stdout=subprocess.PIPE)
|
||||
|
||||
try:
|
||||
subprocess.check_output(['debconf-set-selections'], stdin=ps.stdout)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
ps.wait()
|
||||
|
||||
|
||||
class DeleteInstallerThread(object):
|
||||
def __init__(self, interval=1):
|
||||
thread = threading.Thread(target=self.run, args=())
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
def run(self):
|
||||
command = "rm {0}/conf.d/dokku-installer.conf && {1} stop && {1} start".format(nginx_dir, nginx_init)
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && (stop dokku-installer || systemctl stop dokku-installer.service)"
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
check_boot()
|
||||
|
||||
port = int(os.getenv('PORT', 2000))
|
||||
httpd = SocketServer.TCPServer(("", port), GetHandler)
|
||||
print("Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port))
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
PAGE = """
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Dokku Setup</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
|
||||
<style>
|
||||
.bd-callout {
|
||||
padding: 1.25rem;
|
||||
margin-top: 1.25rem;
|
||||
margin-bottom: 1.25rem;
|
||||
border: 1px solid #eee;
|
||||
border-left-width: .25rem;
|
||||
border-radius: .25rem;
|
||||
}
|
||||
.bd-callout p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.bd-callout-info {
|
||||
border-left-color: #5bc0de;
|
||||
}
|
||||
pre {
|
||||
font-size: 80%;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
h1 small {
|
||||
font-size: 50%;
|
||||
}
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.container {
|
||||
width: 640px;
|
||||
}
|
||||
.result {
|
||||
padding-left: 20px;
|
||||
}
|
||||
input.form-control, textarea.form-control {
|
||||
background-color: #fafbfc;
|
||||
font-size: 14px;
|
||||
}
|
||||
input.form-control::placeholder, textarea.form-control::placeholder {
|
||||
color: #adb2b8
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<form id="form" role="form">
|
||||
<h1 class="pt-3">Dokku Setup <small class="text-muted">{VERSION}</small></h1>
|
||||
<div class="alert alert-warning small" role="alert">
|
||||
<strong>Warning:</strong> The SSH key filled out here can grant root access to the server. Please complete the setup as soon as possible.
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>Admin Access</h3>
|
||||
<div class="form-group">
|
||||
<label for="key">Public SSH Keys</label><br />
|
||||
<textarea class="form-control" name="keys" rows="5" id="key" placeholder="Begins with 'ssh-rsa', 'ssh-dss', 'ssh-ed25519', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'">{ADMIN_KEYS}</textarea>
|
||||
<small class="form-text text-muted">Public keys allow users to ssh onto the server as the <code>dokku</code> user, as well as remotely execute Dokku commands. They are currently auto-populated from: <code>{AUTHORIZED_KEYS_LOCATION}</code>, and can be changed later via the <a href="https://dokku.com/docs/deployment/user-management/" target="_blank"><code>dokku ssh-keys</code></a> plugin.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>Hostname Configuration</h3>
|
||||
<div class="form-group">
|
||||
<label for="hostname">Hostname</label>
|
||||
<input class="form-control" type="text" id="hostname" name="hostname" value="{HOSTNAME}" placeholder="A hostname or ip address such as {HOSTNAME}" />
|
||||
<small class="form-text text-muted">This will be used as the default host for all applications, and can be changed later via the <a href="https://dokku.com/docs/configuration/domains/" target="_blank"><code>dokku domains:set-global</code></a> command.</small>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" id="vhost" name="vhost" value="true">
|
||||
<label class="form-check-label" for="vhost">Use virtualhost naming for apps</label>
|
||||
<small class="form-text text-muted">When enabled, Nginx will be run on port 80 and proxy requests to apps based on hostname.</small>
|
||||
<small class="form-text text-muted">When disabled, a specific port will be setup for each application on first deploy, and requests to that port will be proxied to the relevant app.</small>
|
||||
</div>
|
||||
<div class="alert alert-warning small mt-3 d-{UFW_DISPLAY}" role="alert">
|
||||
<strong>Warning:</strong> UFW is active. To allow traffic to specific ports, run <code>sudo ufw allow PORT</code> for the port in question.
|
||||
</div>
|
||||
<div class="bd-callout bd-callout-info">
|
||||
<h5>What will app URLs look like?</h5>
|
||||
<pre><code id="example">http://hostname:port</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" onclick="setup()" class="btn btn-primary">Finish Setup</button> <span class="result"></span>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="error-output"></div>
|
||||
<script>
|
||||
var $ = document.querySelector.bind(document)
|
||||
|
||||
function setup() {
|
||||
if ($("#key").value.trim() == "") {
|
||||
alert("Your admin public key cannot be blank.")
|
||||
return
|
||||
}
|
||||
if ($("#hostname").value.trim() == "") {
|
||||
alert("Your hostname cannot be blank.")
|
||||
return
|
||||
}
|
||||
var data = new FormData($("#form"))
|
||||
|
||||
var inputs = [].slice.call(document.querySelectorAll("input, textarea, button"))
|
||||
inputs.forEach(function (input) {
|
||||
input.disabled = true
|
||||
})
|
||||
|
||||
var result = $(".result")
|
||||
fetch("/setup", {method: "POST", body: data})
|
||||
.then(function(response) {
|
||||
if (response.ok) {
|
||||
return response.json()
|
||||
} else {
|
||||
throw new Error('Server returned error')
|
||||
}
|
||||
})
|
||||
.then(function(response) {
|
||||
result.classList.add("text-success");
|
||||
result.textContent = "Success! Redirecting in 3 seconds. .."
|
||||
setTimeout(function() {
|
||||
window.location.href = "https://dokku.com/docs~{VERSION}/deployment/application-deployment/";
|
||||
}, 3000);
|
||||
})
|
||||
.catch(function (error) {
|
||||
result.classList.add("text-danger");
|
||||
result.textContent = "Could not send the request"
|
||||
})
|
||||
}
|
||||
|
||||
function update() {
|
||||
if ($("#vhost").matches(":checked") && $("#hostname").value.match(/^(\d{1,3}\.){3}\d{1,3}$/)) {
|
||||
alert("In order to use virtualhost naming, the hostname must not be an IP but a valid domain name.")
|
||||
$("#vhost").checked = false;
|
||||
}
|
||||
if ($("#vhost").matches(':checked')) {
|
||||
$("#example").textContent = "http://<app-name>."+$("#hostname").value
|
||||
} else {
|
||||
$("#example").textContent = "http://"+$("#hostname").value+":<app-port>"
|
||||
}
|
||||
}
|
||||
$("#vhost").addEventListener("change", update);
|
||||
$("#hostname").addEventListener("input", update);
|
||||
update();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -55,7 +55,7 @@ fn-dokku-host() {
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_HOST" ]]; then
|
||||
fn-client-help-msg
|
||||
return
|
||||
fi
|
||||
|
||||
echo "$DOKKU_HOST"
|
||||
@@ -100,11 +100,14 @@ main() {
|
||||
done
|
||||
|
||||
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
|
||||
if [[ -z "$DOKKU_REMOTE_HOST" ]]; then
|
||||
fn-client-help-msg
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]]; then
|
||||
if [[ -d .git ]] || git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
set +e
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
set -e
|
||||
else
|
||||
echo " ! This is not a git repository" 1>&2
|
||||
|
||||
@@ -6,7 +6,7 @@ readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXXXX")"
|
||||
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
@@ -49,6 +49,7 @@ fn-build-dokku() {
|
||||
--build-arg IS_RELEASE="$IS_RELEASE" \
|
||||
--build-arg PLUGIN_MAKE_TARGET="build" \
|
||||
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
|
||||
--progress plain \
|
||||
-f "contrib/build-dokku.Dockerfile" \
|
||||
-t "$NAME" .
|
||||
return "$?"
|
||||
@@ -134,9 +135,20 @@ fn-publish-package() {
|
||||
|
||||
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
|
||||
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
|
||||
[[ "$RELEASE_TYPE" == "raspbian" ]] && DIST=raspbian
|
||||
|
||||
if [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("xenial" "bionic" "focal")
|
||||
if [[ "$RELEASE_TYPE" == "raspbian" ]]; then
|
||||
OS_IDS=("buster")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing deb to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
ex="$?"
|
||||
if [[ "$ex" -ne "0" ]]; then
|
||||
EXIT_CODE="$ex"
|
||||
fi
|
||||
done
|
||||
elif [[ "$DIST" == "ubuntu" ]]; then
|
||||
OS_IDS=("bionic" "focal")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -147,7 +159,7 @@ fn-publish-package() {
|
||||
done
|
||||
|
||||
DIST=debian
|
||||
OS_IDS=("stretch" "buster")
|
||||
OS_IDS=("stretch" "buster" "bullseye")
|
||||
for OS_ID in "${OS_IDS[@]}"; do
|
||||
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
|
||||
package_cloud push "${REPOSITORY}/${DIST}/${OS_ID}" "$PACKAGE_NAME"
|
||||
@@ -204,7 +216,6 @@ fn-repo-update() {
|
||||
return
|
||||
fi
|
||||
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" contrib/dokku-installer.py
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" debian/control
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" Dockerfile
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/advanced-usage/plugin-management.md
|
||||
@@ -380,11 +391,13 @@ main() {
|
||||
|
||||
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error extracting deb package"
|
||||
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
|
||||
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
|
||||
|
||||
if [[ "$RELEASE" != "build" ]]; then
|
||||
fn-publish-package "$IS_RELEASE" "raspbian" "build/dokku_${NEXT_VERSION}_armhf.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
|
||||
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
|
||||
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
log-info() {
|
||||
# shellcheck disable=SC2034
|
||||
|
||||
11
deb.mk
11
deb.mk
@@ -1,8 +1,7 @@
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE = amd64
|
||||
BUILD_DIRECTORY ?= /tmp
|
||||
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
|
||||
DOKKU_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_ARCHITECTURE ?= amd64
|
||||
|
||||
ifndef IS_RELEASE
|
||||
IS_RELEASE = true
|
||||
@@ -45,9 +44,9 @@ ifneq (,$(findstring false,$(IS_RELEASE)))
|
||||
endif
|
||||
|
||||
cp -r debian /tmp/build-dokku/DEBIAN
|
||||
sed -i.bak "s/^Architecture: .*/Architecture: $(DOKKU_ARCHITECTURE)/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
rm -f /tmp/build-dokku/DEBIAN/lintian-overrides
|
||||
cp debian/lintian-overrides /tmp/build-dokku/usr/share/lintian/overrides/dokku
|
||||
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build-dokku/var/lib/dokku/STABLE_VERSION`/g" /tmp/build-dokku/DEBIAN/control && rm /tmp/build-dokku/DEBIAN/control.bak
|
||||
dpkg-deb --build /tmp/build-dokku "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
lintian "$(BUILD_DIRECTORY)/dokku_`cat /tmp/build-dokku/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
|
||||
|
||||
|
||||
8
debian/config
vendored
8
debian/config
vendored
@@ -10,14 +10,6 @@ fi
|
||||
readonly ACTION="${1:-configure}"
|
||||
readonly VERSION="${2:-dev}"
|
||||
|
||||
db_input "high" "dokku/web_config" || true
|
||||
db_go || true
|
||||
|
||||
db_get "dokku/web_config"
|
||||
if [ $RET = "true" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
db_input "high" "dokku/nginx_enable" || true
|
||||
db_input "high" "dokku/hostname" || true
|
||||
db_input "high" "dokku/vhost_enable" || true
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,10 +1,10 @@
|
||||
Package: dokku
|
||||
Version: 0.24.6
|
||||
Version: 0.26.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, parallel, dokku-update, dokku-event-listener
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-image-labeler (>= 0.2.2), net-tools, netrc, software-properties-common, parallel, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip
|
||||
Recommends: herokuish (>= 0.3.4), bash-completion, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
3
debian/lintian-overrides
vendored
3
debian/lintian-overrides
vendored
@@ -10,6 +10,3 @@ dokku: hardening-no-relro
|
||||
|
||||
# Built golang binaries link to libc
|
||||
dokku: missing-dependency-on-libc
|
||||
|
||||
# Temporary python dependency until #2247 is resolved
|
||||
dokku: python-script-but-no-python-dep usr/share/dokku/contrib/dokku-installer.py
|
||||
|
||||
54
debian/postinst
vendored
54
debian/postinst
vendored
@@ -43,6 +43,20 @@ setup-storage() {
|
||||
}
|
||||
|
||||
setup-plugins() {
|
||||
echo "Deleting invalid plugins"
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/core-plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/available/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/available/" -type d -empty -delete
|
||||
fi
|
||||
if [ -f "${DOKKU_LIB_ROOT}/plugins/enabled/" ]; then
|
||||
find "${DOKKU_LIB_ROOT}/plugins/enabled/" -type d -empty -delete
|
||||
fi
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||
@@ -88,40 +102,7 @@ setup-sshcommand() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup-dokku-installer() {
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
[[ -x /usr/bin/openresty ]] && NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
|
||||
if command -v "python3" &>/dev/null; then
|
||||
sed -i '1 s/^.*$/#!\/usr\/bin\/env python3/' /usr/share/dokku/contrib/dokku-installer.py
|
||||
elif command -v "python2.7" &>/dev/null; then
|
||||
sed -i '1 s/^.*$/#!\/usr\/bin\/env python2.7/' /usr/share/dokku/contrib/dokku-installer.py
|
||||
fi
|
||||
|
||||
if [[ -f "$NGINX_ROOT/conf.d/dokku-installer.conf" ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2>/dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" >/dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
dpkg-handling() {
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
@@ -133,9 +114,6 @@ dpkg-handling() {
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
@@ -157,10 +135,10 @@ case "$1" in
|
||||
|
||||
setup-user
|
||||
setup-storage
|
||||
|
||||
dpkg-handling
|
||||
setup-plugins
|
||||
setup-sshcommand
|
||||
setup-dokku-installer
|
||||
dpkg-handling
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
47
debian/preinst
vendored
47
debian/preinst
vendored
@@ -7,55 +7,8 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
fi
|
||||
|
||||
setup_dokku_installer() {
|
||||
NGINX_BASE_PATH="$1"
|
||||
NGINX_INIT_NAME="$2"
|
||||
|
||||
NGINX_CONF="${NGINX_BASE_PATH}/conf.d/dokku-installer.conf"
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
{
|
||||
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
|
||||
echo 'server {'
|
||||
echo ' listen 80;'
|
||||
echo ' location / {'
|
||||
echo ' proxy_pass http://dokku-installer;'
|
||||
echo ' }'
|
||||
echo '}'
|
||||
} >>$NGINX_CONF
|
||||
|
||||
rm -f $NGINX_BASE_PATH/sites-enabled/*
|
||||
DOKKU_DISTRO="$(
|
||||
. /etc/os-release >/dev/null 2>&1 || true
|
||||
echo "$ID"
|
||||
)"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
/usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" reload || /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" start
|
||||
;;
|
||||
ubuntu)
|
||||
if [[ -x /usr/bin/sv ]]; then
|
||||
/usr/bin/sv reload "$NGINX_INIT_NAME" || /usr/bin/sv start "$NGINX_INIT_NAME"
|
||||
else
|
||||
"/etc/init.d/$NGINX_INIT_NAME" reload || "/etc/init.d/$NGINX_INIT_NAME" start
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
install)
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
setup_dokku_installer "/usr/local/openresty/nginx/conf" "openresty"
|
||||
else
|
||||
setup_dokku_installer "/etc/nginx" "nginx"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/skip_key_file"
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
||||
db_get "dokku/key_file"
|
||||
|
||||
5
debian/templates
vendored
5
debian/templates
vendored
@@ -1,8 +1,3 @@
|
||||
Template: dokku/web_config
|
||||
Description: Enable the web-based config page?
|
||||
Type: boolean
|
||||
Default: true
|
||||
|
||||
Template: dokku/vhost_enable
|
||||
Description: Enable vhost-based deployments?
|
||||
Type: boolean
|
||||
|
||||
@@ -12,9 +12,20 @@ log-fail() {
|
||||
exit 1
|
||||
}
|
||||
|
||||
support-userns() {
|
||||
chown 0:0 /usr/bin/sudo
|
||||
chmod 4755 /usr/bin/sudo
|
||||
chown 0:0 /usr/lib/sudo/sudoers.so
|
||||
chown -R 0:0 /etc/sudoers
|
||||
chown -R 0:0 /etc/sudoers.d
|
||||
chown -R 0:0 /run/sshd
|
||||
}
|
||||
|
||||
main() {
|
||||
local NGINX_ROOT
|
||||
|
||||
support-userns
|
||||
|
||||
if [[ ! -d /mnt/dokku ]]; then
|
||||
log-info "Creating missing /mnt/dokku"
|
||||
mkdir -p /mnt/dokku
|
||||
@@ -51,6 +62,12 @@ main() {
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
|
||||
fi
|
||||
|
||||
if [[ -n "$DOKKU_HOST_ROOT" ]]; then
|
||||
touch /etc/default/dokku
|
||||
echo "export DOKKU_HOST_ROOT=$DOKKU_HOST_ROOT" >>/etc/default/dokku
|
||||
chown dokku:dokku /etc/default/dokku
|
||||
fi
|
||||
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
|
||||
@@ -1 +1 @@
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-image-labeler,/usr/bin/pack
|
||||
|
||||
20
docker/usr/local/bin/pack
Executable file
20
docker/usr/local/bin/pack
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
main() {
|
||||
declare desc="re-runs pack commands as sudo"
|
||||
local PACK_BIN=""
|
||||
if [[ -x "/usr/bin/pack" ]]; then
|
||||
PACK_BIN="/usr/bin/pack"
|
||||
fi
|
||||
|
||||
if [[ -z "$PACK_BIN" ]]; then
|
||||
echo "! No pack binary found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo -E "$PACK_BIN" "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -32,7 +32,7 @@ To extract the backup onto another server, copy the backup to the server and ext
|
||||
sudo tar -xzvf path/to/dokku/backup.tar.gz -C /
|
||||
```
|
||||
|
||||
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual applications can be rebuilt. Please consult the [process management documentation](/docs/processes/process-management.md#rebuilding-apps) for more information on how to rebuild applications.
|
||||
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual apps can be rebuilt. Please consult the [process management documentation](/docs/processes/process-management.md#rebuilding-apps) for more information on how to rebuild apps.
|
||||
|
||||
## Caveats
|
||||
|
||||
@@ -56,9 +56,15 @@ git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
git push dokku [master]
|
||||
```
|
||||
|
||||
### Docker Networks
|
||||
|
||||
Docker networks generated by Dokku should be recreated. Running `dokku network:report` will output all networks in use by various apps, which can then be used to recreate them via `dokku network:create $NETWORK`.
|
||||
|
||||
Networks created by tools other than Dokku may be created as they initially were.
|
||||
|
||||
### Docker Image and Tar-based Apps
|
||||
|
||||
These applications may fail to rebuild via the normal `ps:rebuild` method. Redeploy these apps by running the original commands used to deploy them
|
||||
These apps may fail to rebuild via the normal `ps:rebuild` method. Redeploy these apps by running the original commands used to deploy them
|
||||
|
||||
### Datastores
|
||||
|
||||
@@ -81,14 +87,13 @@ The plugin directory is contained at the `/var/lib/dokku/plugins` directory. Cor
|
||||
|
||||
Note that restoring a plugin will not trigger any `install` or `dependencies` triggers. You will need to run these manually. See the [plugin management documentation](/docs/advanced-usage/plugin-management.md#installing-a-plugin) for more information on how to trigger these two hooks.
|
||||
|
||||
|
||||
### Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
System administrators are highly encouraged to store persistent data in app-specific subdirectories of the path `/var/lib/dokku/data/storage`. This will help ensure restores of the aforementioned primary Dokku directories will restore service to all apps.
|
||||
|
||||
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more information on how to attach persistent storage to your application.
|
||||
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more information on how to attach persistent storage to your app.
|
||||
|
||||
## Recovering app code
|
||||
|
||||
|
||||
@@ -2,41 +2,45 @@
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
## Usage
|
||||
|
||||
### Overview
|
||||
|
||||
Sometimes you need to run a command on deployment time, but before an app is completely deployed. Common use cases include:
|
||||
|
||||
* Checking a database is initialized
|
||||
* Running database migrations
|
||||
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
||||
- Checking a database is initialized
|
||||
- Running database migrations
|
||||
- Any commands required to set up the server (e.g. something like a Django `collectstatic`)
|
||||
|
||||
To support this, Dokku provides support for a special `release` command within your app's `Procfile`, as well as a special `scripts.dokku` key inside of your app's `app.json` file. Be aware that all commands are run within the context of the built docker image - no commands affect the host unless there are volume mounts attached to your app.
|
||||
|
||||
Each "phase" has different expectations and limitations:
|
||||
|
||||
- `app.json`: `scripts.dokku.predeploy`
|
||||
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
|
||||
- Are changes committed to the image at this phase: Yes
|
||||
- Example use-cases
|
||||
- Bundling assets in a slightly different way
|
||||
- Installing a custom package from source or copying a binary into place
|
||||
- When to use: This should be used if your app does not support arbitrary build commands and you need to make changes to the built image.
|
||||
- Are changes committed to the image at this phase: Yes
|
||||
- Example use-cases
|
||||
- Bundling assets in a slightly different way
|
||||
- Installing a custom package from source or copying a binary into place
|
||||
- `app.json`: `scripts.dokku.postdeploy`
|
||||
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Notifying slack that your app is deployed
|
||||
- Coordinating traffic routing with a central load balancer
|
||||
- When to use: This should be used in conjunction with external systems to signal the completion of your deploy.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Notifying slack that your app is deployed
|
||||
- Coordinating traffic routing with a central load balancer
|
||||
- `app.json`: `scripts.postdeploy`
|
||||
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Setting up OAuth clients and DNS
|
||||
- Loading seed/test data into the app’s test database
|
||||
- When to use: This should be used when you wish to run a command _once_, after the app is created and not on subsequent deploys to the app.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Setting up OAuth clients and DNS
|
||||
- Loading seed/test data into the app’s test database
|
||||
- `Procfile`: `release`
|
||||
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Sending CSS, JS, and other assets from your app’s slug to a CDN or S3 bucket
|
||||
- Priming or invalidating cache stores
|
||||
- Running database migrations
|
||||
- When to use: This should be used in conjunction with external systems to signal the completion of your app image build.
|
||||
- Are changes committed to the image at this phase: No
|
||||
- Example use-cases
|
||||
- Sending CSS, JS, and other assets from your app’s slug to a CDN or S3 bucket
|
||||
- Priming or invalidating cache stores
|
||||
- Running database migrations
|
||||
|
||||
Additionally, if using a Dockerfile with an `ENTRYPOINT`, the deployment task is passed to that entrypoint as is. The exceptions are if the entrypoint is one of the following:
|
||||
|
||||
@@ -49,13 +53,89 @@ Please keep the above in mind when utilizing deployment tasks.
|
||||
|
||||
> To execute commands on the host during a release phase, see the [plugin creation documentation](/docs/development/plugin-creation.md) docs for more information on building your own custom plugin.
|
||||
|
||||
## `app.json` deployment tasks
|
||||
### Changing the `app.json` location
|
||||
|
||||
When deploying a monorepo, it may be desirable to specify the specific path of the `app.json` file to use for a given app. This can be done via the `app-json:set` command. If a value is specified and that file does not exist within the repository, Dokku will continue the build process as if the repository has no `app.json` file.
|
||||
|
||||
```shell
|
||||
dokku app-json:set node-js-app appjson-path second-app.json
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku app-json:set node-js-app appjson-path
|
||||
```
|
||||
|
||||
The `appjson-path` property can also be set globally. The global default is `app.json`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku app-json:set --global appjson-path global-app.json
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku app-json:set --global appjson-path
|
||||
```
|
||||
|
||||
### Displaying app-json reports for an app
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
You can get a report about the app's storage status using the `app-json:report` command:
|
||||
|
||||
```shell
|
||||
dokku app-json:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app app-json information
|
||||
App-json computed appjson path: app2.json
|
||||
App-json global appjson path: app.json
|
||||
App-json appjson path: app2.json
|
||||
=====> python-sample app-json information
|
||||
App-json computed appjson path: app.json
|
||||
App-json global appjson path: app.json
|
||||
App-json appjson path:
|
||||
=====> ruby-sample app-json information
|
||||
App-json computed appjson path: app.json
|
||||
App-json global appjson path: app.json
|
||||
App-json appjson path:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku app-json:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app app-json information
|
||||
App-json computed appjson path: app2.json
|
||||
App-json global appjson path: app.json
|
||||
App-json appjson path: app2.json
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku app-json:report node-js-app --app-json-appjson-path
|
||||
```
|
||||
|
||||
```
|
||||
app2.json
|
||||
```
|
||||
|
||||
### Deployment tasks
|
||||
|
||||
#### `app.json` deployment tasks
|
||||
|
||||
Dokku provides limited support for the `app.json` manifest from Heroku (documentation available [here](https://devcenter.heroku.com/articles/app-json-schema)). The keys available for use with Deployment Tasks are:
|
||||
|
||||
- `scripts.dokku.predeploy`: This is run _after_ an app's docker image is built, but _before_ any containers are scheduled. Changes made to your image are committed at this phase.
|
||||
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
|
||||
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are *not* committed at this phase.
|
||||
- `scripts.dokku.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||
- `scripts.postdeploy`: This is run _after_ an app's containers are scheduled. Changes made to your image are _not_ committed at this phase.
|
||||
|
||||
For buildpack-based deployments, the location of the `app.json` file should be at the root of your repository. Dockerfile-based app deploys should have the `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
|
||||
|
||||
@@ -75,7 +155,7 @@ The following is an example `app.json` file. Please note that only the `scripts.
|
||||
}
|
||||
```
|
||||
|
||||
## Procfile Release command
|
||||
#### Procfile Release command
|
||||
|
||||
> New as of 0.14.0
|
||||
|
||||
@@ -87,6 +167,6 @@ To use the `release` command, simply add a `release` stanza to your Procfile.
|
||||
release: curl https://some.external.api.service.com/deployment?state=built
|
||||
```
|
||||
|
||||
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are *not* persisted to disk.
|
||||
Unlike the `scripts.dokku.predeploy` command, changes made during by the `release` command are _not_ persisted to disk.
|
||||
|
||||
> Warning: scaling the release command up will likely result in unspecified issues within your deployment, and is highly discouraged.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> New as of 0.3.17
|
||||
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
Pass [container options](https://docs.docker.com/engine/reference/run/) to the `docker run` command during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
|
||||
@@ -29,6 +29,8 @@ Manipulation of docker options will not restart running containers. This enables
|
||||
|
||||
More information on supported Docker options can be found here: https://docs.docker.com/engine/reference/commandline/run/.
|
||||
|
||||
Container options configured via the `docker-options` plugin are not used to modify the process a container runs. Container options are the `[OPTIONS]` portion of the following, where `[CONTAINER_COMMAND]` and `[ARG]` are the process and the arguments passed to it that are launched in the created container: `docker run [OPTIONS] [CONTAINER_COMMAND] [ARG...]`. Please see the documentation for [customizing the run command](/docs/deployment/builders/dockerfiles.md#customizing-the-run-command) or use a [Procfile](/docs/deployment/builders/dockerfiles.md#procfiles-and-multiple-processes) to modify the command used by a Dockerfile-based container.
|
||||
|
||||
## Examples
|
||||
|
||||
### Add Docker options
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
|
||||
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
|
||||
|
||||
|
||||
```
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
storage:ensure-directory [--chown option] <directory> # Creates a persistent storage directory in the recommended storage path
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
```
|
||||
|
||||
> The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy/run phase.
|
||||
@@ -21,50 +21,77 @@ The storage plugin supports the following mount points:
|
||||
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`. For simplicity, the Dokku project recommends using the directory `/var/lib/dokku/data/storage` directory as the root host path for mounts. This directory is created on Dokku installation.
|
||||
### Creating storage directories
|
||||
|
||||
> New as of 0.25.5
|
||||
|
||||
A storage directory can be created with the `storage:ensure-directory` command. This command will create a subdirectory in the recommended `/var/lib/doku/data/storage` path - created during Dokku installation - and prepare it for use with an app.
|
||||
|
||||
```shell
|
||||
# we use a subdirectory inside of the host directory to scope it to just the app
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
dokku storage:ensure-directory lollipop
|
||||
```
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container. Mounts are only available for containers crated via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||
```
|
||||
-----> Ensuring /var/lib/dokku/data/storage/lollipop exists
|
||||
Setting directory ownership to 32767:32767
|
||||
Directory ready for mounting
|
||||
```
|
||||
|
||||
> If the `/storage` path within the container had pre-existing content, the container files will be overrwritten. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||
By default, permissions are set for usage with Herokuish buildpacks. These permissions can be changed via the `--chown` option according to the following table:
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
- `--chown herokuish` (default): Use `32767:32767` as the folder permissions.
|
||||
- This is used for apps deployed with Buildpacks via Herokuish.
|
||||
- `--chown heroku`: Use `1000:1000` as the folder permissions.
|
||||
- This is used for apps deployed with Cloud Native Buildpacks using the `heroku/buildpacks` builder.
|
||||
- `--chown packeto`: Use `2000:2000` as the folder permissions.
|
||||
- This is used for apps deployed with Cloud Native Buildpacks using the `cloudfoundry/cnb` or `packeto` builders.
|
||||
- `--chown false`: Skips the `chown` call.
|
||||
|
||||
Users deploying via Dockerfile will want to specify `--chown false` and manually `chown` the created directory if the user and/or group id of the runnning process in the deployed container do not correspond to any of the above options.
|
||||
|
||||
> Warning: Failing to set the correct directory ownership may result in issues in persisting files written to the mounted storage directory.
|
||||
|
||||
### Mounting storage into apps
|
||||
|
||||
Dokku supports mounting both explicit host paths as well as docker volumes via the `storage:mount` command. This takes two arguments, an app name and a `host-path:container-path` or `docker-volume:container-path` combination.
|
||||
|
||||
```shell
|
||||
# mount the directory into your container's /app/storage directory, relative to the container root (/)
|
||||
# explicit host paths _must_ exist prior to usage.
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
|
||||
# mount the docker volume into your container's /app/storage directory, relative to the container root (/)
|
||||
# docker volumes _must_ exist prior to usage.
|
||||
dokku storage:mount node-js-app some-docker-volume:/app/storage
|
||||
```
|
||||
|
||||
In the first example, Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/app/storage` inside the container. The mount point is *not* relative to your app's working directory, and is instead relative to the root (`/`) of the container. Mounts are only available for containers created via `run` and by the deploy process, and not during the build process. In addition, the host path is never auto-created by either Dokku or Docker, and should be an explicit path, not one relative to the current working directory.
|
||||
|
||||
> If the `/storage` path within the container had pre-existing content, the container files will be over-written. This may be an issue for users that create assets at build time but then mount a directory at the same place during runtime. Files are not merged.
|
||||
|
||||
Once persistent storage is mounted, the app requires a restart. See the [process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
|
||||
```shell
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root (`/`) of the container.
|
||||
### Unmounting storage
|
||||
|
||||
If an app no longer requires a mounted volume or directory, the `storage:unmount` command can be called. This takes the same arguments as the `storage:mount` command, an app name and a `host-path:container-path` or `docker-volume:container-path` combination.
|
||||
|
||||
```shell
|
||||
# creating storage for the app 'node-js-app'
|
||||
mkdir -p /var/lib/dokku/data/storage/node-js-app
|
||||
# unmount the directory from your container's /app/storage directory, relative to the container root (/)
|
||||
dokku storage:unmount node-js-app /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
|
||||
# set the directory ownership. Below is an example for herokuish
|
||||
# but see the `Directory Permissions` section for more details
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storage
|
||||
# unmount the docker volume from your container's /app/storage directory, relative to the container root (/)
|
||||
dokku storage:unmount node-js-app some-docker-volume:/app/storage
|
||||
```
|
||||
|
||||
You can mount one or more directories as desired by following the above pattern.
|
||||
Once persistent storage is unmounted, the app requires a restart. See the [process scaling documentation](/docs/processes/process-management.md) for more information.
|
||||
|
||||
### Directory Permissions
|
||||
|
||||
The host directory should always be owned by the container user and group id. If this is not the case, files may not persist when written to mounted storage.
|
||||
|
||||
- Buildpacks via Herokuish: Use `32767:32767` as the file permissions
|
||||
- For Cloud Native Buildpacks: This will depend on the builder in question, but can be retrieved via the `CNB_USER_ID` and `CNB_GROUP_ID` environment variables on the builder image. Common builders are as follows:
|
||||
- heroku/buildpacks: `1000:1000`
|
||||
- cloudfoundry/cnb: `2000:2000`
|
||||
- packeto: `2000:2000`
|
||||
- Dockerfile and Docker Image: Use the user and group id which corresponds to the one running the process within the container.
|
||||
```shell
|
||||
dokku ps:restart app-name
|
||||
```
|
||||
|
||||
### Displaying storage reports for an app
|
||||
|
||||
@@ -112,9 +139,9 @@ dokku storage:report node-js-app --storage-deploy-mounts
|
||||
|
||||
## Use Cases
|
||||
|
||||
### Persistent storage
|
||||
### Sharing storage across deploys
|
||||
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web applications, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
Dokku is powered by Docker containers, which recommends in their [best practices](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#containers-should-be-ephemeral) that containers be treated as ephemeral. In order to manage persistent storage for web apps, like user uploads or large binary assets like images, a directory outside the container should be mounted.
|
||||
|
||||
### Shared storage between containers
|
||||
|
||||
@@ -140,11 +167,11 @@ You cannot use mounted volumes during the build phase of a Dockerfile deploy. Th
|
||||
|
||||
> 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.
|
||||
|
||||
## Application User and Persistent Storage file ownership (buildpack apps only)
|
||||
## App User and Persistent Storage file ownership (buildpack apps only)
|
||||
|
||||
> New as of 0.7.1
|
||||
|
||||
By default, Dokku will execute your buildpack application processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
|
||||
By default, Dokku will execute your buildpack app processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
|
||||
|
||||
> NOTE: this user must exist in your herokuish image.
|
||||
|
||||
|
||||
@@ -35,35 +35,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.24.6 enabled dokku core standard plugin
|
||||
20_events 0.24.6 enabled dokku core events logging plugin
|
||||
app-json 0.24.6 enabled dokku core app-json plugin
|
||||
apps 0.24.6 enabled dokku core apps plugin
|
||||
build-env 0.24.6 enabled dokku core build-env plugin
|
||||
buildpacks 0.24.6 enabled dokku core buildpacks plugin
|
||||
certs 0.24.6 enabled dokku core certificate management plugin
|
||||
checks 0.24.6 enabled dokku core checks plugin
|
||||
common 0.24.6 enabled dokku core common plugin
|
||||
config 0.24.6 enabled dokku core config plugin
|
||||
docker-options 0.24.6 enabled dokku core docker-options plugin
|
||||
domains 0.24.6 enabled dokku core domains plugin
|
||||
enter 0.24.6 enabled dokku core enter plugin
|
||||
git 0.24.6 enabled dokku core git plugin
|
||||
logs 0.24.6 enabled dokku core logs plugin
|
||||
network 0.24.6 enabled dokku core network plugin
|
||||
nginx-vhosts 0.24.6 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.24.6 enabled dokku core plugin plugin
|
||||
proxy 0.24.6 enabled dokku core proxy plugin
|
||||
ps 0.24.6 enabled dokku core ps plugin
|
||||
repo 0.24.6 enabled dokku core repo plugin
|
||||
resource 0.24.6 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.24.6 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.24.6 enabled dokku core shell plugin
|
||||
ssh-keys 0.24.6 enabled dokku core ssh-keys plugin
|
||||
storage 0.24.6 enabled dokku core storage plugin
|
||||
tags 0.24.6 enabled dokku core tags plugin
|
||||
tar 0.24.6 enabled dokku core tar plugin
|
||||
trace 0.24.6 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.26.2 enabled dokku core standard plugin
|
||||
20_events 0.26.2 enabled dokku core events logging plugin
|
||||
app-json 0.26.2 enabled dokku core app-json plugin
|
||||
apps 0.26.2 enabled dokku core apps plugin
|
||||
build-env 0.26.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.26.2 enabled dokku core buildpacks plugin
|
||||
certs 0.26.2 enabled dokku core certificate management plugin
|
||||
checks 0.26.2 enabled dokku core checks plugin
|
||||
common 0.26.2 enabled dokku core common plugin
|
||||
config 0.26.2 enabled dokku core config plugin
|
||||
docker-options 0.26.2 enabled dokku core docker-options plugin
|
||||
domains 0.26.2 enabled dokku core domains plugin
|
||||
enter 0.26.2 enabled dokku core enter plugin
|
||||
git 0.26.2 enabled dokku core git plugin
|
||||
logs 0.26.2 enabled dokku core logs plugin
|
||||
network 0.26.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.26.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.26.2 enabled dokku core plugin plugin
|
||||
proxy 0.26.2 enabled dokku core proxy plugin
|
||||
ps 0.26.2 enabled dokku core ps plugin
|
||||
repo 0.26.2 enabled dokku core repo plugin
|
||||
resource 0.26.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.26.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.26.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.26.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.26.2 enabled dokku core storage plugin
|
||||
tags 0.26.2 enabled dokku core tags plugin
|
||||
tar 0.26.2 enabled dokku core tar plugin
|
||||
trace 0.26.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
|
||||
126
docs/advanced-usage/registry-management.md
Normal file
126
docs/advanced-usage/registry-management.md
Normal file
@@ -0,0 +1,126 @@
|
||||
# Registry Management
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
```
|
||||
registry:login [--password-stdin] <server> <username> [<password>] # Login to a docker registry
|
||||
registry:report [<app>] [<flag>] # Displays a registry report for one or more apps
|
||||
registry:set <app> <key> (<value>) # Set or clear a registry property for an app
|
||||
```
|
||||
|
||||
The registry plugin enables interacting with remote registries, which is useful when either deploying images via `git:from-image` or when interacting with custom schedulers to deploy built image artifacts.
|
||||
|
||||
## Usage
|
||||
|
||||
### Logging into a registry
|
||||
|
||||
The `registry:login` command can be used to log into a docker registry. The following are examples for logging into various common registries:
|
||||
|
||||
```shell
|
||||
# hub.docker.com
|
||||
dokku registry:login docker.io $USERNAME $PASSWORD
|
||||
|
||||
# digitalocean
|
||||
# the username and password are both defined as the same api token
|
||||
dokku registry:login registry.digitalocean.com $DIGITALOCEAN_API_TOKEN $DIGITALOCEAN_API_TOKEN
|
||||
|
||||
# github container registry
|
||||
# see the following link for information on retrieving a personal access token
|
||||
# https://docs.github.com/en/packages/guides/pushing-and-pulling-docker-images#authenticating-to-github-container-registry
|
||||
dokku registry:login ghcr.io $USERNAME $REGISTRY_PAT_TOKEN
|
||||
|
||||
# quay
|
||||
# a robot user may be used to login
|
||||
dokku registry:login quay.io $USERNAME $PASSWORD
|
||||
```
|
||||
|
||||
For security reasons, the password may also be specified as stdin by specifying the `--password-stdin` flag. This is supported regardless of the registry being logged into.
|
||||
|
||||
```shell
|
||||
echo "$PASSWORD" | dokku registry:login --password-stdin docker.io $USERNAME
|
||||
```
|
||||
|
||||
For certain Docker registries - such as Amazon ECR or Google's GCR registries - users may instead wish to use a docker credential helper to automatically authenticate against a server; please see the documentation regarding the credential helper in question for further setup instructions.
|
||||
|
||||
### Setting a remote server
|
||||
|
||||
To specify a remote server registry for pushes, set the `server` property via the `registry:set` command. The default value for this property is empty string. Setting the value to `docker.io` or `hub.docker.com` will result in the computed value being empty string (as that is the default, implicit registry), while any non-zero length value will have a `/` appended to it if there is not one already.
|
||||
|
||||
```shell
|
||||
dokku registry:set node-js-app server docker.io
|
||||
```
|
||||
|
||||
This property can be set for a single app or globally via the `--global` flag. When set globally, the app-specific value will always overide the global value. The default global value for this property is empty string.
|
||||
|
||||
```shell
|
||||
dokku registry:set --global server docker.io
|
||||
```
|
||||
|
||||
Setting the property value to an empty string will reset the value to the system default. Resetting the value can be done per app or globally.
|
||||
|
||||
```shell
|
||||
# per-app
|
||||
dokku registry:set node-js-app server
|
||||
|
||||
# globally
|
||||
dokku registry:set --global server
|
||||
```
|
||||
|
||||
The following are the values that should be used for common remote servers:
|
||||
|
||||
- Amazon Elastic Container Registry:
|
||||
- value: `$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/`
|
||||
- notes: The `$AWS_ACCOUNT_ID` and `$AWS_REGION` should match the values for your account and region, respectively. Additionally, an IAM profile that allows `push` access to the repository specified by `image-repo` should be attached to your Dokku server.
|
||||
- Azure Container Registry:
|
||||
- value `$REGISTRY_NAME.azurecr.io/`
|
||||
- notes: The `$AKS_REGISTRY_NAME` should match the name of the registry created on your account.
|
||||
- Docker Hub:
|
||||
- value: `docker.io/`
|
||||
- notes: Requires owning the namespace used in the `image-repo` value.
|
||||
- Digitalocean:
|
||||
- value: `registry.digitalocean.com/`
|
||||
- notes: Requires setting the correct `image-repo` value for your registry.
|
||||
- Github Container Registry:
|
||||
- value: `ghcr.io/`
|
||||
- notes: Requires that the authenticated user has access to the namespace used in the `image-repo` value.
|
||||
- Quay.io:
|
||||
- value: `quay.io/`
|
||||
|
||||
### Specifying an image repository name
|
||||
|
||||
By default, Dokku uses the value `dokku/$APP_NAME` as the image repository that is pushed and deployed. For certain registries, the `dokku` namespace may not be available to your user. In these cases, the value can be set by changing the value of the `image-repo` property via the `registry:set` command.
|
||||
|
||||
```shell
|
||||
dokku registry:set node-js-app image-repo my-awesome-prefix/node-js-app
|
||||
```
|
||||
|
||||
Setting the property value to an empty string will reset the value to the system default. Resetting the value has to be done per-app.
|
||||
|
||||
```shell
|
||||
# per-app
|
||||
dokku registry:set node-js-app push-on-release
|
||||
```
|
||||
|
||||
### Pushing images on build
|
||||
|
||||
To push the image on release, set the `push-on-release` property to `true` via the `registry:set` command. The default value for this property is `false`. Setting the property to `true` will result in the imag being tagged with an ID that is incremented with every release. This tag will be what is used for running app code.
|
||||
|
||||
```shell
|
||||
dokku registry:set node-js-app push-on-release true
|
||||
```
|
||||
|
||||
This property can be set for a single app or globally via the `--global` flag. When set globally, the app-specific value will always overide the global value. The default global value for this property is `false`.
|
||||
|
||||
```shell
|
||||
dokku registry:set --global push-on-release true
|
||||
```
|
||||
|
||||
Setting the property value to an empty string will reset the value to the system default. Resetting the value can be done per app or globally.
|
||||
|
||||
```shell
|
||||
# per-app
|
||||
dokku registry:set node-js-app push-on-release
|
||||
|
||||
# globally
|
||||
dokku registry:set --global push-on-release
|
||||
```
|
||||
@@ -103,7 +103,6 @@ dokku resource:limit node-js-app
|
||||
|
||||
This may also be combined with the `--process-type` flag to see app limits on a process-type level. Note that the displayed values are not merged with the defaults.
|
||||
|
||||
|
||||
```shell
|
||||
dokku resource:limit --process-type web node-js-app
|
||||
```
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
# Alternative Schedulers
|
||||
|
||||
In addition to the built-in [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md), Dokku also supports two scheduler plugins:
|
||||
|
||||
- [Kubernetes](https://github.com/dokku/dokku-scheduler-kubernetes)
|
||||
- [Nomad](https://github.com/dokku/dokku-scheduler-nomad)
|
||||
|
||||
These scheduler implementations may not be complete, though provide enough functionality for a user to get an app deployed via the underlying scheduler.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
@@ -50,7 +50,7 @@ Dokku will no longer distribute packages for Debian versions that are not `stabl
|
||||
- Debian 7 (wheezy)
|
||||
- Debian 8 (jessie)
|
||||
|
||||
### App report flags
|
||||
### Removed App report flags
|
||||
|
||||
The `--git-sha` flag was moved from the `apps:report` command to the `git:report` command.
|
||||
|
||||
|
||||
35
docs/appendices/0.25.0-migration-guide.md
Normal file
35
docs/appendices/0.25.0-migration-guide.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# 0.25.0 Migration Guide
|
||||
|
||||
## Registry Plugin
|
||||
|
||||
The [dokku-registry](https://github.com/dokku/dokku-registry) plugin is now built-in. This comes with a few changes:
|
||||
|
||||
- Builder plugins should call `post-release-builder` at the end of the build.
|
||||
- The `push` and `pull` command are not implemented. Users wishing to deploy a remote image should use `git:from-image`. Image pushing is not available at this time.
|
||||
- At this time, remote docker repositories are not automatically created for AWS, and users must create those repositories for their applications as necessary. This may be implemented in the future.
|
||||
- Docker images are only pushed when configured to do so. See the [registry management documentation](/docs/deployment/registry-management.md) for more details.
|
||||
|
||||
## Other
|
||||
|
||||
### Changes
|
||||
|
||||
- The network plugin can now set an `initial-network` for all containers on creation. This is a replacement for specifying the `--network` flag via the `docker-options` plugin. Please see the [network documentation](/docs/networking/network.md#attaching-an-app-to-a-network) for more information.
|
||||
- The `dokku run` command now always removes the ephemeral container on exit. Users that need a persistent container should instead specify a `console` process type in their `Procfile` specifying an available shell (usually either `bash` or `sh`) and scale that container appropriately.
|
||||
- The `pre-deploy` plugin trigger is now called internally by Dokku. Scheduler plugins should avoid calling this trigger, as any image changes introduced by subsequent trigger calls will be ignored.
|
||||
- The default image used for Herokuish Buildpack builds is now `gliderlabs/herokuish:latest-20`, and is based on both the `heroku-20` stack as well as Ubuntu 20.04. Users that wish to stick with the old, `heroku-18`/Ubuntu 18.04 builder may specify `gliderlabs/herokuish:latest-18` as their builder image. Please see the [herokuish buildpack deployment documentation](/docs/deployment/builders/herokuish-buildpacks.md#customizing-the-buildpack-stack-builder) for more information on how to specify a custom buildpack stack builder.
|
||||
- This change does not impact any users of Cloud Native Buildpacks.
|
||||
- We fixed an issue that required extracting Procfiles at the beginning of a deploy. Due to this change, a `Dockerfile` app contains a `Procfile` that does not specify a `web` process will fail to start. Usage of a `Procfile` with _only_ a `release` command should be replaced with a `scripts.dokku.postdeploy` deployment task in the `app.json` file. The alternative is to define the `web` process in the `Procfile`. See the [deployment task documentation](/docs/advanced-usage/deployment-tasks.md) for more information.
|
||||
|
||||
### Deprecations
|
||||
|
||||
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
|
||||
- The `--rm` and `--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||
- The `--detach` flag is deprecated in favor of the `run:detached` command.
|
||||
- The `DOKKU_SCALE` file is deprecated. Please see the [process management documentation](/docs/processes/process-management.md#manually-managing-process-scaling) for more information on it's replacement with the `formation` key of the `app.json` file.
|
||||
- The hooks `post-release-buildpack`, `post-release-dockerfile`, and `post-release-pack` are deprecated in favor of `post-release-builder`. See the [plugin triggers documentation](https://dokku.com/docs/development/plugin-triggers/#post-release-builder) for more details.
|
||||
|
||||
## Removals
|
||||
|
||||
- As of April 2021, Ubuntu 16.04 is no longer an LTS release, and support has been removed. Packages may still install on older versions of Ubuntu, but are no longer tested, and therefore no support will be provided.
|
||||
- The web installer has been removed. Users are now required to setup Dokku via cli commands. This change was made to combat potential security issues where users ignored the web installer, allowing unauthorized users to add their keys to the host.
|
||||
- The `scheduler-docker-cleanup` plugin trigger has been removed from the scheduler interface, and is no longer invoked.
|
||||
12
docs/appendices/0.26.0-migration-guide.md
Normal file
12
docs/appendices/0.26.0-migration-guide.md
Normal file
@@ -0,0 +1,12 @@
|
||||
# 0.26.0 Migration Guide
|
||||
|
||||
## Removals
|
||||
|
||||
- The `tags` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
- The `tar` plugin - deprecated in [0.24.0](/docs/appendices/0.24.0-migration-guide.md) - was removed. Users are highly encouraged to switch their workflows to `git:from-archive`.
|
||||
|
||||
## Changes
|
||||
|
||||
- The `scheduler` plugin now controls the scheduler in use for deploys. Apps will have their `DOKKU_SCHEDULER` environment variables migrated to the scheduler plugin, after which that value will be removed from said app. Please see the [scheduler documentation](/docs/deployment/schedulers/scheduler-management.md) for more information.
|
||||
- The `deploy-source` metadata from `apps:report` is now no longer computed on the fly, but hydrated at deploy time via the `deploy-source-set` trigger. This value may be empty until your next deploy.
|
||||
- Additionally, the `deploy-source` trigger has now been removed.
|
||||
@@ -23,10 +23,10 @@
|
||||
## 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`
|
||||
- `dokku build`
|
||||
- `dokku receive`
|
||||
- `dokku release`
|
||||
- `dokku tar:build`
|
||||
- `dokku tar:build-locked`
|
||||
- `dokku git:build`
|
||||
- `dokku git:build-locked`
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.24.6\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.26.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -42,13 +42,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -540,7 +540,9 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
|
||||
bottom: 20px;
|
||||
display: block;
|
||||
left: auto;
|
||||
max-height: 600px;
|
||||
max-width: 300px;
|
||||
overflow: scroll;
|
||||
right: 20px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
"0.21.4",
|
||||
"0.22.9",
|
||||
"0.23.9",
|
||||
"0.24.6"
|
||||
"0.24.10",
|
||||
"0.25.7",
|
||||
"0.26.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -47,112 +47,26 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
|
||||
> Warning: The following plugins have been supplied by our community and may not have been tested by Dokku maintainers.
|
||||
|
||||
[256dpi]: https://github.com/256dpi
|
||||
[abossard]: https://github.com/dudagroup
|
||||
[ademuk]: https://github.com/ademuk
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[alessio]: https://github.com/alessio
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[Aluxian]: https://github.com/Aluxian
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[artofrawr]: https://github.com/artofrawr
|
||||
[badsyntax]: https://github.com/badsyntax
|
||||
[basgys]: https://github.com/basgys
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[blag]: https://github.com/blag
|
||||
[cameron-martin]: https://github.com/cameron-martin
|
||||
[candlewaster]: https://notabug.org/candlewaster
|
||||
[cedricziel]: https://github.com/cedricziel
|
||||
[cef]: https://github.com/cef
|
||||
[cjblomqvist]: https://github.com/cjblomqvist
|
||||
[crisward]: https://github.com/crisward
|
||||
[cu12]: https://github.com/cu12
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dokku-community]: https://github.com/dokku-community
|
||||
[dyson]: https://github.com/dyson
|
||||
[fermuch]: https://github.com/fermuch
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[Flink]: https://github.com/Flink
|
||||
[fomojola]: https://github.com/fomojola
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[iamale]: https://github.com/iamale
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iloveitaly]: https://github.com/iloveitaly
|
||||
[investtools]: https://github.com/investtools
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
[josegonzalez]: https://github.com/josegonzalez
|
||||
[Kloadut]: https://github.com/Kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[m0rth1um]: https://github.com/m0rth1um
|
||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
||||
[matto1990]: https://github.com/matto1990
|
||||
[mbreit]: https://github.com/mbreit
|
||||
[mbriskar]: https://github.com/mbriskar
|
||||
[michaelshobbs]: https://github.com/michaelshobbs
|
||||
[mikecsh]: https://github.com/mikecsh
|
||||
[mikexstudios]: https://github.com/mikexstudios
|
||||
[mimischi]: https://github.com/mimischi
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[motin]: https://github.com/motin
|
||||
[mrname]: https://github.com/mrname
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
[nickcharlton]: https://github.com/nickcharlton
|
||||
[nickstenning]: https://github.com/nickstenning
|
||||
[nornagon]: https://github.com/nornagon
|
||||
[ohardy]: https://github.com/ohardy
|
||||
[pauldub]: https://github.com/pauldub
|
||||
[pnegahdar]: https://github.com/pnegahdar
|
||||
[RaceHub]: https://github.com/racehub
|
||||
[ribot]: https://github.com/ribot
|
||||
[rlaneve]: https://github.com/rlaneve
|
||||
[robv]: https://github.com/robv
|
||||
[scottatron]: https://github.com/scottatron
|
||||
[sehrope]: https://github.com/sehrope
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[sgulseth]: https://github.com/sgulseth
|
||||
[sseemayer]: https://github.com/sseemayer
|
||||
[statianzo]: https://github.com/statianzo
|
||||
[stuartpb]: https://github.com/stuartpb
|
||||
[thrashr888]: https://github.com/thrashr888
|
||||
[wmluke]: https://github.com/wmluke
|
||||
[Zenedith]: https://github.com/Zenedith
|
||||
[fteychene]: https://github.com/fteychene
|
||||
[sarendsen]: https://github.com/sarendsen
|
||||
[baikunz]: https://github.com/baikunz
|
||||
[lazyatom]: https://github.com/lazyatom
|
||||
[ollej]: https://github.com/ollej
|
||||
|
||||
### Datastores
|
||||
|
||||
#### Relational
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
|
||||
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [kloadut][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
|
||||
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
|
||||
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
|
||||
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [flink][] | 0.3.26+ |
|
||||
|
||||
#### Caching
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.0+ |
|
||||
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [aluxian][] | 0.5.0+ |
|
||||
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
|
||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [zenedith][] | Varnish cache between nginx and application with base configuration|
|
||||
|
||||
#### Queuing
|
||||
|
||||
@@ -173,10 +87,6 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
|
||||
| [Headless Chrome](https://github.com/lazyatom/dokku-chrome) | [lazyatom][] | 0.8.1+ |
|
||||
|
||||
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
|
||||
[c77cbf1]: https://github.com/dokku/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
|
||||
[28de3ec]: https://github.com/dokku/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
|
||||
|
||||
### Plugins Implementing New Dokku Functionality
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
@@ -185,10 +95,10 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [Docker Direct](https://github.com/josegonzalez/dokku-docker-direct) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
|
||||
| [Dockerfile custom path](https://github.com/mimischi/dokku-dockerfile) | [mimischi][] | 0.8.0+ |
|
||||
| [Dockerfile custom path](https://github.com/mimischi/dokku-dockerfile) | [mimischi][] | 0.8.0+ |
|
||||
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>1</sup> | [crisward][] | 0.4.0+ |
|
||||
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [benjamin-dobell][] | 0.4.0+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
@@ -199,20 +109,18 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [robots.txt](https://notabug.org/candlewaster/dokku-robots.txt) | [candlewaster][] | 0.4.x |
|
||||
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.4.0+ |
|
||||
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
|
||||
| [Application build hook](https://github.com/fteychene/dokku-build-hook) | [fteychene][] | 0.4.0+ |
|
||||
| [Post Deploy Script](https://github.com/baikunz/dokku-post-deploy-script) | [baikunz][] | 0.4.0+ |
|
||||
| [Application build hook](https://github.com/fteychene/dokku-build-hook) | [fteychene][] | 0.4.0+ |
|
||||
| [Post Deploy Script](https://github.com/baikunz/dokku-post-deploy-script) | [baikunz][] | 0.4.0+ |
|
||||
| [Auto Sync](https://github.com/IdeaSynthesis/dokku-autosync)<sup>4</sup> | [fomojola][] | 0.8.1+ |
|
||||
| [Deploy Webhook](https://github.com/IdeaSynthesis/dokku-deploy-webhook)<sup>5</sup> | [fomojola][] | 0.8.1+ |
|
||||
|
||||
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
|
||||
|
||||
<sup>1</sup> Extends app.json support to include creating volumes and creating / linking databases on push
|
||||
|
||||
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
|
||||
|
||||
<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>4</sup> Adds the ability to sync an application repo with a remote Github repo (useful for automated rebuilds without needing a git push from an external system
|
||||
<sup>4</sup> Adds the ability to sync an application repo with a remote GitHub repo (useful for automated rebuilds without needing a git push from an external system
|
||||
|
||||
<sup>5</sup> Adds the ability to invoke a post-deploy webhook with the IP, port and app name, all with a single config:set).
|
||||
|
||||
@@ -220,7 +128,7 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | 0.4.0+ |
|
||||
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [flink][] | 0.4.0+ |
|
||||
| [APT](https://github.com/dokku-community/dokku-apt) | [dokku-community][] | 0.18.x+ |
|
||||
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | 0.3.x |
|
||||
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | 0.3.x |
|
||||
@@ -228,7 +136,7 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | 0.3.x |
|
||||
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
|
||||
| [Chef cookbook](https://github.com/nickcharlton/dokku-cookbook) | [nickcharlton][] | |
|
||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
|
||||
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [flink][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Limit (Resource management)](https://github.com/sarendsen/dokku-limit) | [sarendsen][] | 0.9.0+ |
|
||||
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
|
||||
@@ -243,16 +151,15 @@ The following plugins are available and provided by Dokku maintainers. Please f
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [Telegram Notifications](https://github.com/m0rth1um/dokku-telegram) | [m0rth1um][] | 0.4.0+ |
|
||||
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/dokku-community/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/dokku-community/dokku-acl) | [maciej łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | 0.4.0+ |
|
||||
| [Dokku Wordpress](https://github.com/dokku-community/dokku-wordpress) | [dokku-community][] | 0.4.0+ |
|
||||
| [Access](https://github.com/mainto/dokku-access) | [mainto](https://github.com/mainto) | 0.4.0+ |
|
||||
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare](https://github.com/kingsquare) | 0.4.0+ |
|
||||
| [Fonts](https://github.com/ollej/dokku-fonts) | [ollej] | 0.19.11+ |
|
||||
| [Dokku Wordpress](https://github.com/dokku-community/dokku-wordpress) | [dokku-community][] | 0.4.0+ |
|
||||
| [Access](https://github.com/mainto/dokku-access) | [mainto][] | 0.4.0+ |
|
||||
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare][] | 0.4.0+ |
|
||||
| [Fonts](https://github.com/ollej/dokku-fonts) | [ollej][] | 0.19.11+ |
|
||||
| [Discourse](https://github.com/badsyntax/dokku-discourse) | [badsyntax][] | 0.21.4+ |
|
||||
|
||||
|
||||
### Deprecated Plugins
|
||||
|
||||
The following plugins have been removed as their functionality is now in Dokku Core.
|
||||
@@ -260,7 +167,7 @@ The following plugins have been removed as their functionality is now in Dokku C
|
||||
| Plugin | Author | In Dokku Since |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------- |
|
||||
| [App User](https://github.com/michaelshobbs/dokku-app-user) | [michaelshobbs][] | v0.7.1 (herokuish 0.3.18) |
|
||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [neam][] | v0.3.10 (domains plugin) |
|
||||
| [Debug](https://github.com/josegonzalez/dokku-debug) | [josegonzalez][] | v0.3.9 (trace command) |
|
||||
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | v0.4.2 (named containers plugin) |
|
||||
@@ -271,31 +178,27 @@ The following plugins have been removed as their functionality is now in Dokku C
|
||||
| [List Containers](https://github.com/josegonzalez/dokku-list) | [josegonzalez][] | v0.3.14 (ps plugin) |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | v0.4.0 (herokuish) |
|
||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [flink][] | v0.4.2 (named-containers plugin) |
|
||||
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
|
||||
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | v0.5.0 (deployment tasks) |
|
||||
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
||||
| [Process Manager: Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | v0.3.14/0.7.0 (ps/restart policy plugin) |
|
||||
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [Flink][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [flink][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Shoreman](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
|
||||
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
|
||||
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | v0.5.0 (storage plugin) |
|
||||
|
||||
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
|
||||
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
|
||||
|
||||
[a043e98]: https://github.com/stuartpb/dokku-bind-port/commit/a043e9892f4815b6525c850131e09fd64db5c1fa
|
||||
|
||||
|
||||
### Unmaintained Plugins
|
||||
|
||||
The following plugins are no longer maintained by their developers.
|
||||
@@ -304,22 +207,105 @@ The following plugins are no longer maintained by their developers.
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [flink][] | 0.4.0+ |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [raceHub][] | Compatible with 0.2.0 |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry) | [agco-adm][] | 0.4.0+
|
||||
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
||||
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
||||
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | < 0.4.0 |
|
||||
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [flink][] | 0.4.0+ |
|
||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
|
||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [aomitayo][] | |
|
||||
| [PostGIS](https://github.com/fermuch/dokku-pg-plugin) | [fermuch][] | |
|
||||
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
|
||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
|
||||
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 |
|
||||
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
|
||||
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
|
||||
|
||||
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
||||
|
||||
[256dpi]: https://github.com/256dpi
|
||||
[ademuk]: https://github.com/ademuk
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[alessio]: https://github.com/alessio
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[aluxian]: https://github.com/aluxian
|
||||
[aomitayo]: https://github.com/aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[artofrawr]: https://github.com/artofrawr
|
||||
[badsyntax]: https://github.com/badsyntax
|
||||
[basgys]: https://github.com/basgys
|
||||
[benjamin-dobell]: https://github.com/benjamin-dobell
|
||||
[blag]: https://github.com/blag
|
||||
[cameron-martin]: https://github.com/cameron-martin
|
||||
[candlewaster]: https://notabug.org/candlewaster
|
||||
[cedricziel]: https://github.com/cedricziel
|
||||
[cef]: https://github.com/cef
|
||||
[cjblomqvist]: https://github.com/cjblomqvist
|
||||
[crisward]: https://github.com/crisward
|
||||
[cu12]: https://github.com/cu12
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dokku-community]: https://github.com/dokku-community
|
||||
[dyson]: https://github.com/dyson
|
||||
[fermuch]: https://github.com/fermuch
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[flink]: https://github.com/flink
|
||||
[fomojola]: https://github.com/fomojola
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[iamale]: https://github.com/iamale
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iloveitaly]: https://github.com/iloveitaly
|
||||
[investtools]: https://github.com/investtools
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
[josegonzalez]: https://github.com/josegonzalez
|
||||
[kingsquare]: https://github.com/kingsquare
|
||||
[kloadut]: https://github.com/kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[m0rth1um]: https://github.com/m0rth1um
|
||||
[maciej łebkowski]: https://github.com/mlebkowski
|
||||
[mainto]: https://github.com/mainto
|
||||
[matto1990]: https://github.com/matto1990
|
||||
[mbreit]: https://github.com/mbreit
|
||||
[mbriskar]: https://github.com/mbriskar
|
||||
[michaelshobbs]: https://github.com/michaelshobbs
|
||||
[mikecsh]: https://github.com/mikecsh
|
||||
[mikexstudios]: https://github.com/mikexstudios
|
||||
[mimischi]: https://github.com/mimischi
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[motin]: https://github.com/motin
|
||||
[mrname]: https://github.com/mrname
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
[nickcharlton]: https://github.com/nickcharlton
|
||||
[nickstenning]: https://github.com/nickstenning
|
||||
[ohardy]: https://github.com/ohardy
|
||||
[pauldub]: https://github.com/pauldub
|
||||
[pnegahdar]: https://github.com/pnegahdar
|
||||
[racehub]: https://github.com/racehub
|
||||
[ribot]: https://github.com/ribot
|
||||
[rlaneve]: https://github.com/rlaneve
|
||||
[robv]: https://github.com/robv
|
||||
[scottatron]: https://github.com/scottatron
|
||||
[sehrope]: https://github.com/sehrope
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[statianzo]: https://github.com/statianzo
|
||||
[stuartpb]: https://github.com/stuartpb
|
||||
[thrashr888]: https://github.com/thrashr888
|
||||
[wmluke]: https://github.com/wmluke
|
||||
[zenedith]: https://github.com/zenedith
|
||||
[fteychene]: https://github.com/fteychene
|
||||
[sarendsen]: https://github.com/sarendsen
|
||||
[baikunz]: https://github.com/baikunz
|
||||
[lazyatom]: https://github.com/lazyatom
|
||||
[ollej]: https://github.com/ollej
|
||||
|
||||
@@ -32,7 +32,6 @@ If an FQDN such as `dokku.org` is used as the application name, the global virtu
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed. See the [plugin trigger documentation](/docs/development/plugin-triggers.md#nginx-hostname) for more information.
|
||||
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
If desired, it is possible to disable vhosts with the domains plugin.
|
||||
@@ -43,7 +42,6 @@ dokku domains:disable node-js-app
|
||||
|
||||
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_PROXY_PORT` and/or `DOKKU_PROXY_SSL_PORT` (for services configured to use SSL.)
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -14,11 +14,11 @@ config:keys (<app>|--global) [--merged]
|
||||
config:set [--encoded] [--no-restart] (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset [--no-restart] (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
```
|
||||
> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available _only_ during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860).
|
||||
|
||||
Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys.
|
||||
|
||||
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
||||
For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is _not_ updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then.
|
||||
|
||||
> Note: Global `ENV` files are sourced before app-specific `ENV` files. This means that app-specific variables will take precedence over global variables. Configuring your global `ENV` file is manual, and should be considered potentially dangerous as configuration applies to all applications.
|
||||
|
||||
@@ -91,11 +91,11 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
| `DOKKU_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Deprecated: Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> | Deprecated: Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
|
||||
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
|
||||
| `DOKKU_APP_SHELL` | `/bin/bash` | `dokku config:set` | Allows users to change the default shell used by Dokku for `dokku enter` and execution of deployment tasks. |
|
||||
|
||||
@@ -149,7 +149,7 @@ log_format json_combined escape=json
|
||||
'"remote_addr":"$remote_addr",'
|
||||
'"remote_user":"$remote_user",'
|
||||
'"request":"$request",'
|
||||
'"status": "$status",'
|
||||
'"status":"$status",'
|
||||
'"body_bytes_sent":"$body_bytes_sent",'
|
||||
'"request_time":"$request_time",'
|
||||
'"http_referrer":"$http_referer",'
|
||||
@@ -255,7 +255,7 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
- If `WORKDIR` is specified, add the file to the `WORKDIR` specified in the last Dockerfile stage (example: `WORKDIR /app` and `ADD nginx.conf.sigil /app`).
|
||||
- If no `WORKDIR` is specified, add the file to the root (`/`) of the docker image (example: `ADD nginx.conf.sigil /`).
|
||||
|
||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you _may_ be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
|
||||
|
||||
> The default template is available [here](https://github.com/dokku/dokku/blob/master/plugins/nginx-vhosts/templates/nginx.conf.sigil), and can be used as a guide for your own, custom `nginx.conf.sigil` file. Please refer to the appropriate template file version for your Dokku version.
|
||||
|
||||
@@ -271,7 +271,6 @@ dokku nginx:set node-js-app disable-custom-config true
|
||||
|
||||
Unsetting this value is the same as enabling custom nginx config usage.
|
||||
|
||||
|
||||
#### Available template variables
|
||||
|
||||
```
|
||||
@@ -311,17 +310,21 @@ service nginx reload
|
||||
|
||||
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/node-js-app/nginx.conf.d/` directory manually.
|
||||
|
||||
For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config *within* the container. The following are example contents for your `Procfile`
|
||||
For PHP Buildpack users, you will also need to provide a `Procfile` and an accompanying `nginx.conf` file to customize the nginx config _within_ the container. The following are example contents for your `Procfile`
|
||||
|
||||
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
|
||||
```
|
||||
web: vendor/bin/heroku-php-nginx -C nginx.conf -i php.ini php/
|
||||
```
|
||||
|
||||
Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - would also need to be configured as shown in this example:
|
||||
|
||||
client_header_timeout 50s;
|
||||
location / {
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
```
|
||||
client_header_timeout 50s;
|
||||
location / {
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php$is_args$args;
|
||||
}
|
||||
```
|
||||
|
||||
Please adjust the `Procfile` and `nginx.conf` file as appropriate.
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ 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](/docs/configuration/domains.md).
|
||||
When an SSL certificate is associated to an application, the certificate will be associated with _all_ domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/docs/configuration/domains.md).
|
||||
|
||||
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/docs/configuration/nginx.md).
|
||||
|
||||
|
||||
@@ -211,10 +211,12 @@ git remote add dokku dokku@dokku.me:dokku.me
|
||||
git push dokku main:master
|
||||
```
|
||||
|
||||
... deployment ...
|
||||
```
|
||||
... deployment ...
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://dokku.me
|
||||
remote: -----> Application deployed:
|
||||
remote: http://dokku.me
|
||||
```
|
||||
|
||||
## Dokku/Docker container management compatibility
|
||||
|
||||
|
||||
@@ -191,7 +191,6 @@ dokku apps:clone --ignore-existing node-js-app io-js-app
|
||||
|
||||
If you wish to disable deploying for a period of time, this can be done via deploy locks. Normally, deploy locks exist only for the duration of a deploy so as to avoid deploys from colliding, but a deploy lock can be created by running the `apps:lock` command.
|
||||
|
||||
|
||||
```shell
|
||||
dokku apps:lock node-js-app
|
||||
```
|
||||
@@ -224,7 +223,6 @@ dokku apps:unlock node-js-app
|
||||
|
||||
In some cases, you may wish to inspect the state of an app lock. To do so, you can issue an `apps:lock` command. This will exit non-zero if there is no app lock in place.
|
||||
|
||||
|
||||
```shell
|
||||
dokku apps:locked node-js-app
|
||||
```
|
||||
@@ -245,17 +243,23 @@ dokku apps:report
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635126111
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
=====> python-sample app information
|
||||
App dir: /home/dokku/python-sample
|
||||
App created at: 1635126000
|
||||
App dir: /home/dokku/python-sample
|
||||
App deploy source:
|
||||
App locked: false
|
||||
App deploy source metadata:
|
||||
App locked: false
|
||||
=====> ruby-sample app information
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App created at: 1635122462
|
||||
App dir: /home/dokku/ruby-sample
|
||||
App deploy source: git
|
||||
App deploy source metadata: c60921ea2799ca108276414b95ea197f16798d51
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -266,9 +270,10 @@ dokku apps:report node-js-app
|
||||
|
||||
```
|
||||
=====> node-js-app app information
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App locked: false
|
||||
App dir: /home/dokku/node-js-app
|
||||
App deploy source: git
|
||||
App deploy source metadata: cd7b8afccb202f222e7dc7b427553e71ba5ddafd
|
||||
App locked: false
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
@@ -17,6 +17,7 @@ Dokku supports the following built-in builders:
|
||||
|
||||
- `builder-dockerfile`: Builds apps using a `Dockerfile` via `docker build`. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how this builder functions.
|
||||
- `builder-herokuish`: Builds apps with Heroku's v2a Buildpack specification via `gliderlabs/herokuish`. See the [herokuish builder documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how this builder functions.
|
||||
- `builder-null`: Does nothing during the build phase. See the [null builder documentation](/docs/deployment/builders/null.md) for more information on how this builder functions.
|
||||
- `builder-pack`: Builds apps with Cloud Native Buildpacks via the `pack-cli` tool. See the [cloud native buildpacks builder documentation](/docs/deployment/builders/cloud-native-buildpacks.md) for more information on how this builder functions.
|
||||
|
||||
Builders run a detection script against a source code repository, and the first detected builder will be used to build the app artifact. The exception to this is when a `Dockerfile` is detected and the app is also able to use either `herokuish` or `pack-cli` for building, in which case one of the latter will be chosen.
|
||||
@@ -47,6 +48,34 @@ The default value may be set by passing an empty value for the option.
|
||||
dokku builder:set --global selected
|
||||
```
|
||||
|
||||
#### Changing the build directory
|
||||
|
||||
> Warning: Please keep in mind that setting a custom build directory will result in loss of any changes to the top-level directory, such as the `git.keep-git-dir` property.
|
||||
|
||||
When deploying a monorepo, it may be desirable to specify the specific build directory to use for a given app. This can be done via the `builder:set` command. If a value is specified and that directory does not exist within the repository, the build will fail.
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app build-dir app2
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app build-dir
|
||||
```
|
||||
|
||||
The `build-dir` property can also be set globally. The global default is empty string, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku builder:set --global build-dir app2
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder:set --global build-dir
|
||||
```
|
||||
|
||||
### Displaying builder reports for an app
|
||||
|
||||
You can get a report about the app's builder status using the `builder:report` command:
|
||||
@@ -57,15 +86,24 @@ dokku builder:report
|
||||
|
||||
```
|
||||
=====> node-js-app builder information
|
||||
Builder computed selected: herokuish
|
||||
Builder build dir: custom
|
||||
Builder computed build dir: custom
|
||||
Builder computed selected: herokuish
|
||||
Builder global build dir:
|
||||
Builder global selected: herokuish
|
||||
Builder selected: herokuish
|
||||
=====> python-sample builder information
|
||||
Builder build dir:
|
||||
Builder computed build dir:
|
||||
Builder computed selected: dockerfile
|
||||
Builder global build dir:
|
||||
Builder global selected: herokuish
|
||||
Builder selected: dockerfile
|
||||
=====> ruby-sample builder information
|
||||
Builder build dir:
|
||||
Builder computed build dir:
|
||||
Builder computed selected: herokuish
|
||||
Builder global build dir:
|
||||
Builder global selected: herokuish
|
||||
Builder selected:
|
||||
```
|
||||
|
||||
@@ -12,25 +12,6 @@ Cloud Native Buildpacks are an evolution over the Buildpacks technology provided
|
||||
|
||||
## Usage
|
||||
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in either the following cases:
|
||||
|
||||
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||
```
|
||||
- A `.project.toml` file exists in the root of the app repository.
|
||||
- This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||
|
||||
The builder can also be specified via the `builder:set` command:
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected pack
|
||||
```
|
||||
|
||||
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||
|
||||
### Requirements
|
||||
|
||||
The `pack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://buildpacks.io/docs/tools/pack/).
|
||||
@@ -51,6 +32,99 @@ As this functionality is highly experimental, there are a number of caveats. Ple
|
||||
- `pack` is not currently included with Dokku, nor is it added as a package dependency.
|
||||
- A future version will include it as a package dependency.
|
||||
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in either the following cases:
|
||||
|
||||
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||
```
|
||||
- A `project.toml` file exists in the root of the app repository.
|
||||
- This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||
|
||||
The builder can also be specified via the `builder:set` command:
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected pack
|
||||
```
|
||||
|
||||
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||
|
||||
### Changing the `project.toml` location
|
||||
|
||||
When deploying a monorepo, it may be desirable to specify the specific path of the `project.toml` file to use for a given app. This can be done via the `builder-pack:set` command. If a value other than `project.toml` is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no `project.toml`.
|
||||
|
||||
```shell
|
||||
dokku builder-pack:set node-js-app projecttoml-path project2.toml
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder-pack:set node-js-app projecttoml-path
|
||||
```
|
||||
|
||||
The `projecttoml-path` property can also be set globally. The global default is `project.toml`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku builder-pack:set --global projecttoml-path project2.toml
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder-pack:set --global projecttoml-path
|
||||
```
|
||||
|
||||
### Displaying builder-pack reports for an app
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
You can get a report about the app's storage status using the `builder-pack:report` command:
|
||||
|
||||
```shell
|
||||
dokku app-json:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-pack information
|
||||
Builder-pack computed projecttoml path: project2.toml
|
||||
Builder-pack global projecttoml path: project.toml
|
||||
Builder-pack projecttoml path: project2.toml
|
||||
=====> python-sample builder-pack information
|
||||
Builder-pack computed projecttoml path: project.toml
|
||||
Builder-pack global projecttoml path: project.toml
|
||||
Builder-pack projecttoml path:
|
||||
=====> ruby-sample builder-pack information
|
||||
Builder-pack computed projecttoml path: project.toml
|
||||
Builder-pack global projecttoml path: project.json
|
||||
Builder-pack projecttoml path:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku builder-pack:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-pack information
|
||||
Builder-pack computed projecttoml path: project2.toml
|
||||
Builder-pack global projecttoml path: project.toml
|
||||
Builder-pack projecttoml path: project2.toml
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku builder-pack:report node-js-app --builder-pack-projecttoml-path
|
||||
```
|
||||
|
||||
```
|
||||
project2.toml
|
||||
```
|
||||
|
||||
### Customizing the Buildpack stack builder
|
||||
|
||||
> New as of 0.23.0
|
||||
@@ -69,7 +143,7 @@ dokku buildpacks:set-property node-js-app stack
|
||||
|
||||
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||
|
||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_STACK` environment variable (`heroku/buildpacks` by default).
|
||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_CNB_BUILDER` environment variable (`heroku/buildpacks` by default).
|
||||
|
||||
```shell
|
||||
# set globally
|
||||
|
||||
@@ -27,6 +27,82 @@ If an application was previously deployed via buildpacks, the following commands
|
||||
dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||
```
|
||||
|
||||
### Changing the `Dockerfile` location
|
||||
|
||||
> The previous method to perform this - via `docker-options:add` - should be removed in favor of the `builder-dockerfile:set` command outlined here.
|
||||
|
||||
When deploying a monorepo, it may be desirable to specify the specific path of the `Dockerfile` file to use for a given app. This can be done via the `builder-dockerfile:set` command. If a value is specified and that file does not exist in the app's build directory, then the build will fail.
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:set node-js-app dockerfile-path Dockerfile2
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:set node-js-app dockerfile-path
|
||||
```
|
||||
|
||||
The `dockerfile-path` property can also be set globally. The global default is `Dockerfile`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:set --global dockerfile-path Dockerfile2
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:set --global dockerfile-path
|
||||
```
|
||||
|
||||
### Displaying builder-dockerfile reports for an app
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
You can get a report about the app's storage status using the `builder-dockerfile:report` command:
|
||||
|
||||
```shell
|
||||
dokku app-json:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-dockerfile information
|
||||
Builder-dockerfile computed dockerfile path: Dockerfile2
|
||||
Builder-dockerfile global dockerfile path: Dockerfile
|
||||
Builder-dockerfile dockerfile path: Dockerfile2
|
||||
=====> python-sample builder-dockerfile information
|
||||
Builder-dockerfile computed dockerfile path: Dockerfile
|
||||
Builder-dockerfile global dockerfile path: Dockerfile
|
||||
Builder-dockerfile dockerfile path:
|
||||
=====> ruby-sample builder-dockerfile information
|
||||
Builder-dockerfile computed dockerfile path: Dockerfile
|
||||
Builder-dockerfile global dockerfile path: Dockerfile
|
||||
Builder-dockerfile dockerfile path:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-dockerfile information
|
||||
Builder-dockerfile computed dockerfile path: Dockerfile2
|
||||
Builder-dockerfile global dockerfile path: Dockerfile
|
||||
Builder-dockerfile dockerfile path: Dockerfile2
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku builder-dockerfile:report node-js-app --builder-dockerfile-dockerfile-path
|
||||
```
|
||||
|
||||
```
|
||||
Dockerfile2
|
||||
```
|
||||
|
||||
### Build-time configuration variables
|
||||
|
||||
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available only during runtime.
|
||||
@@ -37,12 +113,6 @@ For users that require customization in the `build` phase, you may use build arg
|
||||
dokku docker-options:add node-js-app build '--build-arg NODE_ENV=production'
|
||||
```
|
||||
|
||||
The location of the `Dockerfile` may also be specified. If the location is changed, the repository **must also** have a `Dockerfile` in the root directory in order to trigger a dockerfile-based deploy.
|
||||
|
||||
```shell
|
||||
dokku docker-options:add node-js-app build '--file Dockerfile.dokku'
|
||||
```
|
||||
|
||||
Once set, the Dockerfile usage would be as follows:
|
||||
|
||||
```Dockerfile
|
||||
@@ -75,7 +145,29 @@ RUN echo $NODE_ENV
|
||||
|
||||
### Building images with Docker Buildkit
|
||||
|
||||
If your Dockerfile is using Docker engine's [buildkit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set. One way to do this is to edit `/etc/environment` on your dokku host and reboot your instance. Note, for complete build log output, you should also set `BUILDKIT_PROGRESS=plain` in the same file.
|
||||
If your Dockerfile is using Docker engine's [buildkit](https://docs.docker.com/develop/develop-images/build_enhancements/) (not to be confused with buildpacks), then the `DOCKER_BUILDKIT=1` environment variable needs to be set. Additionally, complete build log output can be forced via `BUILDKIT_PROGRESS=plain`. Both of these environment variables can be set as follows:
|
||||
|
||||
```shell
|
||||
echo "export DOCKER_BUILDKIT=1" | sudo tee -a /etc/default/dokku
|
||||
echo "export BUILDKIT_PROGRESS=plain" | sudo tee -a /etc/default/dokku
|
||||
```
|
||||
|
||||
#### Buildkit directory caching
|
||||
|
||||
Buildkit implements the `RUN --mount` option, enabling mount directory caches for `RUN` directives. The following is an example that mounts debian packaging related directories, which can speed up fetching of remote package data.
|
||||
|
||||
```Dockerfile
|
||||
FROM debian:latest
|
||||
RUN --mount=target=/var/lib/apt/lists,type=cache \
|
||||
--mount=target=/var/cache/apt,type=cache \
|
||||
apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
git
|
||||
```
|
||||
|
||||
Mount cache targets may vary depending on the tool in use, and users are encouraged to investigate the directories that apply for their language and framework.
|
||||
|
||||
You would adjust the cache directory for whatever application cache you have, e.g. `/root/.pnpm-store/v3` for pnpm, `$HOME/.m2` for maven, or `/root/.cache` for golang.
|
||||
|
||||
### Customizing the run command
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ dokku buildpacks:list node-js-app
|
||||
-----> test buildpack urls
|
||||
```
|
||||
|
||||
|
||||
```shell
|
||||
# running for an app with two buildpacks specified
|
||||
dokku buildpacks:list node-js-app
|
||||
@@ -159,7 +158,7 @@ dokku buildpacks:set-property node-js-app stack
|
||||
|
||||
A change in the stack builder value will execute the `post-stack-set` trigger.
|
||||
|
||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_IMAGE` environment variable (`gliderlabs/herokuish:latest` by default).
|
||||
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set `DOKKU_IMAGE` environment variable (`gliderlabs/herokuish:latest-20` by default).
|
||||
|
||||
```shell
|
||||
# set globally
|
||||
@@ -180,17 +179,17 @@ dokku buildpacks:report
|
||||
```
|
||||
=====> node-js-app buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:v0.5.23-20
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
Buildpacks stack: gliderlabs/herokuish:v0.5.23-20
|
||||
=====> python-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:v0.5.23-20
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
||||
Buildpacks stack:
|
||||
=====> ruby-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:v0.5.23-20
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-20
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-20
|
||||
Buildpacks list:
|
||||
Buildpacks stack:
|
||||
```
|
||||
@@ -226,7 +225,7 @@ dokku config:unset --no-restart node-js-app DOKKU_PROXY_PORT_MAP
|
||||
|
||||
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
||||
|
||||
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified *without* a Git commit SHA like so:
|
||||
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
|
||||
|
||||
```shell
|
||||
# using the latest nodejs buildpack
|
||||
@@ -265,7 +264,6 @@ importantworker: env QUEUE=important bundle exec rake resque:work
|
||||
|
||||
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/docs/processes/process-management.md) for more details around scaling individual processes.
|
||||
|
||||
|
||||
### `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.
|
||||
|
||||
15
docs/deployment/builders/null.md
Normal file
15
docs/deployment/builders/null.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Null Builder
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
The `null` builder does nothing, and is useful for routing to services not managed by Dokku. It should not be used in normal operation. Please see the [network documentation](/docs/networking/network.md#routing-an-app-to-a-known-ip:port-combination) for more information on the aforementioned use case.
|
||||
|
||||
## Usage
|
||||
|
||||
### Detection
|
||||
|
||||
This builder is _never_ auto-detected. The builder _must_ be specified via the `builder:set` command:
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected null
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
# Github Actions
|
||||
# GitHub Actions
|
||||
|
||||
The Dokku project has an official Githb Action available on the [Github Marketplace](https://github.com/marketplace/actions/dokku). The simplest usage example is as follows:
|
||||
The Dokku project has an official GitHub Action available on the [GitHub Marketplace](https://github.com/marketplace/actions/dokku). The simplest usage example is as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
@@ -21,11 +21,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to dokku
|
||||
uses: dokku/github-action@v1
|
||||
uses: dokku/github-action@master
|
||||
with:
|
||||
git_remote_url: 'ssh://dokku@dokku.me:22/appname'
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
```
|
||||
|
||||
|
||||
For further usage documentation and other advanced examples, see the entry on the [Github Marketplace](https://github.com/marketplace/actions/dokku).
|
||||
For further usage documentation and other advanced examples, see the entry on the [GitHub Marketplace](https://github.com/marketplace/actions/dokku).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Gitlab CI
|
||||
# GitLab CI
|
||||
|
||||
Gitlab-CI can be used to automatically deploy a Dokku application via the official the [dokku/ci-docker-image](https://github.com/dokku/ci-docker-image). The simplest example is as follows:
|
||||
GitLab CI can be used to automatically deploy a Dokku application via the official the [dokku/ci-docker-image](https://github.com/dokku/ci-docker-image). The simplest example is as follows:
|
||||
|
||||
```
|
||||
---
|
||||
@@ -18,8 +18,10 @@ deploy:
|
||||
- master
|
||||
variables:
|
||||
GIT_REMOTE_URL: ssh://dokku@dokku.me:22/appname
|
||||
script: dokku-deploy
|
||||
after_script: dokku-unlock
|
||||
script:
|
||||
- dokku-deploy
|
||||
after_script:
|
||||
- dokku-unlock
|
||||
```
|
||||
|
||||
For further usage documentation and other advanced examples, see Dokku's [gitlab-ci](https://github.com/dokku/gitlab-ci) repository.
|
||||
|
||||
@@ -37,7 +37,7 @@ You can use these modifiers as follows:
|
||||
dokku logs node-js-app -t -p web
|
||||
```
|
||||
|
||||
will show logs continually from the web process.
|
||||
The above command will show logs continually from the web process.
|
||||
|
||||
### Failed deploy logs
|
||||
|
||||
@@ -127,6 +127,29 @@ dokku logs:vector-stop
|
||||
|
||||
The `vector` container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||
|
||||
#### Checking Vector's Logs
|
||||
|
||||
It may be necessary to check the vector container's logs to ensure that vector is operating as expected. This can be performed with the `logs:vector-logs` command.
|
||||
|
||||
```shell
|
||||
dokku logs:vector-logs
|
||||
```
|
||||
|
||||
This command also supports the following modifiers:
|
||||
|
||||
```shell
|
||||
--num NUM # the number of lines to display
|
||||
--tail # continually stream logs
|
||||
```
|
||||
|
||||
You can use these modifiers as follows:
|
||||
|
||||
```shell
|
||||
dokku logs:vector-logs --tail --num 10
|
||||
```
|
||||
|
||||
The above command will show logs continually from the vector container, with an initial history of 10 log lines
|
||||
|
||||
#### Configuring a log sink
|
||||
|
||||
Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sinks may be configured globally or on a per-app basis by specifying a `vector-sink` in DSN form with the `logs:set` command. Specifying a sink value will reload any running vector container.
|
||||
@@ -172,6 +195,15 @@ Valid values for `SINK_TYPE` include all log vector log sinks, while `SINK_OPTIO
|
||||
- `int`: form: `key=int`
|
||||
- `[string]`: form: `key[]=string`
|
||||
- `[int]`: form: `key[]=int`
|
||||
- `table`: form: `option[key]=value
|
||||
- `table`: form: `option[key]=value`
|
||||
|
||||
For some sinks - such as the `http` sink - it may be useful to use special characters such as `&`. These characters must be url escaped as per [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986.html).
|
||||
|
||||
```shell
|
||||
# the following command will set the `http` sink with a uri config value
|
||||
# for a uri config value: https://loggerservice.com:1234/?token=abc1234&type=vector
|
||||
# the url quoted version: https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector
|
||||
dokku logs:set test vector-sink "http://?uri=https%3A//loggerservice.com%3A1234/%3Ftoken%3Dabc1234%26type%3Dvector"
|
||||
```
|
||||
|
||||
Please read the [sink documentation](https://vector.dev/docs/reference/sinks/) for your sink of choice to configure the sink as desired.
|
||||
|
||||
@@ -36,7 +36,7 @@ When an application is created via `git push`, Dokku will create the proper `pre
|
||||
dokku git:initialize node-js-app
|
||||
```
|
||||
|
||||
In order for the above command to succeed, the application *must* already exist.
|
||||
In order for the above command to succeed, the application _must_ already exist.
|
||||
|
||||
> Warning: If the `pre-receive` hook was customized in any way, this will overwrite that hook with the current defaults for Dokku.
|
||||
|
||||
@@ -135,7 +135,18 @@ In the above example, Dokku will build the app as if the repository contained _o
|
||||
FROM dokku/node-js-getting-started:latest
|
||||
```
|
||||
|
||||
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected.
|
||||
Triggering a build with the same arguments multiple times will result in Dokku exiting `0` early as there will be no changes detected. If the image tag is reused but the underlying image is different, it is recommended to use the image digest instead of the tag. This can be retrieved via the following command:
|
||||
|
||||
```shell
|
||||
docker inspect --format='{{index .RepoDigests 0}}' $IMAGE_NAME
|
||||
```
|
||||
|
||||
The resulting `git:from-image` call would then be:
|
||||
|
||||
```shell
|
||||
# where the image sha is: sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:@sha256:9d187c3025d03c033dcc71e3a284fee53be88cc4c0356a19242758bc80cab673
|
||||
```
|
||||
|
||||
The `git:from-image` command can optionally take a git `user.name` and `user.email` argument (in that order) to customize the author. If the arguments are left empty, they will fallback to `Dokku` and `automated@dokku.sh`, respectively.
|
||||
|
||||
@@ -143,6 +154,8 @@ The `git:from-image` command can optionally take a git `user.name` and `user.ema
|
||||
dokku git:from-image node-js-app dokku/node-js-getting-started:latest "Camila" "camila@example.com"
|
||||
```
|
||||
|
||||
If the image is a private image that requires a docker login to access, the `registry:login` command should be used to log into the registry. See the [registry documentation](/docs/advanced-usage/registry-management.md#logging-into-a-registry) for more details on this process.
|
||||
|
||||
Finally, certain images may require a custom build context in order for `ONBUILD ADD` and `ONBUILD COPY` statements to succeed. A custom build context can be specified via the `--build-dir` flag. All files in the specified `build-dir` will be copied into the repository for use within the `docker build` process. The build context _must_ be specified on each deploy, and is not otherwise persisted between builds.
|
||||
|
||||
```shell
|
||||
@@ -155,7 +168,7 @@ See the [dockerfile documentation](/docs/deployment/builders/dockerfiles.md) to
|
||||
|
||||
> New as of 0.24.0
|
||||
|
||||
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a Github repository at a specific commit.
|
||||
A Dokku app repository can be initialized or updated from the contents of an archive file via the `git:from-archive` command. This is an excellent way of tracking changes when deploying pre-built binary archives, such as java jars or go binaries. This can also be useful when deploying directly from a GitHub repository at a specific commit.
|
||||
|
||||
```shell
|
||||
dokku git:from-archive node-js-app https://github.com/dokku/smoke-test-app/releases/download/2.0.0/smoke-test-app.tar
|
||||
@@ -233,7 +246,7 @@ dokku git:auth github.com username personal-access-token
|
||||
dokku git:auth github.com
|
||||
```
|
||||
|
||||
For syncing to a private repository stored on a remote Git product such as Github or Gitlab, Dokku's recommendation is to use a personal access token on a bot user where possible. Please see your service's documentation for information regarding the recommended best practices.
|
||||
For syncing to a private repository stored on a remote Git product such as GitHub or GitLab, Dokku's recommendation is to use a personal access token on a bot user where possible. Please see your service's documentation for information regarding the recommended best practices.
|
||||
|
||||
### Allowing remote repository hosts
|
||||
|
||||
|
||||
@@ -1,173 +0,0 @@
|
||||
# Docker Image Tag Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-image`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-a-docker-image) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-image`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tags <app> # List all app image tags
|
||||
tags:create <app> <tag> # Add tag to latest running app image
|
||||
tags:deploy <app> <tag> # Deploy tagged app image
|
||||
tags:destroy <app> <tag> # Remove app image tag
|
||||
```
|
||||
|
||||
The Dokku tags plugin allows you to add Docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tags` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`/`tar`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tags` plugin: No action will be taken against your application.
|
||||
>
|
||||
> Please use the `tags:deploy` command when redeploying an application deployed via Docker image.
|
||||
|
||||
## Usage
|
||||
|
||||
### Exposed ports
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||
|
||||
### Listing tags for an application
|
||||
|
||||
For example, you can list all tags for a given application:
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Creating a tag
|
||||
|
||||
You can also create new tags for that app using the `tags:create` function. Tags should conform to the Docker tagging specification for your Docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
|
||||
|
||||
```shell
|
||||
dokku tags:create node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
=====> Added v1 tag to dokku/node-js-app
|
||||
```
|
||||
|
||||
Once the tag is created, you can see the output by running the `tags` command again.
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
### Deploying an image tag
|
||||
|
||||
Finally, you can also deploy a local image using the `tags:deploy` command. When specifying a tag that is not `latest`, the released image will be retagged as the `latest` image tag for the app.
|
||||
|
||||
> Warning: For images based on Herokuish, using the `tags:deploy` command will reset environment variables written into the image, causing a retag to occur. This will - on average - add two extra layers to your deployed image. Note that this does not affect Dockerfile-based images, which are the majority of images deployed via the `tags` command.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
=====> node-js-app container output:
|
||||
Detected 512 MB available memory, 512 MB limit per process (WEB_MEMORY)
|
||||
Recommending WEB_CONCURRENCY=1
|
||||
> node-js-app@0.1.0 start /app
|
||||
> node index.js
|
||||
Node app is running at localhost:5000
|
||||
=====> end node-js-app container output
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
## Image workflows
|
||||
|
||||
### Deploying from a Docker registry
|
||||
|
||||
You can alternatively add image pulled from a Docker registry and deploy 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
|
||||
```
|
||||
|
||||
### 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"
|
||||
```
|
||||
|
||||
## Related articles
|
||||
- [Setting up persistent storage](/docs/advanced-usage/persistent-storage.md)
|
||||
- [Defining environment variables](/docs/configuration/environment-variables.md)
|
||||
- [Setting up the ports](/docs/networking/proxy-management.md)
|
||||
@@ -1,38 +0,0 @@
|
||||
# Tarball Deployment
|
||||
|
||||
> Warning: As of 0.24.0, this functionality is deprecated in favor of the [`git:from-archive`](/docs/deployment/methods/git.md#initializing-an-app-repository-from-an-archive-file) command. It will be removed in a future release, and is considered unmaintained. Users are highly encouraged to switch their workflows to `git:from-arhive`.
|
||||
>
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tar:from <app> <url> # Loads an app tarball from url
|
||||
tar:in <app> # Reads an tarball containing the app from stdin
|
||||
```
|
||||
|
||||
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
|
||||
>
|
||||
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
|
||||
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
|
||||
>
|
||||
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying from a tarball
|
||||
|
||||
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-Git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
|
||||
|
||||
You can place the tarball on an external webserver and deploy via the `tar:from` command.
|
||||
|
||||
```shell
|
||||
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
|
||||
```
|
||||
|
||||
### Deploying via stdin
|
||||
|
||||
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
|
||||
|
||||
```shell
|
||||
# run from the generated artifact directory
|
||||
tar c . $* | dokku tar:in node-js-app
|
||||
```
|
||||
@@ -17,7 +17,6 @@ in order to avoid SSH interpretting Dokku arguments for itself.
|
||||
```
|
||||
--quiet suppress output headers
|
||||
--trace enable DOKKU_TRACE for current execution only
|
||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
||||
--force force flag. currently used in apps:destroy and other ":destroy" commands
|
||||
```
|
||||
|
||||
|
||||
@@ -37,30 +37,73 @@ Once set, you may re-enable it by setting a blank value for `disable-chown`:
|
||||
dokku scheduler-docker-local:set node-js-app disable-chown
|
||||
```
|
||||
|
||||
### Deploying Process Types in Parallel
|
||||
|
||||
> New as of 0.25.5
|
||||
|
||||
By default, Dokku deploys an app's processes one-by-one in order, with the `web` process being deployed first. Deployment parallelism may be achieved by setting the `parallel-schedule-count` property, which defaults to `1`. Increasing this number increases the number of process types that may be deployed in parallel (with the web process being the exception).
|
||||
|
||||
```shell
|
||||
# Increase parallelism from 1 process type at a time to 4 process types at a time.
|
||||
dokku scheduler-docker-local:set node-js-app parallel-schedule-count 4
|
||||
```
|
||||
|
||||
Once set, you may reset it by setting a blank value for `parallel-schedule-count`:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app parallel-schedule-count
|
||||
```
|
||||
|
||||
If the value of `parallel-schedule-count` is increased and a given process type fails to schedule successfully, then any in-flight process types will continue to be processed, while all process types that have not been scheduled will be skipped before the deployment finally fails.
|
||||
|
||||
Container scheduling output is shown in the order it is received, and thus may be out of order in case of output to stderr.
|
||||
|
||||
Note that increasing the value of `parallel-schedule-count` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
#### Increasing parallelism within a process deploy
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
By default, Dokku will deploy one instance of a given process type at a time. This can be increased by customizing the `app.json` `formation` key to include a `max_parallel` key for the given process type.
|
||||
|
||||
An `app.json` file can be committed to the root of the pushed app repository, and must be within the built image artifact in the image's working directory as shown below.
|
||||
|
||||
- Buildpacks: `/app/app.json`
|
||||
- Dockerfile: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
- Docker Image: `WORKDIR/app.json` or `/app.json` (if no working directory specified)
|
||||
|
||||
The `formation` key should be specified as follows in the `app.json` file:
|
||||
|
||||
```Procfile
|
||||
{
|
||||
"formation": {
|
||||
"web": {
|
||||
"max_parallel": 1
|
||||
},
|
||||
"worker": {
|
||||
"max_parallel": 4
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Omitting or removing the entry will result in parallelism for that process type to return to 1 entry at a time. This can be combined with the `parallel-schedule-count` property to speed up deployments.
|
||||
|
||||
Note that increasing the value of `max_parallel` may significantly impact CPU utilization on your host as your app containers - and their respective processes - start up. Setting a value higher than the number of available CPUs is discouraged. It is recommended that users carefully set this value so as not to overburden their server.
|
||||
|
||||
## Implemented Triggers
|
||||
|
||||
This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-docker-local` plugin.
|
||||
|
||||
- `check-deploy`
|
||||
- `core-post-deploy`
|
||||
- `post-app-clone-setup`
|
||||
- `post-app-rename-setup`
|
||||
- `post-create`
|
||||
- `post-delete`
|
||||
- `pre-deploy`
|
||||
- `pre-restore`
|
||||
- `scheduler-app-status`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-inspect`
|
||||
- `scheduler-is-deployed`
|
||||
- `scheduler-logs`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-retire`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
- `scheduler-tags-destroy`
|
||||
- `apps:clone`
|
||||
- `apps:destroy`
|
||||
- `apps:rename`
|
||||
- `deploy`
|
||||
- `enter`
|
||||
- `logs`
|
||||
- `ps:inspect`
|
||||
- `ps:stop`
|
||||
- `run`
|
||||
|
||||
## Supported Resource Management Properties
|
||||
|
||||
14
docs/deployment/schedulers/kubernetes.md
Normal file
14
docs/deployment/schedulers/kubernetes.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Kubernetes Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Kubernetes Scheduler Plugin](https://github.com/dokku/dokku-scheduler-kubernetes) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`: partial, does not implement failed deploy log capture
|
||||
- `logs`: partial, does not implement failure logs
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-kubernetes/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
13
docs/deployment/schedulers/nomad.md
Normal file
13
docs/deployment/schedulers/nomad.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Nomad Scheduler
|
||||
|
||||
> Warning: This scheduler is not in Dokku core and thus is considered experimental.
|
||||
|
||||
The [Nomad Scheduler Plugin](https://github.com/dokku/dokku-scheduler-nomad) implements the following functionality:
|
||||
|
||||
- `apps:destroy`
|
||||
- `deploy`
|
||||
- `ps:stop`
|
||||
|
||||
Please see the plugin's [issue tracker](https://github.com/dokku/dokku-scheduler-nomad/issues) for more information on the status of the plugin.
|
||||
|
||||
For users that require additional functionality, please refer to the [Sponsoring Documentation](https://github.com/dokku/.github/blob/master/SPONSORING.md).
|
||||
15
docs/deployment/schedulers/null.md
Normal file
15
docs/deployment/schedulers/null.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Null Scheduler
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
The `null` scheduler does nothing, and is useful for routing to services not managed by Dokku. It should not be used in normal operation. Please see the [network documentation](/docs/networking/network.md#routing-an-app-to-a-known-ip:port-combination) for more information on the aforementioned use case.
|
||||
|
||||
## Usage
|
||||
|
||||
### Detection
|
||||
|
||||
This scheduler is _never_ auto-detected. The scheduler _must_ be specified via the `scheduler:set` command:
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected null
|
||||
```
|
||||
118
docs/deployment/schedulers/scheduler-management.md
Normal file
118
docs/deployment/schedulers/scheduler-management.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Scheduler Management
|
||||
|
||||
> New as of 0.26.0
|
||||
|
||||
```
|
||||
scheduler:report [<app>] [<flag>] # Displays a scheduler report for one or more apps
|
||||
scheduler:set <app> <key> (<value>) # Set or clear a scheduler property for an app
|
||||
```
|
||||
|
||||
Schedulers are a way of customizing how an app image is deployed, and can be used to interact with non-local systems such as Kubernetes and Nomad.
|
||||
|
||||
## Usage
|
||||
|
||||
### Scheduler selection
|
||||
|
||||
Dokku supports the following built-in schedulers:
|
||||
|
||||
- `scheduler-docker-local`: Schedules apps against the local docker socket and runs containers directly on the Dokku host. See the [docker-local scheduler documentation](/docs/deployment/schedulers/docker-local.md) for more information on how this scheduler functions.
|
||||
- `scheduler-null`: Does nothing during the scheduler phase. See the [null scheduler documentation](/docs/deployment/schedulers/null.md) for more information on how this scheduler functions.
|
||||
|
||||
See the [alternate schedulers documentation](/docs/deployment/schedulers/alternate-schedulers.md) for more information on other scheduler plugins.
|
||||
|
||||
### Overriding the auto-selected scheduler
|
||||
|
||||
If desired, the scheduler can be specified via the `scheduler:set` command by speifying a value for `selected`. The selected scheduler will always be used.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku scheduler:set node-js-app selected
|
||||
```
|
||||
|
||||
The `selected` property can also be set globally. The global default is an empty string, and auto-detection will be performed when no value is set per-app or globally.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected docker-local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku scheduler:set --global selected
|
||||
```
|
||||
|
||||
### Displaying scheduler reports for an app
|
||||
|
||||
You can get a report about the app's scheduler status using the `scheduler:report` command:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: herokuish
|
||||
=====> python-sample scheduler information
|
||||
Scheduler computed selected: dockerfile
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected: dockerfile
|
||||
=====> ruby-sample scheduler information
|
||||
Scheduler computed selected: herokuish
|
||||
Scheduler global selected: herokuish
|
||||
Scheduler selected:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app scheduler information
|
||||
Scheduler selected: herokuish
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku scheduler:report node-js-app --scheduler-selected
|
||||
```
|
||||
|
||||
## Implementing a Scheduler
|
||||
|
||||
Custom plugins names _must_ have the prefix `scheduler-` or scheduler overriding via `scheduler:set` may not function as expected.
|
||||
|
||||
At this time, the following dokku commands are used to implement a complete scheduler.
|
||||
|
||||
- `apps:destroy`: stops the app processes on the scheduler
|
||||
- triggers: post-delete, scheduler-register-retired, scheduler-retire
|
||||
- `apps:rename`: handles app renaming
|
||||
- triggers: post-app-rename-setup
|
||||
- `apps:clone`: handles app cloning
|
||||
- triggers: post-app-clone-setup
|
||||
- `deploy`: deploys app proceses and checks the status of a deploy
|
||||
- triggers: scheduler-app-status, scheduler-deploy, scheduler-is-deployed, scheduler-logs-failed
|
||||
- `enter`: enters a running container
|
||||
- triggers: scheduler-enter
|
||||
- `logs`: fetches app logs
|
||||
- triggers: scheduler-logs
|
||||
- `run`: starts one-off run containers (detached and non-detached) as well as listing run processes
|
||||
- triggers: scheduler-run, scheduler-run-list
|
||||
- `ps:stop`: stops app processes
|
||||
- triggers: scheduler-stop
|
||||
- `ps:inspect`: outputs inspect output for processes in an app
|
||||
- triggers: scheduler-inspect
|
||||
|
||||
Schedulers may decide to omit some functionality here, or use plugin triggers to supplement config with information from other plugins. Additionally, a scheduler may implement other triggers in order handle any extra processes needed during a deploy.
|
||||
|
||||
Schedulers can use any tools available on the system to build the docker image, and may even be used to interact with off-server systems. The only current requirement is that the scheduler must have access to the image built in the build phase. If this is not the case, the registry plugin can be used to push the image to a registry that the scheduler software can access.
|
||||
|
||||
Deployment tasks are currently executed directly on the primary Dokku server.
|
||||
@@ -18,7 +18,7 @@ Users in Dokku are managed via the `~/dokku/.ssh/authorized_keys` file. It is *h
|
||||
|
||||
### Listing SSH keys
|
||||
|
||||
You can use the `ssh-keys:list` command to show all configured SSH keys. Any key added via the `dokku-installer` will be associated with the `admin` key name.
|
||||
You can use the `ssh-keys:list` command to show all configured SSH keys.
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:list
|
||||
@@ -114,4 +114,3 @@ Use `visudo /etc/sudoers.d/dokku-users`, or `visudo /etc/sudoers` to add the fol
|
||||
```
|
||||
%dokku ALL=(ALL:ALL) NOPASSWD:SETENV: /usr/bin/dokku
|
||||
```
|
||||
|
||||
|
||||
@@ -293,7 +293,7 @@ Invalid container id specified (APP.web.3)
|
||||
|
||||
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
|
||||
### Successful `CHECKS` file
|
||||
|
||||
```
|
||||
WAIT=10
|
||||
@@ -307,7 +307,7 @@ For this check to work, we've added a line to `config/routes.rb` that simply ret
|
||||
get '/check.txt', to: proc {[200, {}, ['simple_check']]}
|
||||
```
|
||||
|
||||
### Deploy output
|
||||
### Successful deploy output
|
||||
|
||||
> Note: The output has been trimmed for brevity.
|
||||
|
||||
@@ -370,7 +370,7 @@ In this example, a Rails application fails to deploy. The reason for the failure
|
||||
|
||||
Once the attempts have been exceeded, the deployment fails and we see the container output, which shows the PostgreSQL connection errors.
|
||||
|
||||
### `CHECKS` file
|
||||
### Failing `CHECKS` file
|
||||
|
||||
```
|
||||
WAIT=10
|
||||
@@ -380,7 +380,7 @@ ATTEMPTS=6
|
||||
|
||||
> The check to the root url `/` would normally access the database.
|
||||
|
||||
### Deploy output
|
||||
### Failing deploy output
|
||||
|
||||
> Note: The output has been trimmed for brevity.
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
A plugin can be a simple implementation of [triggers](/docs/development/plugin-triggers.md) or can implement a command structure of its own. Dokku has no restrictions on the language in which a plugin is implemented; it only cares that the plugin implements the appropriate [commands](/docs/development/plugin-creation.md#command-api) or [triggers](/docs/development/plugin-triggers.md) for the API. **NOTE:** any file that implements triggers or uses the command API must be executable.
|
||||
|
||||
## Plugin Overview
|
||||
|
||||
When creating custom plugins:
|
||||
|
||||
1. Take a look at [the plugins shipped with Dokku](/docs/community/plugins.md) and hack away!
|
||||
@@ -10,29 +12,29 @@ When creating custom plugins:
|
||||
4. Edit [this page](/docs/community/plugins.md) and add a link to the plugin
|
||||
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
|
||||
|
||||
## Compilable plugins (Golang, Java(?), C, etc.)
|
||||
### Compilable plugins (Golang, Java(?), C, etc.)
|
||||
|
||||
When developing a plugin, the `install` trigger must be implemented such that it outputs the built executable(s) using a directory structure that implements the plugin's desired command and/or triggers the API. See the [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
|
||||
|
||||
## Command API
|
||||
### Command API
|
||||
|
||||
There are 3 main integration points: `commands`, `subcommands/default`, and `subcommands/<command-name>`.
|
||||
|
||||
### `commands`
|
||||
#### `commands`
|
||||
|
||||
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands)).
|
||||
|
||||
### `subcommands/default`
|
||||
#### `subcommands/default`
|
||||
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default)).
|
||||
|
||||
### `subcommands/<command-name>`
|
||||
#### `subcommands/<command-name>`
|
||||
|
||||
Implements the additional command interface and will translate to `dokku plugin:cmd` on the command line. (i.e. [`dokku plugin:install`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/install)).
|
||||
|
||||
# Plugin Building Tips
|
||||
## Plugin Building Tips
|
||||
|
||||
## Always create a `plugin.toml`
|
||||
### Always create a `plugin.toml`
|
||||
|
||||
The `plugin.toml` file is used to describe the plugin in help output, and helps users understand the purpose of the plugin. This _must_ have a description and a version. The version _should_ be bumped at every plugin release.
|
||||
|
||||
@@ -43,7 +45,7 @@ version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
## Files should be executable
|
||||
### Files should be executable
|
||||
|
||||
Commands, subcommands, triggers and source shell scripts should all be executable. On a Unix-like machine, the following command can be used to make them executable:
|
||||
|
||||
@@ -53,7 +55,7 @@ chmod +x path/to/file
|
||||
|
||||
Non-executable commands, subcommands, and triggers will be ignored.
|
||||
|
||||
## Use the `pipefail` bash option
|
||||
### Use the `pipefail` bash option
|
||||
|
||||
Consider whether to include the `set -eo pipefail` option. Look at the following example:
|
||||
|
||||
@@ -78,7 +80,7 @@ Options:
|
||||
or zero if no command exited with a non-zero status
|
||||
```
|
||||
|
||||
## Support trace mode
|
||||
### Support trace mode
|
||||
|
||||
Trace mode is useful for getting debugging output from plugins when the `--trace` flag is specified or `dokku trace:on` is triggered. This should be done at the top of each shell script:
|
||||
|
||||
@@ -108,7 +110,7 @@ fi
|
||||
|
||||
In cases where a dependency should be installed before the plugin can be used at all, use the `dependencies` plugin trigger to install the dependency.
|
||||
|
||||
## Implement a help command
|
||||
### Implement a help command
|
||||
|
||||
For plugins which expose commands, implement a `help` command. This may be empty, but should contain a listing of all available commands.
|
||||
|
||||
@@ -116,17 +118,17 @@ Commas - `,` - are used in the help output for columnizing output. Verify that t
|
||||
|
||||
See the sample plugin below for an example.
|
||||
|
||||
## Namespace commands
|
||||
### Namespace commands
|
||||
|
||||
All commands *should* be namespaced. In cases where a core plugin is overriden, the plugin _may_ utilize the a namespace in use by the core, but generally this should be avoided to reduce confusion as to where the command is implemented.
|
||||
All commands _should_ be namespaced. In cases where a core plugin is overriden, the plugin _may_ utilize the a namespace in use by the core, but generally this should be avoided to reduce confusion as to where the command is implemented.
|
||||
|
||||
## Implement a proper catch-all command
|
||||
### Implement a proper catch-all command
|
||||
|
||||
As of 0.3.3, a catch-all should be implemented that exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows Dokku to output a `command not found` message.
|
||||
|
||||
See the sample plugin below for an example.
|
||||
|
||||
## Set app config without restarting
|
||||
### Set app config without restarting
|
||||
|
||||
In the case that a plugin needs to set app configuration settings and a restart should be avoided (default Heroku-style behavior) these "internal" commands provide this functionality:
|
||||
|
||||
@@ -135,13 +137,13 @@ config_set --no-restart node-js-app KEY1=VALUE1 [KEY2=VALUE2 ...]
|
||||
config_unset --no-restart node-js-app KEY1 [KEY2 ...]
|
||||
```
|
||||
|
||||
## Expose functionality in a `functions` file
|
||||
### Expose functionality in a `functions` file
|
||||
|
||||
To allow other plugins access to (some of) a plugin's functionality, functions can expose by including a `functions` file in the plugin for others to source. All functions in that file should be considered publicly accessible by other plugins.
|
||||
|
||||
Any functions that must be kept private should reside in the plugin's `trigger/` or `commands/` directories. Other files may also be used to hide private functions; the official convention for hiding private functions is to place them an `internal-functions` file.
|
||||
|
||||
## Use helper functions to fetch app images
|
||||
### Use helper functions to fetch app images
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
@@ -151,7 +153,7 @@ Plugins should use `get_running_image_tag()` and `get_app_image_name()` as sourc
|
||||
|
||||
> **Note:** This is only for plugins that are not `pre/post-build-*` plugins
|
||||
|
||||
## Use `$DOCKER_BIN` instead of `docker` directly
|
||||
### Use `$DOCKER_BIN` instead of `docker` directly
|
||||
|
||||
> New as of 0.17.5
|
||||
|
||||
@@ -165,7 +167,7 @@ Certain systems may require a wrapper function around the `docker` binary for pr
|
||||
docker run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
```
|
||||
|
||||
## Include labels for all temporary containers and images
|
||||
### Include labels for all temporary containers and images
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
@@ -187,7 +189,7 @@ local DOKKU_COMMIT_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0"
|
||||
"$DOCKER_BIN" container run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
|
||||
```
|
||||
|
||||
## Copy files from the built image using `copy_from_image`
|
||||
### Copy files from the built image using `copy_from_image`
|
||||
|
||||
Avoid copying files from running containers as these files may change over time. Instead copy files from the image built during the deploy process. This can be done via the `copy_from_image` helper function. This will correctly handle various corner cases in copying files from an image.
|
||||
|
||||
@@ -204,7 +206,7 @@ copy_from_image "$IMAGE" "file-being-copied" "$TMP_FILE" 2>/dev/null
|
||||
|
||||
Files are copied from the `/app` directory - for images built via buildpacks - or `WORKDIR` - for images built via Dockerfile.
|
||||
|
||||
## Avoid calling the `dokku` binary directly
|
||||
### Avoid calling the `dokku` binary directly
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
@@ -212,7 +214,7 @@ Plugins should **not** call the `dokku` binary directly from within plugins beca
|
||||
|
||||
Plugins should instead source the `functions` file for a given plugin when attempting to call Dokku internal functions. In cases where plugin functions cannot be sourced (eg if a plugin is implemented in Golang), then call the relevant [plugin triggers](/docs/development/plugin-triggers.md) instead.
|
||||
|
||||
# Sample plugin
|
||||
## Sample plugin
|
||||
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
|
||||
|
||||
@@ -74,6 +74,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-json-process-deploy-parallelism`
|
||||
|
||||
- Description: Decides the parallelism to use when deploying a given process type. The default is 1 process entry at a type.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP $PROCESS_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-maybe-create`
|
||||
|
||||
- Description: Creates an app (gated by whether this is globally enabled or not)
|
||||
@@ -326,7 +341,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
### `core-post-deploy`
|
||||
|
||||
> To avoid issues with community plugins, this plugin trigger should be used *only* for core plugins. Please avoid using this trigger in your own plugins.
|
||||
> To avoid issues with community plugins, this plugin trigger should be used _only_ for core plugins. Please avoid using this trigger in your own plugins.
|
||||
|
||||
- Description: Allows running of commands after an app's processes have been scaled up, but before old containers are torn down. Dokku core currently uses this to switch traffic on nginx.
|
||||
- Invoked by: `dokku deploy`
|
||||
@@ -342,6 +357,31 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
curl "http://httpstat.us/200"
|
||||
```
|
||||
|
||||
### `core-post-extract`
|
||||
|
||||
> To avoid issues with community plugins, this plugin trigger should be used _only_ for core plugins. Please avoid using this trigger in your own plugins.
|
||||
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Adds a clock process to an app's Procfile
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"
|
||||
TMP_WORK_DIR="$2"
|
||||
REV="$3" # optional, may not be sent for tar-based builds
|
||||
|
||||
pushd "$TMP_WORK_DIR" >/dev/null
|
||||
touch Procfile
|
||||
echo "clock: some-command" >> Procfile
|
||||
popd &>/dev/null
|
||||
```
|
||||
|
||||
### `cron-write`
|
||||
|
||||
- Description: Force triggers writing out cron entries
|
||||
@@ -393,7 +433,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
debian|raspbian|ubuntu)
|
||||
apt-get -qq -y --no-install-recommends install nginx
|
||||
;;
|
||||
|
||||
@@ -403,31 +443,22 @@ case "$DOKKU_DISTRO" in
|
||||
esac
|
||||
```
|
||||
|
||||
### `deploy-source`
|
||||
### `deploy`
|
||||
|
||||
- Description: Used for reporting what the current detected deployment source is. The first detected source should always win.
|
||||
- Invoked by: `dokku apps:report`
|
||||
- Arguments: `$APP`
|
||||
- Description: Triggers a deploy for the given app. Can override the image tag to deploy, as well as specify a single process type to deploy.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP [$IMAGE_TAG] [$PROC_TYPE]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Checks if the app should be deployed via git
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"
|
||||
STDIN=$(cat)
|
||||
APP="$1" IMAGE_TAG="$2" PROC_TYPE="$3"
|
||||
|
||||
# bail if another source is detected
|
||||
if [[ -n "$STDIN" ]]; then
|
||||
echo "$STDIN"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -d "$DOKKU_ROOT/$APP/refs" ]]; then
|
||||
echo "git"
|
||||
fi
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `deployed-app-image-repo`
|
||||
@@ -698,6 +729,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-archive`
|
||||
|
||||
- Description: Updates an app's git repository from an archive and then triggers a build
|
||||
- Invoked by: `git:from-archive`
|
||||
- Arguments: `$APP $ARCHIVE_URL $ARCHIVE_TYPE $USER_NAME $USER_EMAIL`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-directory`
|
||||
|
||||
- Description: Updates an app's git repository from a source directory and then triggers a build
|
||||
@@ -713,6 +759,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-from-image`
|
||||
|
||||
- Description: Updates an app's git repository from a docker image and then triggers a build as necessary
|
||||
- Invoked by: `git:from-image`
|
||||
- Arguments: `$APP $DOCKER_IMAGE $BUILD_DIR $USER_NAME $USER_EMAIL`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `git-post-pull`
|
||||
|
||||
- Description:
|
||||
@@ -743,9 +804,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
> Warning: The `git-pre-pull` trigger should _not_ be used for authentication
|
||||
since it does not get called for commands that use `git-upload-archive` such
|
||||
as `git archive`. Instead, use the [`user-auth`](#user-auth) trigger.
|
||||
> Warning: The `git-pre-pull` trigger should _not_ be used for authentication since it does not get called for commands that use `git-upload-archive` such as `git archive`. Instead, use the [`user-auth`](#user-auth) trigger.
|
||||
|
||||
### `git-revision`
|
||||
|
||||
@@ -776,8 +835,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
|
||||
hostname -f > $DOKKU_ROOT/HOSTNAME
|
||||
if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
hostname -f > $DOKKU_ROOT/VHOST
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -891,7 +950,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Return the port for a given app container
|
||||
- Invoked by: `internally triggered by a deploy`
|
||||
- Arguments: `$APP $PROC_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Arguments: `$APP $PROCESS_TYPE $CONTAINER_ID $IS_HEROKUISH_CONTAINER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -917,6 +976,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-get-static-listeners`
|
||||
|
||||
- Description: Return the network value for an app's property
|
||||
- Invoked by: `internally triggered by proxy-build-config`
|
||||
- Arguments: `$APP $PROCESS_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `network-write-ipaddr`
|
||||
|
||||
- Description: Write the ipaddr for a given app index
|
||||
@@ -1177,7 +1251,7 @@ APP="$1"
|
||||
|
||||
### `post-config-update`
|
||||
|
||||
- Description: Allows you to get notified when one or more configs is added or removed. Action can be *set* or *unset*
|
||||
- Description: Allows you to get notified when one or more configs is added or removed. Action can be `set` or `unset`.
|
||||
- Invoked by: `dokku config:set`, `dokku config:unset`
|
||||
- Arguments: `$APP` `set|unset` `key1=VALUE1 key2=VALUE2`
|
||||
- Example:
|
||||
@@ -1281,8 +1355,8 @@ sudo service haproxy reload
|
||||
|
||||
### `post-extract`
|
||||
|
||||
- Description: Allows you to modify the contents of an app *after* it has been extracted from git/tarball but *before* the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Description: Allows you to modify the contents of an app _after_ it has been extracted from git but _before_ the image source type is detected.
|
||||
- Invoked by: The `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
@@ -1322,8 +1396,28 @@ APP="$1"
|
||||
haproxy-build-config "$APP"
|
||||
```
|
||||
|
||||
### `post-release-builder`
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Invokes a command after the build process is complete.
|
||||
- Invoked by: builder plugins
|
||||
- Arguments: `$BUILDER_TYPE $APP $IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
BUILDER_TYPE="$1"; APP="$2"; IMAGE=$3
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `post-release-buildpack`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using buildpacks.
|
||||
@@ -1343,6 +1437,8 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
### `post-release-pack`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
@@ -1365,6 +1461,8 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
### `post-release-dockerfile`
|
||||
|
||||
> Warning: Deprecated, please use `post-release-builder` instead
|
||||
|
||||
> Warning: Image mutation in this trigger may result in an invalid run state, and is heavily discouraged.
|
||||
|
||||
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to apps using a dockerfile.
|
||||
@@ -1571,7 +1669,6 @@ DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0"
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
|
||||
### `pre-release-pack`
|
||||
|
||||
> Warning: The pack plugin trigger apis are under development and may change
|
||||
@@ -1613,7 +1710,7 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
- Description: Allows you to run commands before all containers are restored
|
||||
- Invoked by: `dokku ps:restore`
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -1778,6 +1875,50 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `ps-can-scale`
|
||||
|
||||
- Description: Sets whether or not a user can scale an app with `ps:scale`
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
### `ps-current-scale`
|
||||
|
||||
- Description: Prints out the current scale contents (process-type=quantity) delimited by newlines.
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `ps-set-scale`
|
||||
|
||||
- Description: Sets the scale for an app based on a specified formation (process-type=quantity). Any unspecified process types will be left as is.
|
||||
- Invoked by:
|
||||
- Arguments: `$APP $SKIP_DEPLOY $CLEAR_EXISTING [$PROCESS_TUPLE...]`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `receive-app`
|
||||
|
||||
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an app build.
|
||||
@@ -1923,21 +2064,21 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-docker-cleanup`
|
||||
### `scheduler-detect`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when dokku cleanup is invoked
|
||||
- Invoked by: `dokku deploy, dokku cleanup`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $FORCE_CLEANUP`
|
||||
- Description: Allows you to check which scheduler is in use for an app
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; FORCE_CLEANUP="$3";
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -2083,14 +2224,14 @@ CONTAINER_ID="$2";
|
||||
|
||||
- Description: Allows you to run scheduler commands when containers should be force retired from the system
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1";
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -2133,44 +2274,6 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-tags-create`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is created
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $SOURCE_IMAGE $TARGET_IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-tags-destroy`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when a tag is destroyed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_REPO $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_REPO="$3"; IMAGE_TAG="$4";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `storage-list`
|
||||
|
||||
- Description: Returns a list of storage mounts
|
||||
@@ -2186,48 +2289,13 @@ APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
### `tags-create`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been added
|
||||
- Invoked by: `dokku tags:create`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Upload an app image to docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
|
||||
IMAGE_ID=$(docker inspect --format '{{ .Id }}' $IMAGE)
|
||||
docker tag -f $IMAGE_ID $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
docker push $DOCKER_HUB_USER/$APP:$IMAGE_TAG
|
||||
```
|
||||
|
||||
### `tags-destroy`
|
||||
|
||||
- Description: Allows you to run commands once a tag for an app image has been removed
|
||||
- Invoked by: `dokku tags:destroy`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Remove an image tag from docker hub
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1"; IMAGE_TAG="$2"
|
||||
|
||||
# some code to remove a docker hub tag because it's not implemented in the CLI...
|
||||
```
|
||||
|
||||
### `uninstall`
|
||||
|
||||
- Description: Used to cleanup after itself.
|
||||
- Invoked by: `dokku plugin:uninstall`
|
||||
- Arguments: `$PLUGIN`
|
||||
- Example:
|
||||
- Description: Used to cleanup after itself.
|
||||
- Invoked by: `dokku plugin:uninstall`
|
||||
- Arguments: `$PLUGIN`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
@@ -2261,7 +2329,7 @@ sudo BUILD_STACK=true make install
|
||||
|
||||
### `user-auth`
|
||||
|
||||
This is a special plugin trigger that is executed on *every* command run. As Dokku sometimes internally invokes the `dokku` command, special care should be taken to properly handle internal command redirects.
|
||||
This is a special plugin trigger that is executed on _every_ command run. As Dokku sometimes internally invokes the `dokku` command, special care should be taken to properly handle internal command redirects.
|
||||
|
||||
Note that the trigger should exit as follows:
|
||||
|
||||
@@ -2270,7 +2338,7 @@ Note that the trigger should exit as follows:
|
||||
|
||||
The `SSH_USER` is the original ssh user. If you are running remote commands, this user will typically be `dokku`, and as such should not be trusted when checking permissions. If you are connected via ssh as a different user who then invokes `dokku`, the value of this variable will be that user's name (`root`, `myuser`, etc.).
|
||||
|
||||
The `SSH_NAME` is the `NAME` variable set via the `sshcommand acl-add` command. If you have set a user via the `dokku-installer`, this value will be set to `admin`. For installs via debian package, this value *may* be `default`. For reference, the following command can be run as the root user to specify a specific `NAME` for a given ssh key:
|
||||
The `SSH_NAME` is the `NAME` variable set via the `sshcommand acl-add` command. For reference, the following command can be run as the root user to specify a specific `NAME` for a given ssh key:
|
||||
|
||||
```shell
|
||||
sshcommand acl-add dokku NAME < $PATH_TO_SSH_KEY
|
||||
|
||||
@@ -12,7 +12,7 @@ contrib/release-dokku
|
||||
|
||||
> If you are a maintainer and need the PACKAGECLOUD_TOKEN in order to make a release, please contact @josegonzalez to get this information.
|
||||
|
||||
As well, the 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)
|
||||
As well, the Arch Linux 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
|
||||
|
||||
@@ -20,16 +20,16 @@ Dokku follows semver standards. As we are not yet at a stable release, breaking
|
||||
|
||||
At the moment, tags need not be signed, though that may change in the future.
|
||||
|
||||
## ArchLinux Packages
|
||||
## Arch Linux 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.
|
||||
Arch Linux 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 Arch Linux 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.24.6-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.26.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'
|
||||
@@ -38,17 +38,17 @@ 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.
|
||||
|
||||
### Detailed information for ArchLinux packages
|
||||
### Detailed information for Arch Linux 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.
|
||||
All of the information to build the Arch Linux 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
|
||||
* detailed information about all attributes in `PKGBUILD` could be found in the [Arch Linux 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 Arch Linux wiki
|
||||
|
||||
That is the usual workflow:
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
## Continuous Integration
|
||||
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 16.04.
|
||||
All pull requests have tests run against them on [GitHub Actions](https://github.com/features/actions), a continuous integration platform that provides Docker support for Ubuntu Trusty 18.04.
|
||||
|
||||
If you wish to skip tests for a particular commit, e.g. documentation changes, you may add the `[ci skip]` designator to your commit message. Commits that _should_ be tested but have the above designator will not be merged.
|
||||
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 16.04, we only provide official installation support for that platform and the latest LTS release of Ubuntu (currently 18.04).
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 18.04, we only provide official installation support for that platform and the latest LTS release of Ubuntu (currently 20.04).
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
|
||||
@@ -50,12 +50,10 @@ The Herokuish package is recommended but not required if not using Heroku buildp
|
||||
|
||||
## Configuring an unattended installation
|
||||
|
||||
Once Dokku is installed, if you are not using the web-installer, you'll want to configure 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.
|
||||
Once Dokku is installed, you'll want to configure the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
|
||||
|
||||
For Debian, unattended installation is described [Debian installation guide](/docs/getting-started/install/debian.md).
|
||||
|
||||
*You should also stop and disable the `dokku-installer` service to remove public access to adding SSH keys.*
|
||||
|
||||
Set up a domain using your preferred vendor and a wildcard domain pointing to the host running Dokku. You can manage this global domain using the [domains plugin](/docs/configuration/domains.md).
|
||||
|
||||
Follow the [user management documentation](/docs/deployment/user-management.md) in order to add SSH keys for users to Dokku, or to give other Unix accounts access to Dokku.
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
1. If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
|
||||
|
||||
2. Go to the [Dokku on Azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
|
||||
2. Go to the [Dokku on Azure deployment page](https://github.com/Azure/azure-quickstart-templates/tree/master/application-workloads/dokku/dokku-vm) and click **Deploy to Azure**.
|
||||
|
||||
3. You'll be prompted to enter a few parameters, including a unique storage account name and a unique name for the subdomain 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.
|
||||
|
||||
4. In your browser of choice, navigate to `http://[dnsNameForPublicIP].[location].cloudapp.azure.com`. Where `[dnsNameForPublicIP]` and `[location]` are template parameters you used to deploy the template.
|
||||
|
||||
5. Finish your Dokku setup like you normally would by creating a *new* public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select **Use Virtual Host Naming** and set the **Hostname** to a *public DNS name* that you own such as one you would purchase from [Namecheap](http://namecheap.com). Alternatively thanks to [xip.io](http://xip.io/) you can just use `[yourAzurePublicIP].xip.io` for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.
|
||||
5. Finish your Dokku setup like you normally would by creating a *new* public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select **Use Virtual Host Naming** and set the **Hostname** to a *public DNS name* that you own such as one you would purchase from [Namecheap](http://namecheap.com). Alternatively thanks to [sslip.io](https://sslip.io/) you can just use `[yourAzurePublicIP].sslip.io` for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.sslip.io`.
|
||||
|
||||
@@ -13,7 +13,7 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
# install dokku
|
||||
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
|
||||
OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
echo "xenial bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"
|
||||
echo "bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get -qq -y install dokku
|
||||
@@ -36,7 +36,6 @@ After setting the desired options, proceed with the installation as described ab
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ------------------ | ------- | --------------------- | ------------------------------------------------------------------------ |
|
||||
| dokku/web_config | boolean | true | Use web-based config for below options |
|
||||
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. `[yourapp].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: Setting this to true, will require you to manually add an SSH key later on. |
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
4. Under **Choose a size**, select your machine spec.
|
||||
5. Under **Choose a datacenter region**, select your region.
|
||||
6. Add an SSH Key.
|
||||
* New Keys
|
||||
- New Keys
|
||||
1. Under **Add your SSH keys** click **New SSH Key** _(this opens a dialog)_.
|
||||
2. From your terminal, execute `cat $HOME/.ssh/id_rsa.pub`.
|
||||
3. Copy the output and paste it into the **New SSH Key** dialog, provide a name and click **Add SSH Key**.
|
||||
* Existing Keys
|
||||
- Existing Keys
|
||||
1. Simply add a checkmark next to the existing keys you'd like to add.
|
||||
7. Under **Finalize and create**, give your Droplet a hostname _(not required)_ and click **Create**.
|
||||
8. Once created, copy the IP address to your clipboard.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.24.6
|
||||
docker pull dokku/dokku:0.26.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -11,15 +11,18 @@ Next, run the image.
|
||||
```shell
|
||||
docker container run \
|
||||
--env DOKKU_HOSTNAME=dokku.me \
|
||||
--env DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku \
|
||||
--name dokku \
|
||||
--publish 3022:22 \
|
||||
--publish 8080:80 \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.24.6
|
||||
dokku/dokku:0.26.2
|
||||
```
|
||||
|
||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
- The global hostname is set to `dokku.me` on boot.
|
||||
@@ -28,8 +31,8 @@ Dokku is run in the following configuration:
|
||||
- Container HTTP port 80 is exposed on the host as 8080.
|
||||
- Container HTTPS port 443 is exposed on the host as 8443.
|
||||
- Data within the container is stored on the host within the `/var/lib/dokku` directory.
|
||||
- The docker socket is mounted into container
|
||||
- The "web installer" is not supported.
|
||||
- Image build cache is set to the data dir + `/home/dokku`.
|
||||
- The docker socket is mounted into container.
|
||||
|
||||
Application repositories, plugin config, as well as plugin data are persisted to disk within the specified host directory for `/var/lib/dokku`.
|
||||
|
||||
|
||||
@@ -180,7 +180,6 @@ apt:
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
debconf_selections:
|
||||
web: dokku dokku/web_config boolean false
|
||||
vhost: dokku dokku/vhost_enable boolean true
|
||||
# set the domain name of the new Dokku server
|
||||
hostname: dokku dokku/hostname string $YOUR_FULL_QUALIFIED_DOMAIN
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> New as of 0.8.0 *(experimental)*
|
||||
|
||||
>**Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/docs/deployment/user-management.md#adding-ssh-keys) and [virtual hosts](/docs/configuration/domains.md#customizing-hostnames) using dokku command line interface.
|
||||
> **Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/docs/deployment/user-management.md#adding-ssh-keys) and [virtual hosts](/docs/configuration/domains.md#customizing-hostnames) using dokku command line interface.
|
||||
|
||||
Dokku defaults to being installed via RPM package on CentOS 7. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` Bash script. The following are the steps run by said script:
|
||||
|
||||
|
||||
@@ -38,8 +38,16 @@
|
||||
|
||||
> For users that have customized the IP address of their VM - either in a custom `Vagrantfile` or via the `DOKKU_IP` environment variable - and are not using `10.0.0.2` for the Vagrant IP, you'll need to instead use the output of `vagrant ssh-config dokku` for your `~/.ssh/config` entry.
|
||||
|
||||
6. 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.
|
||||
6. Connect to the server and add your ssh key to the install. Additionally, set the global domain name to `dokku.me`.
|
||||
|
||||
Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (i.e. `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.
|
||||
```shell
|
||||
# usually your key is already available under the current user's `~/.ssh/authorized_keys` file
|
||||
cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin
|
||||
|
||||
# you can use any domain you already have access to
|
||||
dokku domains:set-global dokku.me
|
||||
```
|
||||
|
||||
> Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (i.e. `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.
|
||||
|
||||
@@ -6,11 +6,9 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
|
||||
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of [Ubuntu 16.04/18.04/20.04 x64](https://www.ubuntu.com/download), [Debian 9+ x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- A fresh installation of [Ubuntu 18.04/20.04 x64](https://www.ubuntu.com/download), [Debian 9+ x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- At least 1 GB of system memory <sup>[2]</sup>
|
||||
|
||||
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
|
||||
|
||||
Dokku is designed for usage on a fresh VM installation, and should install all necessary dependencies if installing via the bootstrap method.
|
||||
|
||||
### Installing the latest stable version
|
||||
@@ -21,27 +19,39 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.24.6/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.24.6 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
If you're using Debian 9+ or Ubuntu 18.04, make sure your package manager is configured to install a sufficiently recent version of nginx<sup>[3]</sup>, otherwise, the installation may fail due to `unmet dependencies` relating nginx.
|
||||
|
||||
#### 2. Setup SSH key and Virtualhost Settings
|
||||
#### 2. Optionally connect a domain to your server
|
||||
|
||||
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.
|
||||
Dokku optionally supports one or more domain names. If you do not own a domain name, you may either purchase one or skip this step.
|
||||
|
||||
Alternatively, instructions to skip the web installer with an unattended installation are available in the [advanced install guide](/docs/getting-started/advanced-installation.md#configuring).
|
||||
When connecting a domain, either a single domain or a wildcard may be associated to the server's IP. A wildcard domain will allow access to apps via `$APP.domain.tld`, whereas associating only a single domain name will result in apps being access via `domain.tld:$RANDOM_PORT`. Please see the [dns documentation](/docs/networking/dns.md) and [domains documentation](/docs/configuration/domains.md) for more details.
|
||||
|
||||
> **Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key. You can check if it is still running via `ps auxf | grep dokku-installer`, and it may be stopped via your server's init system - usually either `service dokku-installer stop` or `stop dokku-installer`.
|
||||
#### 3. Setup SSH key and Virtualhost Settings
|
||||
|
||||
> **Warning:** Web installer is not available on CentOS and Arch Linux. You will need to configure [SSH keys](/docs/deployment/user-management.md#adding-ssh-keys) and [virtual hosts](/docs/configuration/domains.md#customizing-hostnames) using dokku command line interface - see unattended installation linked above.
|
||||
Once the installation is complete, you should configure an ssh key and set your global domain:from-archive
|
||||
|
||||
#### 3. Deploy your first application
|
||||
```shell
|
||||
# usually your key is already available under the current user's `~/.ssh/authorized_keys` file
|
||||
cat ~/.ssh/authorized_keys | dokku ssh-keys:add admin
|
||||
|
||||
Once you save your settings, the web admin will self-terminate and you should be able to run or [deploy to the Dokku installation](/docs/deployment/application-deployment.md).
|
||||
# you can use any domain you already have access to
|
||||
dokku domains:set-global dokku.me
|
||||
```
|
||||
|
||||
See the [user management](/docs/deployment/user-management.md#adding-ssh-keys) and [domains documentation](/docs/configuration/domains.md#customizing-hostnames) for more information.
|
||||
|
||||
Alternatively, instructions for an unattended installation are available in the [advanced install guide](/docs/getting-started/advanced-installation.md#configuring).
|
||||
|
||||
#### 4. Deploy your first application
|
||||
|
||||
At this point, you should be able to run or [deploy to the Dokku installation](/docs/deployment/application-deployment.md).
|
||||
|
||||
### Installing via other methods
|
||||
|
||||
|
||||
@@ -33,9 +33,7 @@ dokku trace:off
|
||||
|
||||
## Common Problems
|
||||
|
||||
__Symptom:__ I deployed my app but I am getting the default nginx page.
|
||||
|
||||
__Solution:__
|
||||
### I deployed my app but I am getting the default nginx page.
|
||||
|
||||
Most of the time it's caused by some defaults newer versions of nginx set. To make sure that's the issue you're having run the following:
|
||||
|
||||
@@ -66,27 +64,41 @@ Save the file and try stopping nginx and starting it again:
|
||||
## * Starting nginx nginx [ OK ]
|
||||
```
|
||||
|
||||
***
|
||||
---
|
||||
|
||||
__Symptom:__ I want to deploy my app, but while pushing I get the following error.
|
||||
Using the `EXPOSE` directive in a Dockerfile may be another reason why you might see the default site. When the `EXPOSE` directive is in use and a proxy plugin is enabled (the default), the proxy plugin will listen to requests on the ports specified in the `EXPOSE` stanza.
|
||||
|
||||
! [remote rejected] master -> master (pre-receive hook declined)
|
||||
For example, if you have an `EXPOSE` directive like so:
|
||||
|
||||
__Solution:__
|
||||
```Dockerfile
|
||||
EXPOSE 8000
|
||||
```
|
||||
|
||||
The proxy port mapping will be `http:8000:8000`.
|
||||
|
||||
To avoid this issue, either of the following can be done:
|
||||
|
||||
- Remove `EXPOSE` directive: This will require respecting the `$PORT` environment variable (automatically set by Dokku). Once that change is deployed, the port mapping should be cleared via the `dokku proxy:ports-clear $APP` command (where `$APP` is your app name).
|
||||
- Update the port mapping: Updating the port mapping to redirect port `80` to your app's exposed port via `dokku proxy:ports-set $APP http:80:$EXPOSED_PORT` can also fix the issue. This will also allow certificate management and the letsencrypt plugin to work correctly.
|
||||
|
||||
See the [port management documentation](/docs/networking/port-management.md) for more information on how Dokku exposes ports for applications and how you can configure these for your app.
|
||||
|
||||
### I want to deploy my app, but while pushing I get the following error
|
||||
|
||||
The following error may be emitted from a deploy:
|
||||
|
||||
```
|
||||
! [remote rejected] master -> master (pre-receive hook declined)
|
||||
```
|
||||
|
||||
The `remote rejected` error does not give enough information. Anything could have failed. Enable trace mode and begin debugging. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
|
||||
|
||||
One the reasons why you may get this error is because the command that is run in the container exited (without errors). For example, (in Procfile) when you define a new worker container to run Delayed Job and use the bin/delayed_job start command. This command deamonizes the process and exists. The container thinks it's done so it closes itself. The error you get is the one above. To fix the above problem for Delayed Job, you must define the worker to user rake jobs:work, which doesn't deamonize the process.
|
||||
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I get the aforementioned error in the build phase (after turning on Dokku tracing).
|
||||
### I get the aforementioned error in the build phase (after turning on Dokku tracing)
|
||||
|
||||
Most errors that happen in this phase are due to transient network issues (either locally or remotely) buildpack bugs.
|
||||
|
||||
__Solution (Less solution, more helpful troubleshooting steps):__
|
||||
|
||||
Find the failed phase's container image (`077581956a92` in this example).
|
||||
|
||||
```shell
|
||||
@@ -113,26 +125,26 @@ resolvconf -u
|
||||
|
||||
Please see https://github.com/dokku/dokku/issues/841 and https://github.com/dokku/dokku/issues/649.
|
||||
|
||||
***
|
||||
### After adding an SSH key, I am told I cannot read from the remote repository on push
|
||||
|
||||
__Symptom:__ After adding an SSH key, I still see the following error on deploy:
|
||||
```
|
||||
Connection closed by <host> port 22
|
||||
fatal: Could not read from remote repository.
|
||||
|
||||
Connection closed by <host> port 22
|
||||
fatal: Could not read from remote repository.
|
||||
|
||||
Please make sure you have the correct access rights
|
||||
and the repository exists.
|
||||
Please make sure you have the correct access rights
|
||||
and the repository exists.
|
||||
```
|
||||
|
||||
Certain systems may have access to the `dokku` user via SSH disabled. Please check that the `dokku` user is allowed access to the system in the file `/etc/security/access.conf`. As Dokku does not manage this file, please consult your Operating System's documentation for more information.
|
||||
|
||||
***
|
||||
### I want to deploy my app but I am getting asked for the password of the Git user
|
||||
|
||||
__Symptom:__ I want to deploy my app but I am getting asked for the password of the Git user and the error message.
|
||||
Sometimes the following error message may be shown on push
|
||||
|
||||
fatal: 'NAME' does not appear to be a git repository
|
||||
fatal: Could not read from remote repository.
|
||||
|
||||
__Solution:__
|
||||
```
|
||||
fatal: 'NAME' does not appear to be a git repository
|
||||
fatal: Could not read from remote repository.
|
||||
```
|
||||
|
||||
You get asked for a password because your SSH secret key can't be found. This may happen if the private key corresponding to the public key you added with `sshcommand acl-add` is not located in the default location `~/.ssh/id_rsa`.
|
||||
|
||||
@@ -145,11 +157,7 @@ Host DOKKU_HOSTNAME
|
||||
|
||||
Also see [issue #116](https://github.com/dokku/dokku/issues/116).
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I successfully deployed my application with no deployment errors and receiving **Bad Gateway** when attempting to access the application.
|
||||
|
||||
__Solution:__
|
||||
### I successfully deployed my application with no deployment errors and receiving **Bad Gateway** when attempting to access the application.
|
||||
|
||||
In many cases the application will require the a `process.env.PORT` port opposed to a specified port.
|
||||
|
||||
@@ -161,11 +169,7 @@ var port = process.env.PORT || 3000
|
||||
|
||||
Please see https://github.com/dokku/dokku/issues/282.
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ Deployment fails because of slow internet connection, messages shows `gzip: stdin: unexpected end of file`.
|
||||
|
||||
__Solution:__
|
||||
### Deployment fails because of slow internet connection, messages shows `gzip: stdin: unexpected end of file`.
|
||||
|
||||
If you see output similar this when deploying:
|
||||
|
||||
@@ -189,11 +193,7 @@ Please see https://github.com/dokku/dokku/issues/509.
|
||||
|
||||
Another reason for this error (although it may respond immediately ruling out a timeout issue) may be because you've set the config setting `SSL_CERT_FILE`. Using a config setting with this key interferes with the buildpack's ability to download its dependencies, so you must rename the config setting to something else, e.g. `MY_APP_SSL_CERT_FILE`.
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ Build fails with `Killed` message.
|
||||
|
||||
__Solution:__
|
||||
### Build fails with `Killed` message.
|
||||
|
||||
This generally occurs when the server runs out of memory. You can either add more RAM to your server or setup swap space. The follow script will create 2 GB of swap space.
|
||||
|
||||
@@ -207,11 +207,7 @@ sudo sysctl -w vm.swappiness=10
|
||||
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I successfully deployed my application with no deployment errors but I'm receiving Connection Timeout when attempting to access the application.
|
||||
|
||||
__Solution:__
|
||||
### I successfully deployed my application with no deployment errors but I'm receiving Connection Timeout when attempting to access the application.
|
||||
|
||||
This can occur if Dokku is running on a system with a firewall like UFW enabled (some OS versions like Ubuntu have this enabled by default). You can check if this is your case by running the following script:
|
||||
|
||||
@@ -225,11 +221,7 @@ If the previous script returned `Status: active` and a list of ports, UFW is ena
|
||||
sudo ufw disable
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ I can't connect to my application because the server is sending an invalid response, or can't provide a secure connection.
|
||||
|
||||
__Solution:__
|
||||
### I can't connect to my application because the server is sending an invalid response, or can't provide a secure connection.
|
||||
|
||||
This isn't usually an issue with Dokku, but rather an app config problem. This can happen when your application is configured to enforce secure connections/HSTS, but you don't have SSL set up for the app.
|
||||
|
||||
@@ -237,11 +229,7 @@ In Rails at least, if your `application.rb` or `environmnents/production.rb` inc
|
||||
|
||||
If this solves the issue temporarily, longer term you should consider [configuring SSL](/docs/configuration/ssl.md).
|
||||
|
||||
***
|
||||
|
||||
__Symptom:__ My application deploys properly, but won't load in browser "connection refused"
|
||||
|
||||
__Solution:__
|
||||
### My application deploys properly, but won't load in browser "connection refused"
|
||||
|
||||
This could be a result of a bad proxy configuration (`http:5000:5000` may be incorrect). Run `dokku proxy:report myapp` to check if your app has the correct proxy configuration. It should show something like the following.
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ For any security related updates, please follow our [Twitter account](https://tw
|
||||
Your operating system may occasionally provide security updates. We recommend setting unattended upgrades for your operating system. Here are some helpful links:
|
||||
|
||||
- [Arch Linux System Maintenance](https://wiki.archlinux.org/index.php/System_maintenance)
|
||||
- [Centos Automatic Security Updates](https://serversforhackers.com/c/automatic-security-updates-centos)
|
||||
- [CentOS Automatic Security Updates](https://serversforhackers.com/c/automatic-security-updates-centos)
|
||||
- [Debian Unattended Upgrades](https://wiki.debian.org/UnattendedUpgrades)
|
||||
- [Ubuntu Unattended Upgrades](https://help.ubuntu.com/community/AutomaticSecurityUpdates)
|
||||
|
||||
@@ -19,6 +19,8 @@ Docker releases updates periodically to their engine. We recommend reading their
|
||||
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [Upgrading to 0.26](/docs/appendices/0.26.0-migration-guide.md)
|
||||
- [Upgrading to 0.25](/docs/appendices/0.25.0-migration-guide.md)
|
||||
- [Upgrading to 0.24](/docs/appendices/0.24.0-migration-guide.md)
|
||||
- [Upgrading to 0.23](/docs/appendices/0.23.0-migration-guide.md)
|
||||
- [Upgrading to 0.22](/docs/appendices/0.22.0-migration-guide.md)
|
||||
@@ -69,16 +71,6 @@ new buildpacks that were released:
|
||||
dokku ps:rebuild --all
|
||||
```
|
||||
|
||||
> If you have any applications deployed via the `tags` or `tar` commands, do not run the `ps:rebuild --all` command,
|
||||
> and instead trigger `ps:rebuild` manually for each `git`-deployed application:
|
||||
>
|
||||
> ```
|
||||
> dokku ps:rebuild APP
|
||||
> ```
|
||||
>
|
||||
> Please see the [images documentation](/docs/deployment/methods/images.md) and [tar documentation](/docs/deployment/methods/tar.md)
|
||||
> for instructions on rebuilding applications deployed by those plugins.
|
||||
|
||||
## Upgrading using `dokku-update`
|
||||
|
||||
We provide a helpful binary called `dokku-update`. This is a recommended package that:
|
||||
@@ -87,7 +79,8 @@ We provide a helpful binary called `dokku-update`. This is a recommended package
|
||||
- Automates many of the upgrade instructions for you.
|
||||
- Provides a clean way for us to further enhance the upgrade process in the future.
|
||||
|
||||
When installing from source, this is available from `contrib/dokku-update`, and is also available on Debian and RPM-based systems from our package repositories under the name `dokku-update`.
|
||||
This binary is available on Debian and RPM-based systems from our package repositories under the name `dokku-update`. When installing from source,
|
||||
this is available from a separate Github repository at [dokku/dokku-update](https://github.com/dokku/dokku-update).
|
||||
|
||||
## Upgrading using `apt`
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The [Code Of Conduct](https://github.com/dokku/.github/blob/master/CODE_OF_CONDU
|
||||
|
||||
### Forums
|
||||
|
||||
- [Github Discussions](https://github.com/dokku/dokku/discussions)
|
||||
- [GitHub Discussions](https://github.com/dokku/dokku/discussions)
|
||||
|
||||
GitHub Discussions is a new way for the Dokku community to interact with each other! This is a place to ask questions to the community or discuss potential feature requests before filing issues.
|
||||
|
||||
@@ -34,8 +34,8 @@ You may find help on these locations, but they are not actively monitored by the
|
||||
|
||||
Tag your questions with `dokku` to enable existing users of Stack Overflow to find your questions.
|
||||
|
||||
### IRC (on freenode)
|
||||
### IRC (on libera.chat)
|
||||
|
||||
- [irc.freenode.net/#dokku](https://webchat.freenode.net/?channels=dokku)
|
||||
- [irc.libera.chat/#dokku](https://webchat.libera.chat/?channels=dokku)
|
||||
|
||||
This location isn't as well monitored as Slack, and loses history.
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.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.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.24.6/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.26.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -56,9 +56,6 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/{{NAME}}/getting-started/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>
|
||||
@@ -98,15 +95,18 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.24.6/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.26.2/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.24.6 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.26.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
<span class="output"> # Configure your server domain via `dokku domains:set-global`</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # and user access (via `dokku ssh-keys:add`) to complete the installation</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">echo "xenial bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"</span>
|
||||
<span class="command">echo "bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
@@ -166,7 +166,10 @@
|
||||
<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>
|
||||
<span class="output"> # Configure your server domain via `dokku domains:set-global`</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # and user access (via `dokku ssh-keys:add`) to complete the installation</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -183,7 +186,7 @@
|
||||
</div>
|
||||
|
||||
<div class="alternate-instructions">
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://marketplace.digitalocean.com/apps/dokku?refcode=fe06b043a083" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.</p>
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/application-workloads/dokku/dokku-vm" target="_blank">Azure</a>, <a href="https://marketplace.digitalocean.com/apps/dokku?refcode=fe06b043a083" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.</p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,11 +18,7 @@ Because there are so many different DNS server packages out there as well as a t
|
||||
|
||||
## 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.
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
## Getting started
|
||||
|
||||
@@ -36,7 +32,7 @@ Now you have to make a decision about your domain. Do you want everything and a
|
||||
|
||||
In other words, do you want your applications on your Dokku server accessible via `node-js-app.example.tld` or via `node-js-app.myserver.example.tld`?
|
||||
|
||||
#### Using a sub-domain (node-js-app.myserver.example.tld)
|
||||
### Using a sub-domain (node-js-app.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`.
|
||||
|
||||
@@ -71,7 +67,7 @@ If they all return your IP address, you have set DNS up properly for dokku. You
|
||||
|
||||
Proceed with the setup instructions in the [installation documentation](/docs/getting-started/installation.md)
|
||||
|
||||
#### Using the root of your domain (node-js-app.example.tld)
|
||||
### Using the root of your domain (node-js-app.example.tld)
|
||||
|
||||
This section is a work in progress. It is incomplete.
|
||||
|
||||
|
||||
@@ -123,11 +123,45 @@ dokku network:info test-network
|
||||
// TODO
|
||||
```
|
||||
|
||||
### Routing an app to a known ip:port combination
|
||||
|
||||
> New as of 0.25.0
|
||||
|
||||
In some cases, it may be necessary to route an app to an existing `$IP:$PORT` combination. This is particularly the case for internal admin tools or services that aren't run by Dokku but have a web ui that would benefit from being exposed by Dokku. This can be done by setting a value for `static-web-lister` and running a few other commands when creating an app.
|
||||
|
||||
```shell
|
||||
# for a service listening on:
|
||||
# - ip address: 127.0.0.1
|
||||
# - port: 8080
|
||||
|
||||
# create the app
|
||||
dokku apps:create local-app
|
||||
|
||||
# set the builder to the null builder, which does nothing
|
||||
dokku builder:set local-app selected null
|
||||
|
||||
# set the scheduler to the null scheduler, which does nothing
|
||||
dokku scheduler:set local-app selected null
|
||||
|
||||
# set the static-web-listener network property to the ip:port combination for your app.
|
||||
dokku network:set local-app static-web-listener 127.0.0.1:8080
|
||||
|
||||
# set the port map as desired for the port specified in your static-web-listener
|
||||
dokku proxy:ports-set local-app http:80:8080
|
||||
|
||||
# set the domains desired
|
||||
dokku domains:set local-app local-app.dokku.me
|
||||
|
||||
dokku proxy:build-config local-app
|
||||
```
|
||||
|
||||
Only a single `$IP:$PORT` combination can be routed to for a given app, and that `$IP:$PORT` combination _must_ be accessible to the proxy, or requests to the app may not resolve.
|
||||
|
||||
### Attaching an app to a network
|
||||
|
||||
> New as of 0.20.0, Requires Docker 1.21+
|
||||
|
||||
Apps will default to being associated with the `bridge` network, but can be attached to `attachable` networks by changing the `attach-post-create` or `attach-post-deploy` network properties when using the [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md). A change in these values will require an app deploy or rebuild.
|
||||
Apps will default to being associated with the default `bridge` network or a network specified by the `initial-network` network property. Additionally, an app can be attached to `attachable` networks by changing the `attach-post-create` or `attach-post-deploy` network properties when using the [docker-local scheduler](/docs/advanced-usage/schedulers/docker-local.md). A change in these values will require an app deploy or rebuild.
|
||||
|
||||
```shell
|
||||
# associates the network after a container is created but before it is started
|
||||
@@ -135,6 +169,9 @@ dokku network:set node-js-app attach-post-create test-network
|
||||
|
||||
# associates the network after the deploy is successful but before the proxy is updated
|
||||
dokku network:set node-js-app attach-post-deploy other-test-network
|
||||
|
||||
# associates the network at container creation
|
||||
dokku network:set node-js-app initial-network global-network
|
||||
```
|
||||
|
||||
Setting the `attach` network property to an empty value will de-associate the container with the network.
|
||||
@@ -142,6 +179,23 @@ Setting the `attach` network property to an empty value will de-associate the co
|
||||
```shell
|
||||
dokku network:set node-js-app attach-post-create
|
||||
dokku network:set node-js-app attach-post-deploy
|
||||
dokku network:set node-js-app initial-network
|
||||
```
|
||||
|
||||
The network properties can also be set globally. The global default value is an empty string, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku network:set --global attach-post-create global-create-network
|
||||
dokku network:set --global attach-post-deploy global-deploy-network
|
||||
dokku network:set --global initial-network global-network
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku network:set --global attach-post-create
|
||||
dokku network:set --global attach-post-deploy
|
||||
dokku network:set --global initial-network
|
||||
```
|
||||
|
||||
#### Network Aliases
|
||||
@@ -162,7 +216,7 @@ Dockerfile-based applications may listen on other ports. For more information on
|
||||
|
||||
#### Specifying a custom TLD
|
||||
|
||||
When attaching applications to networks, a custom TLD can be specified via the `network:set` command. This TLD is suffixed to the network alias for the application/process-type combination for _all_ networks to which the application is attached, and cannot be customized per network.
|
||||
When attaching applications to networks, a custom TLD can be specified via the `network:set` command. This TLD is suffixed to the network alias for the application/process-type combination for _all_ networks to which the application is attached, and cannot be customized per network. The default value is an empty string.
|
||||
|
||||
To specify a TLD of `svc.cluster.local` for your application, run the following command:
|
||||
|
||||
@@ -179,6 +233,24 @@ node-js-app.web.svc.cluster.local
|
||||
|
||||
Note that this has no impact on container port handling, and users must still specify the container port when making internal network requests.
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku network:set node-js-app tld
|
||||
```
|
||||
|
||||
The `tld` property can also be set globally. The global default is emty string, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku network:set --global tld svc.cluster.local
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku network:set --global tld
|
||||
```
|
||||
|
||||
#### When to attach containers to a network
|
||||
|
||||
Containers can be attached to a network for a variety of reasons:
|
||||
@@ -203,8 +275,16 @@ Whatever the reason, the semantics of the two network hooks are important and ar
|
||||
- Container state on attach: `running`
|
||||
- Use case: When another container on the network needs to access _this_ container.
|
||||
- Example: A background process needs to communicate with the web process exposed by this container.
|
||||
- `initial-network`:
|
||||
- Phase it applies to:
|
||||
- `build`: Intermediate containers created during the build process.
|
||||
- `deploy`: Deployed app containers.
|
||||
- `run`: Containers created by the `run` command.
|
||||
- Container state on attach: `created`
|
||||
- Use case: When another container on the network is already running and needed by this container.
|
||||
- Example: A key-value store exposing itself to all your apps may be on the `initial-network`.
|
||||
|
||||
> Warning: If the attachment fails at this stage, this may result in your application failing to respond to proxied requests once older containers are removed.
|
||||
> Warning: If the attachment fails during the `running` container state, this may result in your application failing to respond to proxied requests once older containers are removed.
|
||||
|
||||
### Rebuilding network settings
|
||||
|
||||
@@ -278,6 +358,18 @@ CONTAINER ID IMAGE COMMAND CREATED
|
||||
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
|
||||
```
|
||||
|
||||
The `bind-all-interfaces` property can also be set globally. The global default is `false`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku network:set --global bind-all-interfaces true
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku network:set --global bind-all-interfaces
|
||||
```
|
||||
|
||||
### Displaying network reports for an app
|
||||
|
||||
You can get a report about the app's network status using the `network:report` command:
|
||||
@@ -288,14 +380,56 @@ dokku network:report
|
||||
|
||||
```
|
||||
=====> node-js-app network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.1:5000
|
||||
Network attach post create:
|
||||
Network attach post deploy:
|
||||
Network bind all interfaces: false
|
||||
Network computed attach post create:
|
||||
Network computed attach post deploy:
|
||||
Network computed bind all interfaces:false
|
||||
Network computed initial network:
|
||||
Network computed tld:
|
||||
Network global attach post create:
|
||||
Network global attach post deploy:
|
||||
Network global bind all interfaces:false
|
||||
Network global initial network:
|
||||
Network global tld:
|
||||
Network initial network:
|
||||
Network tld:
|
||||
Network web listeners: 172.17.0.1:5000
|
||||
=====> python-sample network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.2:5000
|
||||
Network attach post create:
|
||||
Network attach post deploy:
|
||||
Network bind all interfaces: false
|
||||
Network computed attach post create:
|
||||
Network computed attach post deploy:
|
||||
Network computed bind all interfaces:false
|
||||
Network computed initial network:
|
||||
Network computed tld:
|
||||
Network global attach post create:
|
||||
Network global attach post deploy:
|
||||
Network global bind all interfaces:false
|
||||
Network global initial network:
|
||||
Network global tld:
|
||||
Network initial network:
|
||||
Network tld:
|
||||
Network web listeners: 172.17.0.2:5000
|
||||
=====> ruby-sample network information
|
||||
Network bind all interfaces: true
|
||||
Network listeners:
|
||||
Network attach post create:
|
||||
Network attach post deploy:
|
||||
Network bind all interfaces: false
|
||||
Network computed attach post create:
|
||||
Network computed attach post deploy:
|
||||
Network computed bind all interfaces:false
|
||||
Network computed initial network:
|
||||
Network computed tld:
|
||||
Network global attach post create:
|
||||
Network global attach post deploy:
|
||||
Network global bind all interfaces:false
|
||||
Network global initial network:
|
||||
Network global tld:
|
||||
Network initial network:
|
||||
Network tld:
|
||||
Network web listeners:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -306,8 +440,22 @@ dokku network:report node-js-app
|
||||
|
||||
```
|
||||
=====> node-js-app network information
|
||||
Network bind all interfaces: false
|
||||
Network listeners: 172.17.0.1:5000
|
||||
Network attach post create:
|
||||
Network attach post deploy:
|
||||
Network bind all interfaces: false
|
||||
Network computed attach post create:
|
||||
Network computed attach post deploy:
|
||||
Network computed bind all interfaces:false
|
||||
Network computed initial network:
|
||||
Network computed tld:
|
||||
Network global attach post create:
|
||||
Network global attach post deploy:
|
||||
Network global bind all interfaces:false
|
||||
Network global initial network:
|
||||
Network global tld:
|
||||
Network initial network:
|
||||
Network tld:
|
||||
Network web listeners: 172.17.0.1:5000
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
@@ -130,7 +130,7 @@ dokku proxy:ports-remove node-js-app http:80
|
||||
|
||||
### Buildpacks
|
||||
|
||||
For buildpack deployments, your application *must* respect the `PORT` environment variable. We will typically set this to port `5000`, but this is not guaranteed. If you do not respect the `PORT` environment variable, your containers may start but your services will not be accessible outside of that container.
|
||||
For buildpack deployments, your application _must_ respect the `PORT` environment variable. We will typically set this to port `5000`, but this is not guaranteed. If you do not respect the `PORT` environment variable, your containers may start but your services will not be accessible outside of that container.
|
||||
|
||||
### Dockerfile
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user