Compare commits
433 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a355b8019a | ||
|
|
1494e07c34 | ||
|
|
c9cf213afb | ||
|
|
291e052ece | ||
|
|
72deeec81f | ||
|
|
5e6630f042 | ||
|
|
b44aa8b8ea | ||
|
|
ad2d219691 | ||
|
|
986400c8e2 | ||
|
|
9f395318b3 | ||
|
|
3f0051a04f | ||
|
|
8841f91767 | ||
|
|
afc2d13b40 | ||
|
|
45395743fe | ||
|
|
1d1458862b | ||
|
|
92c81cc05d | ||
|
|
60bed60fa9 | ||
|
|
baec410580 | ||
|
|
77e51a39fa | ||
|
|
907f2d6344 | ||
|
|
0a9997ee3a | ||
|
|
ed60adfdc8 | ||
|
|
1406283b63 | ||
|
|
e34d8431da | ||
|
|
09a5c292cd | ||
|
|
9f9ebc99ec | ||
|
|
35ed98ae71 | ||
|
|
8f70e25e12 | ||
|
|
605bbb165a | ||
|
|
54703c9216 | ||
|
|
daf03a6389 | ||
|
|
e67324cac9 | ||
|
|
8ab1abd3b4 | ||
|
|
23731f6561 | ||
|
|
9fe3f49cb4 | ||
|
|
814385eda9 | ||
|
|
438261b1f9 | ||
|
|
2044496750 | ||
|
|
798793f7f8 | ||
|
|
e799709391 | ||
|
|
2326195eea | ||
|
|
40564464f9 | ||
|
|
54c987ea16 | ||
|
|
a513047e5a | ||
|
|
1c17e43bb7 | ||
|
|
431dc6c1a0 | ||
|
|
8bb559c965 | ||
|
|
50863a9b76 | ||
|
|
a1860bae14 | ||
|
|
fa8267ca09 | ||
|
|
9dae004651 | ||
|
|
f9e163c63a | ||
|
|
e561f87b17 | ||
|
|
78621481a6 | ||
|
|
92de37b23a | ||
|
|
360c587086 | ||
|
|
844b86840a | ||
|
|
94f5c04bf3 | ||
|
|
e76f8da482 | ||
|
|
4d1beedd05 | ||
|
|
b3bc109abe | ||
|
|
0b1775746d | ||
|
|
592b10122d | ||
|
|
f1dd722971 | ||
|
|
24c47e17f8 | ||
|
|
8c6e4c6483 | ||
|
|
34b5234e2f | ||
|
|
b05a2b6da2 | ||
|
|
9ed22eafea | ||
|
|
498bdd0491 | ||
|
|
92ac9cc729 | ||
|
|
9c68cd53fc | ||
|
|
3b3fc5d5c1 | ||
|
|
b4e95fe0d5 | ||
|
|
7bd4d32cb3 | ||
|
|
903d7ce614 | ||
|
|
12f3c12070 | ||
|
|
cb281e17e6 | ||
|
|
06b565f3e5 | ||
|
|
798725bb54 | ||
|
|
a3ef91f2ae | ||
|
|
cd28fe69a5 | ||
|
|
f1ead08549 | ||
|
|
6e3fddb544 | ||
|
|
dd2bbc7722 | ||
|
|
a9ce738f68 | ||
|
|
0e219b05e9 | ||
|
|
ea9cf024d5 | ||
|
|
0d1952592e | ||
|
|
43e7ee06fb | ||
|
|
692bfa7cde | ||
|
|
dbcfb7ee9f | ||
|
|
5f80cd3c20 | ||
|
|
eecee94e70 | ||
|
|
f55dc640ec | ||
|
|
a4ac67a1e0 | ||
|
|
14838de344 | ||
|
|
6b6b1c2aa4 | ||
|
|
8662f4550f | ||
|
|
78dba3be3c | ||
|
|
76911a7dc8 | ||
|
|
68de421630 | ||
|
|
ccbe0b0877 | ||
|
|
6a7d2e5252 | ||
|
|
f83a03a3dc | ||
|
|
44fcea0ffa | ||
|
|
c02059c965 | ||
|
|
92d2895d99 | ||
|
|
2b93c76b1d | ||
|
|
8cbaf1e004 | ||
|
|
b4c4d5d70f | ||
|
|
a00d9de400 | ||
|
|
a36ebd130d | ||
|
|
5b1763aa4a | ||
|
|
53c8f61ffc | ||
|
|
b806154e90 | ||
|
|
1be6ace7b5 | ||
|
|
9d9530b01d | ||
|
|
c4838b4af9 | ||
|
|
5ca3ca5189 | ||
|
|
3457844687 | ||
|
|
346e8284c8 | ||
|
|
180a5e79c9 | ||
|
|
377166d822 | ||
|
|
9256248cfd | ||
|
|
e074cffd4f | ||
|
|
30ac3c24c0 | ||
|
|
4c766b8f0e | ||
|
|
e30fad51de | ||
|
|
9734d09ff1 | ||
|
|
0c3f659854 | ||
|
|
2b1c8f64fb | ||
|
|
2cf3a3d0cf | ||
|
|
4105f0027c | ||
|
|
1dc2a7e20a | ||
|
|
d8753ca8d4 | ||
|
|
d68d02b204 | ||
|
|
8b046b9bd7 | ||
|
|
5b19256109 | ||
|
|
79b0bebb78 | ||
|
|
950b7ed6be | ||
|
|
9432cdd37c | ||
|
|
5bd499a9bc | ||
|
|
5506c9e27d | ||
|
|
e07703645e | ||
|
|
3ca6245b00 | ||
|
|
925c6c4c28 | ||
|
|
0588b6f161 | ||
|
|
fee2d50148 | ||
|
|
9a2c8e04a5 | ||
|
|
2517d392a4 | ||
|
|
a0b6663bef | ||
|
|
5fb7b0a74c | ||
|
|
026d04a65f | ||
|
|
94ace70626 | ||
|
|
2d36dc2a04 | ||
|
|
f3819a46e9 | ||
|
|
c66e08041a | ||
|
|
9e9f601690 | ||
|
|
c9bc4f8615 | ||
|
|
34ee8e7079 | ||
|
|
4ab30b8c14 | ||
|
|
3bc6f071cf | ||
|
|
0669121242 | ||
|
|
03c7543060 | ||
|
|
9730992f95 | ||
|
|
6fcb53113a | ||
|
|
5affe42699 | ||
|
|
eef9f5eba5 | ||
|
|
86febeb7ca | ||
|
|
697afaa2cc | ||
|
|
78a5e4d331 | ||
|
|
1a322eeeb8 | ||
|
|
7dbeffd041 | ||
|
|
8dbf855d56 | ||
|
|
dc9d597cd8 | ||
|
|
f771b272e3 | ||
|
|
6c8f716c11 | ||
|
|
d326c17dfb | ||
|
|
0567bfd65d | ||
|
|
008fafbed8 | ||
|
|
c959b236ea | ||
|
|
85b41121de | ||
|
|
7de242b4ee | ||
|
|
27ed3c52e3 | ||
|
|
c4c278fbcb | ||
|
|
5f4f12c27f | ||
|
|
5000c32efe | ||
|
|
5b53994447 | ||
|
|
ba5b5d4596 | ||
|
|
a17a0e9a82 | ||
|
|
0a8d5eb744 | ||
|
|
af8ade0a09 | ||
|
|
b3ba600cf8 | ||
|
|
ce98222eec | ||
|
|
6836e56b24 | ||
|
|
193e40b4c3 | ||
|
|
d1af10fc51 | ||
|
|
968543c66c | ||
|
|
da27ab3d40 | ||
|
|
034ebff42a | ||
|
|
11241e5003 | ||
|
|
b8c2259775 | ||
|
|
1437b77c6c | ||
|
|
ded056d003 | ||
|
|
8830e15526 | ||
|
|
67bdd47015 | ||
|
|
e8382362e5 | ||
|
|
7de68e7052 | ||
|
|
f723333a90 | ||
|
|
d8ada6a6e9 | ||
|
|
1f882d09bf | ||
|
|
ecfb54c668 | ||
|
|
7aeb17986a | ||
|
|
3500dbfa6a | ||
|
|
230a098b7b | ||
|
|
a568965d14 | ||
|
|
c5d5bc9a9c | ||
|
|
1a4af9b3ea | ||
|
|
ea32544e37 | ||
|
|
9b67ffe9d4 | ||
|
|
6fe984fd3c | ||
|
|
98bf4b7b31 | ||
|
|
d7bb131b37 | ||
|
|
01f317bbf3 | ||
|
|
56d8346d65 | ||
|
|
3eb9c9b3ba | ||
|
|
6b42fde028 | ||
|
|
b0b036549a | ||
|
|
eada23d3f6 | ||
|
|
402c6db826 | ||
|
|
5a52286309 | ||
|
|
22ffa41d31 | ||
|
|
e8d6e879c8 | ||
|
|
d4d69e5224 | ||
|
|
f4c0715299 | ||
|
|
2cab7f24ed | ||
|
|
af9a43b4f5 | ||
|
|
dfda7d63f4 | ||
|
|
05bdda036f | ||
|
|
a09cda126b | ||
|
|
9a43b41208 | ||
|
|
b3341999a1 | ||
|
|
69e4cd7c44 | ||
|
|
33423a0508 | ||
|
|
39f3f598a5 | ||
|
|
2c5106fe32 | ||
|
|
699719b600 | ||
|
|
8481ea2306 | ||
|
|
a984464931 | ||
|
|
f3e191988d | ||
|
|
c99f92e9f2 | ||
|
|
a496ae987a | ||
|
|
75036dfa27 | ||
|
|
b35235f1e9 | ||
|
|
eabcf84f0b | ||
|
|
7fc8770027 | ||
|
|
23d647ee51 | ||
|
|
2fd53a7a01 | ||
|
|
3decb8c4d3 | ||
|
|
966afcb787 | ||
|
|
48484732a0 | ||
|
|
3e5e6b10dd | ||
|
|
2d47931cc4 | ||
|
|
c13c3f8012 | ||
|
|
4e4e256a27 | ||
|
|
161380d639 | ||
|
|
5f36b138fb | ||
|
|
024fd958e8 | ||
|
|
a848d92823 | ||
|
|
3696757e8f | ||
|
|
2cabf0a21f | ||
|
|
283ff056da | ||
|
|
9bcd81c8bd | ||
|
|
0ebb400d91 | ||
|
|
fc5544ac70 | ||
|
|
4a7f13c3d8 | ||
|
|
737e4a5bf4 | ||
|
|
d047db108b | ||
|
|
73f5fde99d | ||
|
|
a17ed7981e | ||
|
|
8a5504574d | ||
|
|
8ac35766f3 | ||
|
|
5fd5e235d8 | ||
|
|
8d526b964b | ||
|
|
084906d684 | ||
|
|
79d4f4578d | ||
|
|
785d9b4937 | ||
|
|
0e03c82139 | ||
|
|
84e33f2c57 | ||
|
|
a6408c0c56 | ||
|
|
915ef6a8d5 | ||
|
|
684f9fd175 | ||
|
|
e276ebbc27 | ||
|
|
0988e62418 | ||
|
|
bbc8c8a533 | ||
|
|
082e9458e5 | ||
|
|
0a17358352 | ||
|
|
3a2bdd83f8 | ||
|
|
625424de68 | ||
|
|
0d71293fca | ||
|
|
b6128dc54e | ||
|
|
919ba7ed93 | ||
|
|
f80788147c | ||
|
|
eb7deedd65 | ||
|
|
eb8347bcc1 | ||
|
|
48752a762c | ||
|
|
42a405355f | ||
|
|
b921aed073 | ||
|
|
73b8c3df55 | ||
|
|
1b92f4a97e | ||
|
|
c8a491ed7f | ||
|
|
da4361583b | ||
|
|
0087296bd3 | ||
|
|
6221b7bf4a | ||
|
|
f977edabb2 | ||
|
|
980ffab600 | ||
|
|
a34d36c5d2 | ||
|
|
b2a0b69ed5 | ||
|
|
2315a127ea | ||
|
|
1c1ff64c67 | ||
|
|
9e2a129854 | ||
|
|
a475af1974 | ||
|
|
4264380e15 | ||
|
|
676aa1a05b | ||
|
|
94c06bbdd2 | ||
|
|
1c600b8846 | ||
|
|
7dd9007607 | ||
|
|
e71ad53b0e | ||
|
|
a92687d3e8 | ||
|
|
2aac9c71fc | ||
|
|
ceac86b58f | ||
|
|
3fb8a576a0 | ||
|
|
c786b9e45e | ||
|
|
68fcd67327 | ||
|
|
a54fa57136 | ||
|
|
343a6a159f | ||
|
|
dc2a680a29 | ||
|
|
72fce08e87 | ||
|
|
b60934629e | ||
|
|
e59f115311 | ||
|
|
19dd92e6c7 | ||
|
|
aab390edb6 | ||
|
|
0c11068129 | ||
|
|
ad804f6d3f | ||
|
|
de43eb1e3d | ||
|
|
5d9daa9367 | ||
|
|
0d9e424ede | ||
|
|
603dc0fad6 | ||
|
|
0cf03baa78 | ||
|
|
ba3af25423 | ||
|
|
a084c62e3f | ||
|
|
b429af8ff2 | ||
|
|
287f383f6c | ||
|
|
aefb24082d | ||
|
|
dee0144c7c | ||
|
|
6ca4813247 | ||
|
|
a717cb99a3 | ||
|
|
8551dfb297 | ||
|
|
6a5bbd63a3 | ||
|
|
ca0b2937b9 | ||
|
|
948d507909 | ||
|
|
037324d850 | ||
|
|
6006303409 | ||
|
|
d1b1841034 | ||
|
|
bc70a24e1d | ||
|
|
acc2e84eda | ||
|
|
4f23dd2dd6 | ||
|
|
3a5f68e4d1 | ||
|
|
d30a948be0 | ||
|
|
c44db3f2cf | ||
|
|
1272287d62 | ||
|
|
f4b96cc688 | ||
|
|
65fb016bc3 | ||
|
|
2eccb95477 | ||
|
|
b9152ee77e | ||
|
|
99ec1c0606 | ||
|
|
5373cf2989 | ||
|
|
b85b4c6e99 | ||
|
|
7be4a3ee48 | ||
|
|
2f83b29f1a | ||
|
|
7709a3a2ec | ||
|
|
06d0b07f36 | ||
|
|
0275c65b8a | ||
|
|
1617796bc6 | ||
|
|
6869fda75b | ||
|
|
06017d17ae | ||
|
|
9fc26aeb41 | ||
|
|
dad5db4e9b | ||
|
|
d356cef183 | ||
|
|
c49d849917 | ||
|
|
b36a2a9154 | ||
|
|
252092c73a | ||
|
|
f6cc77bc3a | ||
|
|
cb16cae09b | ||
|
|
bb494b69ea | ||
|
|
f13a660698 | ||
|
|
ce1ca5cc17 | ||
|
|
e700ad32a3 | ||
|
|
0fd829ed3b | ||
|
|
f9a59180f2 | ||
|
|
04c9fe974e | ||
|
|
4b63c96434 | ||
|
|
ef55ce8919 | ||
|
|
0ba6e26788 | ||
|
|
1b481d214c | ||
|
|
d33ea360ac | ||
|
|
8e07d70070 | ||
|
|
06b4585a62 | ||
|
|
dbc5182193 | ||
|
|
46c023e73d | ||
|
|
f39d0fc0cf | ||
|
|
277429db5a | ||
|
|
9a447c16f2 | ||
|
|
c4c7d0d82d | ||
|
|
e5c76d3795 | ||
|
|
662c8c2831 | ||
|
|
3ec67073ce | ||
|
|
322dd2246f | ||
|
|
13e3950f4a | ||
|
|
d03d5bc40c | ||
|
|
5038050968 | ||
|
|
97fe3f56b7 | ||
|
|
887c0ebdd6 | ||
|
|
99869c520f | ||
|
|
65e82bcea1 | ||
|
|
bf8b67b35d | ||
|
|
8a56740a7c | ||
|
|
3a7bac6218 | ||
|
|
5b9e8ddb7d | ||
|
|
97649e86dd | ||
|
|
f8e3518aa6 | ||
|
|
ef5f7fe03e |
@@ -1,7 +1,8 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
machine:
|
||||
image: ubuntu-1604:201903-01
|
||||
parallelism: 4
|
||||
steps:
|
||||
- checkout
|
||||
@@ -12,11 +13,16 @@ jobs:
|
||||
- run: |
|
||||
echo 'export DOKKU_SKIP_CLEANUP=true' | sudo tee /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
- run: |
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
if [[ "$(lsb_release -rs)" == "14.04" ]]; then
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
|
||||
else
|
||||
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to ens4
|
||||
sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev ens4
|
||||
fi
|
||||
- run: |
|
||||
case $CIRCLE_NODE_INDEX in
|
||||
0) sudo -E make -e lint go-tests ci-go-coverage ;;
|
||||
0) sudo -E make -e lint-ci go-tests ci-go-coverage ;;
|
||||
1) sudo -E make -e deploy-test-checks-root deploy-test-config ;;
|
||||
2) sudo -E make -e deploy-test-multi ;;
|
||||
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||
@@ -25,6 +31,11 @@ jobs:
|
||||
shell: /bin/bash
|
||||
command: sudo -E make -e test-ci
|
||||
no_output_timeout: 60m
|
||||
- run: |
|
||||
if [ "${CIRCLE_NODE_INDEX}" == "0" ]; then
|
||||
./tests/ci/setup.sh docker
|
||||
DOKKU_SSH_PORT=3022 sudo -E make -e test-ci-docker
|
||||
fi
|
||||
- store_artifacts:
|
||||
path: ./coverage.out
|
||||
- store_artifacts:
|
||||
|
||||
@@ -6,6 +6,10 @@ contrib
|
||||
build
|
||||
docs
|
||||
tests
|
||||
!build/dokku.deb
|
||||
!tests/dhparam.pem
|
||||
!contrib/dokku-installer.py
|
||||
!contrib/dokku-update
|
||||
!contrib/bash-completion
|
||||
!contrib/docker
|
||||
vendor
|
||||
|
||||
56
Dockerfile
Normal file
56
Dockerfile
Normal file
@@ -0,0 +1,56 @@
|
||||
FROM phusion/baseimage:0.11
|
||||
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
ARG DOKKU_TAG=0.17.7
|
||||
ARG DOKKU_GID=200
|
||||
ARG DOKKU_UID=200
|
||||
ARG DOKKU_HOSTNAME=dokku.invalid
|
||||
ARG DOKKU_SKIP_KEY_FILE=true
|
||||
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"
|
||||
|
||||
COPY ./tests/dhparam.pem /tmp/dhparam.pem
|
||||
COPY ./build/dokku.deb /tmp/dokku.deb
|
||||
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 install --no-install-recommends --only-upgrade -qq -y openssl openssh-server \
|
||||
&& apt install --no-install-recommends -qq -y 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/* /var/log/nginx/* /var/log/openresty/*
|
||||
567
HISTORY.md
567
HISTORY.md
@@ -1,5 +1,572 @@
|
||||
# History
|
||||
|
||||
## 0.19.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3753: @josegonzalez Always use python3 for the installer
|
||||
|
||||
### Other
|
||||
|
||||
- #3743: @dependabot-preview[bot] chore(deps): [security] bump express from 3.1.2 to 4.17.1 in /tests/apps/.websocket.disabled
|
||||
- #3744: @dependabot-preview[bot] chore(deps): [security] bump handlebars from 1.0.12 to 4.4.5 in /tests/apps/.websocket.disabled
|
||||
- #3750: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile-bad
|
||||
- #3745: @dependabot-preview[bot] chore(deps): [security] bump express from 3.3.8 to 4.17.1 in /tests/apps/gitsubmodules
|
||||
- #3742: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noprocfile
|
||||
- #3729: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.12.0 to 1.25.1 in /tests/apps/php
|
||||
- #3732: @dependabot-preview[bot] chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
|
||||
- #3728: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 7.6.0.v20120127 to 9.4.21.v20190926 in /tests/apps/java
|
||||
- #3730: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.15.6 to 0.16.0 in /tests/apps/python-flask
|
||||
- #3737: @dependabot-preview[bot] chore(deps): bump express3-handlebars from 0.2.3 to 0.5.2 in /tests/apps/.websocket.disabled
|
||||
- #3734: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 59 to 163 in /tests/apps/php
|
||||
- #3735: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 2.6.4 to 2.8.51 in /tests/apps/php
|
||||
- #3723: @dependabot-preview[bot] chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
|
||||
- #3731: @dependabot-preview[bot] chore(deps): bump jinja2 from 2.10.1 to 2.10.3 in /tests/apps/python-flask
|
||||
- #3736: @dependabot-preview[bot] chore(deps): bump socket.io from 0.9.19 to 2.3.0 in /tests/apps/.websocket.disabled
|
||||
- #3726: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.23.0 to 1.24.0 in /tests/apps/gogrpc
|
||||
- #3727: @dependabot-preview[bot] chore(deps): bump maven-dependency-plugin from 2.4 to 3.1.1 in /tests/apps/java
|
||||
- #3733: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 2.6.4 to 2.8.50 in /tests/apps/php
|
||||
- #3720: @dependabot-preview[bot] chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
|
||||
- #3721: @dependabot-preview[bot] chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
|
||||
- #3719: @dependabot-preview[bot] chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
|
||||
|
||||
## 0.19.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3718: @josegonzalez Detect correct python binary to use
|
||||
|
||||
## 0.19.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3713: @josegonzalez Require nginx 1.13+ in order to enable tls1.3
|
||||
|
||||
## 0.19.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3688: @josegonzalez Correct shfmt issues
|
||||
- #3684: @josegonzalez Do not push betafish releases to docker hub
|
||||
- #3681: @josegonzalez Proper openresty support
|
||||
|
||||
### New Features
|
||||
|
||||
- #3687: @josegonzalez Add scheduler-post-run trigger
|
||||
- #3702: @josegonzalez Cleanup build and destroy logging output
|
||||
- #3693: @josegonzalez Remove ssh-keys user-auth trigger in favor of direct check in dokku binary
|
||||
- #3691: @josegonzalez Silence trigger logging
|
||||
- #3685: @josegonzalez Allow passing labels to one-off dokku containers
|
||||
- #3680: @josegonzalez Follow updated intermediate recommendations from the Mozilla SSL Config Generator
|
||||
- #3677: @josegonzalez Improve package build process
|
||||
- #3679: @josegonzalez Allow keeping the git directory during builds
|
||||
- #3577: @josegonzalez Use new-style docker management commands
|
||||
- #3678: @josegonzalez Add container-type to run and deploy containers
|
||||
- #3671: @josegonzalez Allow overriding checks doc url
|
||||
- #3662: @leshik Improve nginx ciphers compatibility
|
||||
- #3668: @josegonzalez Release latest docker image on release
|
||||
- #3659: @fzerorubigd Add support for grpc/grpcs port forwarding
|
||||
- #3690: @josegonzalez Add support for python3
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3701: @limenet Docs / Getting Started: use HTTPS instead of SSH for clone
|
||||
- #3699: @robhudson Add `dokku cleanup` to help output
|
||||
- #3669: @josegonzalez Fix reference to CHECKS file location
|
||||
|
||||
### Tests
|
||||
|
||||
- #3670: @josegonzalez Upgrade all python test deps
|
||||
|
||||
## 0.18.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3704: @josegonzalez Fail nginx:build-config if the image does not exist
|
||||
|
||||
## 0.18.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Other
|
||||
|
||||
- #3703: @scjody Update DOKKU_SCALE from Procfile during ps:scale
|
||||
|
||||
## 0.18.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3660: @josegonzalez Trigger builder-release for dockerfile correctly
|
||||
- #3655: @znz Fix filename of sshcommand tarball
|
||||
- #3648: @josegonzalez Copy the deb file before creating the image
|
||||
|
||||
### New Features
|
||||
|
||||
- #3656: @josegonzalez Allow users to customize the container start command
|
||||
- #3657: @josegonzalez Show error message when docker-related build commands fail
|
||||
- #3654: @josegonzalez Update herokuish to 0.5.3
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3652: @josegonzalez Correct issue in inspect call for issue template
|
||||
|
||||
## 0.18.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3645: @josegonzalez Use version in DOKKU_LIB_ROOT
|
||||
- #3644: @josegonzalez Refactor temp file handling
|
||||
- #3643: @josegonzalez Quiet deploy output
|
||||
- #3641: @josegonzalez Pass SOURCECODE_WORK_DIR to build-buildpack triggers
|
||||
- #3639: @josegonzalez Refer to upstream sshcommand package
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3642: @josegonzalez Correct issue with label change in docs
|
||||
- #3640: @josegonzalez Add missing popd to post-extract example
|
||||
|
||||
## 0.18.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3636: @josegonzalez Unify deb and rpm creation code
|
||||
- #3635: @josegonzalez Upgrade herokuish to 0.5.2
|
||||
|
||||
## 0.18.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.18.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.18.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3627: @josegonzalez Make image removal synchronous
|
||||
- #3618: @josegonzalez Ensure the dokku-retire timer is properly installed
|
||||
- #3614: @alexquick Validate args for config:set and config:unset
|
||||
- #3605: @josegonzalez Handle case where there are empty newlines in the authorized_keys file
|
||||
- #3603: @josegonzalez Drop extra % sign in common.LogVerboseQuiet
|
||||
- #3597: @josegonzalez Allow default trace function to work
|
||||
|
||||
### New Features
|
||||
|
||||
- #3628: @josegonzalez Handle file copying in a secure and reliable fashion
|
||||
- #3630: @josegonzalez Fix issue where push warning on bad branch was skipped
|
||||
- #3629: @josegonzalez Avoid calling the user-auth trigger where possible
|
||||
- #3626: @josegonzalez Builder plugins
|
||||
- #3599: @josegonzalez Scope docker-cleanup to specific app
|
||||
- #3589: @michaelshobbs Allow running Dokku in Docker
|
||||
- #3607: @josegonzalez Purge cache using herokuish image
|
||||
- #3602: @alexymik Create a 502 error page to automatically refresh if backend status changes
|
||||
- #3600: @josegonzalez Refactor IsImageHerokuishBased to match shell version
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3625: @josegonzalez Remove old reference to SPONSORS.md
|
||||
- #3619: @josegonzalez Cleanup plugin creation docs
|
||||
- #3612: @jayjun Improve testing docs
|
||||
- #3613: @Lyelt Remove all uses of proxy_set_header Connection "upgrade"
|
||||
- #3596: @josegonzalez Add missing hooks to events plugin and plugin triggers docs
|
||||
|
||||
### Tests
|
||||
|
||||
- #3610: @jayjun Correct Bats path in single tests
|
||||
|
||||
## 0.17.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3593: @JakeAngell Fix nginx template for https in "Connection" header
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3595: @josegonzalez Drop extra help output for trace
|
||||
|
||||
## 0.17.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3591: @palfrey Allow SSH keys with no ending newline
|
||||
|
||||
### New Features
|
||||
|
||||
- #3587: @josegonzalez feat: drop make and gcc as dependencies
|
||||
|
||||
## 0.17.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3586: @josegonzalez ps plugin parallel usage cleanup
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3584: @josegonzalez Fix no-install-recommends documentation
|
||||
|
||||
### Other
|
||||
|
||||
- #3579: @znz Update plugin list
|
||||
|
||||
## 0.17.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3578: @josegonzalez Allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
|
||||
|
||||
## 0.17.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3576: @josegonzalez Allow setting DOCKER_BIN path for docker execution
|
||||
|
||||
## 0.17.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3575: @josegonzalez Add a way to cleanup apps for specific schedulers
|
||||
|
||||
## 0.17.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3570: @znz Fix typos in trace help
|
||||
|
||||
### New Features
|
||||
|
||||
- #3574: @josegonzalez Add support for pulling app status from scheduler plugins
|
||||
- #3571: @znz Simplify hostname_regex
|
||||
|
||||
## 0.17.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3568: @josegonzalez Correct issue with clearing global domains
|
||||
|
||||
## 0.17.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3567: @josegonzalez Ignore SC2064
|
||||
|
||||
## 0.17.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.17.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3565: @josegonzalez Properly cleanup temp files
|
||||
- #3563: @josegonzalez Properly split strings in sanitized ps:inspect
|
||||
- #3560: @josegonzalez Resource setting fixes
|
||||
- #3556: @josegonzalez Add missing domains:clear-global command
|
||||
- #3554: @znz Switch from rawgit to jsdelivr in manifest.json too
|
||||
|
||||
### New Features
|
||||
|
||||
- #3566: @josegonzalez Allow users to specify wildcard domains
|
||||
- #3564: @josegonzalez Add config:clear command
|
||||
- #3477: @alexquick Allow specifying environment variables for dokku run
|
||||
- #3540: @josegonzalez Do not append the global domain for matching subdomains
|
||||
- #3559: @josegonzalez Add trace:on and trace:off
|
||||
- #3561: @josegonzalez feat: disable scaling if app contains DOKKU_SCALE file
|
||||
- #3558: @josegonzalez Add nginx:show-conf command
|
||||
- #3549: @josegonzalez Add message indicating that the user is looking at default limits/reservations
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3557: @josegonzalez Standardize on node-js-app in examples
|
||||
- #3548: @josegonzalez Remove outdated global resource setting
|
||||
|
||||
### Other
|
||||
|
||||
- #3562: @josegonzalez Proxy ports manipulation updates
|
||||
|
||||
## 0.16.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3547: @josegonzalez Correct retrieval of resource values for alternative schedulers
|
||||
|
||||
### New Features
|
||||
|
||||
- #3546: @josegonzalez Add ability to trigger an arbitrary plugin hook
|
||||
|
||||
## 0.16.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3541: @josegonzalez Handle case where image is null on first deploy
|
||||
|
||||
### New Features
|
||||
|
||||
- #3543: @josegonzalez Add ability to clear global domains
|
||||
- #3517: @josegonzalez SSH key updates
|
||||
- #3538: @josegonzalez Silence dokku run 'errors'
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3523: @MarcDiethelm Add an example how to specify a Dockerfile for deployment
|
||||
- #3539: @josegonzalez Warn users when ufw is enabled
|
||||
|
||||
## 0.16.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3536: @josegonzalez docs: Add documentation for nginx-pre-reload limitation
|
||||
- #3535: @josegonzalez Add help output for apps:exists
|
||||
|
||||
## 0.16.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3532: @josegonzalez refactor: allow the scheduler to decide if an app is deployed
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3530: @jhstatewide Updated info about supported Ubuntu versions
|
||||
|
||||
## 0.16.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.16.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.16.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3527: @josegonzalez Use DOKKU_IMAGE for report command
|
||||
|
||||
### New Features
|
||||
|
||||
- #3528: @josegonzalez feat: add support for quiet ps:scale output
|
||||
- #3516: @ape-box fix nginx template with Connection header to http_connection
|
||||
- #3513: @Mayeu Support installing plugins via file:// scheme
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3525: @artofrawr add multi dockerfile plugin to plugins.md
|
||||
- #3518: @renestalder Add GitLab GIT_STRATEGY for stop_preview_app
|
||||
- #3506: @vanastassiou Clarify application deployment documentation
|
||||
- #3512: @Mayeu Update example app in deploy tutorial
|
||||
|
||||
## 0.15.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3511: @josegonzalez Add json output to config:export
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3510: @josegonzalez Remove SPONSORS doc in favor of OpenCollective
|
||||
- #3509: @Neamar Missing space in markdown formatting
|
||||
- #3507: @renestalder Fix GitLab CI examples
|
||||
|
||||
## 0.15.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #3499: @josegonzalez Ensure the .buildpacks file exists before writing to it
|
||||
- #3500: @josegonzalez Always allow ps:scale proc=0
|
||||
- #3497: @josegonzalez Allow reporting domains when there are none specified
|
||||
|
||||
### New Features
|
||||
|
||||
- #3502: @josegonzalez Add a trigger to fetch the git revision
|
||||
- #3501: @josegonzalez Move log retrieval to docker-local scheduler
|
||||
- #3498: @josegonzalez Add ability to report domains globally
|
||||
- #3496: @josegonzalez Cleanup glide plugins when running src-clean
|
||||
|
||||
### Documentation
|
||||
|
||||
- #3504: @vanastassiou Edits for readability and conciseness
|
||||
- #3490: @josegonzalez Add missing link to resource management docs
|
||||
|
||||
## 0.15.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### New Features
|
||||
|
||||
- #3489: @josegonzalez feat: upgrade herokuish to 0.5.0 (Ubuntu 18.04)
|
||||
|
||||
## 0.15.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
|
||||
### Additional information
|
||||
|
||||
- Container Inspect Output (if applicable):
|
||||
- 0.13.0+: `dokku inspect APP_NAME`
|
||||
- <0.13.0: `docker inspect CONTAINER_ID`: WARNING, `docker inspect` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX.
|
||||
- Container Inspect Output (if applicable) via `dokku ps:inspect APP_NAME`
|
||||
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
|
||||
- Link to the exact repository being deployed (if possible/applicable):
|
||||
- If a deploy is failing or behaving unexpectedly:
|
||||
@@ -40,5 +38,5 @@
|
||||
- If using buildpacks, which custom buildpacks are in use
|
||||
- If using a `Dockerfile`, the contents of that file
|
||||
- If it exists, the contents of your `Procfile`.
|
||||
- Output of failing Dokku commands after running `dokku trace on`
|
||||
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
|
||||
- Output of failing Dokku commands after running `dokku trace:on`
|
||||
(BEWARE: `trace:on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXX):
|
||||
|
||||
17
Makefile
17
Makefile
@@ -2,7 +2,8 @@ DOKKU_VERSION ?= master
|
||||
|
||||
PROCFILE_VERSION ?= 0.6.0
|
||||
PLUGN_VERSION ?= 0.3.2
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.7.0/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.8.0
|
||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_x86_64.tgz
|
||||
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
|
||||
@@ -107,10 +108,11 @@ addman: help2man man-db
|
||||
mandb
|
||||
|
||||
version:
|
||||
mkdir -p ${DOKKU_LIB_ROOT}
|
||||
ifeq ($(DOKKU_VERSION),master)
|
||||
git describe --tags > ~dokku/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
|
||||
git describe --tags > ${DOKKU_LIB_ROOT}/VERSION 2>/dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ${DOKKU_LIB_ROOT}/VERSION
|
||||
else
|
||||
echo $(DOKKU_VERSION) > ~dokku/VERSION
|
||||
echo $(DOKKU_VERSION) > ${DOKKU_LIB_ROOT}/STABLE_VERSION
|
||||
endif
|
||||
|
||||
plugin-dependencies: plugn procfile-util
|
||||
@@ -119,12 +121,15 @@ plugin-dependencies: plugn procfile-util
|
||||
plugins: plugn procfile-util docker
|
||||
sudo -E dokku plugin:install --core
|
||||
|
||||
dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil
|
||||
dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil dos2unix
|
||||
$(MAKE) -e stack
|
||||
|
||||
apt-update:
|
||||
apt-get update -qq
|
||||
|
||||
dos2unix:
|
||||
apt-get install -qq -y dos2unix
|
||||
|
||||
help2man:
|
||||
apt-get install -qq -y help2man
|
||||
|
||||
@@ -132,8 +137,8 @@ man-db:
|
||||
apt-get install -qq -y man-db
|
||||
|
||||
sshcommand:
|
||||
wget -qO /usr/local/bin/sshcommand ${SSHCOMMAND_URL}
|
||||
chmod +x /usr/local/bin/sshcommand
|
||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
||||
tar xzf /tmp/sshcommand_latest.tgz -C /usr/local/bin
|
||||
sshcommand create dokku /usr/local/bin/dokku
|
||||
|
||||
procfile-util:
|
||||
|
||||
@@ -13,8 +13,6 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
## Sponsors
|
||||
|
||||
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS.md) file.
|
||||
|
||||
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
|
||||
|
||||
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
|
||||
@@ -98,8 +96,8 @@ A fresh VM running any of the following operating systems:
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#Sponsors
|
||||
|
||||
[Deis](http://deis.io)
|
||||
|
||||
[DigitalOcean](https://www.digitalocean.com/)
|
||||
|
||||
[Melvin Lammerts](http://dokku.net)
|
||||
37
common.mk
37
common.mk
@@ -1,4 +1,41 @@
|
||||
GO_ARGS ?= -a
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.12
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
build: $(BUILD)
|
||||
|
||||
build-in-docker: clean
|
||||
mkdir -p /tmp/dokku-go-build-cache
|
||||
docker run --rm \
|
||||
-v $$PWD/../..:$(GO_REPO_ROOT) \
|
||||
-v /tmp/dokku-go-build-cache:/root/.cache/go-build \
|
||||
-e PLUGIN_NAME=$(PLUGIN_NAME) \
|
||||
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
|
||||
$(BUILD_IMAGE) \
|
||||
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
|
||||
|
||||
clean:
|
||||
rm -rf commands subcommands triggers
|
||||
find . -xtype l -delete
|
||||
|
||||
commands: **/**/commands.go
|
||||
go build $(GO_ARGS) -o commands src/commands/commands.go
|
||||
|
||||
subcommands:
|
||||
go build $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
|
||||
$(MAKE) $(SUBCOMMANDS)
|
||||
|
||||
subcommands/%:
|
||||
ln -sf subcommands $@
|
||||
|
||||
src-clean:
|
||||
rm -rf .gitignore src vendor Makefile *.go glide.*
|
||||
|
||||
triggers:
|
||||
go build $(GO_ARGS) -o triggers src/triggers/triggers.go
|
||||
$(MAKE) $(TRIGGERS)
|
||||
|
||||
triggers/%:
|
||||
ln -sf triggers $(shell echo $@ | cut -d '/' -f2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# bash completion for dd -*- shell-script -*-
|
||||
# bash completion for dokku -*- shell-script -*-
|
||||
|
||||
_dokku_complete_verify() {
|
||||
declare desc="shows bash completion"
|
||||
|
||||
@@ -36,7 +36,7 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
SKIP_GO_CLEAN=true \
|
||||
make version copyfiles \
|
||||
&& rm -rf plugins/common/*.go plugins/common/glide* plugins/common/vendor/ \
|
||||
&& make deb-dokku deb-sshcommand deb-sigil \
|
||||
rpm-dokku rpm-sshcommand rpm-sigil
|
||||
&& make deb-dokku deb-sigil \
|
||||
rpm-dokku rpm-sigil
|
||||
|
||||
RUN ls -lha /tmp/
|
||||
|
||||
@@ -42,7 +42,7 @@ def main():
|
||||
download_urls['downloads/' + version['filename']] = version['download_url']
|
||||
|
||||
for filename, download_url in download_urls.items():
|
||||
print "downloading", filename
|
||||
print("downloading {0}".format(filename))
|
||||
download_file(filename, download_url)
|
||||
upload_file(filename)
|
||||
|
||||
|
||||
8
contrib/dokku-docker-bin.sh
Executable file
8
contrib/dokku-docker-bin.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x && DOKKU_DOCKER_ENV="--env DOKKU_TRACE=on"
|
||||
DOKKU_DOCKER_CONTAINER_NAME=${DOKKU_DOCKER_CONTAINER_NAME:=dokku}
|
||||
|
||||
# TODO: handle cases where we need a tty
|
||||
# shellcheck disable=SC2086
|
||||
docker exec $DOKKU_DOCKER_ENV -i "$DOKKU_DOCKER_CONTAINER_NAME" dokku "$@"
|
||||
@@ -1,23 +1,44 @@
|
||||
#!/usr/bin/env python2.7
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import cgi
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
try:
|
||||
import SimpleHTTPServer
|
||||
import SocketServer
|
||||
except ImportError:
|
||||
import http.server as SimpleHTTPServer
|
||||
import socketserver as SocketServer
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.15.2'
|
||||
VERSION = 'v0.19.3'
|
||||
|
||||
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 = subprocess.check_output(command, shell=True)
|
||||
if ':' in hostname:
|
||||
hostname = ''
|
||||
hostname = bytes_to_string(subprocess.check_output(command, shell=True))
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
@@ -33,17 +54,37 @@ admin_keys = []
|
||||
if os.path.isfile(key_file):
|
||||
try:
|
||||
command = "cat {0}".format(key_file)
|
||||
admin_keys = subprocess.check_output(command, shell=True).strip().split("\n")
|
||||
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_dir = os.getenv('NGINX_DIR', '/etc/nginx/conf.d')
|
||||
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:
|
||||
@@ -60,8 +101,8 @@ def check_boot():
|
||||
f.write("[Install]\n")
|
||||
f.write("WantedBy=multi-user.target\n")
|
||||
f.write("WantedBy=graphical.target\n")
|
||||
if os.path.exists(nginx_dir):
|
||||
with open('{0}/dokku-installer.conf'.format(nginx_dir), 'w') as f:
|
||||
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")
|
||||
@@ -70,19 +111,27 @@ def check_boot():
|
||||
f.write(" }\n")
|
||||
f.write("}\n")
|
||||
|
||||
subprocess.call('rm -f /etc/nginx/sites-enabled/*', shell=True)
|
||||
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.wfile.write(content)
|
||||
self.write_content(content)
|
||||
|
||||
def do_POST(self):
|
||||
if self.path not in ['/setup', '/setup/']:
|
||||
@@ -123,7 +172,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
user = user + str(index)
|
||||
command = ['sshcommand', 'acl-add', 'dokku', user]
|
||||
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
|
||||
proc.stdin.write(key)
|
||||
try:
|
||||
proc.stdin.write(key)
|
||||
except TypeError:
|
||||
proc.stdin.write(string_to_bytes(key))
|
||||
proc.stdin.close()
|
||||
proc.wait()
|
||||
|
||||
@@ -136,9 +188,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
if 'selfdestruct' in sys.argv:
|
||||
DeleteInstallerThread()
|
||||
|
||||
content = json.dumps({'status': 'ok'})
|
||||
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(json.dumps({'status': 'ok'}))
|
||||
self.write_content(content)
|
||||
|
||||
def web_admin_user_exists(self):
|
||||
return self.user_exists('web-admin(\d+)')
|
||||
@@ -193,7 +247,7 @@ class DeleteInstallerThread(object):
|
||||
thread.start()
|
||||
|
||||
def run(self):
|
||||
command = "rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start"
|
||||
command = "rm {0}/conf.d/dokku-installer.conf && {1} stop && {1} start".format(nginx_dir, nginx_init)
|
||||
try:
|
||||
subprocess.call(command, shell=True)
|
||||
except:
|
||||
@@ -211,7 +265,7 @@ def main():
|
||||
|
||||
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)
|
||||
print("Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port))
|
||||
httpd.serve_forever()
|
||||
|
||||
|
||||
@@ -294,6 +348,9 @@ PAGE = """
|
||||
<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>
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly 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
|
||||
@@ -206,13 +206,15 @@ fn-repo-update() {
|
||||
|
||||
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
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/browserconfig.xml
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/manifest.json
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/style.css
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/development/release-process.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/home.html
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/getting-started/install/docker.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/getting-started/installation.md
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/home.html
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/template.html
|
||||
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" README.md
|
||||
|
||||
@@ -317,6 +319,12 @@ fn-require-bin() {
|
||||
fi
|
||||
}
|
||||
|
||||
fn-build-docker-image() {
|
||||
declare desc="Builds the dokku docker image and tags it with the given version"
|
||||
declare VERSION="$1"
|
||||
docker build -t "dokku/dokku:$VERSION" .
|
||||
}
|
||||
|
||||
main() {
|
||||
declare RELEASE="$1"
|
||||
local CURRENT_VERSION NEXT_VERSION IS_RELEASE
|
||||
@@ -354,10 +362,20 @@ main() {
|
||||
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION" || log-fail "Error building 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
|
||||
if [[ "$RELEASE" == "build" ]]; then
|
||||
fn-build-docker-image "latest" || log-fail "Error building docker image"
|
||||
else
|
||||
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"
|
||||
|
||||
if [[ "$IS_RELEASE" == "true" ]]; then
|
||||
docker tag "dokku/dokku:$NEXT_VERSION" "dokku/dokku:latest"
|
||||
docker push "dokku/dokku:$NEXT_VERSION"
|
||||
docker push "dokku/dokku:latest"
|
||||
fi
|
||||
fn-repo-push-tags "$IS_RELEASE"
|
||||
fi
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly 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
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
|
||||
readonly 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXX")"
|
||||
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-plugin-release.XXXXXX")"
|
||||
|
||||
trap 'rm -rf "$TMP_WORK_DIR" >/dev/null' RETURN INT TERM EXIT
|
||||
|
||||
|
||||
42
deb.mk
42
deb.mk
@@ -2,7 +2,7 @@ BUILD_DIRECTORY ?= /tmp
|
||||
|
||||
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
|
||||
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
|
||||
HEROKUISH_VERSION ?= 0.4.9
|
||||
HEROKUISH_VERSION ?= 0.5.3
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -16,17 +16,6 @@ DOKKU_UPDATE_VERSION ?= 0.1.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
define SSHCOMMAND_DESCRIPTION
|
||||
Turn SSH into a thin client specifically for your app
|
||||
Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.7.0
|
||||
SSHCOMMAND_ARCHITECTURE = amd64
|
||||
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
|
||||
|
||||
define SIGIL_DESCRIPTION
|
||||
Standalone string interpolator and template processor
|
||||
Sigil is a command line tool for template processing
|
||||
@@ -45,9 +34,8 @@ ifndef IS_RELEASE
|
||||
endif
|
||||
|
||||
export SIGIL_DESCRIPTION
|
||||
export SSHCOMMAND_DESCRIPTION
|
||||
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-setup deb-sshcommand deb-sigil
|
||||
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-dokku-update deb-setup deb-sigil
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
@@ -63,7 +51,7 @@ install-from-deb:
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-sshcommand deb-sigil deb-dokku-update
|
||||
deb-all: deb-setup deb-herokuish deb-dokku deb-sigil deb-dokku-update
|
||||
mv $(BUILD_DIRECTORY)/*.deb .
|
||||
@echo "Done"
|
||||
|
||||
@@ -129,30 +117,6 @@ deb-dokku-update:
|
||||
contrib/dokku-update=/usr/local/bin/dokku-update \
|
||||
contrib/dokku-update-version=/var/lib/dokku-update/VERSION
|
||||
|
||||
deb-sshcommand:
|
||||
rm -rf /tmp/tmp /tmp/build $(SSHCOMMAND_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
|
||||
|
||||
@echo "-> Downloading package"
|
||||
wget -q -O /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) $(SSHCOMMAND_URL)
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
mkdir -p "/tmp/build/usr/local/bin"
|
||||
cp /tmp/tmp/sshcommand-$(SSHCOMMAND_VERSION) /tmp/build/usr/local/bin/sshcommand
|
||||
chmod +x /tmp/build/usr/local/bin/sshcommand
|
||||
|
||||
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \
|
||||
--version $(SSHCOMMAND_VERSION) \
|
||||
--architecture $(SSHCOMMAND_ARCHITECTURE) \
|
||||
--package $(BUILD_DIRECTORY)/$(SSHCOMMAND_PACKAGE_NAME) \
|
||||
--url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \
|
||||
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
|
||||
--category admin \
|
||||
--description "$$SSHCOMMAND_DESCRIPTION" \
|
||||
--license 'MIT License' \
|
||||
.
|
||||
|
||||
deb-sigil:
|
||||
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
|
||||
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.15.2
|
||||
Version: 0.19.3
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog
|
||||
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.13.0) | docker-engine (>= 1.13.0) | docker-io (>= 1.13.0) | docker.io (>= 1.13.0) | docker-ce (>= 1.13.0) | docker-ee (>= 1.13.0), net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
|
||||
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
|
||||
Pre-Depends: 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
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
|
||||
7
debian/lintian-overrides
vendored
7
debian/lintian-overrides
vendored
@@ -1,5 +1,5 @@
|
||||
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:87
|
||||
dokku: command-with-path-in-maintainer-script postinst:22 /usr/bin/sshcommand
|
||||
dokku: maintainer-script-calls-systemctl postinst:98
|
||||
dokku: changelog-file-missing-in-native-package
|
||||
dokku: statically-linked-binary
|
||||
dokku: unstripped-binary-or-object
|
||||
@@ -10,3 +10,6 @@ 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
|
||||
|
||||
221
debian/postinst
vendored
221
debian/postinst
vendored
@@ -26,6 +26,124 @@ call-sshcommand() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup-user() {
|
||||
echo "Setting up dokku user"
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
mkdir -p "$DOKKU_ROOT/.ssh" "$DOKKU_ROOT/.dokkurc"
|
||||
touch "$DOKKU_ROOT/.ssh/authorized_keys"
|
||||
chown -R dokku:dokku "$DOKKU_ROOT/.ssh" "${DOKKU_ROOT}/.dokkurc"
|
||||
}
|
||||
|
||||
setup-storage() {
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data" "${DOKKU_LIB_ROOT}/data/storage"
|
||||
chown dokku:dokku "${DOKKU_LIB_ROOT}/data"
|
||||
}
|
||||
|
||||
setup-plugins() {
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/available" "${DOKKU_LIB_ROOT}/plugins/available"
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/core-plugins/enabled" "${DOKKU_LIB_ROOT}/plugins/enabled"
|
||||
touch "${DOKKU_LIB_ROOT}/core-plugins/config.toml" "${DOKKU_LIB_ROOT}/plugins/config.toml"
|
||||
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then
|
||||
rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available
|
||||
fi
|
||||
done
|
||||
|
||||
db_get "dokku/nginx_enable"
|
||||
echo "Enabling all core plugins"
|
||||
find "${DOKKU_LIB_ROOT}/core-plugins/available" -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then
|
||||
echo "Skipping enable of nginx-vhosts plugin"
|
||||
continue
|
||||
elif [ ! -d "${DOKKU_LIB_ROOT}/plugins/available/$plugin" ]; then
|
||||
ln -s "${DOKKU_LIB_ROOT}/core-plugins/available/$plugin" "${DOKKU_LIB_ROOT}/plugins/available/$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/core-plugins" plugn enable "$plugin"
|
||||
PLUGIN_PATH="${DOKKU_LIB_ROOT}/plugins" plugn enable "$plugin"
|
||||
fi
|
||||
done
|
||||
find -L "${DOKKU_LIB_ROOT}" -type l -delete
|
||||
chown dokku:dokku -R "${DOKKU_LIB_ROOT}/plugins" "${DOKKU_LIB_ROOT}/core-plugins"
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
}
|
||||
|
||||
setup-sshcommand() {
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' >"${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" >"${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
call-sshcommand acl-add dokku default <"$RET" || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
abort-upgrade | abort-remove | abort-deconfigure) ;;
|
||||
|
||||
@@ -33,103 +151,16 @@ case "$1" in
|
||||
configure)
|
||||
mandb
|
||||
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
|
||||
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
|
||||
echo "Setting up storage directories"
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
chown dokku:dokku ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
|
||||
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
|
||||
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
elif [ -f ${DOKKU_LIB_ROOT}/plugins/$plugin/.core ]; then
|
||||
rm -rf ${DOKKU_LIB_ROOT}/plugins/$plugin
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
mv ${DOKKU_LIB_ROOT}/plugins/$plugin ${DOKKU_LIB_ROOT}/plugins/available
|
||||
fi
|
||||
done
|
||||
|
||||
db_get "dokku/nginx_enable"
|
||||
echo "Enabling all core plugins"
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then
|
||||
echo "Skipping enable of nginx-vhosts plugin"
|
||||
continue
|
||||
elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn enable $plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin
|
||||
fi
|
||||
done
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Ensure proper sshcommand path"
|
||||
echo '/usr/bin/dokku' >"${DOKKU_ROOT}/.sshcommand"
|
||||
if [[ -f .ssh/authorized_keys ]]; then
|
||||
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
|
||||
if [[ -f /sbin/modprobe ]]; then
|
||||
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
||||
fi
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
|
||||
rm -f ${DOKKU_ROOT}/VERSION
|
||||
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
||||
|
||||
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2>/dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" >/dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -f "${DOKKU_ROOT}/VHOST" ]; then
|
||||
echo "VHOST file detected, skipping modification"
|
||||
else
|
||||
db_get "dokku/vhost_enable"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_get "dokku/hostname"
|
||||
echo "Setting VHOST contents to $RET"
|
||||
echo "$RET" >"${DOKKU_ROOT}/VHOST"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/hostname"
|
||||
echo "$RET" >"${DOKKU_ROOT}/HOSTNAME"
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ -f "$RET" ]; then
|
||||
call-sshcommand acl-add dokku default <"$RET" || true
|
||||
fi
|
||||
fi
|
||||
setup-user
|
||||
setup-storage
|
||||
setup-plugins
|
||||
setup-sshcommand
|
||||
setup-dokku-installer
|
||||
dpkg-handling
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
2
debian/postrm
vendored
2
debian/postrm
vendored
@@ -28,6 +28,8 @@ main() {
|
||||
fi
|
||||
|
||||
if [[ "$1" == "purge" ]]; then
|
||||
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku.conf
|
||||
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku-installer.conf
|
||||
rm -f /etc/nginx/conf.d/dokku.conf
|
||||
rm -f /etc/nginx/conf.d/dokku-installer.conf
|
||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||
|
||||
74
debian/preinst
vendored
74
debian/preinst
vendored
@@ -7,41 +7,53 @@ 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
|
||||
NGINX_CONF="/etc/nginx/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 /etc/nginx/sites-enabled/*
|
||||
DOKKU_DISTRO="$(
|
||||
. /etc/os-release >/dev/null 2>&1 || true
|
||||
echo "$ID"
|
||||
)"
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian)
|
||||
NGINX_INIT="/usr/sbin/invoke-rc.d"
|
||||
"$NGINX_INIT" nginx reload || "$NGINX_INIT" nginx start
|
||||
;;
|
||||
ubuntu)
|
||||
NGINX_INIT="/etc/init.d/nginx"
|
||||
"$NGINX_INIT" reload || "$NGINX_INIT" start
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
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"
|
||||
|
||||
4
docker/etc/cron.d/dokku-retire
Normal file
4
docker/etc/cron.d/dokku-retire
Normal file
@@ -0,0 +1,4 @@
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
SHELL=/bin/bash
|
||||
|
||||
*/5 * * * * root /usr/bin/dokku ps:retire >> /var/log/dokku/retire.log 2>&1
|
||||
9
docker/etc/logrotate.d/services
Normal file
9
docker/etc/logrotate.d/services
Normal file
@@ -0,0 +1,9 @@
|
||||
/var/log/services/* {
|
||||
daily
|
||||
missingok
|
||||
rotate 7
|
||||
compress
|
||||
delaycompress
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
73
docker/etc/my_init.d/10_dokku_init
Executable file
73
docker/etc/my_init.d/10_dokku_init
Executable file
@@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
log-info() {
|
||||
declare desc="Log info formatter"
|
||||
echo " $*" 1>&2
|
||||
}
|
||||
|
||||
log-fail() {
|
||||
declare desc="Log fail formatter"
|
||||
echo "! $*" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
main() {
|
||||
local NGINX_ROOT
|
||||
|
||||
if [[ ! -d /mnt/dokku ]]; then
|
||||
log-info "Creating missing /mnt/dokku"
|
||||
mkdir -p /mnt/dokku
|
||||
fi
|
||||
|
||||
directories=("/etc/ssh" "/home/dokku" "/var/lib/dokku/config" "/var/lib/dokku/data")
|
||||
for dir in "${directories[@]}"; do
|
||||
if [[ ! -e "$dir" ]]; then
|
||||
log-info "Copying ${dir} skel into place"
|
||||
mkdir -p "/mnt/dokku${dir}"
|
||||
rsync -a "/skel${dir}/" "${dir}/" || log-fail "Unable to copy ${dir} skel into place"
|
||||
fi
|
||||
|
||||
# chown mount directories to "dokku:dokku"
|
||||
if [[ "$dir" != "/etc/ssh" ]]; then
|
||||
find "$dir" -print0 | xargs -0 chown -h dokku:dokku
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -f /mnt/dokku/plugin-list ]]; then
|
||||
while read line; do
|
||||
dokku plugin:install "$(echo "$line" | awk '{print $2}')" "$(echo "$line" | cut -d':' -f1)"
|
||||
done </mnt/dokku/plugin-list
|
||||
fi
|
||||
|
||||
if [[ -n "$DOKKU_HOSTNAME" ]]; then
|
||||
echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections
|
||||
echo "dokku dokku/vhost_enable boolean true" | debconf-set-selections
|
||||
dokku --quiet domains:set-global "$DOKKU_HOSTNAME"
|
||||
fi
|
||||
|
||||
if [[ -x /usr/local/bin/docker ]]; then
|
||||
mkdir -p /home/dokku/.dokkurc
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
|
||||
fi
|
||||
|
||||
NGINX_ROOT="/etc/nginx"
|
||||
if [[ -x /usr/bin/openresty ]]; then
|
||||
NGINX_ROOT="/usr/local/openresty/nginx/conf"
|
||||
rm -rf /etc/runit/runsvdir/default/nginx
|
||||
else
|
||||
rm -rf /etc/runit/runsvdir/default/openresty
|
||||
fi
|
||||
|
||||
if [[ ! -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" ]]; then
|
||||
mkdir -p "/mnt/dokku${NGINX_ROOT}"
|
||||
openssl dhparam -out "/mnt/dokku${NGINX_ROOT}/dhparam.pem" 2048
|
||||
fi
|
||||
|
||||
mkdir -p "${NGINX_ROOT}/conf.d"
|
||||
cp -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" "${NGINX_ROOT}/dhparam.pem"
|
||||
chown root:root "${NGINX_ROOT}/dhparam.pem"
|
||||
chown root:root "${NGINX_ROOT}/conf.d"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
15
docker/etc/runit/runsvdir/default/dokku-restore/finish
Executable file
15
docker/etc/runit/runsvdir/default/dokku-restore/finish
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/dokku-restore
|
||||
exec 2>&1
|
||||
|
||||
if [[ "$1" -ne 0 ]]; then
|
||||
echo "Error restoring dokku apps! Retrying in 30 seconds..."
|
||||
exec sleep 30
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Done restoring dokku apps."
|
||||
exec sleep infinity
|
||||
|
||||
exit 0
|
||||
9
docker/etc/runit/runsvdir/default/dokku-restore/run
Executable file
9
docker/etc/runit/runsvdir/default/dokku-restore/run
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/dokku-restore
|
||||
exec 2>&1
|
||||
|
||||
echo "Running dokku-restore"
|
||||
cd /tmp || exit 1
|
||||
|
||||
exec dokku ps:restore
|
||||
7
docker/etc/runit/runsvdir/default/nginx/run
Executable file
7
docker/etc/runit/runsvdir/default/nginx/run
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/nginx
|
||||
exec 2>&1
|
||||
|
||||
echo "Running nginx"
|
||||
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf -g "daemon off;"
|
||||
7
docker/etc/runit/runsvdir/default/openresty/run
Executable file
7
docker/etc/runit/runsvdir/default/openresty/run
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/openresty
|
||||
exec 2>&1
|
||||
|
||||
echo "Running openresty"
|
||||
exec /usr/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf -g "daemon off;"
|
||||
7
docker/etc/runit/runsvdir/default/rsyslog/run
Executable file
7
docker/etc/runit/runsvdir/default/rsyslog/run
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
exec >>/var/log/services/rsyslog
|
||||
exec 2>&1
|
||||
|
||||
echo "Running rsyslog"
|
||||
exec /usr/sbin/rsyslogd -n
|
||||
1
docker/etc/sudoers.d/dokku-docker
Normal file
1
docker/etc/sudoers.d/dokku-docker
Normal file
@@ -0,0 +1 @@
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker
|
||||
20
docker/usr/local/bin/docker
Executable file
20
docker/usr/local/bin/docker
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
main() {
|
||||
declare desc="re-runs docker commands as sudo"
|
||||
local DOCKER_BIN=""
|
||||
if [[ -x "/usr/bin/docker" ]]; then
|
||||
DOCKER_BIN="/usr/bin/docker"
|
||||
fi
|
||||
|
||||
if [[ -z "$DOCKER_BIN" ]]; then
|
||||
echo "! No docker binary found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo -E "$DOCKER_BIN" "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
30
docker/usr/local/openresty/nginx/conf/nginx.conf
Normal file
30
docker/usr/local/openresty/nginx/conf/nginx.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/openresty.pid;
|
||||
include /usr/local/openresty/nginx/conf/modules-enabled/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /usr/local/openresty/nginx/conf/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
access_log /var/log/openresty/access.log;
|
||||
error_log /var/log/openresty/error.log;
|
||||
|
||||
gzip on;
|
||||
|
||||
include /usr/local/openresty/nginx/conf/conf.d/*.conf;
|
||||
include /usr/local/openresty/nginx/conf/sites-enabled/*;
|
||||
}
|
||||
@@ -8,6 +8,7 @@ plugin:enable <name> # Enable a previously disabled plugin
|
||||
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]] # Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
|
||||
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
||||
plugin:list # Print active plugins
|
||||
plugin:trigger <args...>. # Trigger an arbitrary plugin hook
|
||||
plugin:uninstall <name> # Uninstall a plugin (third-party only)
|
||||
plugin:update [name [committish]] # Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
|
||||
```
|
||||
@@ -23,39 +24,43 @@ dokku plugins-install
|
||||
|
||||
## Usage
|
||||
|
||||
You can list all installed plugins using the `plugin` command:
|
||||
You can list all installed plugins using the `plugin:list` command:
|
||||
|
||||
```shell
|
||||
dokku plugin
|
||||
dokku plugin:list
|
||||
```
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.15.2 enabled dokku core standard plugin
|
||||
20_events 0.15.2 enabled dokku core events logging plugin
|
||||
apps 0.15.2 enabled dokku core apps plugin
|
||||
build-env 0.15.2 enabled dokku core build-env plugin
|
||||
certs 0.15.2 enabled dokku core certificate management plugin
|
||||
checks 0.15.2 enabled dokku core checks plugin
|
||||
common 0.15.2 enabled dokku core common plugin
|
||||
config 0.15.2 enabled dokku core config plugin
|
||||
docker-options 0.15.2 enabled dokku core docker-options plugin
|
||||
domains 0.15.2 enabled dokku core domains plugin
|
||||
enter 0.15.2 enabled dokku core enter plugin
|
||||
git 0.15.2 enabled dokku core git plugin
|
||||
logs 0.15.2 enabled dokku core logs plugin
|
||||
named-containers 0.15.2 enabled dokku core named containers plugin
|
||||
network 0.15.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.15.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.15.2 enabled dokku core plugin plugin
|
||||
proxy 0.15.2 enabled dokku core proxy plugin
|
||||
ps 0.15.2 enabled dokku core ps plugin
|
||||
repo 0.15.2 enabled dokku core repo plugin
|
||||
shell 0.15.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.15.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.15.2 enabled dokku core storage plugin
|
||||
tags 0.15.2 enabled dokku core tags plugin
|
||||
tar 0.15.2 enabled dokku core tar plugin
|
||||
00_dokku-standard 0.19.3 enabled dokku core standard plugin
|
||||
20_events 0.19.3 enabled dokku core events logging plugin
|
||||
app-json 0.19.3 enabled dokku core app-json plugin
|
||||
apps 0.19.3 enabled dokku core apps plugin
|
||||
build-env 0.19.3 enabled dokku core build-env plugin
|
||||
buildpacks 0.19.3 enabled dokku core buildpacks plugin
|
||||
certs 0.19.3 enabled dokku core certificate management plugin
|
||||
checks 0.19.3 enabled dokku core checks plugin
|
||||
common 0.19.3 enabled dokku core common plugin
|
||||
config 0.19.3 enabled dokku core config plugin
|
||||
docker-options 0.19.3 enabled dokku core docker-options plugin
|
||||
domains 0.19.3 enabled dokku core domains plugin
|
||||
enter 0.19.3 enabled dokku core enter plugin
|
||||
git 0.19.3 enabled dokku core git plugin
|
||||
logs 0.19.3 enabled dokku core logs plugin
|
||||
network 0.19.3 enabled dokku core network plugin
|
||||
nginx-vhosts 0.19.3 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.19.3 enabled dokku core plugin plugin
|
||||
proxy 0.19.3 enabled dokku core proxy plugin
|
||||
ps 0.19.3 enabled dokku core ps plugin
|
||||
repo 0.19.3 enabled dokku core repo plugin
|
||||
resource 0.19.3 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.19.3 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.19.3 enabled dokku core shell plugin
|
||||
ssh-keys 0.19.3 enabled dokku core ssh-keys plugin
|
||||
storage 0.19.3 enabled dokku core storage plugin
|
||||
tags 0.19.3 enabled dokku core tags plugin
|
||||
tar 0.19.3 enabled dokku core tar plugin
|
||||
trace 0.19.3 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
@@ -70,11 +70,31 @@ dokku resource:limit --cpu 100 --memory 100 --process-type worker node-js-app
|
||||
|
||||
#### Displaying Resource Limits
|
||||
|
||||
Running the `resource:limits` command without any flags will display the currently configured app reservation.
|
||||
Running the `resource:limit` command without any flags will display the currently configured default app limits.
|
||||
|
||||
```shell
|
||||
dokku resource:limits node-js-app
|
||||
=====> resource limits node-js-app information
|
||||
dokku resource:limit node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource limits node-js-app information [defaults]
|
||||
cpu:
|
||||
memory:
|
||||
memory-swap: 100
|
||||
network: 100
|
||||
network-ingress:
|
||||
network-egress:
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource limits node-js-app information (web)
|
||||
cpu: 100
|
||||
memory: 100
|
||||
memory-swap:
|
||||
@@ -83,64 +103,6 @@ dokku resource:limits node-js-app
|
||||
network-egress:
|
||||
```
|
||||
|
||||
#### Global Resource Limits
|
||||
|
||||
By default, Dokku does not limit any resources, though these can be specified at the server level via the `--global` flag on the `resource:limit` command.
|
||||
|
||||
```shell
|
||||
dokku resource:limit --global --memory 200
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting default resource limits
|
||||
memory: 200
|
||||
```
|
||||
|
||||
This may also be combined with the `--process-type` flag to set global limits on a process-type level:
|
||||
|
||||
```shell
|
||||
dokku resource:limit --global --memory 150 --process-type web node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting default resource limits (web)
|
||||
memory: 150
|
||||
```
|
||||
|
||||
#### Displaying Global Resource Limits
|
||||
|
||||
Running the `resource:limit` command with only the `--global` flag will display the currently configured default limits.
|
||||
|
||||
```shell
|
||||
dokku resource:limit --global
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource limits default information
|
||||
cpu:
|
||||
memory: 200
|
||||
memory-swap:
|
||||
network:
|
||||
network-ingress:
|
||||
network-egress:
|
||||
```
|
||||
|
||||
This may also be combined with the `--process-type` flag to see global limits on a process-type level:
|
||||
|
||||
```shell
|
||||
dokku resource:limit --global --process-type web
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource limits default information (web)
|
||||
cpu:
|
||||
memory-swap:
|
||||
memory: 150
|
||||
network-egress:
|
||||
network-ingress:
|
||||
network:
|
||||
```
|
||||
|
||||
#### Clearing Resource Limits
|
||||
|
||||
In cases where the values are incorrect - or there is no desire to limit resources - resource limits may be cleared using the `resource:limit-clear` command.
|
||||
@@ -204,11 +166,14 @@ dokku resource:reserve --cpu 100 --memory 100 --process-type worker node-js-app
|
||||
|
||||
#### Displaying Resource Reservations
|
||||
|
||||
Running the `resource:reserve` command without any flags will display the currently configured app reservation.
|
||||
Running the `resource:reserve` command without any flags will display the currently configured default app reservations.
|
||||
|
||||
```shell
|
||||
dokku resource:reserve node-js-app
|
||||
=====> resource reservation node-js-app information
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource reservation node-js-app information [defaults]
|
||||
cpu: 100
|
||||
memory: 100
|
||||
memory-swap:
|
||||
@@ -217,64 +182,22 @@ dokku resource:reserve node-js-app
|
||||
network-egress:
|
||||
```
|
||||
|
||||
#### Global Resource Reservations
|
||||
|
||||
By default, Dokku does not reserve any resources, though these can be specified at the server level via the `--global` flag on the `resource:reserve` command.
|
||||
This may also be combined with the `--process-type` flag to see app reservations on a process-type level. Note that the displayed values are not merged with the defaults.
|
||||
|
||||
```shell
|
||||
dokku resource:reserve --global --memory 200
|
||||
dokku resource:reserve --process-type web node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting default resource reservation
|
||||
memory: 200
|
||||
```
|
||||
|
||||
This may also be combined with the `--process-type` flag to set global reservations on a process-type level:
|
||||
|
||||
```shell
|
||||
dokku resource:reserve --global --memory 150 --process-type web node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Setting default resource reservation (web)
|
||||
memory: 150
|
||||
```
|
||||
|
||||
#### Displaying Global Resource Reservations
|
||||
|
||||
Running the `resource:reserve` command with only the `--global` flag will display the currently configured default reservation.
|
||||
|
||||
```shell
|
||||
dokku resource:reserve --global
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource reservation default information
|
||||
cpu:
|
||||
memory: 200
|
||||
=====> resource reservation node-js-app information (web)
|
||||
cpu: 100
|
||||
memory: 100
|
||||
memory-swap:
|
||||
network:
|
||||
network-ingress:
|
||||
network-egress:
|
||||
```
|
||||
|
||||
This may also be combined with the `--process-type` flag to see global reservations on a process-type level:
|
||||
|
||||
```shell
|
||||
dokku resource:reserve --global --process-type web
|
||||
```
|
||||
|
||||
```
|
||||
=====> resource reservation default information (web)
|
||||
cpu:
|
||||
memory-swap:
|
||||
memory: 150
|
||||
network-egress:
|
||||
network-ingress:
|
||||
network:
|
||||
```
|
||||
|
||||
#### Clearing Resource Reservations
|
||||
|
||||
In cases where the values are incorrect - or there is no desire to reserve resources - resource reservations may be cleared using the `resource:reserve-clear` command.
|
||||
|
||||
@@ -43,12 +43,17 @@ This plugin implements various functionality through `plugn` triggers to integra
|
||||
|
||||
- `check-deploy`
|
||||
- `core-post-deploy`
|
||||
- `post-app-clone-setup`
|
||||
- `post-create`
|
||||
- `post-delete`
|
||||
- `pre-deploy`
|
||||
- `pre-restore`
|
||||
- `scheduler-deploy`
|
||||
- `scheduler-docker-cleanup`
|
||||
- `scheduler-inspect`
|
||||
- `scheduler-logs-failed`
|
||||
- `scheduler-logs`
|
||||
- `scheduler-retire`
|
||||
- `scheduler-run`
|
||||
- `scheduler-stop`
|
||||
- `scheduler-tags-create`
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.15.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.3\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -39,13 +39,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
"0.12.13",
|
||||
"0.13.4",
|
||||
"0.14.6",
|
||||
"0.15.2"
|
||||
"0.15.5",
|
||||
"0.16.4",
|
||||
"0.17.9",
|
||||
"0.18.5",
|
||||
"0.19.3"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
[Aluxian]: https://github.com/Aluxian
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[artofrawr]: https://github.com/artofrawr
|
||||
[basgys]: https://github.com/basgys
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[blag]: https://github.com/blag
|
||||
@@ -229,6 +230,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
|
||||
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
|
||||
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
|
||||
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
|
||||
| [Multi Dockerfile](https://github.com/artofrawr/dokku-multi-dockerfile) | [artofrawr][] | 0.4.0+ |
|
||||
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | 0.3.x |
|
||||
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | 0.3.x |
|
||||
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
|
||||
|
||||
@@ -65,7 +65,7 @@ review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
environment:
|
||||
name: review/$CI_ENVIRONMENT_SLUG
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://$CI_ENVIRONMENT_SLUG.dokku.me/
|
||||
on_stop: stop_review_app
|
||||
only:
|
||||
@@ -87,8 +87,10 @@ The above only runs for non-master branches, and will _also_ trigger an `on_stop
|
||||
stop_review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
environment:
|
||||
name: review/$CI_ENVIRONMENT_SLUG
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
action: stop
|
||||
when: manual
|
||||
script:
|
||||
|
||||
@@ -6,11 +6,12 @@
|
||||
domains:add <app> <domain> [<domain> ...] # Add domains to app
|
||||
domains:add-global <domain> [<domain> ...] # Add global domain names
|
||||
domains:clear <app> # Clear all domains for app
|
||||
domains:clear-global # Clear global domain names
|
||||
domains:disable <app> # Disable VHOST support
|
||||
domains:enable <app> # Enable VHOST support
|
||||
domains:remove <app> <domain> [<domain> ...] # Remove domains from app
|
||||
domains:remove-global <domain> [<domain> ...] # Remove global domain names
|
||||
domains:report [<app>] [<flag>] # Displays a domains report for one or more apps
|
||||
domains:report [<app>|--global] [<flag>] # Displays a domains report for one or more apps
|
||||
domains:set <app> <domain> [<domain> ...] # Set domains for app
|
||||
domains:set-global <domain> [<domain> ...] # Set global domain names
|
||||
```
|
||||
@@ -27,21 +28,10 @@ scheme://subdomain.domain.tld
|
||||
|
||||
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial dokku configuration. It can then be modified with `dokku domains:add-global` and `dokku domains:remove-global`. This value is used as a default TLD for all applications on a host.
|
||||
|
||||
If a FQDN such as `other.tld` is used as the application name, the global virtualhost will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
|
||||
If an FQDN such as `dokku.org` is used as the application name, the global virtualhost will be ignored and the resulting vhost URL for that application will be `dokku.org`.
|
||||
|
||||
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
|
||||
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.
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
|
||||
|
||||
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
|
||||
echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
```
|
||||
|
||||
If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed.
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
@@ -88,17 +78,17 @@ dokku domains:report
|
||||
```
|
||||
=====> node-js-app domains information
|
||||
Domains app enabled: true
|
||||
Domains app vhosts: node-js-sample.dokku.org
|
||||
Domains app vhosts: node-js-app.dokku.org
|
||||
Domains global enabled: true
|
||||
Domains global vhosts: dokku.org
|
||||
=====> python-sample domains information
|
||||
=====> python-app domains information
|
||||
Domains app enabled: true
|
||||
Domains app vhosts: python-sample.dokku.org
|
||||
Domains app vhosts: python-app.dokku.org
|
||||
Domains global enabled: true
|
||||
Domains global vhosts: dokku.org
|
||||
=====> ruby-sample domains information
|
||||
=====> ruby-app domains information
|
||||
Domains app enabled: true
|
||||
Domains app vhosts: ruby-sample.dokku.org
|
||||
Domains app vhosts: ruby-app.dokku.org
|
||||
Domains global enabled: true
|
||||
Domains global vhosts: dokku.org
|
||||
```
|
||||
|
||||
@@ -6,12 +6,13 @@ The `config` plugin provides the following commands to manage your variables:
|
||||
|
||||
```
|
||||
config (<app>|--global) Pretty-print an app or global environment
|
||||
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
||||
config:clear (<app>|--global) Clears environment variables
|
||||
config:export (<app>|--global) [--envfile] Export a global or app environment
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:keys (<app>|--global) [--merged] Show keys set in environment
|
||||
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
|
||||
config:export (<app>|--global) [--envfile] Export a global or app environment
|
||||
config:keys (<app>|--global) [--merged] Show keys set in environment
|
||||
config:bundle (<app>|--global) [--merged] Bundle environment into tarfile
|
||||
```
|
||||
> 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).
|
||||
|
||||
@@ -89,10 +90,11 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `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` | `http://dokku.viewdocs.io/dokku/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_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace on` <br /> `dokku trace false` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
| `DOKKU_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. |
|
||||
@@ -113,6 +115,7 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
|
||||
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
|
||||
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
|
||||
| `DOKKU_PROXY_PORT` | automatically assigned | `dokku config:set` | |
|
||||
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `dokku config:set` | |
|
||||
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |
|
||||
@@ -120,6 +123,7 @@ The following list config variables have special meaning and can be set in a var
|
||||
| `DOKKU_SKIP_CLEANUP` | | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | When a deploy is triggered, if this is set to a non-empty value, then old docker containers and images will not be removed. |
|
||||
| `DOKKU_SKIP_DEFAULT_CHECKS` | | `dokku config:set` | |
|
||||
| `DOKKU_SKIP_DEPLOY` | | `dokku config:set` | |
|
||||
| `DOKKU_START_CMD` | none | `dokku config:set` | Command to run instead of `/start $PROC_TYPE` |
|
||||
| `DOKKU_SYSTEM_GROUP` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System group to chown files as. |
|
||||
| `DOKKU_SYSTEM_USER` | `dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | System user to chown files as. |
|
||||
| `DOKKU_WAIT_TO_RETIRE` | `60` | `dokku config:set` | After a successful deploy, the grace period given to old containers before they are stopped/terminated. This is useful for ensuring completion of long-running http connections. |
|
||||
|
||||
@@ -67,17 +67,17 @@ dokku certs:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-sample
|
||||
Ssl dir: /home/dokku/node-js-sample/tls
|
||||
=====> node-js-app
|
||||
Ssl dir: /home/dokku/node-js-app/tls
|
||||
Ssl enabled: true
|
||||
Ssl hostnames: *.node-js-sample.org node-js-sample.org
|
||||
Ssl hostnames: *.node-js-app.org node-js-app.org
|
||||
Ssl expires at: Oct 5 23:59:59 2019 GMT
|
||||
Ssl issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA
|
||||
Ssl starts at: Oct 5 00:00:00 2016 GMT
|
||||
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.node-js-sample.org
|
||||
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.node-js-app.org
|
||||
Ssl verified: self signed.
|
||||
=====> python-sample
|
||||
Ssl dir: /home/dokku/python-sample/tls
|
||||
=====> python-app
|
||||
Ssl dir: /home/dokku/python-app/tls
|
||||
Ssl enabled: false
|
||||
Ssl hostnames:
|
||||
Ssl expires at:
|
||||
@@ -90,12 +90,12 @@ dokku certs:report
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku certs:report node-js-sample
|
||||
dokku certs:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-sample ssl information
|
||||
Ssl dir: /home/dokku/node-js-sample/tls
|
||||
=====> node-js-app ssl information
|
||||
Ssl dir: /home/dokku/node-js-app/tls
|
||||
Ssl enabled: true
|
||||
Ssl hostnames: *.dokku.org dokku.org
|
||||
Ssl expires at: Oct 5 23:59:59 2019 GMT
|
||||
@@ -108,7 +108,7 @@ dokku certs:report node-js-sample
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku certs:report node-js-sample --ssl-enabled
|
||||
dokku certs:report node-js-app --ssl-enabled
|
||||
```
|
||||
|
||||
## HSTS Header
|
||||
@@ -139,7 +139,7 @@ server {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
proxy_set_header X-Forwarded-For $http_x_forwarded_for;
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
# Deploying to Dokku
|
||||
|
||||
> Note: This document uses the hostname `dokku.me` in commands. For your server, please
|
||||
> substitute your server's hostname instead.
|
||||
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should set the `DOKKU_DOMAIN` value in the `Vagrantfile` before you initialize the Vagrant VM.
|
||||
|
||||
## Deploy tutorial
|
||||
|
||||
Once Dokku has been configured with at least one user, applications can be deployed via a `git push` command. To quickly see Dokku deployment in action, you can use the Heroku Ruby on Rails example app.
|
||||
Once you have configured Dokku with at least one user, you can deploy applications using `git push`. To quickly see Dokku deployment in action, try using [the Heroku Ruby on Rails "Getting Started" app](https://github.com/heroku/ruby-getting-started).
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# SSH access to github must be enabled on this host
|
||||
git clone git@github.com:heroku/ruby-rails-sample.git
|
||||
git clone https://github.com/heroku/ruby-getting-started
|
||||
```
|
||||
|
||||
### Create the app
|
||||
|
||||
Create the application on the Dokku host. You will need to SSH onto the host to run this command.
|
||||
SSH into the Dokku host and create the application as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
dokku apps:create ruby-rails-sample
|
||||
dokku apps:create ruby-getting-started
|
||||
```
|
||||
|
||||
### Create the backing services
|
||||
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/docs/community/plugins.md#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
Dokku by default **does not** provide datastores (e.g. MySQL, PostgreSQL) on a newly created app. You can add datastore support by installing plugins, and the Dokku project [provides official plugins](/docs/community/plugins.md#official-plugins-beta) for common datastores.
|
||||
|
||||
The Getting Started app requires a PostgreSQL service, so install the plugin and create the related service as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
@@ -36,42 +37,41 @@ sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
dokku postgres:create railsdatabase
|
||||
```
|
||||
|
||||
> Each service may take a few moments to create.
|
||||
Each service may take a few moments to create.
|
||||
|
||||
### Linking backing services to applications
|
||||
|
||||
Once the service creation is complete, set the `DATABASE_URL` environment variable by linking the service.
|
||||
Once the services have been created, you then set the `DATABASE_URL` environment variable by linking the service, as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
# each official datastore offers a `link` method to link a service to any application
|
||||
dokku postgres:link railsdatabase ruby-rails-sample
|
||||
dokku postgres:link railsdatabase ruby-getting-started
|
||||
```
|
||||
|
||||
> You can link a single service to multiple applications or use one service per application.
|
||||
Dokku supports linking a single service to multiple applications as well as linking only one service per application.
|
||||
|
||||
### Deploy the app
|
||||
|
||||
> Warning: Your application *should* respect the `PORT` environment variable or it may not respond to web requests.
|
||||
> Please see the [port management documentation](/docs/networking/port-management.md) for details.
|
||||
> Warning: Your app should respect the `PORT` environment variable, otherwise it may not respond to web requests. You can find more information in the [port management documentation](/docs/networking/port-management.md).**
|
||||
|
||||
Now you can deploy the `ruby-rails-sample` app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
|
||||
Now you can deploy the `ruby-getting-started` app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# the remote username *must* be dokku or pushes will fail
|
||||
cd ruby-rails-sample
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
cd ruby-getting-started
|
||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
> Note: Some tools may not support the short-upstream syntax referenced above, and you may need to prefix
|
||||
> the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-rails-sample`
|
||||
> the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-getting-started`
|
||||
> Please see the [Git](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a) documentation for more details.
|
||||
|
||||
> Note: Your private key should be registered with ssh-agent in local development. If you get a
|
||||
> permission denied error when pushing you can register your private key by running
|
||||
> `ssh-add -k ~/<your private key>`.
|
||||
> Note: Your private key should be registered with `ssh-agent` in your local development environment. If you get a `permission denied` error when pushing, you can register your private key as follows: `ssh-add -k ~/<your private key>`.
|
||||
|
||||
After running `git push dokku master`, you should have output similar to this in your terminal:
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
@@ -80,7 +80,7 @@ Compressing objects: 100% (162/162), done.
|
||||
Writing objects: 100% (231/231), 36.96 KiB | 0 bytes/s, done.
|
||||
Total 231 (delta 93), reused 147 (delta 53)
|
||||
-----> Cleaning up...
|
||||
-----> Building ruby-rails-sample from herokuish...
|
||||
-----> Building ruby-getting-started from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Ruby app detected
|
||||
-----> Compiling Ruby/Rails
|
||||
@@ -95,12 +95,12 @@ Total 231 (delta 93), reused 147 (delta 53)
|
||||
...
|
||||
|
||||
=====> Application deployed:
|
||||
http://ruby-rails-sample.dokku.me
|
||||
http://ruby-getting-started.dokku.me
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown as seen above.
|
||||
Once the deploy is complete, the application's web URL will be generated as above.
|
||||
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [Dockerfile](https://docs.docker.com/reference/builder/).
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks), as well as by using a project's [Dockerfile](https://docs.docker.com/reference/builder/).
|
||||
|
||||
|
||||
### Skipping deployment
|
||||
@@ -109,23 +109,23 @@ If you only want to rebuild and tag a container, you can skip the deployment pha
|
||||
|
||||
``` shell
|
||||
# on the Dokku host
|
||||
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
|
||||
dokku config:set ruby-getting-started DOKKU_SKIP_DEPLOY=true
|
||||
```
|
||||
|
||||
### Redeploying or restarting
|
||||
|
||||
If you need to redeploy (or restart) your app:
|
||||
If you need to redeploy or restart your app:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
dokku ps:rebuild ruby-rails-sample
|
||||
dokku ps:rebuild ruby-getting-started
|
||||
```
|
||||
|
||||
See the [process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
### Deploying with private git submodules
|
||||
### Deploying with private Git submodules
|
||||
|
||||
Dokku uses Git locally (i.e. not a Docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private Git submodules, you'll need to drop your deploy key in `/home/dokku/.ssh/` and potentially add `github.com` (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
|
||||
Dokku uses Git locally (i.e. not a Docker image) to build its own copy of your app repo, including submodules, as the `dokku` user. This means that in order to deploy private Git submodules, you need to put your deploy key in `/home/dokku/.ssh/` and potentially add `github.com` (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. You can use the following test to confirm your setup is correct:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
@@ -134,25 +134,25 @@ ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
||||
ssh -T git@github.com
|
||||
```
|
||||
|
||||
Note that if the buildpack or Dockerfile build process require SSH key access for other reasons, the above may not always apply.
|
||||
> Warning: if the buildpack or Dockerfile build process require SSH key access for other reasons, the above may not always apply.
|
||||
|
||||
## Deploying to subdomains
|
||||
|
||||
The name of remote repository is used as the name of application to be deployed, as for example above:
|
||||
If you do not enter a fully qualified domain name when pushing your app, Dokku deploys the app to `<remotename>.yourdomain.tld` as follows:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# the remote username *must* be dokku or pushes will fail
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
remote: http://ruby-getting-started.dokku.me
|
||||
```
|
||||
|
||||
You can also specify fully qualified names, say `app.dokku.me`, as
|
||||
You can also specify the fully qualified name as follows:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
@@ -166,7 +166,7 @@ remote: -----> Application deployed:
|
||||
remote: http://app.dokku.me
|
||||
```
|
||||
|
||||
This is in particular useful, then you want to deploy to root domain, as
|
||||
This is useful when you want to deploy to the root domain:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
@@ -182,9 +182,9 @@ git push dokku master
|
||||
|
||||
## Dokku/Docker container management compatibility
|
||||
|
||||
Dokku is, at its core, a Docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the Docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), Dokku executes a cleanup function prior to every deployment.
|
||||
Dokku is, at its core, a Docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the Docker daemon.
|
||||
|
||||
As of 0.5.x, this function removes all containers with the label `dokku` where the status is either `dead` or `exited`, as well as all `dangling` images. Previous versions would remove `dead` or `exited` containers, regardless of their label.
|
||||
Prior to every deployment, Dokku will execute a cleanup function. As of 0.5.x, the cleanup removes all containers with the `dokku` label where the status is either `dead` or `exited` (previous versions would remove _all_ `dead` or `exited` containers). The cleanup function also removes all images with `dangling` status.
|
||||
|
||||
## Adding deploy users
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ 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
|
||||
|
||||
@@ -76,3 +76,28 @@ This behavior can be disabled entirely on a per-app basis by setting the `rev-en
|
||||
# override for a specific app
|
||||
dokku git:set node-js-app rev-env-var ""
|
||||
```
|
||||
|
||||
### Keeping the `.git` directory
|
||||
|
||||
By default, Dokku will remove the contents of the `.git` before triggering a build for a given app. This is generally a safe default as shipping the entire source code history of your app in the deployed image artifact is unnecessary as it increases bloat and potentially can leak information if there are any security issues with your app code.
|
||||
|
||||
To enable the `.git` directory, run the `git:set` command as follows:
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
|
||||
# keep the .git directory during builds
|
||||
dokku git:set node-js-app keep-git-dir true
|
||||
```
|
||||
|
||||
The default behavior is to delete this directory and it's contents. To revert to the default behavior, the `keep-git-dir` value can be set to either an empty string or `false`.
|
||||
|
||||
```shell
|
||||
# on the Dokku host
|
||||
|
||||
# delete the .git directory during builds (default)
|
||||
dokku git:set node-js-app keep-git-dir false
|
||||
|
||||
# delete the .git directory during builds (default)
|
||||
dokku git:set node-js-app keep-git-dir ""
|
||||
```
|
||||
|
||||
@@ -92,7 +92,6 @@ dokku tags:deploy node-js-app v1
|
||||
-----> Running post-deploy
|
||||
-----> Configuring node-js-app.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old containers in 60 seconds
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
|
||||
@@ -5,7 +5,7 @@ Sometimes you need to either inspect running containers or run a one-off command
|
||||
## Run a command in an app environment
|
||||
|
||||
```
|
||||
run <app> <cmd> # Run a command in a new container using the current application image
|
||||
run [ --env KEY=VALUE | -e KEY=VALUE ] <app> <cmd> # Run a command in a new container using the current application image
|
||||
```
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
||||
@@ -13,6 +13,9 @@ The `run` command can be used to run a one-off process for a specific command. T
|
||||
```shell
|
||||
# runs `ls -lah` in the `/app` directory of the application `node-js-app`
|
||||
dokku run node-js-app ls -lah
|
||||
|
||||
# optionally, run can be passed custom environment variables
|
||||
dokku run --env "NODE_ENV=development" --env "PATH=/custom/path" node-js-app npm run mytask
|
||||
```
|
||||
|
||||
The `run` command can also be used to run a command defined in your Procfile:
|
||||
@@ -43,6 +46,12 @@ dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Containers may have specific labels attached. In order to avoid issues with dokku internals, do not use any labels beginning with either `com.dokku` or `org.label-schema`.
|
||||
|
||||
```shell
|
||||
dokku --label=com.example.test-label=value run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Finally, you may wish to run a container in "detached" mode via the `--detach` Dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as Dokku will *not* automatically terminate the container.
|
||||
|
||||
```shell
|
||||
|
||||
@@ -81,13 +81,13 @@ dokku checks:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> search checks information
|
||||
=====> node-js-app checks information
|
||||
Checks disabled list: none
|
||||
Checks skipped list: none
|
||||
=====> python-sample checks information
|
||||
=====> python-app checks information
|
||||
Checks disabled list: none
|
||||
Checks skipped list: none
|
||||
=====> ruby-sample checks information
|
||||
=====> ruby-app checks information
|
||||
Checks disabled list: _all_
|
||||
Checks skipped list: none
|
||||
```
|
||||
@@ -95,11 +95,11 @@ dokku checks:report
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku checks:report node-js-sample
|
||||
dokku checks:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-sample checks information
|
||||
=====> node-js-app checks information
|
||||
Checks disabled list: none
|
||||
Checks skipped list: none
|
||||
```
|
||||
@@ -107,7 +107,7 @@ dokku checks:report node-js-sample
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku checks:report node-js-sample --checks-disabled-list
|
||||
dokku checks:report node-js-app --checks-disabled-list
|
||||
```
|
||||
|
||||
## Customizing checks
|
||||
@@ -123,7 +123,7 @@ To specify checks, add a `CHECKS` file to the root of your project directory. Th
|
||||
- comments (lines starting with #)
|
||||
- empty lines
|
||||
|
||||
> For Dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
> For Dockerfile and Docker Image based deploys, the file *must* be in the `WORKDIR` directory of the built image. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
|
||||
### Check instructions
|
||||
|
||||
@@ -327,7 +327,6 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
-----> Running post-deploy
|
||||
-----> Configuring myapp.dokku.me...
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
-----> Shutting down old container in 60 seconds
|
||||
=====> Application deployed:
|
||||
|
||||
@@ -1,57 +1,251 @@
|
||||
# Plugin Creation
|
||||
# Plugin creation
|
||||
|
||||
Plugins can simply be implementations of [triggers](/docs/development/plugin-triggers.md) or they may implement a command structure of their own. Dokku has no restrictions on the language in which a plugin is implemented, it only cares that the plugin implements the appropriate [commands](/docs/development/plugin-creation.md#command-api) or [triggers](/docs/development/plugin-triggers.md) API. NOTE: all files that implement the triggers or commands API must be executable.
|
||||
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.
|
||||
|
||||
If you create your own plugin:
|
||||
When creating custom plugins:
|
||||
|
||||
1. Take a look at the plugins shipped with Dokku and hack away!
|
||||
2. Check out the [list of triggers](/docs/development/plugin-triggers.md) your plugin can implement.
|
||||
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
|
||||
4. Edit [this page](/docs/community/plugins.md) and add a link to it.
|
||||
1. Take a look at [the plugins shipped with Dokku](/docs/community/plugins.md) and hack away!
|
||||
2. Check out the [list of triggers](/docs/development/plugin-triggers.md) the plugin can implement
|
||||
3. Upload the plugin to GitHub with a repository name following the `dokku-<name>` convention (e.g. `dokku-mariadb`)
|
||||
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 (i.e. golang, java(?), c, etc.)
|
||||
The plugin developer is required to implement the `install` trigger such that it will output your built executable(s) in the correct directory structure to implement the plugin's desired command and/or trigger API. See [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
|
||||
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 implementation points: `commands`, `subcommands/default`, and `subcommands/<command-name>`
|
||||
There are 3 main integration points: `commands`, `subcommands/default`, and `subcommands/<command-name>`.
|
||||
|
||||
#### commands
|
||||
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands))
|
||||
### `commands`
|
||||
|
||||
#### subcommands/default
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default))
|
||||
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/<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))
|
||||
### `subcommands/default`
|
||||
|
||||
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default)).
|
||||
|
||||
### Sample plugin
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
### `subcommands/<command-name>`
|
||||
|
||||
hello/subcommands/default
|
||||
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
|
||||
|
||||
## 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.
|
||||
|
||||
```toml
|
||||
[plugin]
|
||||
description = "dokku example plugin"
|
||||
version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
||||
```shell
|
||||
chmod +x path/to/file
|
||||
```
|
||||
|
||||
Non-executable commands, subcommands, and triggers will be ignored.
|
||||
|
||||
## Use the `pipefail` bash option
|
||||
|
||||
Consider whether to include the `set -eo pipefail` option. Look at the following example:
|
||||
|
||||
```shell
|
||||
IMAGE=$(docker images | grep "user/repo" | awk '{print $3}')
|
||||
if [[ -z $IMAGE ]]; then
|
||||
dokku_log_fail "user/repo image not found... Did you run 'dokku plugin:install'?"
|
||||
fi
|
||||
```
|
||||
|
||||
If `user/repo` doesn't exist, Dokku exits just before the `awk` command and the `dokku_log_fail` message will never go to `STDOUT`. printed with echo. The `set -e` option should be used in this case.
|
||||
|
||||
Here is the `help` entry for `set`:
|
||||
|
||||
```
|
||||
help set
|
||||
Options:
|
||||
-e Exit immediately if a command exits with a non-zero status.
|
||||
-o option-name
|
||||
pipefail the return value of a pipeline is the status of
|
||||
the last command to exit with a non-zero status,
|
||||
or zero if no command exited with a non-zero status
|
||||
```
|
||||
|
||||
## 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:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
```
|
||||
|
||||
In the above example, the third line enables bash's debug mode, which prints command traces before executing command.
|
||||
|
||||
## Verify the existence of dependencies
|
||||
|
||||
If a plugin depends on a specific command-line tool, check whether that tool exists before utilizing it. Either `command -v` or `which` may be used to do so:
|
||||
|
||||
```shell
|
||||
# `command -v` example
|
||||
if ! command -v "nginx" &>/dev/null; then
|
||||
log-fail "Missing nginx, install it"
|
||||
fi
|
||||
|
||||
# `which` example
|
||||
if ! which nginx >/dev/null 2>&1; then
|
||||
log-fail "Missing nginx, install it"
|
||||
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
|
||||
|
||||
For plugins which expose commands, implement a `help` command. This may be empty, but should contain a listing of all available commands.
|
||||
|
||||
Commas - `,` - are used in the help output for columnizing output. Verify that the plugin conforms to the spec by running `dokku help --all` and manually verifying the output.
|
||||
|
||||
See the sample plugin below for an example.
|
||||
|
||||
## 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.
|
||||
|
||||
## 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
|
||||
|
||||
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:
|
||||
|
||||
```shell
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
Dokku allows image tagging and deployment of tagged images. This means hard-coding the `$IMAGE` as `dokku/$APP` is no longer sufficient.
|
||||
|
||||
Plugins should use `get_running_image_tag()` and `get_app_image_name()` as sourced from `common/functions`. See the [plugin triggers](/docs/development/plugin-triggers.md) doc for examples.
|
||||
|
||||
> **Note:** This is only for plugins that are not `pre/post-build-*` plugins
|
||||
|
||||
## Use `$DOCKER_BIN` instead of `docker` directly
|
||||
|
||||
> New as of 0.17.5
|
||||
|
||||
Certain systems may require a wrapper function around the `docker` binary for proper execution. Utilizing the `$DOCKER_BIN` environment variable when calling docker for those functions is preferred.
|
||||
|
||||
```shell
|
||||
# good
|
||||
"$DOCKER_BIN" container run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
|
||||
# bad
|
||||
docker run -d $IMAGE /bin/bash -e -c "$COMMAND"
|
||||
```
|
||||
|
||||
## Include labels for all temporary containers and images
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
As of 0.5.0, labels are used to help cleanup intermediate containers with `dokku cleanup`. Plugins that create containers and images should add the correct labels to the `build`, `commit`, and `run` docker commands.
|
||||
|
||||
Note that where possible, a label `com.dokku.app-name=$APP` - where `$APP` is the name of the app - should also be included. This enables `dokku cleanup APP` to cleanup the specific containers for a given app.
|
||||
|
||||
```shell
|
||||
# `docker build` example
|
||||
"$DOCKER_BIN" image build "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_BUILD_ARGS ...
|
||||
|
||||
# `docker commit` example
|
||||
# Note that the arguments must be set as a local array
|
||||
# as arrays cannot be exported in shell
|
||||
local DOKKU_COMMIT_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL $DOKKU_CONTAINER_LABEL=")
|
||||
"$DOCKER_BIN" container commit --change "LABEL com.dokku.app-name=$APP" "${DOKKU_COMMIT_ARGS[@]}" ...
|
||||
|
||||
# `docker run` example
|
||||
"$DOCKER_BIN" container run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
```shell
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
local TMP_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$TMP_FILE' >/dev/null" RETURN INT TERM
|
||||
|
||||
local IMAGE_TAG="$(get_running_image_tag "$APP")"
|
||||
local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
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
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
Plugins should **not** call the `dokku` binary directly from within plugins because clients using the `--app` argument are potentially broken when doing so.
|
||||
|
||||
Plugins should instead source the `functions` file for a given plugin when attempting to call Dokku internal functions.
|
||||
|
||||
# Sample plugin
|
||||
|
||||
The below plugin is a dummy `dokku hello` plugin.
|
||||
|
||||
Each plugin requires a `plugin.toml` descriptor file with the following required fields:
|
||||
|
||||
```toml
|
||||
[plugin]
|
||||
description = "dokku hello plugin"
|
||||
version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
`hello/subcommands/default`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_main_cmd() {
|
||||
declare desc="prints Hello \$APP"
|
||||
local cmd="hello"
|
||||
declare cmd="hello" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
local argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
set -- $cmd $@
|
||||
##
|
||||
#
|
||||
declare APP="$1"
|
||||
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2"
|
||||
local APP="$2";
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$APP"
|
||||
|
||||
echo "Hello $APP"
|
||||
}
|
||||
@@ -59,27 +253,18 @@ hello_main_cmd() {
|
||||
hello_main_cmd "$@"
|
||||
```
|
||||
|
||||
hello/subcommands/world
|
||||
`hello/subcommands/world`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_world_cmd() {
|
||||
declare desc="prints Hello World"
|
||||
local cmd="hello:world"
|
||||
# Support --app/$DOKKU_APP_NAME flag
|
||||
# Use the following lines to reorder args into "$cmd $DOKKU_APP_NAME $@""
|
||||
local argv=("$@")
|
||||
declare desc="prints Hello world"
|
||||
declare cmd="hello:world" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
[[ -n $DOKKU_APP_NAME ]] && set -- $DOKKU_APP_NAME $@
|
||||
set -- $cmd $@
|
||||
##
|
||||
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2"
|
||||
local APP="$2";
|
||||
|
||||
echo "Hello world"
|
||||
}
|
||||
@@ -87,11 +272,12 @@ hello_world_cmd() {
|
||||
hello_world_cmd "$@"
|
||||
```
|
||||
|
||||
hello/commands
|
||||
`hello/commands`
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | hello:help)
|
||||
@@ -126,53 +312,3 @@ help_content
|
||||
|
||||
esac
|
||||
```
|
||||
|
||||
Each plugin requires a `plugin.toml` descriptor file with the following required fields:
|
||||
|
||||
```toml
|
||||
[plugin]
|
||||
description = "dokku hello plugin"
|
||||
version = "0.1.0"
|
||||
[plugin.config]
|
||||
```
|
||||
|
||||
A few notes:
|
||||
|
||||
- Don't forget to `chmod +x` your executable files.
|
||||
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
|
||||
- If your command requires that an application exists, ensure you check for it's existence in the manner prescribed above.
|
||||
- A `help` command is required, though it is allowed to be empty. Also, the command syntax will need to separated by `, ` in order to maintain columnar output alignment.
|
||||
- Commands *should* be namespaced.
|
||||
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows Dokku to output a `command not found` message.
|
||||
- Be sure you want the "set -eo pipefail" option. Look at the following example :
|
||||
|
||||
```shell
|
||||
IMAGE=$(docker images | grep "user/repo" | awk '{print $3}')
|
||||
if [[ -z $IMAGE ]]; then
|
||||
dokku_log_fail "user/repo image not found... Did you run 'dokku plugin:install'?"
|
||||
fi
|
||||
```
|
||||
|
||||
In the case where the "user/repo" is not installed, Dokku exits just before the awk command,
|
||||
you will never see the message printed with echo. You just want "set -e" in this case.
|
||||
|
||||
Here is the documentation of the 'set -eo pipefail' option:
|
||||
```
|
||||
help set
|
||||
Options:
|
||||
-e Exit immediately if a command exits with a non-zero status.
|
||||
-o option-name
|
||||
pipefail the return value of a pipeline is the status of
|
||||
the last command to exit with a non-zero status,
|
||||
or zero if no command exited with a non-zero status
|
||||
```
|
||||
- As some plugins require access to set app config settings and do not want/require the default Heroku-style behavior of a restart, we have the following "internal" commands that provide this functionality :
|
||||
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app KEY1=VALUE1 [KEY2=VALUE2 ...]
|
||||
dokku config:unset --no-restart node-js-app KEY1 [KEY2 ...]
|
||||
```
|
||||
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/docs/development/plugin-triggers.md) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
- As of 0.6.0, we advise you to *not* call the `dokku` binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions
|
||||
|
||||
@@ -29,6 +29,21 @@ The following plugin triggers describe those available to a Dokku installation.
|
||||
|
||||
> The example plugin trigger code is not guaranteed to be implemented as in within dokku, and are merely simplified examples. Please look at the Dokku source for larger, more in-depth examples.
|
||||
|
||||
### `app-restart`
|
||||
|
||||
- Description: Triggers an app restart
|
||||
- Invoked by: `dokku config:clear`, `dokku config:set`, `dokku config:unset`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `app-urls`
|
||||
|
||||
- Description: Allows you to change the urls Dokku reports for an application. Will override any auto-detected urls.
|
||||
@@ -53,6 +68,66 @@ case "$URL_TYPE" in
|
||||
esac
|
||||
```
|
||||
|
||||
### `builder-build`
|
||||
|
||||
- Description: Triggers the artifact build process
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$BUILDER_TYPE` `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-create-dokku-image`
|
||||
|
||||
- Description: Allows modification of the configured dokku-image
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$BUILDER_TYPE` `$APP` `$SOURCECODE_WORK_DIR` `$DOKKU_IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-dokku-image`
|
||||
|
||||
- Description: Allows modification of the used dokku-image.
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$BUILDER_TYPE` `$APP` `$SOURCECODE_WORK_DIR` `$DOKKU_IMAGE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `builder-release`
|
||||
|
||||
- Description: Triggers the artifact release process
|
||||
- Invoked by: `dokku deploy`
|
||||
- Arguments: `$BUILDER_TYPE` `$APP` `$IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `check-deploy`
|
||||
|
||||
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
|
||||
@@ -68,7 +143,7 @@ esac
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
APP="$1"; CONTAINERID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
|
||||
APP="$1"; CONTAINER_ID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
|
||||
|
||||
eval "$(config_export app $APP)"
|
||||
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
|
||||
@@ -291,13 +366,11 @@ verify_app_name "$APP"
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `docker-args-run`
|
||||
### `docker-args-process-build`
|
||||
|
||||
> Warning: Deprecated, please use `docker-args-process-run` instead
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker deploy options.
|
||||
- Invoked by: `dokku ps:rebuild`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -333,7 +406,27 @@ verify_app_name "$APP"
|
||||
|
||||
- Description: `$PROC_TYPE` may be set to magic `_all_` process type to signify global docker run options.
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE [$PROC_TYPE $CONTAINER_INDEX]`
|
||||
- Arguments: `$APP $IMAGE_TAG $IMAGE_SOURCE_TYPE`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `docker-args-run`
|
||||
|
||||
> Warning: Deprecated, please use `docker-args-process-run` instead
|
||||
|
||||
- Description:
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -381,6 +474,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
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`
|
||||
|
||||
- Description: Allows you to fetch the current git revision for a given application
|
||||
- Invoked by:
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `install`
|
||||
|
||||
- Description: Used to setup any files/configuration for a plugin.
|
||||
@@ -571,6 +679,8 @@ echo "$NEW_SUBDOMAIN.$VHOST"
|
||||
|
||||
### `nginx-pre-reload`
|
||||
|
||||
> Warning: The arguments INTERNAL_PORT and INTERNAL_IP_ADDRESS are no longer sufficient to retrieve all app listeners. Please run `plugn trigger network-get-listeners APP` within any implementation of `nginx-pre-reload` in order to retrieve all application listeners.
|
||||
|
||||
- Description: Run before nginx reloads hosts
|
||||
- Invoked by: `dokku nginx:build-config`
|
||||
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
|
||||
@@ -635,7 +745,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
- Description: Allows you to run commands after the build image is create for a given app. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -805,6 +915,7 @@ 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
|
||||
```
|
||||
|
||||
### `post-proxy-ports-update`
|
||||
@@ -849,9 +960,10 @@ CMD="cat > gm && \
|
||||
dpkg -s CONTAINER_PACKAGE >/dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE >/dev/null
|
||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $CID) -eq 0
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
### `post-release-dockerfile`
|
||||
@@ -894,7 +1006,7 @@ dokku config:set --no-restart $APP MANUALLY_STOPPED=1
|
||||
|
||||
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to apps using buildpacks.
|
||||
- Invoked by: `internal function dokku_build() (build phase)`
|
||||
- Arguments: `$APP`
|
||||
- Arguments: `$APP` `$SOURCECODE_WORK_DIR`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
@@ -938,7 +1050,7 @@ APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $AP
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
```
|
||||
|
||||
@@ -959,10 +1071,10 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
test $(docker wait $id) -eq 0
|
||||
docker commit $id $IMAGE >/dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
test $(docker wait $CID) -eq 0
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
### `pre-disable-vhost`
|
||||
@@ -1040,9 +1152,10 @@ CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick >/dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE >/dev/null
|
||||
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
test $(docker wait $CID) -eq 0
|
||||
docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
```
|
||||
|
||||
### `pre-release-dockerfile`
|
||||
@@ -1127,9 +1240,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-enable`
|
||||
### `proxy-disable`
|
||||
|
||||
- Description: Enables the configured proxy implementation for an app
|
||||
- Description: Disables the configured proxy implementation for an app
|
||||
- Invoked by: `internally triggered by ps:restore`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
@@ -1142,9 +1255,9 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `proxy-disable`
|
||||
### `proxy-enable`
|
||||
|
||||
- Description: Disables the configured proxy implementation for an app
|
||||
- Description: Enables the configured proxy implementation for an app
|
||||
- Invoked by: `internally triggered by ps:restore`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
@@ -1199,6 +1312,22 @@ fi
|
||||
plugn trigger receive-app $APP $newrev
|
||||
```
|
||||
|
||||
### `report`
|
||||
|
||||
- Description: Allows you to report on any custom configuration in use by your application
|
||||
- Invoked by: `dokku report`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `resource-get-property`
|
||||
|
||||
- Description: Fetches a given resource property value
|
||||
@@ -1232,18 +1361,21 @@ APP="$1"; HOSTNAME=$(hostname -s)
|
||||
mail -s "$APP containers on $HOSTNAME failed to retire" ops@dokku.me
|
||||
```
|
||||
|
||||
### `report`
|
||||
### `scheduler-app-status`
|
||||
|
||||
- Description: Allows you to report on any custom configuration in use by your application
|
||||
- Invoked by: `dokku report`
|
||||
- Arguments: `$APP`
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Fetch the status of an app
|
||||
- Invoked by: `dokku ps:report`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
APP="$1";
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1305,6 +1437,43 @@ DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-is-deployed`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to check if an app has been deployed
|
||||
- Invoked by: `dokku ps:rebuild`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
### `scheduler-logs`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Allows you to run scheduler commands when retrieving container logs
|
||||
- Invoked by: `dokku logs:failed`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $PROCESS_TYPE $TAIL $PRETTY_PRINT $NUM`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; PROCESS_TYPE="$3"; TAIL="$4"; PRETTY_PRINT="$5"; NUM="$6"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-logs-failed`
|
||||
|
||||
> Warning: The scheduler plugin trigger apis are under development and may change
|
||||
@@ -1319,7 +1488,64 @@ DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}";
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-post-delete`
|
||||
|
||||
> 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 an app is deleted
|
||||
- Invoked by: `dokku apps:destroy`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_TAG`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-post-run`
|
||||
|
||||
> 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 after a `dokku run` invocation is called
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP $CONTAINER_ID`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2"; CONTAINER_ID="$3";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-retire`
|
||||
|
||||
> 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 containers should be force retired from the system
|
||||
- Invoked by: `dokku run`
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ The workflow looks like this:
|
||||
```shell
|
||||
# having dokku-arch in ../dokku-arch
|
||||
vagrant up build-arch
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.15.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.19.3-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'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Dokku test suite
|
||||
# Running Tests
|
||||
|
||||
Dokku has a full test suite to assist in quick iterating development. These tests include a linter using [shellcheck](https://github.com/koalaman/shellcheck), functional unit tests using the [bats testing framework](https://github.com/sstephenson/bats), and a deployment suite of example apps that use the most popular languages and frameworks.
|
||||
Dokku has a full test suite to assist in quick iterating development. These tests include a linter using [shellcheck](https://github.com/koalaman/shellcheck), functional unit tests using the [Bats testing framework](https://github.com/bats-core/bats-core), and a deployment suite of example apps that use the most popular languages and frameworks.
|
||||
|
||||
We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
@@ -11,13 +11,13 @@ We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 14.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.
|
||||
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 14.04, we only provide official installation support for that platform.
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
- Setup Dokku in a [vagrant vm](/docs/getting-started/install/vagrant.md)
|
||||
- Setup Dokku in a [Vagrant VM](/docs/getting-started/install/vagrant.md).
|
||||
- Run the following to setup tests and execute them:
|
||||
|
||||
```shell
|
||||
@@ -29,8 +29,8 @@ While we do provide official packages for a variety of platforms, as our test su
|
||||
# execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
make test
|
||||
|
||||
# run linter & update vagrant Dokku install from local git clone
|
||||
make lint copyfiles
|
||||
# run linter
|
||||
make lint
|
||||
|
||||
# execute all bats tests
|
||||
make unit-tests
|
||||
@@ -39,6 +39,16 @@ While we do provide official packages for a variety of platforms, as our test su
|
||||
make deploy-tests
|
||||
```
|
||||
|
||||
After making changes to your local Dokku clone, don't forget to update the Vagrant Dokku install.
|
||||
|
||||
```shell
|
||||
# update vagrant dokku install from local git clone
|
||||
make copyfiles
|
||||
|
||||
# build a specific plugin
|
||||
make go-build-plugin copyplugin PLUGIN_NAME=apps
|
||||
```
|
||||
|
||||
Additionally you may run a specific app deployment tests with a target similar to:
|
||||
|
||||
```shell
|
||||
@@ -63,7 +73,7 @@ bats tests/unit/10_apps.bats tests/unit/10_certs.bats
|
||||
|
||||
## Executing a single test
|
||||
|
||||
In order to increase testing velocity, a wrapper script around bats is available that can be used to run a single testcase within a suite.
|
||||
In order to increase testing velocity, a wrapper script around Bats is available that can be used to run a single test case within a suite.
|
||||
|
||||
Tests within a suite may be listed by specifying the suite as a parameter to the `tests/bats-exec-test-single` script.
|
||||
|
||||
@@ -77,7 +87,7 @@ A single test can be specified as a second parameter. The test is selected by fu
|
||||
tests/bats-exec-test-single tests/unit/10_apps.bats clone
|
||||
```
|
||||
|
||||
Some special characters are translated in the test listing - specifically the characters `( ) :` - while others are not. The fuzzy matching happens on the test names listed when no second character is invoked, so executing a test with a more specific name will work as expected.
|
||||
Some special characters are translated in the test listing, specifically the characters `( ) :`, while others are not. The fuzzy matching happens on test names as listed by this script, so executing a test with a more specific name will work as expected.
|
||||
|
||||
```shell
|
||||
tests/bats-exec-test-single tests/unit/10_apps.bats clone_-2d-2dskip-2ddeploy
|
||||
|
||||
@@ -46,7 +46,7 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
|
||||
|
||||
## Skipping Herokuish installation
|
||||
|
||||
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=true bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
|
||||
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=" --no-install-recommends " bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
|
||||
|
||||
## Configuring an unattended installation
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Microsoft Azure
|
||||
# Microsoft Azure Installation Notes
|
||||
|
||||
1. If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# DigitalOcean Droplet
|
||||
# DigitalOcean Droplet Installation Notes
|
||||
|
||||
[DigitalOcean](https://www.digitalocean.com/products/compute/) offers a pre-installed Dokku image. You can run this image on any sized Droplet, although larger Droplets will allow you to run larger applications.
|
||||
|
||||
|
||||
54
docs/getting-started/install/docker.md
Normal file
54
docs/getting-started/install/docker.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# Docker Installation Notes
|
||||
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.19.3
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
|
||||
```shell
|
||||
docker run \
|
||||
--env DOKKU_HOSTNAME=dokku.me \
|
||||
--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.19.3
|
||||
```
|
||||
|
||||
Dokku is run with the following options:
|
||||
|
||||
- The global hostname is set to `dokku.me` on boot.
|
||||
- The container name is dokku.
|
||||
- Container SSH port 22 is exposed on the host as 3022.
|
||||
- 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
|
||||
|
||||
Application repositories, plugin config, and plugin data is persisted to disk within the specified host directory for `/var/lib/dokku`.
|
||||
|
||||
To install custom plugins, create a `plugin-list` file in the host's `/var/lib/dokku` directory. The plugins listed herein will be automatically installed by Dokku on container boot. This file should be the following format:
|
||||
|
||||
```yaml
|
||||
plugin_name: repository_url
|
||||
```
|
||||
|
||||
An example for installing the postgres and redis plugins follows:
|
||||
|
||||
```yaml
|
||||
postgres: https://github.com/dokku/dokku-postgres.git
|
||||
redis: https://github.com/dokku/dokku-redis.git
|
||||
```
|
||||
|
||||
To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.
|
||||
|
||||
```shell
|
||||
docker exec -it dokku bash
|
||||
```
|
||||
|
||||
Please see the [user management documentation](/docs/deployment/user-management.md) for more information.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Install Dokku on DreamHost Cloud Server with cloud-init
|
||||
# DreamHost Cloud Server Installation Notes
|
||||
|
||||
Cloud-init script can be used to automate installation of Dokku on
|
||||
Dreamhost (or any other OpenStack-compatible cloud with minimal
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Install Dokku using Vagrant
|
||||
# Vagrant Installation Notes
|
||||
|
||||
1. Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
|
||||
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of [Ubuntu 16.04 x64](https://www.ubuntu.com/download), [Ubuntu 14.04 x64](https://www.ubuntu.com/download), [Debian 8.2 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 x64 - Any currently supported release](https://www.ubuntu.com/download), [Debian 8.2 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.
|
||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.15.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
@@ -54,6 +54,7 @@ For various reasons, certain hosting providers may have other steps that should
|
||||
As well, you may wish to customize your installation in some other fashion. or experiment with Vagrant. The guides below should get you started:
|
||||
|
||||
- [Debian Package Installation Notes](/docs/getting-started/install/debian.md)
|
||||
- [Docker-based Installation Notes](/docs/getting-started/install/docker.md)
|
||||
- [RPM Package Installation Notes](/docs/getting-started/install/rpm.md)
|
||||
- [Vagrant Installation Notes](/docs/getting-started/install/vagrant.md)
|
||||
- [Advanced Install Customization](/docs/getting-started/advanced-installation.md)
|
||||
|
||||
@@ -1,5 +1,38 @@
|
||||
# Troubleshooting
|
||||
|
||||
> New as of 0.17.0
|
||||
|
||||
```
|
||||
trace:on # Enables trace mode
|
||||
trace:off # Disables trace mode
|
||||
```
|
||||
|
||||
## Trace Mode
|
||||
|
||||
By default, Dokku will constrain the amount of output displayed for any given command run. The verbosity of output can be increased by enabling trace mode. Trace mode will turn on the `set -x` flag for bash plugins, while other plugins are free to respect the environment variable `DOKKU_TRACE` and log differently as approprate. Trace mode can be useful to see _where_ plugins are running commands that would otherwise be unexpected.
|
||||
|
||||
To enable trace mode, run `trace:on`
|
||||
|
||||
```shell
|
||||
dokku trace:on
|
||||
```
|
||||
|
||||
```
|
||||
-----> Enabling trace mode
|
||||
```
|
||||
|
||||
Trace mode can be disabled with `trace:off`
|
||||
|
||||
```shell
|
||||
dokku trace:off
|
||||
```
|
||||
|
||||
```
|
||||
-----> Disabling trace mode
|
||||
```
|
||||
|
||||
## Common Problems
|
||||
|
||||
__Symptom:__ I deployed my app but I am getting the default nginx page.
|
||||
|
||||
__Solution:__
|
||||
@@ -41,22 +74,7 @@ __Symptom:__ I want to deploy my app, but while pushing I get the following erro
|
||||
|
||||
__Solution:__
|
||||
|
||||
The `remote rejected` error does not give enough information. Anything could have failed.
|
||||
|
||||
To enable Dokku tracing, simply run the following command:
|
||||
|
||||
```shell
|
||||
# since 0.3.9
|
||||
dokku trace on
|
||||
```
|
||||
|
||||
In versions older than 0.3.9, you can create a `/home/dokku/dokkurc` file containing the following:
|
||||
|
||||
```shell
|
||||
export DOKKU_TRACE=1
|
||||
```
|
||||
|
||||
This will trace all of Dokku's activity. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
|
||||
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.
|
||||
|
||||
***
|
||||
|
||||
|
||||
@@ -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.15.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.15.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.15.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.15.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.15.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.15.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.15.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.15.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.15.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.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.15.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/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.15.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/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.15.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
@@ -127,12 +127,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.15.2/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.15.2 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -3,17 +3,19 @@
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy:ports <app> # List proxy port mappings for app
|
||||
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings for app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
|
||||
proxy:ports <app> # List proxy port mappings for an app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Add proxy port mappings to an app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for an app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Remove specific proxy port mappings from an app
|
||||
proxy:ports-set <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for an app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Usage
|
||||
|
||||
> Warning: Mapping alternative ports may conflict with the active firewall installed on your server or hosting provider. Such software includes - but is not limited to - AWS Security Groups, iptables, and UFW. Please consult the documentation for those softwares as applicable.
|
||||
|
||||
### Proxy port mapping
|
||||
|
||||
> New as of 0.6.0
|
||||
@@ -63,7 +65,6 @@ dokku proxy:ports-add node-js-app http:8080:5000
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
@@ -98,7 +99,6 @@ dokku proxy:ports-set node-js-app http:8080:5000
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
@@ -124,7 +124,7 @@ For buildpack deployments, your application *must* respect the `PORT` environmen
|
||||
|
||||
> Changed as of 0.5.0
|
||||
|
||||
Dokku's default proxy implementation - nginx - only supports HTTP request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
|
||||
|
||||
#### Applications using EXPOSE
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ The proxy port scheme is as follows:
|
||||
|
||||
- `SCHEME:HOST_PORT:CONTAINER_PORT`
|
||||
|
||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports both the `http` and `https` schemes.
|
||||
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports the `http`, `https`, `grpc` and `grpcs` schemes.
|
||||
For the `grpc` and `grpcs` see [nginx blog post on grpc](https://www.nginx.com/blog/nginx-1-13-10-grpc/).
|
||||
|
||||
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.
|
||||
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.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.15.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.15.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.15.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.15.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.15.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.15.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.15.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.15.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.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.15.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/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.15.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.15.2/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.3/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
@@ -157,6 +157,7 @@
|
||||
<a href="/{{NAME}}/advanced-usage/persistent-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/{{NAME}}/advanced-usage/plugin-management/" class="list-group-item">Plugin Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/repository-management/" class="list-group-item">Repository Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/resource-management/" class="list-group-item">Resource Management</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Schedulers</a>
|
||||
|
||||
|
||||
26
dokku
26
dokku
@@ -2,6 +2,7 @@
|
||||
set -eo pipefail
|
||||
shopt -s nullglob
|
||||
|
||||
export DOCKER_BIN=docker
|
||||
if [[ -r /etc/default/dokku ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source /etc/default/dokku
|
||||
@@ -36,7 +37,11 @@ DOKKU_DISTRO=$(
|
||||
echo "$ID"
|
||||
)
|
||||
|
||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"}
|
||||
# Specify twice so that only host-level
|
||||
# configuration can ever override the DOCKER_BIN value
|
||||
export DOCKER_BIN=${DOCKER_BIN:="docker"}
|
||||
|
||||
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest"}
|
||||
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
|
||||
|
||||
export PLUGIN_PATH=${PLUGIN_PATH:="$DOKKU_LIB_ROOT/plugins"}
|
||||
@@ -51,12 +56,14 @@ export DOKKU_SYSTEM_USER=${DOKKU_SYSTEM_USER:="dokku"}
|
||||
export DOKKU_API_VERSION=1
|
||||
export DOKKU_NOT_IMPLEMENTED_EXIT=10
|
||||
export DOKKU_VALID_EXIT=0
|
||||
export DOKKU_PID="$BASHPID"
|
||||
|
||||
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
|
||||
|
||||
export DOKKU_CONTAINER_LABEL=dokku
|
||||
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL"
|
||||
export DOKKU_GLOBAL_BUILD_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=$DOKKU_CONTAINER_LABEL"
|
||||
export DOKKU_GLOBAL_RUN_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=$DOKKU_CONTAINER_LABEL"
|
||||
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
@@ -80,13 +87,13 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
|
||||
fi
|
||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:add" ]]; then
|
||||
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]]; then
|
||||
export SSH_USER=$(id -un)
|
||||
sudo -u dokku -E -H "$0" "$@"
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]]; then
|
||||
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]] || [[ $1 == "ssh-keys:remove" ]]; then
|
||||
if [[ $(id -un) != "root" ]]; then
|
||||
dokku_log_fail "This command must be run as root"
|
||||
else
|
||||
@@ -132,7 +139,7 @@ execute_dokku_cmd() {
|
||||
deploy | delete | ls | run | cleanup)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
trace | url | urls | report)
|
||||
url | urls | report)
|
||||
local PLUGIN_NAME="00_dokku-standard"
|
||||
;;
|
||||
esac
|
||||
@@ -237,8 +244,13 @@ case "$1" in
|
||||
;;
|
||||
|
||||
version | -v | --version)
|
||||
test -f "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
||||
DOKKU_VERSION=$(cat "${DOKKU_ROOT}/VERSION")
|
||||
if [[ -f "$DOKKU_LIB_ROOT/STABLE_VERSION" ]]; then
|
||||
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/STABLE_VERSION")
|
||||
elif [[ -f "$DOKKU_LIB_ROOT/VERSION" ]]; then
|
||||
DOKKU_VERSION=$(cat "${DOKKU_LIB_ROOT}/VERSION")
|
||||
else
|
||||
dokku_log_fail "Unable to determine dokku's version"
|
||||
fi
|
||||
echo "dokku version ${DOKKU_VERSION}"
|
||||
;;
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help help:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
[[ " help help:help cleanup:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | run:help | trace:help | url:help | urls:help | version:help)
|
||||
help | cleanup:help | run:help | trace:help | url:help | urls:help | version:help)
|
||||
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
|
||||
help_content_func() {
|
||||
declare desc="return standard plugin help content"
|
||||
cat <<help_content
|
||||
run <app> <cmd>, Run a command in a new container using the current application image
|
||||
trace [on/off], Enable dokku tracing
|
||||
cleanup [<app>], Cleans up exited/dead Docker containers and removes dangling images
|
||||
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
version , Print dokku's version
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.19.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -12,12 +12,12 @@ dokku_report_cmd() {
|
||||
dokku_log_info1 "memory: "
|
||||
free -m | sed "s/^/ /"
|
||||
dokku_log_info1 "docker version: "
|
||||
docker version | sed "s/^/ /"
|
||||
"$DOCKER_BIN" version | sed "s/^/ /"
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
docker -D info | sed "s/^/ /"
|
||||
"$DOCKER_BIN" -D system info | sed "s/^/ /"
|
||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||
dokku_log_info1 "herokuish version: "
|
||||
docker run --rm gliderlabs/herokuish:latest herokuish version | sed "s/^/ /"
|
||||
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||
dokku_log_info1 "dokku version: $(dokku version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
dokku plugin:list | sed "s/^/ /"
|
||||
|
||||
@@ -6,12 +6,38 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
dokku_run_cmd() {
|
||||
declare desc="runs command in container based on app image"
|
||||
declare cmd="run" APP="$2"
|
||||
declare cmd="run" APP=""
|
||||
shift
|
||||
|
||||
declare -a RUN_ENV
|
||||
RUN_ENV=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
-e=* | --env=*)
|
||||
local arg=$(printf "%s" "$1" | sed -E 's/(^-e=)|(^--env=)//g')
|
||||
RUN_ENV+=("$arg")
|
||||
shift
|
||||
;;
|
||||
-e | --env)
|
||||
if [[ ! $2 ]]; then
|
||||
dokku_log_warn "expected $1 to have an argument"
|
||||
break
|
||||
fi
|
||||
RUN_ENV+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
APP="$1"
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
verify_app_name "$APP"
|
||||
shift 2
|
||||
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "$@"
|
||||
plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "${#RUN_ENV[@]}" "${RUN_ENV[@]}" "$@"
|
||||
}
|
||||
|
||||
dokku_run_cmd "$@"
|
||||
|
||||
1
plugins/20_events/app-restart
Symbolic link
1
plugins/20_events/app-restart
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/app-urls
Symbolic link
1
plugins/20_events/app-urls
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/builder-build
Symbolic link
1
plugins/20_events/builder-build
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/builder-release
Symbolic link
1
plugins/20_events/builder-release
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/docker-args-process-build
Symbolic link
1
plugins/20_events/docker-args-process-build
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/docker-args-process-deploy
Symbolic link
1
plugins/20_events/docker-args-process-deploy
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/docker-args-process-run
Symbolic link
1
plugins/20_events/docker-args-process-run
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/git-revision
Symbolic link
1
plugins/20_events/git-revision
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -38,7 +38,14 @@ fi
|
||||
|
||||
if [[ -d "$DOKKU_RSYSLOG_FILTER_DIR" && ! -f "$DOKKU_RSYSLOG_FILTER" ]]; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
:syslogtag, contains, "dokku" $DOKKU_EVENTS_LOGFILE
|
||||
:syslogtag, contains, "dokku-event" $DOKKU_EVENTS_LOGFILE
|
||||
EOF
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_RSYSLOG_FILTER" ]] && ! grep -q "dokku-event" "$DOKKU_RSYSLOG_FILTER"; then
|
||||
cat >"$DOKKU_RSYSLOG_FILTER" <<EOF
|
||||
:syslogtag, contains, "dokku-event" $DOKKU_EVENTS_LOGFILE
|
||||
EOF
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.19.3"
|
||||
[plugin.config]
|
||||
|
||||
1
plugins/20_events/resource-get-property
Symbolic link
1
plugins/20_events/resource-get-property
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-app-status
Symbolic link
1
plugins/20_events/scheduler-app-status
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-inspect
Symbolic link
1
plugins/20_events/scheduler-inspect
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-is-deployed
Symbolic link
1
plugins/20_events/scheduler-is-deployed
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-logs
Symbolic link
1
plugins/20_events/scheduler-logs
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-logs-failed
Symbolic link
1
plugins/20_events/scheduler-logs-failed
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-post-delete
Symbolic link
1
plugins/20_events/scheduler-post-delete
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
1
plugins/20_events/scheduler-retire
Symbolic link
1
plugins/20_events/scheduler-retire
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -8,17 +8,16 @@ source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
get_phase_script() {
|
||||
declare desc="extracts app.json from app image and returns the appropriate json key/value"
|
||||
declare IMAGE_TAG="$1" PHASE_SCRIPT_KEY="$2"
|
||||
local GET_PHASE_SCRIPT_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_get_phase_script.XXXX")
|
||||
local APP_JSON_FILE="$GET_PHASE_SCRIPT_TMP_WORK_DIR/app.json"
|
||||
trap 'rm -rf "$GET_PHASE_SCRIPT_TMP_WORK_DIR" >/dev/null' RETURN INT TERM
|
||||
local APP_JSON_FILE=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$APP_JSON_FILE' >/dev/null" RETURN INT TERM
|
||||
|
||||
copy_from_image "$IMAGE" "app.json" "$GET_PHASE_SCRIPT_TMP_WORK_DIR" 2>/dev/null || true
|
||||
copy_from_image "$IMAGE" "app.json" "$APP_JSON_FILE" 2>/dev/null || true
|
||||
|
||||
if [[ ! -f "$APP_JSON_FILE" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" <"$APP_JSON_FILE"
|
||||
get_json_value ".scripts.dokku.${PHASE_SCRIPT_KEY}" <"$APP_JSON_FILE"
|
||||
}
|
||||
|
||||
get_release_cmd() {
|
||||
@@ -26,7 +25,7 @@ get_release_cmd() {
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
|
||||
extract_procfile "$APP" "$IMAGE_TAG" >/dev/null
|
||||
trap 'remove_procfile $APP' RETURN INT TERM EXIT
|
||||
trap "remove_procfile $APP" RETURN INT TERM EXIT
|
||||
|
||||
get_cmd_from_procfile "$APP" "release" "5000"
|
||||
}
|
||||
@@ -36,6 +35,9 @@ execute_script() {
|
||||
declare APP="$1" IMAGE_TAG="$2" PHASE_SCRIPT_KEY="$3"
|
||||
local IMAGE id SCRIPT_CMD
|
||||
|
||||
local DOCKER_COMMIT_LABEL_ARGS=("--change" "\"LABEL org.label-schema.schema-version=1.0\"" "--change" "\"LABEL org.label-schema.vendor=dokku\"" "--change" "\"LABEL com.dokku.app-name=$APP\"")
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$APP"
|
||||
|
||||
IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
if [[ "$PHASE_SCRIPT_KEY" == "release" ]]; then
|
||||
SCRIPT_CMD=$(get_release_cmd "$APP" "$IMAGE_TAG" 2>/dev/null || true)
|
||||
@@ -85,7 +87,7 @@ execute_script() {
|
||||
|
||||
local IMAGE_SOURCE_TYPE="dockerfile"
|
||||
is_image_herokuish_based "$IMAGE" && IMAGE_SOURCE_TYPE="herokuish"
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-deploy "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE" "$PHASE_SCRIPT_KEY")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-deploy "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
|
||||
|
||||
# eval args as array to respect escapes
|
||||
declare -a ARG_ARRAY
|
||||
@@ -96,8 +98,8 @@ execute_script() {
|
||||
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
|
||||
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
|
||||
|
||||
id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
|
||||
if test "$(docker wait "$id")" -ne 0; then
|
||||
id=$("$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --env DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
|
||||
if test "$("$DOCKER_BIN" container wait "$id")" -ne 0; then
|
||||
dokku_container_log_verbose_quiet "$id"
|
||||
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
|
||||
fi
|
||||
@@ -119,6 +121,5 @@ execute_script() {
|
||||
local DOCKER_COMMIT_ARGS="$DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG $DOCKER_COMMIT_CMD_CHANGE_ARG"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
eval docker commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" >/dev/null
|
||||
eval "$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "${DOCKER_COMMIT_ARGS[@]}" "$id" "$IMAGE" >/dev/null
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.19.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -34,13 +34,15 @@ apps_destroy() {
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Destroying $APP (including all add-ons)"
|
||||
dokku_log_info1 "Destroying $APP (including all add-ons)"
|
||||
plugn trigger pre-delete "$APP" "$IMAGE_TAG"
|
||||
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
local REMOVE_CONTAINERS="true"
|
||||
plugn trigger scheduler-stop "$DOKKU_SCHEDULER" "$APP" "$REMOVE_CONTAINERS"
|
||||
plugn trigger scheduler-post-delete "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
|
||||
plugn trigger post-delete "$APP" "$IMAGE_TAG"
|
||||
docker_cleanup "$APP" "true"
|
||||
}
|
||||
|
||||
apps_exists() {
|
||||
|
||||
@@ -85,6 +85,7 @@ apps_help_content_func() {
|
||||
apps:clone <old-app> <new-app>, Clones an app
|
||||
apps:create <app>, Create a new app
|
||||
apps:destroy <app>, Permanently destroy an app
|
||||
apps:exists <app>, Checks if an app exists
|
||||
apps:list, List your apps
|
||||
apps:lock <app>, Locks an app for deployment
|
||||
apps:locked <app>, Checks if an app is locked for deployment
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.15.2"
|
||||
version = "0.19.3"
|
||||
[plugin.config]
|
||||
|
||||
@@ -16,7 +16,7 @@ app_post_delete() {
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
|
||||
"$DOCKER_BIN" image rm $("$DOCKER_BIN" image list --quiet "$IMAGE_REPO" | xargs) &>/dev/null || true
|
||||
}
|
||||
|
||||
app_post_delete "$@"
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
apps_pre_delete() {
|
||||
declare desc="apps pre-delete plugin trigger"
|
||||
local trigger="apps_pre_delete"
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$2"
|
||||
local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
local CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$APP/cache"
|
||||
verify_app_name "$APP"
|
||||
|
||||
if ! is_image_herokuish_based "$IMAGE"; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -d $CACHE_DIR ]]; then
|
||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
}
|
||||
|
||||
apps_pre_delete "$@"
|
||||
@@ -22,6 +22,8 @@ apps_clone_cmd() {
|
||||
OLD_APP="$1" NEW_APP="$2"
|
||||
[[ -z "$OLD_APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||
|
||||
is_valid_app_name "$OLD_APP"
|
||||
is_valid_app_name "$NEW_APP"
|
||||
apps_exists "$OLD_APP" >/dev/null 2>&1 || dokku_log_fail "App does not exist"
|
||||
@@ -44,7 +46,7 @@ apps_clone_cmd() {
|
||||
plugn trigger post-app-clone-setup "$OLD_APP" "$NEW_APP"
|
||||
|
||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
rm -rf "$NEW_CACHE_DIR"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user