Compare commits
347 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ab923c252 | ||
|
|
adcd5aa812 | ||
|
|
129691eb6e | ||
|
|
4942a15a2b | ||
|
|
3b117270b6 | ||
|
|
39f47b70d3 | ||
|
|
ff81f57840 | ||
|
|
c17bab994a | ||
|
|
d2674ac9d5 | ||
|
|
31ca55732f | ||
|
|
8dbb9cb976 | ||
|
|
92904c8f04 | ||
|
|
da25c5ad7d | ||
|
|
12e32697fc | ||
|
|
18b38f40fe | ||
|
|
8cde5d9500 | ||
|
|
2737e691ce | ||
|
|
5330a2ac7e | ||
|
|
2a0f3f5034 | ||
|
|
af4f126b78 | ||
|
|
1ae7467e5a | ||
|
|
f962241557 | ||
|
|
3157709b11 | ||
|
|
9918b0dd19 | ||
|
|
cc46c5ae9c | ||
|
|
0ec9600d84 | ||
|
|
ea0e044bd2 | ||
|
|
35eb9a1ea3 | ||
|
|
2d7e5181c6 | ||
|
|
537a2a3397 | ||
|
|
cb931253f7 | ||
|
|
582ecc8ec4 | ||
|
|
d43a23df5a | ||
|
|
f6699ba467 | ||
|
|
00ed4e41b1 | ||
|
|
61ca55b697 | ||
|
|
6fcdf61196 | ||
|
|
a6095d4496 | ||
|
|
f3a47fba2b | ||
|
|
2e74fb8506 | ||
|
|
d60a21e65e | ||
|
|
7f0050dbe7 | ||
|
|
a458bd6803 | ||
|
|
bedaa5203c | ||
|
|
b87f617d2f | ||
|
|
23924a092d | ||
|
|
8ef9390ae1 | ||
|
|
b90add9e4e | ||
|
|
42aa57e067 | ||
|
|
c5c395ed65 | ||
|
|
152213ffb4 | ||
|
|
c336aa15a0 | ||
|
|
945c032290 | ||
|
|
b79f6d6531 | ||
|
|
b8ae0169e7 | ||
|
|
b6604118d4 | ||
|
|
4a8f247980 | ||
|
|
98d861a02a | ||
|
|
95e99070c6 | ||
|
|
d2719a2751 | ||
|
|
35383b0a73 | ||
|
|
6271566a89 | ||
|
|
cd5c077787 | ||
|
|
d7a9bf0a4d | ||
|
|
1fb869f0c4 | ||
|
|
144f541e4f | ||
|
|
e60ebf12fa | ||
|
|
a4a229df3a | ||
|
|
f4e2c32721 | ||
|
|
e1debb80b5 | ||
|
|
5adf0a2b6a | ||
|
|
9fab65dc61 | ||
|
|
e50558e9e0 | ||
|
|
247d522b7e | ||
|
|
ca3f609b75 | ||
|
|
3a44cc6270 | ||
|
|
4dce4d652a | ||
|
|
0c96c4b6de | ||
|
|
72c519f7b3 | ||
|
|
81a76207b5 | ||
|
|
05bd2913dd | ||
|
|
6bb20e9b27 | ||
|
|
99d4b4d0e8 | ||
|
|
2ad14f71ea | ||
|
|
1412002217 | ||
|
|
1c3dc8285a | ||
|
|
1dc3fb972f | ||
|
|
38544eb6be | ||
|
|
dd4908174b | ||
|
|
d923f4c73d | ||
|
|
d27d3ea380 | ||
|
|
9288d3c6a6 | ||
|
|
4d896b22d0 | ||
|
|
b31fab115b | ||
|
|
1de6b4ad42 | ||
|
|
16ee66b552 | ||
|
|
e40197cd37 | ||
|
|
0e3f17d920 | ||
|
|
7293893d99 | ||
|
|
08ecc92630 | ||
|
|
b27d6b791d | ||
|
|
a6b6b08e3e | ||
|
|
49813a2a54 | ||
|
|
b4e906285b | ||
|
|
8f979ea0e7 | ||
|
|
1430c2a13e | ||
|
|
8243df4ade | ||
|
|
0e5db7db5c | ||
|
|
9c1677556e | ||
|
|
bd98ff5299 | ||
|
|
ca5c887b8a | ||
|
|
aee59f623c | ||
|
|
f6b97100ea | ||
|
|
0c8cfe9a48 | ||
|
|
0ef276d40b | ||
|
|
553cc232b2 | ||
|
|
afd2952cb1 | ||
|
|
638d50127e | ||
|
|
58bfd70118 | ||
|
|
63fc11a4b9 | ||
|
|
106b2c20f1 | ||
|
|
67962ad527 | ||
|
|
d94bc733c9 | ||
|
|
a21ee6f216 | ||
|
|
7a93b11bdd | ||
|
|
78f0c53871 | ||
|
|
54c1ccd9bb | ||
|
|
318c21996a | ||
|
|
6b67d5c59b | ||
|
|
56566d1c05 | ||
|
|
421863f4ac | ||
|
|
38505006e8 | ||
|
|
a05b79e2a9 | ||
|
|
1c0ce250dc | ||
|
|
a2d399c104 | ||
|
|
9f8058dd78 | ||
|
|
507916f57b | ||
|
|
6f095271e1 | ||
|
|
44b87ffe8d | ||
|
|
992b023bc8 | ||
|
|
a6d65c821f | ||
|
|
2bd4272424 | ||
|
|
99a1e2ee33 | ||
|
|
d5ea97f7b0 | ||
|
|
6359404ef3 | ||
|
|
ba9eee8271 | ||
|
|
691e454185 | ||
|
|
d05925f6f1 | ||
|
|
d4bfd0b7fa | ||
|
|
ffd0a81311 | ||
|
|
a677e05b1f | ||
|
|
575fbb3560 | ||
|
|
f33d3d852f | ||
|
|
f38d8cfadb | ||
|
|
e394776c3b | ||
|
|
2bad1e4acd | ||
|
|
75945ee0d7 | ||
|
|
9d002ccab5 | ||
|
|
5df11a0a1f | ||
|
|
a40c42019b | ||
|
|
d4783685d1 | ||
|
|
d212fd44c7 | ||
|
|
d9073272df | ||
|
|
ff8ccd2801 | ||
|
|
3f5a022970 | ||
|
|
18be8f4fa9 | ||
|
|
e397604841 | ||
|
|
01570012c5 | ||
|
|
acd981d50e | ||
|
|
3a52c7d0a8 | ||
|
|
003f6a5bd8 | ||
|
|
edf9653ebf | ||
|
|
12cc31427b | ||
|
|
4eafd3b5b7 | ||
|
|
e93175b37e | ||
|
|
0828db4bb7 | ||
|
|
4da1fea274 | ||
|
|
a9127e3abd | ||
|
|
531bb20519 | ||
|
|
9411c4ddc1 | ||
|
|
406a82de29 | ||
|
|
9bda9e721f | ||
|
|
3b35656ae9 | ||
|
|
f1763bdaf5 | ||
|
|
397c8f6d15 | ||
|
|
364eac374d | ||
|
|
93cf9cc118 | ||
|
|
50b2836e52 | ||
|
|
9b75cc39b1 | ||
|
|
6325dd6d7b | ||
|
|
2a702175b5 | ||
|
|
210128f5f2 | ||
|
|
ae8eaa7e63 | ||
|
|
11c2497b31 | ||
|
|
03e90ed2a0 | ||
|
|
c3d103e46c | ||
|
|
a292e41015 | ||
|
|
58046ea6dc | ||
|
|
8cb5989220 | ||
|
|
97714e9c22 | ||
|
|
43f25c218f | ||
|
|
d9e5182399 | ||
|
|
9aa471c1fd | ||
|
|
6dbb34ec0b | ||
|
|
080ed43232 | ||
|
|
3f70728451 | ||
|
|
00411decf5 | ||
|
|
ebfcf24e53 | ||
|
|
d5b886b2b5 | ||
|
|
dc8424d8a5 | ||
|
|
c6bd80aca6 | ||
|
|
42a92eb654 | ||
|
|
bacbc6d90d | ||
|
|
3f8c868ab8 | ||
|
|
c56110b3a7 | ||
|
|
679a399df3 | ||
|
|
eb82d958f4 | ||
|
|
3162fa5b9a | ||
|
|
8c2731b328 | ||
|
|
c95cb526be | ||
|
|
983115c827 | ||
|
|
b8f32f6ea4 | ||
|
|
20be426125 | ||
|
|
f38bc64119 | ||
|
|
f1e3c0764c | ||
|
|
d72c183d9e | ||
|
|
f61e6e60f4 | ||
|
|
8ba6ce94fc | ||
|
|
4cc2dc7844 | ||
|
|
379ada07d9 | ||
|
|
d49f9b89c2 | ||
|
|
3638399726 | ||
|
|
4929272c87 | ||
|
|
d9603af08a | ||
|
|
e30b579de5 | ||
|
|
2aea999326 | ||
|
|
00ce3932d0 | ||
|
|
7461b83972 | ||
|
|
426e6b746a | ||
|
|
66a30b0547 | ||
|
|
f99e3a6c9c | ||
|
|
3c7985cd82 | ||
|
|
e42df29a79 | ||
|
|
4a357e9896 | ||
|
|
c885205b91 | ||
|
|
1674d02af9 | ||
|
|
889d237669 | ||
|
|
68c5407ed4 | ||
|
|
e62212f810 | ||
|
|
551eae0c5b | ||
|
|
f2abbad5b7 | ||
|
|
e5196a2f03 | ||
|
|
3c6ace7d68 | ||
|
|
b4fbf7189e | ||
|
|
9af8ec2acc | ||
|
|
5e85038d9c | ||
|
|
b9025f6137 | ||
|
|
795e4f0f34 | ||
|
|
b21b58ed38 | ||
|
|
0840976265 | ||
|
|
300a276ed0 | ||
|
|
6b27f424db | ||
|
|
9f33459266 | ||
|
|
ee467e6793 | ||
|
|
cba345025c | ||
|
|
837c3db042 | ||
|
|
8d4fc1f883 | ||
|
|
97f2dc81c7 | ||
|
|
770d150c7c | ||
|
|
e134c314ea | ||
|
|
48fd2b3862 | ||
|
|
b4dd50731a | ||
|
|
24d8083fad | ||
|
|
593a4c8170 | ||
|
|
12dbbda68c | ||
|
|
e967ba86b5 | ||
|
|
791f53ab47 | ||
|
|
82cab643a8 | ||
|
|
b598af67b9 | ||
|
|
3915d25d84 | ||
|
|
c52e947df1 | ||
|
|
5614a4c702 | ||
|
|
a2f37699a2 | ||
|
|
87a33ae739 | ||
|
|
72cb743a61 | ||
|
|
4d812b343b | ||
|
|
7f6fc4081c | ||
|
|
baaf6b2296 | ||
|
|
f88c427a41 | ||
|
|
34985adb43 | ||
|
|
6757759b15 | ||
|
|
d3687cf7f4 | ||
|
|
47bf471698 | ||
|
|
78f1794373 | ||
|
|
4f5fa3294c | ||
|
|
c571049714 | ||
|
|
8202bd37d4 | ||
|
|
f4b946e32d | ||
|
|
ff1acd09f5 | ||
|
|
b95cc79a42 | ||
|
|
7e68b65103 | ||
|
|
55c8a58686 | ||
|
|
43a5be6ece | ||
|
|
88b1b18494 | ||
|
|
0ea265f832 | ||
|
|
229fe1d167 | ||
|
|
e88df23fdb | ||
|
|
f897dc0034 | ||
|
|
e16979fcdb | ||
|
|
447e716da2 | ||
|
|
ac77e7ad5c | ||
|
|
823115b125 | ||
|
|
ee600cc376 | ||
|
|
68a62e9f00 | ||
|
|
528746cf6c | ||
|
|
69096c864e | ||
|
|
0033a52e28 | ||
|
|
416222b20a | ||
|
|
cb4ac3353e | ||
|
|
2362232fe2 | ||
|
|
66eff6f15e | ||
|
|
c7c22d8392 | ||
|
|
8afe8d5f13 | ||
|
|
933a174dfd | ||
|
|
9d711cbb44 | ||
|
|
efd25cfb45 | ||
|
|
959c93b95b | ||
|
|
de428a814c | ||
|
|
69934f7caf | ||
|
|
c5cf82d96b | ||
|
|
29c8afeb35 | ||
|
|
ca03ea72f5 | ||
|
|
f40bcc37aa | ||
|
|
3aca35df88 | ||
|
|
50b59cba7f | ||
|
|
a5875f4326 | ||
|
|
74899b580d | ||
|
|
44918d22ab | ||
|
|
57b9f19ba9 | ||
|
|
1d3276a1d7 | ||
|
|
65e0fb9037 | ||
|
|
e234401178 | ||
|
|
66894bc0c5 | ||
|
|
4b0c8b3d59 | ||
|
|
0c79a2c2fc | ||
|
|
d440b4614d | ||
|
|
929b8444e4 |
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
skip: ${{ steps.check-commit.outputs.skip }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
timeout-minutes: 45
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: set up qemu
|
||||
uses: docker/setup-qemu-action@v3
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
echo "matrix=$json" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: build-image
|
||||
uses: ./.github/actions/build-image
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: build-image
|
||||
uses: ./.github/actions/build-image
|
||||
@@ -117,10 +117,10 @@ jobs:
|
||||
matrix: ${{fromJson(needs.build.outputs.matrix)}}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
SYNC_GITHUB_PASSWORD: ${{ secrets.SYNC_GITHUB_PASSWORD }}
|
||||
SYNC_GITHUB_USERNAME: ${{ secrets.SYNC_GITHUB_USERNAME }}
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-${{ matrix.index }}
|
||||
path: test-results
|
||||
@@ -156,10 +156,10 @@ jobs:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -190,10 +190,10 @@ jobs:
|
||||
GITHUB_NODE_INDEX: ${{ matrix.index }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: download packages
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -214,7 +214,7 @@ jobs:
|
||||
2) sudo -E make -e deploy-test-multi ;;
|
||||
3) sudo -E make -e deploy-test-go-fail-predeploy deploy-test-go-fail-postdeploy ;;
|
||||
esac
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: coverage.${{ matrix.index }}
|
||||
path: test-results/coverage
|
||||
@@ -230,7 +230,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: download test-results
|
||||
uses: actions/download-artifact@v5
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
path: test-results
|
||||
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# workaround for https://github.com/github/codeql/issues/14235
|
||||
- name: Remove go.work file
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
12
.github/workflows/lint.yml
vendored
12
.github/workflows/lint.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Run hadolint
|
||||
uses: hadolint/hadolint-action@2332a7b74a6de0dda2e2221d575162eba76ba5e5
|
||||
# v3.0.0 => 4b5806eb9c6bee4954fc0e0cc3ad6175fc9782c1
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Setup packer
|
||||
uses: hashicorp/setup-packer@main
|
||||
with:
|
||||
@@ -66,7 +66,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Run shellcheck
|
||||
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38
|
||||
# 1.1.0 => 94e0aab03ca135d11a35e5bfc14e6746dc56e7e9
|
||||
@@ -76,7 +76,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Run shfmt
|
||||
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2
|
||||
# v0.5.0 => edd0e45ecff35b05f162052b50df50976c1b74fc
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- name: Clone
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Run yamllint
|
||||
uses: ibiqlik/action-yamllint@2576378a8e339169678f9939646ee3ee325e845c
|
||||
# v3.1.1 => 2576378a8e339169678f9939646ee3ee325e845c
|
||||
|
||||
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -73,7 +73,7 @@ jobs:
|
||||
run: echo "version=$(cat build/next-version)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
needs: release
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Setup packer
|
||||
uses: hashicorp/setup-packer@main
|
||||
@@ -109,7 +109,7 @@ jobs:
|
||||
PKR_VAR_dokku_version="${VERSION:1}" make image/build/digitalocean
|
||||
|
||||
- name: upload packages
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: digitalocean-manifest.json
|
||||
path: digitalocean-manifest.json
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
needs: release
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
- name: Bump Azure Template
|
||||
env:
|
||||
BOT_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
|
||||
@@ -33,6 +33,11 @@ RUN mkdir -p /etc/apt/keyrings \
|
||||
&& NIXPACKS_BIN_DIR=/usr/bin BIN_DIR=/usr/bin /tmp/nixpacks.bash \
|
||||
&& test -x /usr/bin/nixpacks \
|
||||
&& rm -rf /tmp/nixpacks.bash \
|
||||
&& curl -o /tmp/railpack.bash -sSL https://railpack.com/install.sh \
|
||||
&& chmod +x /tmp/railpack.bash \
|
||||
&& RAILPACK_BIN_DIR=/usr/bin BIN_DIR=/usr/bin /tmp/railpack.bash \
|
||||
&& test -x /usr/bin/railpack \
|
||||
&& rm -rf /tmp/railpack.bash \
|
||||
&& 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 \
|
||||
|
||||
209
HISTORY.md
209
HISTORY.md
@@ -1,5 +1,214 @@
|
||||
# History
|
||||
|
||||
## 0.37.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.37.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.37.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #8198: @josegonzalez Ensure we continue on with logic if the error returned from fetching all apps is NoAppsExist
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #8196: @dependabot[bot] chore(deps): bump byjg/easy-haproxy from 4.6.0 to 5.0.0 in /plugins/haproxy-vhosts
|
||||
- #8197: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.31 to 2.11.32 in /plugins/scheduler-k3s
|
||||
|
||||
## 0.37.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.37.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.37.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #8186: @josegonzalez Update url to download golang
|
||||
- #8155: @josegonzalez Sanitize vector sink values in report output
|
||||
- #8156: @josegonzalez Do not start nginx if there are no apps with nginx as a proxy
|
||||
- #8152: @josegonzalez Ensure keda usage does not cause jank in scaling deployments
|
||||
|
||||
### New Features
|
||||
|
||||
- #8154: @josegonzalez Enable live-restore by default when installing Dokku
|
||||
- #8151: @josegonzalez Allow exposing non-web processes as kubernetes services
|
||||
|
||||
### Refactors
|
||||
|
||||
- #8149: @josegonzalez Remove nginx checks for functionality that always exists
|
||||
|
||||
### Documentation
|
||||
|
||||
- #8170: @znz Fix version in migration docs
|
||||
- #8169: @josegonzalez Update logging in doc generation to enhance doc generation debugging
|
||||
- #8153: @josegonzalez Fix reference to letsencrypt-server property
|
||||
- #8150: @josegonzalez Clarify system requirements for k3s usage
|
||||
- #8148: @josegonzalez Clarify plugin installation documentation
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #8192: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/go-fail-predeploy
|
||||
- #8191: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/go-fail-postdeploy
|
||||
- #8189: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/gogrpc
|
||||
- #8193: @dependabot[bot] chore(deps): bump python from 3.14.0-alpine to 3.14.1-alpine in /docs/_build
|
||||
- #8190: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/zombies-dockerfile-no-tini
|
||||
- #8188: @dependabot[bot] chore(deps): bump golang from 1.25.4 to 1.25.5 in /tests/apps/zombies-dockerfile-tini
|
||||
- #8194: @dependabot[bot] chore(deps): bump python from 3.14.0-bookworm to 3.14.1-bookworm in /tests/apps/dockerfile-release
|
||||
- #8195: @dependabot[bot] chore(deps): bump django from 5.2.8 to 5.2.9 in /tests/apps/dockerfile-release
|
||||
- #8177: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express-noprocfile
|
||||
- #8178: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-procfile-bad
|
||||
- #8179: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express
|
||||
- #8180: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-procfile
|
||||
- #8181: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/gitsubmodules
|
||||
- #8183: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/checks-root
|
||||
- #8182: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/nodejs-express-noappjson
|
||||
- #8184: @dependabot[bot] chore(deps): bump express from 5.1.0 to 5.2.1 in /tests/apps/dockerfile-app-json-formations
|
||||
- #8172: @dependabot[bot] chore(deps): bump beautifulsoup4 from 4.14.2 to 4.14.3 in /docs/_build
|
||||
- #8173: @dependabot[bot] chore(deps): bump werkzeug from 3.1.3 to 3.1.4 in /tests/apps/python-flask
|
||||
- #8164: @dependabot[bot] chore(deps): bump body-parser from 2.2.0 to 2.2.1 in /tests/apps/checks-root
|
||||
- #8165: @dependabot[bot] chore(deps): bump github.com/go-resty/resty/v2 from 2.16.5 to 2.17.0 in /plugins/scheduler-k3s
|
||||
- #8167: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.17.1 to 10.17.2 in /docs/_build
|
||||
- #8162: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.30 to 2.11.31 in /plugins/scheduler-k3s
|
||||
- #8161: @dependabot[bot] chore(deps): bump github.com/fluxcd/pkg/kustomize from 1.23.0 to 1.24.0 in /plugins/scheduler-k3s
|
||||
- #8159: @dependabot[bot] chore(deps): bump helm.sh/helm/v3 from 3.19.0 to 3.19.2 in /plugins/scheduler-k3s
|
||||
- #8158: @dependabot[bot] chore(deps): bump k8s.io/kubernetes from 1.34.1 to 1.34.2 in /plugins/scheduler-k3s
|
||||
- #8143: @dependabot[bot] chore(deps): bump actions/checkout from 5 to 6
|
||||
- #8145: @dependabot[bot] chore(deps): bump github.com/go-openapi/jsonpointer from 0.22.1 to 0.22.3 in /plugins/scheduler-k3s
|
||||
- #8146: @dependabot[bot] chore(deps): bump k8s.io/kubectl from 0.34.1 to 0.34.2 in /plugins/scheduler-k3s
|
||||
- #8144: @dependabot[bot] chore(deps): bump traefik from 3.6.1 to 3.6.2 in /plugins/traefik-vhosts
|
||||
|
||||
## 0.37.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.37.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.37.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.37.0 migration guide](/docs/appendices/0.37.0-migration-guide.md) for more information on migrating to 0.37.0.
|
||||
|
||||
### Backwards Compatibility Breaks
|
||||
|
||||
- #8140: @josegonzalez Rename the scheduler-k3s:cluster-* commands to use a : instead of - for a delimiter
|
||||
- #7982: @josegonzalez Remove references to pack being experimental
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #8136: @josegonzalez Do not reset manually set port mappings when upgrading dokku
|
||||
- #8114: @josegonzalez Ensure we can execute run commands when exec is executed as part of an entrypoint
|
||||
- #8109: @josegonzalez Allow skipping the install trigger when installing a plugin
|
||||
- #8104: @josegonzalez Drop deprecated aufs check
|
||||
- #8100: @othercorey Add process-type label for run with procfile cmd
|
||||
|
||||
### New Features
|
||||
|
||||
- #8139: @josegonzalez Add aliases for select builder and scheduler plugins
|
||||
- #8138: @josegonzalez Turn on buildpack trace mode when dokku trace is on
|
||||
- #8137: @josegonzalez Add the ability to create k3s node profiles
|
||||
- #8135: @josegonzalez Add support for git remotes with port specified inline
|
||||
- #8112: @josegonzalez Implement cron and one-off run task TTLs
|
||||
- #8106: @josegonzalez Support inline comments for app.json
|
||||
- #8105: @josegonzalez Allow specifying kubelet-args when adding a new node to the cluster
|
||||
- #8085: @josegonzalez Implement config:import command
|
||||
- #8004: @Tashows Add buildpacks:detect subcommand
|
||||
- #7991: @josegonzalez Add ability to pause/restart cron jobs
|
||||
- #7989: @josegonzalez Add support to prevent overlapping execution of cron tasks
|
||||
- #7986: @josegonzalez Add support for specifying CNB buildpacks via buildpacks command
|
||||
- #7956: @josegonzalez Add a Railpack builder to Dokku
|
||||
- #7608: @dragonhunt02 Add commands to proxy implementations for managing labels
|
||||
|
||||
### Refactors
|
||||
|
||||
- #8101: @josegonzalez Filter build docker-options correctly for each builder
|
||||
|
||||
### Documentation
|
||||
|
||||
- #8103: @josegonzalez Correct the release version for railpacks support
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #8130: @dependabot[bot] chore(deps): bump golang.org/x/crypto from 0.43.0 to 0.45.0 in /plugins/common
|
||||
- #8110: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.76.0 to 1.77.0 in /tests/apps/gogrpc
|
||||
- #8108: @dependabot[bot] chore(deps): bump js-yaml from 3.14.1 to 3.14.2 in /tests/apps/multi
|
||||
- #8107: @dependabot[bot] chore(deps): bump click from 8.3.0 to 8.3.1 in /docs/_build
|
||||
- #8098: @dependabot[bot] chore(deps): bump traefik from 3.5.4 to 3.6.1 in /plugins/traefik-vhosts
|
||||
- #8097: @dependabot[bot] chore(deps): bump timberio/vector from 0.51.0-debian to 0.51.1-debian in /plugins/logs
|
||||
- #8094: @dependabot[bot] chore(deps): bump pymdown-extensions from 10.16.1 to 10.17.1 in /docs/_build
|
||||
- #8092: @dependabot[bot] chore(deps): bump mkdocs-material from 9.6.23 to 9.7.0 in /docs/_build
|
||||
- #8090: @dependabot[bot] chore(deps): bump sigs.k8s.io/kustomize/api from 0.20.1 to 0.21.0 in /plugins/scheduler-k3s
|
||||
|
||||
## 0.36.11
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.36.11/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.36.11 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #8084: @josegonzalez Use the correct case for AS in Dockerfile
|
||||
- #8083: @josegonzalez Use correct variable for tasks
|
||||
- #8081: @josegonzalez Error out if the appname or app.json is missing when retrieving cron entries
|
||||
|
||||
### Refactors
|
||||
|
||||
- #8082: @josegonzalez Standardize naming in cron code
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #8073: @dependabot[bot] chore(deps): bump timberio/vector from 0.50.0-debian to 0.51.0-debian in /plugins/logs
|
||||
- #8080: @dependabot[bot] chore(deps): bump github.com/containerd/containerd from 1.7.28 to 1.7.29 in /plugins/scheduler-k3s
|
||||
- #8079: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/zombies-dockerfile-tini
|
||||
- #8075: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/go-fail-postdeploy
|
||||
- #8078: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/go-fail-predeploy
|
||||
- #8077: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/zombies-dockerfile-no-tini
|
||||
- #8076: @dependabot[bot] chore(deps): bump golang from 1.25.3 to 1.25.4 in /tests/apps/gogrpc
|
||||
- #8072: @dependabot[bot] chore(deps): update markdown requirement from <3.10,>=3.2.1 to >=3.2.1,<3.11 in /docs/_build
|
||||
- #8074: @dependabot[bot] chore(deps): bump django from 5.2.7 to 5.2.8 in /tests/apps/dockerfile-release
|
||||
- #8071: @dependabot[bot] chore(deps): bump mkdocs-material from 9.6.22 to 9.6.23 in /docs/_build
|
||||
- #8068: @dependabot[bot] chore(deps): bump traefik from 3.5.3 to 3.5.4 in /plugins/traefik-vhosts
|
||||
- #8069: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.18.0 to 2.18.1 in /plugins/scheduler-k3s
|
||||
- #8066: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.29 to 2.11.30 in /plugins/scheduler-k3s
|
||||
|
||||
## 0.36.10
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.36.10/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.36.10 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #8063: @othercorey Use -t instead of deprecated --time in stop commands
|
||||
- #8058: @josegonzalez Ensure the pre-receive hook and URLS files are correct when cloning or renaming apps
|
||||
- #8059: @josegonzalez Expand variables for release tasks
|
||||
- #8060: @josegonzalez Use updated http2 directive for setting http2 support
|
||||
|
||||
### Documentation
|
||||
|
||||
- #8051: @othercorey Fix "its" in Caddy SSL configuration documentation
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #8065: @dependabot[bot] chore(deps): bump actions/upload-artifact from 4 to 5
|
||||
- #8064: @dependabot[bot] chore(deps): bump actions/download-artifact from 5 to 6
|
||||
- #8057: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-procfile-bad
|
||||
- #8056: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-app-json-formations
|
||||
- #8055: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-procfile
|
||||
- #8054: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile
|
||||
- #8053: @dependabot[bot] chore(deps): bump node from 24-alpine to 25-alpine in /tests/apps/dockerfile-noexpose
|
||||
|
||||
## 0.36.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
@@ -85,8 +85,8 @@ Otherwise, you will need to import the keypair manually after installation using
|
||||
To install the latest stable release, run the following commands as a user who has access to `sudo`:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.36.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.36.9 bash bootstrap.sh
|
||||
wget -NP . https://dokku.com/install/v0.37.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.37.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to configure your server domain (via `dokku domains:set-global`) and user access (via `dokku ssh-keys:add`) to complete the installation.
|
||||
|
||||
@@ -135,20 +135,33 @@ main() {
|
||||
mv docs-main docs
|
||||
git checkout -- mkdocs.yml docs
|
||||
|
||||
if [[ "$(git -C tmp/docs-build ls-files -dmo)" == "docs/sitemap.xml.gz" ]]; then
|
||||
echo "====> Checking for file changes"
|
||||
changes=$(git -C tmp/docs-build ls-files -dmo)
|
||||
if [[ -z "$changes" ]]; then
|
||||
echo " ! No doc changes found"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "$changes" == "docs/sitemap.xml.gz" ]]; then
|
||||
echo " ! No doc changes found"
|
||||
git -C tmp/docs-build checkout -- docs/sitemap.xml.gz
|
||||
else
|
||||
echo "====> Pushing docs"
|
||||
git -C tmp/docs-build add .
|
||||
git -C tmp/docs-build commit -m "chore: regenerate docs"
|
||||
|
||||
if [[ -n "$BOT_GITHUB_USERNAME" ]] && [[ -n "$BOT_GITHUB_API_TOKEN" ]]; then
|
||||
git -C tmp/docs-build remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/docs.git"
|
||||
fi
|
||||
|
||||
git -C tmp/docs-build push origin master
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "====> Changes found"
|
||||
echo "$changes"
|
||||
|
||||
echo "====> Committing changes"
|
||||
git -C tmp/docs-build add .
|
||||
git -C tmp/docs-build commit -m "chore: regenerate docs"
|
||||
|
||||
echo "====> Pushing changes"
|
||||
if [[ -n "$BOT_GITHUB_USERNAME" ]] && [[ -n "$BOT_GITHUB_API_TOKEN" ]]; then
|
||||
git -C tmp/docs-build remote set-url origin "https://$BOT_GITHUB_USERNAME:$BOT_GITHUB_API_TOKEN@github.com/dokku/docs.git"
|
||||
fi
|
||||
|
||||
git -C tmp/docs-build push origin master
|
||||
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
@@ -7,7 +7,7 @@ ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
|
||||
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux.tar.gz "https://go.dev/dl/go${GOLANG_VERSION}.linux-$(dpkg --print-architecture).tar.gz" \
|
||||
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux.tar.gz \
|
||||
&& cp /usr/local/go/bin/* /usr/local/bin \
|
||||
&& mkdir -p ${WORKDIR}/contrib
|
||||
@@ -23,7 +23,7 @@ COPY . ${WORKDIR}
|
||||
ENV GOPATH=/go
|
||||
ENV GOROOT=/usr/local/go
|
||||
|
||||
FROM builder as amd64
|
||||
FROM builder AS amd64
|
||||
|
||||
ARG PLUGIN_MAKE_TARGET
|
||||
ARG DOKKU_VERSION=master
|
||||
@@ -38,7 +38,7 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
|
||||
make version copyfiles \
|
||||
&& make deb-dokku
|
||||
|
||||
FROM builder as arm64
|
||||
FROM builder AS arm64
|
||||
|
||||
COPY --from=amd64 /tmp /tmp
|
||||
COPY --from=amd64 /usr/local/share/man/man1/dokku.1 /usr/local/share/man/man1/dokku.1-generated
|
||||
|
||||
@@ -86,11 +86,11 @@
|
||||
},
|
||||
{
|
||||
"name": "herokuish",
|
||||
"version": "0.11.3",
|
||||
"version": "0.11.5",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.3/herokuish_0.11.3_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.3/herokuish_0.11.3_linux_x86_64.tgz"
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.5/herokuish_0.11.5_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.11.5/herokuish_0.11.5_linux_x86_64.tgz"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
export DOKKU_PORT=${DOKKU_PORT:=22}
|
||||
export DOKKU_PORT=${DOKKU_PORT:=}
|
||||
export DOKKU_HOST=${DOKKU_HOST:=}
|
||||
export DOKKU_APP_PATH=${DOKKU_APP_PATH:=}
|
||||
|
||||
fn-random-number() {
|
||||
[[ -n "$1" ]] && RANGE="$1"
|
||||
@@ -61,12 +62,42 @@ fn-dokku-host() {
|
||||
echo "$DOKKU_HOST"
|
||||
}
|
||||
|
||||
fn-dokku-app() {
|
||||
declare DOKKU_GIT_REMOTE="$1" DOKKU_REMOTE_HOST="$2"
|
||||
remote_output="$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | awk '{print $2}')"
|
||||
|
||||
# check if there is a scheme
|
||||
if echo "$remote_output" | grep -qEi "ssh://"; then
|
||||
echo "$remote_output" | grep -Ei "ssh://dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f2 -d'/' 2>/dev/null
|
||||
else
|
||||
echo "$remote_output" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f2 -d':' 2>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
fn-dokku-port() {
|
||||
declare DOKKU_GIT_REMOTE="$1" DOKKU_REMOTE_HOST="$2"
|
||||
remote_output="$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | awk '{print $2}')"
|
||||
|
||||
if echo "$remote_output" | grep -qEi "ssh://"; then
|
||||
local output="$(echo "$remote_output" | grep -Ei "ssh://dokku@$DOKKU_REMOTE_HOST" | cut -f2 -d'@' | cut -f1 -d'/' 2>/dev/null)"
|
||||
# check if output has a : and if so, get the port
|
||||
if echo "$output" | grep -qEi ":"; then
|
||||
echo "$output" | cut -f2 -d':' 2>/dev/null
|
||||
else
|
||||
echo "22"
|
||||
fi
|
||||
else
|
||||
echo "22"
|
||||
fi
|
||||
}
|
||||
|
||||
fn-get-remote() {
|
||||
git config dokku.remote 2>/dev/null || echo "dokku"
|
||||
}
|
||||
|
||||
main() {
|
||||
declare CMD="$1" APP_ARG="$2"
|
||||
|
||||
local APP="" DOKKU_GIT_REMOTE="$(fn-get-remote)" DOKKU_REMOTE_HOST=""
|
||||
local cmd_set=false next_index=1 skip=false args=("$@")
|
||||
|
||||
@@ -84,6 +115,10 @@ main() {
|
||||
APP=${args[$next_index]}
|
||||
skip=true
|
||||
shift 2
|
||||
elif [[ "$arg" == "--app-path" ]]; then
|
||||
DOKKU_APP_PATH=${args[$next_index]}
|
||||
skip=true
|
||||
shift 2
|
||||
elif [[ "$arg" == "--remote" ]]; then
|
||||
DOKKU_GIT_REMOTE=${args[$next_index]}
|
||||
skip=true
|
||||
@@ -103,6 +138,11 @@ main() {
|
||||
next_index=$((next_index + 1))
|
||||
done
|
||||
|
||||
if [[ -n "$DOKKU_APP_PATH" ]]; then
|
||||
pushd "$DOKKU_APP_PATH" &>/dev/null || exit 1
|
||||
trap 'popd &>/dev/null || true' RETURN INT TERM
|
||||
fi
|
||||
|
||||
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
|
||||
if [[ -z "$DOKKU_REMOTE_HOST" ]] && [[ "$CMD" != remote ]] && [[ "$CMD" != remote:* ]]; then
|
||||
fn-client-help-msg
|
||||
@@ -111,14 +151,28 @@ main() {
|
||||
if [[ -z "$APP" ]]; then
|
||||
if [[ -d .git ]] || git rev-parse --git-dir &>/dev/null; then
|
||||
set +e
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
APP="$(fn-dokku-app "$DOKKU_GIT_REMOTE" "$DOKKU_REMOTE_HOST")"
|
||||
set -e
|
||||
else
|
||||
echo " ! This is not a git repository" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$DOKKU_PORT" ]]; then
|
||||
DOKKU_PORT="$(fn-dokku-port "$DOKKU_GIT_REMOTE" "$DOKKU_REMOTE_HOST")"
|
||||
fi
|
||||
|
||||
case "$CMD" in
|
||||
remote:show)
|
||||
echo "dokku-app: $APP"
|
||||
echo "dokku-git-remote: $DOKKU_GIT_REMOTE"
|
||||
echo "dokku-host: $DOKKU_HOST"
|
||||
echo "dokku-port: $DOKKU_PORT"
|
||||
echo "dokku-remote-host: $DOKKU_REMOTE_HOST"
|
||||
echo "dokku-ssh-user: dokku"
|
||||
echo "dokku-constructed-remote: ssh://dokku@$DOKKU_REMOTE_HOST:$DOKKU_PORT/$APP"
|
||||
exit 0
|
||||
;;
|
||||
apps:create)
|
||||
if [[ -z "$APP" ]] && [[ -z "$APP_ARG" ]]; then
|
||||
APP=$(fn-random-name)
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.36.9
|
||||
Version: 0.37.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: apache2-utils, locales, git, cpio, cron, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 19.03.0) | docker-engine (>= 19.03.0) | docker-io (>= 19.03.0) | docker.io (>= 19.03.0) | docker-ce (>= 19.03.0) | docker-ee (>= 19.03.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, parallel, procfile-util, rsync, dos2unix, jq, unzip, util-linux
|
||||
Depends: apache2-utils, locales, git, cpio, cron, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 19.03.0) | docker-engine (>= 19.03.0) | docker-io (>= 19.03.0) | docker.io (>= 19.03.0) | docker-ce (>= 19.03.0) | docker-ee (>= 19.03.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, parallel, procfile-util, rsync, dos2unix, unzip, util-linux
|
||||
Recommends: herokuish, bash-completion, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, bind9-dnsutils, debconf, plugn, sudo, python3, rsyslog
|
||||
Pre-Depends: gliderlabs-sigil, jq, nginx (>= 1.8.0) | openresty, bind9-dnsutils, debconf, plugn, sudo, python3, rsyslog
|
||||
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
|
||||
|
||||
37
debian/postinst
vendored
37
debian/postinst
vendored
@@ -24,6 +24,39 @@ call-sshcommand() {
|
||||
fi
|
||||
}
|
||||
|
||||
setup-docker-live-restore() {
|
||||
# skip if running in docker-based installation
|
||||
if [[ "$DOKKU_INIT_SYSTEM" == "sv" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# allow disabling via /etc/default/dokku
|
||||
if [[ "$DOKKU_LIVE_RESTORE" == "false" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
live_restore="$(docker info --format '{{ .LiveRestoreEnabled }}' || true)"
|
||||
if [ "$live_restore" = "true" ]; then
|
||||
echo "Docker live-restore is already enabled"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Enabling docker live-restore"
|
||||
if [[ ! -f /etc/docker/daemon.json ]]; then
|
||||
echo "{}" >/etc/docker/daemon.json
|
||||
fi
|
||||
|
||||
config="$(jq '. + {"live-restore": true}' /etc/docker/daemon.json)"
|
||||
echo "$config" >/etc/docker/daemon.json
|
||||
if command -v systemctl &>/dev/null; then
|
||||
if ! systemctl reload docker; then
|
||||
echo "Unable to reload docker, please reload manually" 1>&2
|
||||
fi
|
||||
else
|
||||
echo "Unable to reload docker, please reload manually" 1>&2
|
||||
fi
|
||||
}
|
||||
|
||||
setup-user() {
|
||||
echo "Setting up dokku user"
|
||||
call-sshcommand create dokku /usr/bin/dokku
|
||||
@@ -128,9 +161,6 @@ case "$1" in
|
||||
configure)
|
||||
mandb
|
||||
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
|
||||
if [[ -f /sbin/modprobe ]]; then
|
||||
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
|
||||
fi
|
||||
|
||||
setup-user
|
||||
setup-storage
|
||||
@@ -138,6 +168,7 @@ case "$1" in
|
||||
dpkg-handling
|
||||
setup-plugins
|
||||
setup-sshcommand
|
||||
setup-docker-live-restore
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -86,7 +86,7 @@ main() {
|
||||
fi
|
||||
|
||||
# run core install triggers to force create any folders that may be missing
|
||||
dokku plugin:install --core
|
||||
dokku plugin:install
|
||||
|
||||
if [[ -n "$DOKKU_HOSTNAME" ]]; then
|
||||
echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections
|
||||
|
||||
@@ -1 +1 @@
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/lambda-builder,/usr/bin/nixpacks,/usr/bin/pack
|
||||
dokku ALL=NOPASSWD:SETENV:/usr/bin/docker,/usr/bin/docker-container-healthchecker,/usr/bin/docker-image-labeler,/usr/bin/lambda-builder,/usr/bin/nixpacks,/usr/bin/railpack,/usr/bin/pack
|
||||
|
||||
20
docker/usr/local/bin/railpack
Normal file
20
docker/usr/local/bin/railpack
Normal file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $TRACE ]] && set -x
|
||||
|
||||
main() {
|
||||
declare desc="re-runs railpack commands as sudo"
|
||||
local RAILPACK_BIN=""
|
||||
if [[ -x "/usr/bin/railpack" ]]; then
|
||||
RAILPACK_BIN="/usr/bin/railpack"
|
||||
fi
|
||||
|
||||
if [[ -z "$RAILPACK_BIN" ]]; then
|
||||
echo "! No railpack binary found" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo -E "$RAILPACK_BIN" "$@"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
2
docs/_build/Dockerfile
vendored
2
docs/_build/Dockerfile
vendored
@@ -1,4 +1,4 @@
|
||||
FROM python:3.14.0-alpine
|
||||
FROM python:3.14.1-alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
10
docs/_build/requirements.txt
vendored
10
docs/_build/requirements.txt
vendored
@@ -1,18 +1,18 @@
|
||||
beautifulsoup4==4.14.2
|
||||
click==8.3.0
|
||||
beautifulsoup4==4.14.3
|
||||
click==8.3.1
|
||||
ghp-import==2.1.0
|
||||
importlib-metadata==8.7.0
|
||||
Jinja2==3.1.6
|
||||
Markdown>=3.2.1,<3.10
|
||||
Markdown>=3.2.1,<3.11
|
||||
MarkupSafe==3.0.3
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.6.1
|
||||
mkdocs-exclude==1.0.2
|
||||
mkdocs-material==9.6.22
|
||||
mkdocs-material==9.7.0
|
||||
mkdocs-material-extensions==1.3.1
|
||||
packaging==25.0
|
||||
Pygments==2.19.2
|
||||
pymdown-extensions==10.16.1
|
||||
pymdown-extensions==10.17.2
|
||||
pyparsing==3.2.5
|
||||
python-dateutil==2.9.0.post0
|
||||
PyYAML==6.0.3
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
```
|
||||
plugin:disable <name> # Disable an installed plugin (third-party only)
|
||||
plugin:enable <name> # Enable a previously disabled plugin
|
||||
plugin:install [--core|git-url] [--committish branch|commit|tag] [--name custom-plugin-name] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
|
||||
plugin:install [--core|git-url] [--committish branch|commit|tag] [--name custom-plugin-name] [--skip-install-trigger] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
|
||||
plugin:installed <name> # Checks if a plugin is installed
|
||||
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
|
||||
plugin:list # Print active plugins
|
||||
@@ -36,35 +36,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.36.9 enabled dokku core standard plugin
|
||||
20_events 0.36.9 enabled dokku core events logging plugin
|
||||
app-json 0.36.9 enabled dokku core app-json plugin
|
||||
apps 0.36.9 enabled dokku core apps plugin
|
||||
build-env 0.36.9 enabled dokku core build-env plugin
|
||||
buildpacks 0.36.9 enabled dokku core buildpacks plugin
|
||||
certs 0.36.9 enabled dokku core certificate management plugin
|
||||
checks 0.36.9 enabled dokku core checks plugin
|
||||
common 0.36.9 enabled dokku core common plugin
|
||||
config 0.36.9 enabled dokku core config plugin
|
||||
docker-options 0.36.9 enabled dokku core docker-options plugin
|
||||
domains 0.36.9 enabled dokku core domains plugin
|
||||
enter 0.36.9 enabled dokku core enter plugin
|
||||
git 0.36.9 enabled dokku core git plugin
|
||||
logs 0.36.9 enabled dokku core logs plugin
|
||||
network 0.36.9 enabled dokku core network plugin
|
||||
nginx-vhosts 0.36.9 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.36.9 enabled dokku core plugin plugin
|
||||
proxy 0.36.9 enabled dokku core proxy plugin
|
||||
ps 0.36.9 enabled dokku core ps plugin
|
||||
repo 0.36.9 enabled dokku core repo plugin
|
||||
resource 0.36.9 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.36.9 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.36.9 enabled dokku core shell plugin
|
||||
ssh-keys 0.36.9 enabled dokku core ssh-keys plugin
|
||||
storage 0.36.9 enabled dokku core storage plugin
|
||||
tags 0.36.9 enabled dokku core tags plugin
|
||||
tar 0.36.9 enabled dokku core tar plugin
|
||||
trace 0.36.9 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.37.2 enabled dokku core standard plugin
|
||||
20_events 0.37.2 enabled dokku core events logging plugin
|
||||
app-json 0.37.2 enabled dokku core app-json plugin
|
||||
apps 0.37.2 enabled dokku core apps plugin
|
||||
build-env 0.37.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.37.2 enabled dokku core buildpacks plugin
|
||||
certs 0.37.2 enabled dokku core certificate management plugin
|
||||
checks 0.37.2 enabled dokku core checks plugin
|
||||
common 0.37.2 enabled dokku core common plugin
|
||||
config 0.37.2 enabled dokku core config plugin
|
||||
docker-options 0.37.2 enabled dokku core docker-options plugin
|
||||
domains 0.37.2 enabled dokku core domains plugin
|
||||
enter 0.37.2 enabled dokku core enter plugin
|
||||
git 0.37.2 enabled dokku core git plugin
|
||||
logs 0.37.2 enabled dokku core logs plugin
|
||||
network 0.37.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.37.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.37.2 enabled dokku core plugin plugin
|
||||
proxy 0.37.2 enabled dokku core proxy plugin
|
||||
ps 0.37.2 enabled dokku core ps plugin
|
||||
repo 0.37.2 enabled dokku core repo plugin
|
||||
resource 0.37.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.37.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.37.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.37.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.37.2 enabled dokku core storage plugin
|
||||
tags 0.37.2 enabled dokku core tags plugin
|
||||
tar 0.37.2 enabled dokku core tar plugin
|
||||
trace 0.37.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
@@ -128,6 +128,12 @@ The `--core` flag may also be indicated as the sole argument, though it is only
|
||||
dokku plugin:install --core
|
||||
```
|
||||
|
||||
If installing plugins in a Dockerfile, you will want to skip the `install` trigger. This will be run on container boot.
|
||||
|
||||
```shell
|
||||
dokku plugin:install https://github.com/dokku/smoke-test-plugin.git --name smoke-test-plugin --skip-install-trigger
|
||||
```
|
||||
|
||||
Finally, all flags may be omitted to trigger the `install` procedures for both core and third-party plugins:
|
||||
|
||||
```shell
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
|
||||
- The `plugin:list` command no longer outputs the version for the `plugn` binary.
|
||||
- Users building docker images that run Dokku will need to use a new sudoer wrapper for the `docker-image-labeler` binary to work correctly. A reference version has been placed in the `docker` skeleton directory. This should only impact platform developers, and users of our Docker image will already have the file available.
|
||||
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron entry in `/etc/cron.d/dokku` to avoid this issue.
|
||||
- The `dokku` user's cron is now in use by Dokku itself. Customizations will be overwritten. Users are encouraged to use a cron file at `/etc/cron.d/dokku` to avoid this issue.
|
||||
- As of 0.23.0, Dokku will now inject the `max-size` log driver option for applications. This is restricted to app-configured log driver values empty, `local` or `json-file` in 0.23.1 to increase setup compatibility. Users who configure alternative log drivers at the system level will need to either set the global `max-size` property to `unlimited` or switch to the built-in `vector` logging support.
|
||||
|
||||
15
docs/appendices/0.37.0-migration-guide.md
Normal file
15
docs/appendices/0.37.0-migration-guide.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 0.37.0 Migration Guide
|
||||
|
||||
## Changes
|
||||
|
||||
- The `app.json` file format is now parsed as JSONC and supports inline comments.
|
||||
- The `scheduler-k3s:cluster-add` command is now `scheduler-k3s:cluster:add`.
|
||||
- The `scheduler-k3s:cluster-list` command is now `scheduler-k3s:cluster:list`.
|
||||
- The `scheduler-k3s:cluster-remove` command is now `scheduler-k3s:cluster:remove`.
|
||||
|
||||
## Removals
|
||||
|
||||
- Support for the `DOKKU_DOCKERFILE_CACHE_BUILD` environment variable has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
|
||||
- Support for the `DOKKU_DOCKER_BUILD_OPTS` environment variable has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
|
||||
- Support for the `no-cache` nixpacks property has been removed. Use the `docker-options` plugin to set build arguments for your app instead.
|
||||
- Support for customizing the label-key for the caddy proxy has been removed. Always use `caddy.` as a prefix for your caddy directives.
|
||||
@@ -21,7 +21,9 @@
|
||||
(list, optional) A list of cron resources. Keys are the names of the process types. The values are an object containing one or more of the following properties:
|
||||
|
||||
- `command`: (string, required)
|
||||
- `maintenance`: (boolean, optional)
|
||||
- `schedule`: (string, required)
|
||||
- `concurrency_policy`: (string, optional, default: `allow`, options: `allow`, `forbid`, `replace`)
|
||||
|
||||
## Formation
|
||||
|
||||
@@ -41,6 +43,7 @@
|
||||
- `autoscaling` (map of string to object, optional) autoscaling rules. See the autoscaling section for more details
|
||||
- `max_parallel`: (int, optional) number of instances to deploy in parallel at a given time
|
||||
- `quantity`: (int, optional) number of processes to maintain. Default 1 for web processes, 0 for all others.
|
||||
- `service`: (map of string to oject, optional) governs how non-web processes are exposed as services on the network
|
||||
|
||||
### Autoscaling
|
||||
|
||||
@@ -80,6 +83,24 @@ An autoscaling trigger consists of the following properties:
|
||||
- `type`: (string, optional)
|
||||
- `metadata`: (object, optional)
|
||||
|
||||
### Service
|
||||
|
||||
```json
|
||||
{
|
||||
"formation": {
|
||||
"internal-web": {
|
||||
"service": {
|
||||
"exposed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
(object, optional) A key-value object specifying how to expose non-web processes as services.
|
||||
|
||||
- `service`: (boolean, optional) Whether to expose a process as a network service. The `PORT` variable will be set to 5000.
|
||||
|
||||
## Healthchecks
|
||||
|
||||
```json
|
||||
|
||||
3
docs/appendices/file-formats/railpack-json.md
Normal file
3
docs/appendices/file-formats/railpack-json.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# railpack.json
|
||||
|
||||
The `railpack.json` file is used to configure an application when built with the `railpack` builder. Please refer to the [railpack.json documentation](https://railpack.com/config/file) for more information.
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.36.9\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.37.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
/* Avatar section darkmode fade */
|
||||
--avatar-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, white 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
--avatar-darkmode-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, #043791 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
--avatar-darkmode-before-gradient: rgba(0, 0, 0, 0) linear-gradient(90deg, #0.37.2 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
--avatar-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, white 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
--avatar-darkmode-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, #043791 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
--avatar-darkmode-after-gradient: rgba(0, 0, 0, 0) linear-gradient(270deg, #0.37.2 2.52%, rgba(255, 255, 255, 0) 100%) repeat scroll 0% 0%;
|
||||
}
|
||||
|
||||
body {
|
||||
@@ -1191,15 +1191,15 @@ ul.fas li .fa-large:before {
|
||||
|
||||
.getting-started::after {
|
||||
background: linear-gradient(0deg, rgba(52, 52, 87, 0.2) -40.97%, rgba(0, 0, 0, 0) 103.19%),
|
||||
#043791;
|
||||
#0.37.2;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
background: #043791;
|
||||
background: #0.37.2;
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
background: #043791;
|
||||
background: #0.37.2;
|
||||
}
|
||||
|
||||
.powered-by_brands {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
"0.33.9",
|
||||
"0.34.9",
|
||||
"0.35.20",
|
||||
"0.36.9"
|
||||
"0.36.11",
|
||||
"0.37.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -110,7 +110,6 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `DOKKU_DEFAULT_CHECKS_WAIT` | `10` | `dokku config:set` | If no user-defined checks are specified - or if the process being checked is not a `web` process - this is the period of time Dokku will wait before checking that a container is still running. |
|
||||
| `DOKKU_DISABLE_PROXY` | none | `dokku proxy:disable` <br /> `dokku proxy:enable` | Disables the proxy in front of your application, resulting in publicly routing the docker container. |
|
||||
| `DOKKU_DISABLE_APP_AUTOCREATION` | none | `dokku config:set` | Disables automatic creation of a non-existent app on deploy. |
|
||||
| `DOKKU_DOCKERFILE_CACHE_BUILD` | none | `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 | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` <br /> `dokku config:set` | |
|
||||
|
||||
174
docs/deployment/builders/buildpack-management.md
Normal file
174
docs/deployment/builders/buildpack-management.md
Normal file
@@ -0,0 +1,174 @@
|
||||
# Buildpacks Management
|
||||
|
||||
> [!NOTE]
|
||||
> Buildpacks commands apply to both herokuish and CNB-based builds
|
||||
|
||||
```
|
||||
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
|
||||
buildpacks:clear <app> # Clear all buildpacks set on the app
|
||||
buildpacks:list <app> # List all buildpacks for an app
|
||||
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
||||
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
||||
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
### Listing Buildpacks in Use
|
||||
|
||||
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
|
||||
|
||||
```shell
|
||||
# running for an app with no buildpacks specified
|
||||
dokku buildpacks:list node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> test buildpack urls
|
||||
```
|
||||
|
||||
```shell
|
||||
# running for an app with two buildpacks specified
|
||||
dokku buildpacks:list node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> test buildpack urls
|
||||
https://github.com/heroku/heroku-buildpack-python.git
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
### Adding custom buildpacks
|
||||
|
||||
> Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
|
||||
To add a custom buildpack, use the `buildpacks:add` command:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
When no buildpacks are currently specified, the specified buildpack will be the only one executed for detection and compilation.
|
||||
|
||||
Multiple buildpacks may be specified by using the `buildpacks:add` command multiple times.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
Buildpacks are executed in order, may be inserted at a specified index via the `--index` flag. This flag is specified starting at a 1-index value.
|
||||
|
||||
```shell
|
||||
# will add the golang buildpack at the second position, bumping all proceeding ones by 1 position
|
||||
dokku buildpacks:add --index 2 node-js-app https://github.com/heroku/heroku-buildpack-golang.git
|
||||
```
|
||||
|
||||
### Overwriting a buildpack position
|
||||
|
||||
In some cases, it may be necessary to swap out a given buildpack. Rather than needing to re-specify each buildpack, the `buildpacks:set` command can be used to overwrite a buildpack at a given position.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
By default, this will overwrite the _first_ buildpack specified. To specify an index, the `--index` flag may be used. This flag is specified starting at a 1-index value, and defaults to `1`.
|
||||
|
||||
```shell
|
||||
# the following are equivalent commands
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
dokku buildpacks:set --index 1 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
If the index specified is larger than the number of buildpacks currently configured, the buildpack will be appended to the end of the list.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:set --index 99 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
### Removing a buildpack
|
||||
|
||||
> At least one of a buildpack or index must be specified
|
||||
|
||||
A single buildpack can be removed by name via the `buildpacks:remove` command.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:remove node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
Buildpacks can also be removed by index via the `--index` flag. This flag is specified starting at a 1-index value.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:remove node-js-app --index 1
|
||||
```
|
||||
|
||||
### Clearing all buildpacks
|
||||
|
||||
> This does not affect automatically detected buildpacks, nor does it impact any specified `BUILDPACK_URL` environment variable.
|
||||
|
||||
The `buildpacks:clear` command can be used to clear all configured buildpacks for a specified app.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:clear node-js-app
|
||||
```
|
||||
|
||||
### Using a specific buildpack version
|
||||
|
||||
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
||||
|
||||
By default, builders will pin their vendored buildpacks, resulting in a consistent build result for your application. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
|
||||
|
||||
```shell
|
||||
# using the latest nodejs buildpack
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs
|
||||
```
|
||||
|
||||
This will use the latest commit on the `master` branch of the specified buildpack. To pin to a newer version of a buildpack, a sha may also be specified by using the form `REPOSITORY_URL#COMMIT_SHA`, where `COMMIT_SHA` is any tree-ish git object - usually a git tag.
|
||||
|
||||
```shell
|
||||
# using v87 of the nodejs buildpack
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
### Displaying buildpack reports for an app
|
||||
|
||||
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:v0.7.0-22
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
Buildpacks stack: gliderlabs/herokuish:v0.7.0-20
|
||||
=====> python-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
||||
Buildpacks stack:
|
||||
=====> ruby-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list:
|
||||
Buildpacks stack:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app buildpacks information
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report node-js-app --buildpacks-list
|
||||
```
|
||||
@@ -14,8 +14,8 @@ buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpa
|
||||
|
||||
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the [herokuish buildpacks documentation](/docs/deployment/builders/herokuish-buildpacks.md) for more information on how to clear buildpack build cache for an application.
|
||||
|
||||
> [!WARNING]
|
||||
> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps. As the integration is experimental in Dokku, it is likely to change over time.
|
||||
> [!NOTE]
|
||||
> This functionality uses the `pack` cli from the [Cloud Native Buildpacks](https://buildpacks.io) project to build apps.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -27,7 +27,7 @@ Builds will proceed with the `pack` cli for the app from then on.
|
||||
|
||||
### Caveats
|
||||
|
||||
As this functionality is highly experimental, there are a number of caveats. Please note that not all issues are listed below.
|
||||
While pack is well-supported in Dokku, there are a number of caveats. Please note that not all issues are listed below.
|
||||
|
||||
- Specifying specific buildpacks is not currently possible.
|
||||
- A future release will add support for specifying buildpacks via the `buildpacks` plugin.
|
||||
@@ -41,16 +41,7 @@ As this functionality is highly experimental, there are a number of caveats. Ple
|
||||
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in either the following cases:
|
||||
|
||||
- The `DOKKU_CNB_EXPERIMENTAL` app environment variable is set to `1`.
|
||||
|
||||
```shell
|
||||
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
|
||||
```
|
||||
|
||||
- A `project.toml` file exists in the root of the app repository.
|
||||
- This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||
This builder will be auto-detected if a `project.toml` file exists in the root of the app repository. This file is consumed by `pack-cli` and used to describe how the app is built.
|
||||
|
||||
The builder can also be specified via the `builder:set` command:
|
||||
|
||||
|
||||
@@ -199,8 +199,6 @@ dokku config:set node-js-app DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||
|
||||
To tell Docker what to run.
|
||||
|
||||
Setting `$DOKKU_DOCKERFILE_CACHE_BUILD` to `true` or `false` will enable or disable Docker's image layer cache. Lastly, for more granular build control, you may also pass any `docker build` option to `docker`, by setting `$DOKKU_DOCKER_BUILD_OPTS`.
|
||||
|
||||
### Procfiles and multiple processes
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
||||
@@ -4,12 +4,6 @@
|
||||
> Subcommands new as of 0.15.0
|
||||
|
||||
```
|
||||
buildpacks:add [--index 1] <app> <buildpack> # Add new app buildpack while inserting into list of buildpacks if necessary
|
||||
buildpacks:clear <app> # Clear all buildpacks set on the app
|
||||
buildpacks:list <app> # List all buildpacks for an app
|
||||
buildpacks:remove <app> <buildpack> # Remove a buildpack set on the app
|
||||
buildpacks:report [<app>] [<flag>] # Displays a buildpack report for one or more apps
|
||||
buildpacks:set [--index 1] <app> <buildpack> # Set new app buildpack at a given position defaulting to the first buildpack if no index is specified
|
||||
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
|
||||
```
|
||||
|
||||
@@ -49,104 +43,6 @@ dokku builder:set node-js-app selected herokuish
|
||||
|
||||
> Dokku will only select the `dockerfile` builder if both the `herokuish` and `pack` builders are not detected and a Dockerfile exists. See the [dockerfile builder documentation](/docs/deployment/builders/dockerfiles.md) for more information on how that builder functions.
|
||||
|
||||
### Listing Buildpacks in Use
|
||||
|
||||
The `buildpacks:list` command can be used to show buildpacks that have been set for an app. This will omit any auto-detected buildpacks.
|
||||
|
||||
```shell
|
||||
# running for an app with no buildpacks specified
|
||||
dokku buildpacks:list node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> test buildpack urls
|
||||
```
|
||||
|
||||
```shell
|
||||
# running for an app with two buildpacks specified
|
||||
dokku buildpacks:list node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> test buildpack urls
|
||||
https://github.com/heroku/heroku-buildpack-python.git
|
||||
https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
### Adding custom buildpacks
|
||||
|
||||
> Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
|
||||
To add a custom buildpack, use the `buildpacks:add` command:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
When no buildpacks are currently specified, the specified buildpack will be the only one executed for detection and compilation.
|
||||
|
||||
Multiple buildpacks may be specified by using the `buildpacks:add` command multiple times.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
dokku buildpacks:add node-js-app https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
Buildpacks are executed in order, may be inserted at a specified index via the `--index` flag. This flag is specified starting at a 1-index value.
|
||||
|
||||
```shell
|
||||
# will add the golang buildpack at the second position, bumping all proceeding ones by 1 position
|
||||
dokku buildpacks:add --index 2 node-js-app https://github.com/heroku/heroku-buildpack-golang.git
|
||||
```
|
||||
|
||||
### Overwriting a buildpack position
|
||||
|
||||
In some cases, it may be necessary to swap out a given buildpack. Rather than needing to re-specify each buildpack, the `buildpacks:set` command can be used to overwrite a buildpack at a given position.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
By default, this will overwrite the _first_ buildpack specified. To specify an index, the `--index` flag may be used. This flag is specified starting at a 1-index value, and defaults to `1`.
|
||||
|
||||
```shell
|
||||
# the following are equivalent commands
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
dokku buildpacks:set --index 1 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
If the index specified is larger than the number of buildpacks currently configured, the buildpack will be appended to the end of the list.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:set --index 99 node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
### Removing a buildpack
|
||||
|
||||
> At least one of a buildpack or index must be specified
|
||||
|
||||
A single buildpack can be removed by name via the `buildpacks:remove` command.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:remove node-js-app https://github.com/heroku/heroku-buildpack-ruby.git
|
||||
```
|
||||
|
||||
Buildpacks can also be removed by index via the `--index` flag. This flag is specified starting at a 1-index value.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:remove node-js-app --index 1
|
||||
```
|
||||
|
||||
### Clearing all buildpacks
|
||||
|
||||
> This does not affect automatically detected buildpacks, nor does it impact any specified `BUILDPACK_URL` environment variable.
|
||||
|
||||
The `buildpacks:clear` command can be used to clear all configured buildpacks for a specified app.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:clear node-js-app
|
||||
```
|
||||
|
||||
### Customizing the Buildpack stack builder
|
||||
|
||||
> [!IMPORTANT]
|
||||
@@ -207,49 +103,6 @@ The default value may be set by passing an empty value for the option.
|
||||
dokku builder-herokuish:set --global allowed
|
||||
```
|
||||
|
||||
### Displaying buildpack reports for an app
|
||||
|
||||
You can get a report about the app's buildpacks status using the `buildpacks:report` command:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:v0.7.0-22
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
Buildpacks stack: gliderlabs/herokuish:v0.7.0-20
|
||||
=====> python-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git,https://github.com/heroku/heroku-buildpack-python.git
|
||||
Buildpacks stack:
|
||||
=====> ruby-sample buildpacks information
|
||||
Buildpacks computed stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks global stack: gliderlabs/herokuish:latest-24
|
||||
Buildpacks list:
|
||||
Buildpacks stack:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app buildpacks information
|
||||
Buildpacks list: https://github.com/heroku/heroku-buildpack-nodejs.git
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku buildpacks:report node-js-app --buildpacks-list
|
||||
```
|
||||
|
||||
### Displaying builder-herokuish reports for an app
|
||||
|
||||
> [!IMPORTANT]
|
||||
@@ -309,24 +162,6 @@ If an application was previously deployed via Dockerfile, the following commands
|
||||
dokku ports:clear node-js-app
|
||||
```
|
||||
|
||||
### Using a specific buildpack version
|
||||
|
||||
> Always remember to pin your buildpack versions when using the multi-buildpacks method, or you may find deploys changing your deployed environment.
|
||||
|
||||
By default, Dokku uses the [gliderlabs/herokuish](https://github.com/gliderlabs/herokuish/) project, which pins all of it's vendored buildpacks. There may be occasions where the pinned version results in a broken deploy, or does not have a particular feature that is required to build your project. To use a more recent version of a given buildpack, the buildpack may be specified _without_ a Git commit SHA like so:
|
||||
|
||||
```shell
|
||||
# using the latest nodejs buildpack
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs
|
||||
```
|
||||
|
||||
This will use the latest commit on the `master` branch of the specified buildpack. To pin to a newer version of a buildpack, a sha may also be specified by using the form `REPOSITORY_URL#COMMIT_SHA`, where `COMMIT_SHA` is any tree-ish git object - usually a git tag.
|
||||
|
||||
```shell
|
||||
# using v87 of the nodejs buildpack
|
||||
dokku buildpacks:set node-js-app https://github.com/heroku/heroku-buildpack-nodejs#v87
|
||||
```
|
||||
|
||||
### `curl` build timeouts
|
||||
|
||||
Certain buildpacks may time out in retrieving dependencies via `curl`. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a `curl` command.
|
||||
@@ -345,3 +180,32 @@ See the [repository management documentation](/docs/advanced-usage/repository-ma
|
||||
### Specifying commands via Procfile
|
||||
|
||||
See the [Procfile documentation](/docs/processes/process-management.md#procfile) for more information on how to specify different processes for your app.
|
||||
|
||||
### Listing Buildpacks in Use
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#listing-buildpacks-in-use) for more information on how to list buildpacks in use.
|
||||
|
||||
### Adding custom buildpacks
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#adding-custom-buildpacks) for more information on how to add custom buildpacks.
|
||||
|
||||
### Overwriting a buildpack position
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#overwriting-a-buildpack-position) for more information on how to overwrite a buildpack position.
|
||||
|
||||
### Removing a buildpack
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#removing-a-buildpack) for more information on how to remove a buildpack.
|
||||
|
||||
### Clearing all buildpacks
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#clearing-all-buildpacks) for more information on how to clear all buildpacks.
|
||||
|
||||
### Using a specific buildpack version
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#using-a-specific-buildpack-version) for more information on how to using a specific buildpack version
|
||||
|
||||
|
||||
### Displaying buildpack reports for an app
|
||||
|
||||
See the [buildpack management documentation](/docs/processes/process-management.md#displaying-buildpack-reports-for-an-app) for more information on how to display buildpack reports for an app.
|
||||
@@ -80,28 +80,10 @@ dokku builder-nixpacks:set --global nixpackstoml-path
|
||||
|
||||
### Disabling cache
|
||||
|
||||
Cache is enabled by default, but can be disabled by setting the `no-cache` property to `true`:
|
||||
Disable cache using the [docker-options] plugin:
|
||||
|
||||
```shell
|
||||
dokku builder-nixpacks:set node-js-app no-cache true
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder-nixpacks:set node-js-app no-cache
|
||||
```
|
||||
|
||||
The `no-cache` property can also be set globally. The global default is `false`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku builder-nixpacks:set --global no-cache true
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder-nixpacks:set --global no-cache
|
||||
dokku docker-options:add node-js-app build "--no-cache"
|
||||
```
|
||||
|
||||
### Displaying builder-nixpacks reports for an app
|
||||
@@ -117,23 +99,14 @@ dokku builder-nixpacks:report
|
||||
Builder-nixpacks computed nixpackstoml path: nixpacks2.toml
|
||||
Builder-nixpacks global nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks nixpackstoml path: nixpacks2.toml
|
||||
Builder-nixpacks computed no cache: true
|
||||
Builder-nixpacks global no cache: false
|
||||
Builder-nixpacks no cache: true
|
||||
=====> python-sample builder-nixpacks information
|
||||
Builder-nixpacks computed nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks global nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks nixpackstoml path:
|
||||
Builder-nixpacks computed no cache: false
|
||||
Builder-nixpacks global no cache: false
|
||||
Builder-nixpacks no cache:
|
||||
=====> ruby-sample builder-nixpacks information
|
||||
Builder-nixpacks computed nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks global nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks nixpackstoml path:
|
||||
Builder-nixpacks computed no cache: false
|
||||
Builder-nixpacks global no cache: false
|
||||
Builder-nixpacks no cache:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
@@ -147,17 +120,14 @@ dokku builder-nixpacks:report node-js-app
|
||||
Builder-nixpacks computed nixpackstoml path: nixpacks2.toml
|
||||
Builder-nixpacks global nixpackstoml path: nixpacks.toml
|
||||
Builder-nixpacks nixpackstoml path: nixpacks2.toml
|
||||
Builder-nixpacks computed no cache: true
|
||||
Builder-nixpacks global no cache: false
|
||||
Builder-nixpacks no cache: true
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku builder-nixpacks:report node-js-app --builder-nixpacks-no-cache
|
||||
dokku builder-nixpacks:report node-js-app --builder-nixpacks-nixpackstoml-path
|
||||
```
|
||||
|
||||
```
|
||||
true
|
||||
nixpacks2.toml
|
||||
```
|
||||
|
||||
142
docs/deployment/builders/railpack.md
Normal file
142
docs/deployment/builders/railpack.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# Railpack
|
||||
|
||||
> [!IMPORTANT]
|
||||
> New as of 0.37.0
|
||||
|
||||
The `railpack` builder builds apps via [Railpack](https://railpack.com/), a buildpack alternative.
|
||||
|
||||
## Usage
|
||||
|
||||
### Requirements
|
||||
|
||||
Before using Railpacks, the following steps must be taken:
|
||||
|
||||
- Install the `railpack` cli: The `railpack` cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on [this page](https://railpack.com/installation).
|
||||
- Create a `buildkit` builder: Railpack uses buildkit.
|
||||
```shell
|
||||
docker run --rm --privileged -d --name buildkit moby/buildkit
|
||||
```
|
||||
- Set the buildkit builder: Update the `/etc/default/dokku` file to set `BUILDKIT_HOST`:
|
||||
```shell
|
||||
touch /etc/default/dokku
|
||||
echo "export BUILDKIT_HOST='docker-container://buildkit'" >> /etc/default/dokku
|
||||
````
|
||||
|
||||
### Detection
|
||||
|
||||
This builder will be auto-detected in the following case:
|
||||
|
||||
- A `railpack.json` exists in the root of the app repository.
|
||||
|
||||
The builder may also be selected via the `builder:set` command
|
||||
|
||||
```shell
|
||||
dokku builder:set node-js-app selected railpack
|
||||
```
|
||||
|
||||
### Supported languages
|
||||
|
||||
See the [upstream railpack documentation](https://railpack.com/) for further information on what languages and frameworks are supported.
|
||||
|
||||
### Build-time configuration variables
|
||||
|
||||
For security reasons - and as per [Docker recommendations](https://github.com/docker/docker/issues/13490) - railpack-based deploys have variables available only during runtime.
|
||||
|
||||
For users that require customization in the `build` phase, you may use build arguments via the [docker-options plugin](/docs/advanced-usage/docker-options.md). All environment variables set by the `config` plugin are automatically exported within the railpack build environment, and thus `--env` only requires setting a key without a value.
|
||||
|
||||
```shell
|
||||
dokku docker-options:add node-js-app build '--env NODE_ENV'
|
||||
```
|
||||
|
||||
Alternatively, a full value may be provided in the form of `--env KEY=VALUE`:
|
||||
|
||||
```shell
|
||||
dokku docker-options:add node-js-app build '--env NODE_ENV=production'
|
||||
```
|
||||
|
||||
### Changing the `railpack.json` location
|
||||
|
||||
The `railpack.json` is expected to be found in a specific directory, depending on the deploy approach:
|
||||
|
||||
- The `WORKDIR` of the Docker image for deploys resulting from `git:from-image` and `git:load-image` commands.
|
||||
- The root of the source code tree for all other deploys (git push, `git:from-archive`, `git:sync`).
|
||||
|
||||
Sometimes it may be desirable to set a different path for a given app, e.g. when deploying from a monorepo. This can be done via the `railpackjson-path` property:
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:set node-js-app railpackjson-path .dokku/railpack.json
|
||||
```
|
||||
|
||||
The value is the path to the desired file *relative* to the base search directory, and will never be treated as absolute paths in any context. If that file does not exist within the repository, the build will fail.
|
||||
|
||||
The default value may be set by passing an empty value for the option:
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:set node-js-app railpackjson-path
|
||||
```
|
||||
|
||||
The `railpackjson-path` property can also be set globally. The global default is `railpack.json`, and the global value is used when no app-specific value is set.
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:set --global railpackjson-path railpack2.json
|
||||
```
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:set --global railpackjson-path
|
||||
```
|
||||
|
||||
### Disabling cache
|
||||
|
||||
Disable cache using the [docker-options] plugin:
|
||||
|
||||
```shell
|
||||
dokku docker-options:add node-js-app build "--no-cache"
|
||||
```
|
||||
|
||||
### Displaying builder-railpack reports for an app
|
||||
|
||||
You can get a report about the app's storage status using the `builder-railpack:report` command:
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:report
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-railpack information
|
||||
Builder-railpack computed railpackjson path: railpack2.json
|
||||
Builder-railpack global railpackjson path: railpack.json
|
||||
Builder-railpack railpackjson path: railpack2.json
|
||||
=====> python-sample builder-railpack information
|
||||
Builder-railpack computed railpackjson path: railpack.json
|
||||
Builder-railpack global railpackjson path: railpack.json
|
||||
Builder-railpack railpackjson path:
|
||||
=====> ruby-sample builder-railpack information
|
||||
Builder-railpack computed railpackjson path: railpack.json
|
||||
Builder-railpack global railpackjson path: railpack.json
|
||||
Builder-railpack railpackjson path:
|
||||
```
|
||||
|
||||
You can run the command for a specific app also.
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:report node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> node-js-app builder-railpack information
|
||||
Builder-railpack computed railpackjson path: railpack2.json
|
||||
Builder-railpack global railpackjson path: railpack.json
|
||||
Builder-railpack railpackjson path: railpack2.json
|
||||
```
|
||||
|
||||
You can pass flags which will output only the value of the specific information you want. For example:
|
||||
|
||||
```shell
|
||||
dokku builder-railpack:report node-js-app --builder-railpack-railpackjson-path
|
||||
```
|
||||
|
||||
```
|
||||
railpack2.json
|
||||
```
|
||||
@@ -71,7 +71,7 @@ All commands have the application name automatically set via the `--app` flag on
|
||||
|
||||
The client supports several environment variables:
|
||||
|
||||
- `DOKKU_HOST` (default: `dokku` git remote): Used to interact with a specific remote server. Can be overridden via the `--remote` flag.
|
||||
- `DOKKU_HOST` (default: `dokku` git remote): Used to interact with a specific remote server. Can be overridden via the `--remote` flag. Must specify the `--app` flag when specified.
|
||||
- `DOKKU_PORT` (default: `22`): Used to specify a port to connect to the Dokku server on.
|
||||
|
||||
It also supports several flags (all flags unspecified here are passed as is to the server):
|
||||
@@ -99,6 +99,12 @@ To list all available remotes, run `dokku remote:list`. This is equivalent to ru
|
||||
|
||||
To add a remote, run `dokku remote:add $REMOTE_NAME dokku@dokku.me:$APP_NAME`, replacing `$REMOTE_NAME` with your desired remote name, the `$APP_NAME` with your desired app name and the host `dokku.me` with your Dokku host. This is equivalent to running `git remote add $REMOTE_NAME dokku@dokku.me:$APP_NAME`.
|
||||
|
||||
The following remote formats are supported:
|
||||
|
||||
- `dokku@HOSTNAME.TLD:APP_NAME`
|
||||
- `ssh://dokku@HOSTNAME.TLD/APP_NAME`
|
||||
- `ssh://dokku@HOSTNAME.TLD:HOST_PORT/APP_NAME`
|
||||
|
||||
To remove a remote, run `dokku remote:remove $REMOTE_NAME`. This is equivalent to running `git remote remove $REMOTE_NAME`.
|
||||
|
||||
By default, the remote in use is `dokku`. To change the remote the client uses by default, run `dokku remote:set $REMOTE_NAME`, where `$REMOTE_NAME` is the name of your desired remote. This will not check the value specified, so that remote *must* be available or errors will occur when running normal client commands. Note that specifying `--remote` when running dokku commands will override this configuration value.
|
||||
|
||||
@@ -7,12 +7,15 @@
|
||||
scheduler-k3s:annotations:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE>, Set or clear an annotation for a given app/process-type/resource-type combination
|
||||
scheduler-k3s:autoscaling-auth:set <app|--global> <trigger> [<--metadata key=value>...], Set or clear a scheduler-k3s autoscaling keda trigger authentication resource for an app
|
||||
scheduler-k3s:autoscaling-auth:report <app|--global> [--format stdout|json] [--include-metadata] # Displays a scheduler-k3s autoscaling auth report for an app
|
||||
scheduler-k3s:cluster-add [ssh://user@host:port] # Adds a server node to a Dokku-managed cluster
|
||||
scheduler-k3s:cluster-list # Lists all nodes in a Dokku-managed cluster
|
||||
scheduler-k3s:cluster-remove [node-id] # Removes client node to a Dokku-managed cluster
|
||||
scheduler-k3s:cluster:add [ssh://user@host:port] # Adds a server node to a Dokku-managed cluster
|
||||
scheduler-k3s:cluster:list # Lists all nodes in a Dokku-managed cluster
|
||||
scheduler-k3s:cluster:remove [node-id] # Removes client node to a Dokku-managed cluster
|
||||
scheduler-k3s:ensure-charts # Ensures the k3s charts are installed
|
||||
scheduler-k3s:initialize # Initializes a cluster
|
||||
scheduler-k3s:labels:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE>, Set or clear a label for a given app/process-type/resource-type combination
|
||||
scheduler-k3s:labels:set <app|--global> <property> (<value>) [--process-type PROCESS_TYPE] <--resource-type RESOURCE_TYPE> # Set or clear a label for a given app/process-type/resource-type combination
|
||||
scheduler-k3s:profiles:add <profile> [--role ROLE] [--insecure-allow-unknown-hosts] [--taint-scheduling] [--kubelet-args KUBELET_ARGS] Adds a node profile to the k3s cluster
|
||||
scheduler-k3s:profiles:list [--format json|stdout] # Lists all node profiles in the k3s cluster
|
||||
scheduler-k3s:profiles:remove <profile> # Removes a node profile from the k3s cluster
|
||||
scheduler-k3s:report [<app>] [<flag>] # Displays a scheduler-k3s report for one or more apps
|
||||
scheduler-k3s:set [<app>|--global] <key> (<value>) # Set or clear a scheduler-k3s property for an app or the scheduler
|
||||
scheduler-k3s:show-kubeconfig # Displays the kubeconfig for remote usage
|
||||
@@ -77,22 +80,38 @@ dokku scheduler-k3s:initialize --ingress-class traefik
|
||||
|
||||
#### Adding a worker node
|
||||
|
||||
Nodes that run app workloads can be added via the `scheduler-k3s:cluster-add` command. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in worker mode. Workers are typically used to run app workloads.
|
||||
Nodes that run app workloads can be added via the `scheduler-k3s:cluster:add` command. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in worker mode. Workers are typically used to run app workloads.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add ssh://root@worker-1.example.com
|
||||
dokku scheduler-k3s:cluster:add ssh://root@worker-1.example.com
|
||||
```
|
||||
|
||||
Per-node kubelet flags can be supplied by passing `--kubelet-args` with a comma-separated `key=value` list. This is useful for tuning scheduler capacity or enforcing cluster-wide defaults at the node level.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster:add \
|
||||
--kubelet-args allowed-unsafe-sysctls=net.ipv6.conf.all.disable_ipv6 \
|
||||
ssh://root@worker-1.example.com
|
||||
```
|
||||
|
||||
Multiple kubelet arguments can be specified in the same call by separating them with commas. The following example enables IPv4 forwarding while also increasing the pod density on the worker.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster:add \
|
||||
--kubelet-args allowed-unsafe-sysctls=net.ipv6.conf.all.disable_ipv6,max-pods=150 \
|
||||
ssh://root@worker-2.example.com
|
||||
```
|
||||
|
||||
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --insecure-allow-unknown-hosts ssh://root@worker-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --insecure-allow-unknown-hosts ssh://root@worker-1.example.com
|
||||
```
|
||||
|
||||
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --server-ip 192.168.20.15 ssh://root@worker-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --server-ip 192.168.20.15 ssh://root@worker-1.example.com
|
||||
```
|
||||
|
||||
#### Adding a server node
|
||||
@@ -102,28 +121,28 @@ dokku scheduler-k3s:cluster-add --server-ip 192.168.20.15 ssh://root@worker-1.ex
|
||||
|
||||
Server nodes are typically used to replicate the cluster state, and it is recommended to have an odd number of nodes spread across several availability zones (datacenters in close proximity within a region). This allows for higher availability in the event of a cluster failure. Server nodes run control-plane services such as the traefik load balancer and the etcd backing store.
|
||||
|
||||
Server nodes can also be added with the `scheduler-k3s:cluster-add` command by specifying `--role server`. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in server mode.
|
||||
Server nodes can also be added with the `scheduler-k3s:cluster:add` command by specifying `--role server`. This will ssh onto the specified server, install k3s, and join it to the current Dokku node in server mode.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --role server ssh://root@server-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --role server ssh://root@server-1.example.com
|
||||
```
|
||||
|
||||
Server nodes allow any workloads to be scheduled on them by default, in addition to the control-plane, etcd, and the scheduler itself. To avoid app workloads being scheduled on your control-plane, use the `--taint-scheduling` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --role server --taint-scheduling ssh://root@server-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --role server --taint-scheduling ssh://root@server-1.example.com
|
||||
```
|
||||
|
||||
If the server isn't in the `known_hosts` file, the connection will fail. This can be bypassed by setting the `--insecure-allow-unknown-hosts` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --role server --insecure-allow-unknown-hosts ssh://root@server-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --role server --insecure-allow-unknown-hosts ssh://root@server-1.example.com
|
||||
```
|
||||
|
||||
By default, Dokku will attempt to auto-detect the IP address of the Dokku server for the remote server to connect to. In cases where the auto-detected IP address is incorrect, an override may be specified via the `--server-ip` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:cluster-add --role server --server-ip 192.168.20.15 ssh://root@server-1.example.com
|
||||
dokku scheduler-k3s:cluster:add --role server --server-ip 192.168.20.15 ssh://root@server-1.example.com
|
||||
```
|
||||
|
||||
#### Changing the network interface
|
||||
@@ -134,6 +153,48 @@ When attaching an worker or server node, the K3s plugin will look at the IP asso
|
||||
dokku scheduler-k3s:set --global network-interface eth1
|
||||
```
|
||||
|
||||
### Node Profiles
|
||||
|
||||
Node profiles capture repeatable `scheduler-k3s:cluster:add` options so you can join multiple nodes with identical settings. A profile name can be specified for the `scheduler-k3s:cluster:add` command via the `--profile <name>` flag. Any flags passed directly to `scheduler-k3s:cluster:add` override the stored values for that run.
|
||||
|
||||
#### Listing profiles
|
||||
|
||||
Display stored profiles to understand which roles and behaviors will be used.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:profiles:list
|
||||
```
|
||||
|
||||
```
|
||||
name role
|
||||
awesome-profile worker
|
||||
```
|
||||
|
||||
This command also takes an optional `--format` flag to specify a format for the output. Options include `json` and `stdout`
|
||||
|
||||
#### Adding profiles
|
||||
|
||||
Create or update a profile that defines how new nodes should be prepared before joining the cluster.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:profiles:add edge-workers \
|
||||
--role worker \
|
||||
--insecure-allow-unknown-hosts \
|
||||
--kubelet-args protect-kernel-defaults=true,eviction-hard=memory.available<200Mi
|
||||
```
|
||||
|
||||
Profile names must be alphanumeric, may include internal dashes, cannot start/end with a dash, and must be ≤32 characters. Other than the `--server-ip` flag, all flags used for `scheduler-k3s:cluster:add` are valid for the `scheduler-k3s:profiles:add` command.
|
||||
|
||||
#### scheduler-k3s:profiles:remove
|
||||
|
||||
Delete a profile once it’s no longer required.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:profiles:remove edge-workers
|
||||
```
|
||||
|
||||
Removal only deletes the stored definition; nodes that already joined the cluster keep their existing configuration.
|
||||
|
||||
### Changing deployment settings
|
||||
|
||||
The k3s plugin provides a number of settings that can be used to managed deployments on a per-app basis. The following table outlines ones not covered elsewhere:
|
||||
@@ -171,6 +232,27 @@ The global default value may be set by passing an empty value for the option.
|
||||
dokku scheduler-k3s:set --global deploy-timeout
|
||||
```
|
||||
|
||||
### Exposing services on the network
|
||||
|
||||
Dokku will automatically expose the `web` process as a Kubernetes Service, with all others being treated as background processes. In some cases, it may be useful to have other processes exposed as Kubernetes Service objects so as to segregate internal http endpoints from public http endpoints. This can be done by modifying the `app.json` Formation entry for your process type.
|
||||
|
||||
```json
|
||||
{
|
||||
"formation": {
|
||||
"internal-web": {
|
||||
"service": {
|
||||
"exposed": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
In the above example, the `internal-web` process is exposed as a service. The `PORT` variable for the process will be set to `5000`, and a kubernetes `Service` object will be created pointing at your processes.
|
||||
|
||||
> [!NOTE]
|
||||
> It is not possible to modify the port mapping, nor is it possible to assign domains or SSL to a non-web process.
|
||||
|
||||
### SSL Certificates
|
||||
|
||||
#### Enabling letsencrypt integration
|
||||
@@ -201,7 +283,7 @@ The default value may be set by passing an empty value for the option:
|
||||
dokku scheduler-k3s:set node-js-app letsencrypt-server
|
||||
```
|
||||
|
||||
The `image-pull-secrets` property can also be set globally. The global default is `production`.
|
||||
The `letsencrypt-server` property can also be set globally. The global default is `production`.
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:set --global letsencrypt-server staging
|
||||
|
||||
@@ -582,7 +582,7 @@ APP="$1"; PROPERTY="$2"
|
||||
|
||||
### `cron-entries`
|
||||
|
||||
- Description: Allows injecting cron entries into the written out scheduled cron task list. Each entry is newline delimited, and individual entries come in the form `$SCHEDULE;$FULL_COMMAND;$ARBITRARY_DATA`. Individual implementations of cron writing can decide whether and how to include these cron entries. The `ARBITRARY_DATA` includes the log file path for the basic `docker-local` cron implementation.
|
||||
- Description: Allows injecting cron tasks into the written out scheduled cron task list. Each entry is newline delimited, and individual tasks come in the form `$SCHEDULE;$FULL_COMMAND;$ARBITRARY_DATA`. Individual implementations of cron writing can decide whether and how to include these cron tasks. The `ARBITRARY_DATA` includes the log file path for the basic `docker-local` cron implementation.
|
||||
- Invoked by:
|
||||
- Arguments: `$DOKKU_SCHEDULER`
|
||||
- Example:
|
||||
@@ -2450,7 +2450,7 @@ DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
> The scheduler plugin trigger apis are under development and may change
|
||||
> between minor releases until the 1.0 release.
|
||||
|
||||
- Description: Force triggers writing out cron entries. Arguments are optional.
|
||||
- Description: Force triggers writing out cron tasks. Arguments are optional.
|
||||
- Invoked by: `ps:start`, `ps:stop`, `cron:set`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
@@ -2805,6 +2805,26 @@ DOKKU_SCHEDULER="$1"; APP="$2"; CONTAINER="$3"; TAIL="$4"; PRETTY_PRINT="$5"; NU
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-run-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 retire containers started by the `run` command
|
||||
- Invoked by: `dokku run:retire`
|
||||
- Arguments: `$DOKKU_SCHEDULER $APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
DOKKU_SCHEDULER="$1"; APP="$2";
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
### `scheduler-run-stop`
|
||||
|
||||
> [!WARNING]
|
||||
|
||||
@@ -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.36.9-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.37.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.36.9
|
||||
docker pull dokku/dokku:0.37.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -19,7 +19,7 @@ docker container run -d \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.36.9
|
||||
dokku/dokku:0.37.2
|
||||
```
|
||||
|
||||
Alternatively, you can use `docker-compose.yml`:
|
||||
@@ -27,7 +27,7 @@ Alternatively, you can use `docker-compose.yml`:
|
||||
```yaml
|
||||
services:
|
||||
dokku:
|
||||
image: dokku/dokku:0.36.9
|
||||
image: dokku/dokku:0.37.2
|
||||
container_name: dokku
|
||||
network_mode: bridge
|
||||
ports:
|
||||
@@ -80,12 +80,12 @@ redis: https://github.com/dokku/dokku-redis.git
|
||||
|
||||
### Prior to Dokku start
|
||||
|
||||
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command. Note that the version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
|
||||
The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command, though the `install` trigger must be skipped via the `--skip-install-trigger`. The version installed at that time will be the one that persists. Below is an example Dockerfile showing this method.
|
||||
|
||||
```Dockerfile
|
||||
FROM dokku/dokku:0.36.9
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
|
||||
FROM dokku/dokku:0.37.2
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git --skip-install-trigger
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git --skip-install-trigger
|
||||
```
|
||||
|
||||
## SSH Key Management
|
||||
|
||||
@@ -8,17 +8,11 @@ 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 any of the following operating systems:
|
||||
- [Ubuntu 22.04/24.04](https://www.ubuntu.com/download)
|
||||
- [Debian 11+ x64](https://www.debian.org/distrib/)
|
||||
- A server with one of the following architectures
|
||||
- AMD64 (alternatively known as `x86_64`), commonly used for Intel cloud servers
|
||||
- ARMV8 (alternatively known as `arm64`), commonly used for Raspberry PI and AWS Graviton
|
||||
|
||||
To avoid memory pressure during builds or runtime of your applications, we suggest the following:
|
||||
|
||||
- At least 1 GB of system memory
|
||||
- If your system has less than 1GB of memory, you can use [this workaround](/docs/getting-started/advanced-installation.md#vms-with-less-than-1-gb-of-memory).
|
||||
- Operating Systems: [Ubuntu 22.04/24.04](https://www.ubuntu.com/download) or [Debian 11+ x64](https://www.debian.org/distrib/)
|
||||
- Supported Architectures: `AMD64` (`x86_64`) and `arm64` (`armv8`)
|
||||
- Minimum Memory:
|
||||
- Docker Scheduler: 1GB of system memory, or [add swap memory](/docs/getting-started/advanced-installation.md#vms-with-less-than-1-gb-of-memory)
|
||||
- K3s Scheduler: 2GB of system memory on every node in the cluster
|
||||
|
||||
Finally, we recommend attaching at least one domain name to your server. This is not required, but using a domain name will make app access easier. When connecting a domain, either a single domain or a wildcard may be associated to the server's IP.
|
||||
|
||||
@@ -37,8 +31,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 -NP . https://dokku.com/install/v0.36.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.36.9 bash bootstrap.sh
|
||||
wget -NP . https://dokku.com/install/v0.37.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.37.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -18,6 +18,8 @@ Docker releases updates periodically to their engine. We recommend reading their
|
||||
|
||||
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
|
||||
|
||||
- [Upgrading to 0.37](/docs/appendices/0.37.0-migration-guide.md)
|
||||
- [Upgrading to 0.36](/docs/appendices/0.36.0-migration-guide.md)
|
||||
- [Upgrading to 0.35](/docs/appendices/0.35.0-migration-guide.md)
|
||||
- [Upgrading to 0.34](/docs/appendices/0.34.0-migration-guide.md)
|
||||
- [Upgrading to 0.33](/docs/appendices/0.33.0-migration-guide.md)
|
||||
|
||||
@@ -10,26 +10,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.36.9/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.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.37.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.37.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.37.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.37.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.37.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.37.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.37.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.37.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.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.37.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
@@ -38,7 +38,7 @@
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="./assets/style.css" rel="stylesheet"> -->
|
||||
</head>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<main class="container px-4 px-lg-5">
|
||||
<div class="row">
|
||||
<div class="col-lg-7">
|
||||
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.36.9</span></span></a>
|
||||
<a class="badge-link" href="https://github.com/dokku/dokku/releases"><span class="badge py-2 d-flex fit-content"><div class="circle align-self-center me-2"></div>Latest release <span id="releaseVersion" class="ms-1">v0.37.2</span></span></a>
|
||||
<h1 class="text-white hero-heading mt-5">An open source PAAS alternative to Heroku.</h1>
|
||||
<h4 class="text-white mt-5">Dokku helps you build and manage the lifecycle of applications from building to scaling.</h4>
|
||||
<div class="d-flex mt-5">
|
||||
@@ -125,7 +125,7 @@
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.36.9 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.37.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
> [!IMPORTANT]
|
||||
> New as of 0.28.0
|
||||
|
||||
Dokku provides integration with the [Caddy](https://caddyserver.com/) proxy service by utilizing the Docker label-based integration implemented by Caddy.
|
||||
Dokku provides integration with the [Caddy](https://caddyserver.com/) proxy service by utilizing the Docker label-based integration implemented by [Caddy Docker Proxy](https://github.com/lucaslorentz/caddy-docker-proxy).
|
||||
|
||||
```
|
||||
caddy:report [<app>] [<flag>] # Displays a caddy report for one or more apps
|
||||
@@ -117,19 +117,57 @@ dokku caddy:set --global log-level DEBUG
|
||||
|
||||
After modifying, the Caddy container will need to be restarted.
|
||||
|
||||
### Changing the label key for the app
|
||||
### Label Management
|
||||
|
||||
The default label key for the app is `caddy`. This can be changed by setting the `label-key` property:
|
||||
The Caddy plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Caddy behavior beyond what the plugin provides by default.
|
||||
|
||||
Refer to the upstream [caddy-docker-proxy](https://github.com/lucaslorentz/caddy-docker-proxy) documentation for more information on what labels are available.
|
||||
|
||||
#### Adding a label
|
||||
|
||||
To add a custom container label to an app, use the `caddy:labels:add` command:
|
||||
|
||||
```shell
|
||||
dokku caddy:set node-js-app label-key caddy_0
|
||||
dokku caddy:labels:add node-js-app caddy.directive value
|
||||
```
|
||||
|
||||
This will update the app's label key to `caddy_0`. The label key is used to identify the app in the Caddy configuration. If you change the label key, you will need to restart or rebuild the app to apply the updates.
|
||||
This will add the label `caddy.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Removing a label
|
||||
|
||||
To remove a custom container label from an app, use the `caddy:labels:remove` command:
|
||||
|
||||
```shell
|
||||
dokku caddy:labels:remove node-js-app caddy.directive
|
||||
```
|
||||
|
||||
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Showing labels
|
||||
|
||||
To view all custom container labels for an app, use the `caddy:labels:show` command:
|
||||
|
||||
```shell
|
||||
dokku caddy:labels:show node-js-app
|
||||
```
|
||||
|
||||
To view a specific label value, provide the label name:
|
||||
|
||||
```shell
|
||||
dokku caddy:labels:show node-js-app caddy.directive
|
||||
```
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The caddy plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
The caddy plugin only supports automatic ssl certificates from its letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
#### Enabling letsencrypt integration
|
||||
|
||||
|
||||
@@ -113,6 +113,54 @@ dokku haproxy:set --global log-level DEBUG
|
||||
|
||||
After modifying, the Haproxy container will need to be restarted.
|
||||
|
||||
### Label Management
|
||||
|
||||
The Haproxy plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Haproxy behavior beyond what the plugin provides by default.
|
||||
|
||||
Refer to the upstream [EasyHaproxy](https://github.com/byjg/docker-easy-haproxy) documentation for more information on what labels are available.
|
||||
|
||||
#### Adding a label
|
||||
|
||||
To add a custom container label to an app, use the `haproxy:labels:add` command:
|
||||
|
||||
```shell
|
||||
dokku haproxy:labels:add node-js-app haproxy.directive value
|
||||
```
|
||||
|
||||
This will add the label `haproxy.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Removing a label
|
||||
|
||||
To remove a custom container label from an app, use the `haproxy:labels:remove` command:
|
||||
|
||||
```shell
|
||||
dokku haproxy:labels:remove node-js-app haproxy.directive
|
||||
```
|
||||
|
||||
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Showing labels
|
||||
|
||||
To view all custom container labels for an app, use the `haproxy:labels:show` command:
|
||||
|
||||
```shell
|
||||
dokku haproxy:labels:show node-js-app
|
||||
```
|
||||
|
||||
To view a specific label value, provide the label name:
|
||||
|
||||
```shell
|
||||
dokku haproxy:labels:show node-js-app haproxy.directive
|
||||
```
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The haproxy plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
@@ -124,6 +124,54 @@ The following folders within an app repository may have `*.conf` files that will
|
||||
- `openresty/http-includes/`: Injected in the `server` block serving http(s) requests for the app.
|
||||
- `openresty/http-location-includes/`: Injected in the `location` block that proxies to the app in the app's respective `server` block.
|
||||
|
||||
### Label Management
|
||||
|
||||
The OpenResty plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure OpenResty behavior beyond what the plugin provides by default.
|
||||
|
||||
Refer to the upstream [openresty-docker-proxy](https://github.com/dokku/openresty-docker-proxy) documentation for more information on what labels are available.
|
||||
|
||||
#### Adding a label
|
||||
|
||||
To add a custom container label to an app, use the `openresty:labels:add` command:
|
||||
|
||||
```shell
|
||||
dokku openresty:labels:add node-js-app openresty.directive value
|
||||
```
|
||||
|
||||
This will add the label `openresty.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Removing a label
|
||||
|
||||
To remove a custom container label from an app, use the `openresty:labels:remove` command:
|
||||
|
||||
```shell
|
||||
dokku openresty:labels:remove node-js-app openresty.directive
|
||||
```
|
||||
|
||||
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Showing labels
|
||||
|
||||
To view all custom container labels for an app, use the `openresty:labels:show` command:
|
||||
|
||||
```shell
|
||||
dokku openresty:labels:show node-js-app
|
||||
```
|
||||
|
||||
To view a specific label value, provide the label name:
|
||||
|
||||
```shell
|
||||
dokku openresty:labels:show node-js-app openresty.directive
|
||||
```
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The OpenResty plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
@@ -127,6 +127,54 @@ dokku traefik:set --global log-level DEBUG
|
||||
|
||||
After modifying, the Traefik container will need to be restarted.
|
||||
|
||||
### Label Management
|
||||
|
||||
The Traefik plugin allows you to add custom container labels to apps. These labels are injected into containers during deployment and can be used to configure Traefik behavior beyond what the plugin provides by default.
|
||||
|
||||
Refer to the upstream [Traefik](https://doc.traefik.io/traefik/) documentation for more information on what labels are available.
|
||||
|
||||
#### Adding a label
|
||||
|
||||
To add a custom container label to an app, use the `traefik:labels:add` command:
|
||||
|
||||
```shell
|
||||
dokku traefik:labels:add node-js-app traefik.directive value
|
||||
```
|
||||
|
||||
This will add the label `traefik.directive=value` to the app's containers. After adding a label, you will need to rebuild or redeploy the app for the label to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Removing a label
|
||||
|
||||
To remove a custom container label from an app, use the `traefik:labels:remove` command:
|
||||
|
||||
```shell
|
||||
dokku traefik:labels:remove node-js-app traefik.directive
|
||||
```
|
||||
|
||||
This will remove the specified label from the app. After removing a label, you will need to rebuild or redeploy the app for the change to be applied to running containers.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild node-js-app
|
||||
```
|
||||
|
||||
#### Showing labels
|
||||
|
||||
To view all custom container labels for an app, use the `traefik:labels:show` command:
|
||||
|
||||
```shell
|
||||
dokku traefik:labels:show node-js-app
|
||||
```
|
||||
|
||||
To view a specific label value, provide the label name:
|
||||
|
||||
```shell
|
||||
dokku traefik:labels:show node-js-app traefik.directive
|
||||
```
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The traefik plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# One-off Tasks
|
||||
|
||||
```
|
||||
run [-e|--env KEY=VALUE] [--no-tty] <app> <cmd> # Run a command in a new container using the current app image
|
||||
run:detached [-e|-env KEY=VALUE] [--force-tty] <app> <cmd> # Run a command in a new detached container using the current app image
|
||||
run [-e|--env KEY=VALUE] [--no-tty] [--ttl-seconds SECONDS] <app> <cmd> # Run a command in a new container using the current app image
|
||||
run:detached [-e|-env KEY=VALUE] [--force-tty] [--ttl-seconds SECONDS] <app> <cmd> # Run a command in a new detached container using the current app image
|
||||
run:list [--format json|stdout] [<app>] # List all run containers for an app
|
||||
run:logs <app|--container CONTAINER> [-h] [-t] [-n num] [-q] # Display recent log output for run containers
|
||||
run:stop <app|--container CONTAINER> # Stops all run containers for an app or a specified run container
|
||||
@@ -29,6 +29,16 @@ dokku run --env "NODE_ENV=development" --env "PATH=/custom/path" node-js-app npm
|
||||
|
||||
One off containers are removed at the end of process execution.
|
||||
|
||||
In addition, one-off containers also run for a max of 24 hours (86400 seconds) by default, after which they are reaped. This can be changed by setting the `--ttl-seconds` argument:
|
||||
|
||||
|
||||
```shell
|
||||
# runs for 10 minutes
|
||||
dokku run --ttl-seconds 600 node-js-app npm run mytask
|
||||
```
|
||||
|
||||
One-off containers that exceed their runtime are reaped every 5 minutes, so the ttl-seconds is an approximation and your app may end up running for up to 5 minutes longer than expected.
|
||||
|
||||
#### Running Procfile commands
|
||||
|
||||
The `run` command can also be used to run a command defined in the app `Procfile`:
|
||||
|
||||
@@ -6,8 +6,10 @@
|
||||
```
|
||||
cron:list <app> [--format json|stdout] # List scheduled cron tasks for an app
|
||||
cron:report [<app>] [<flag>] # Display report about an app
|
||||
cron:resume <app> <cron_id> # Resume a cron task
|
||||
cron:run <app> <cron_id> [--detach] # Run a cron task on the fly
|
||||
cron:set [--global|<app>] <key> <value> # Set or clear a cron property for an app
|
||||
cron:suspend <app> <cron_id> # Suspend a cron task
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -31,12 +33,17 @@ The `app.json` file for a given app can define a special `cron` key that contain
|
||||
}
|
||||
```
|
||||
|
||||
A cron entry takes the following properties:
|
||||
A cron task takes the following properties:
|
||||
|
||||
- `command`: A command to be run within the built app image. Specified commands can also be `Procfile` entries.
|
||||
- `maintenance`: A boolean value that decides whether the cron task is in maintenance and therefore executable or not.
|
||||
- `schedule`: A [cron-compatible](https://en.wikipedia.org/wiki/Cron#Overview) scheduling definition upon which to run the command. Seconds are generally not supported.
|
||||
- `concurrency_policy`: A string (default: `allow`), that controls whether the cron task can be run concurrently with another invocation of itself. Valid options are `allow` (allow concurrency), `forbid` (exit the new cron task if there is an existing one), `replace` (delete any existing cron task and start the new one).
|
||||
|
||||
Zero or more cron commands can be specified per app. Cron entries are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
|
||||
|
||||
Zero or more cron tasks can be specified per app. Cron tasks are validated after the build artifact is created but before the app is deployed, and the cron schedule is updated during the post-deploy phase.
|
||||
|
||||
Cron tasks can run for a maximum of 24 hours via the docker-local scheduler, after which they are reaped from the system.
|
||||
|
||||
See the [app.json location documentation](/docs/advanced-usage/deployment-tasks.md#changing-the-appjson-location) for more information on where to place your `app.json` file.
|
||||
|
||||
@@ -123,6 +130,26 @@ ID Schedule Command
|
||||
5cruaotm4yzzpnjlsdunblj8qyjp @daily /bin/true
|
||||
```
|
||||
|
||||
#### Suspending and resuming a specific cron task
|
||||
|
||||
Cron tasks can be suspended to temporarily prevent them from running, and later resumed to re-enable them. This is useful for maintenance or debugging purposes.
|
||||
|
||||
To suspend a specific cron task, use the `cron:suspend` command with the app name and cron ID:
|
||||
|
||||
```shell
|
||||
dokku cron:suspend node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5
|
||||
```
|
||||
|
||||
A suspended task will not execute according to its schedule. You can verify a task is suspended by checking the `Maintenance` column in the `cron:list` output, which will show `true (task)` for suspended tasks.
|
||||
|
||||
To resume a suspended cron task, use the `cron:resume` command:
|
||||
|
||||
```shell
|
||||
dokku cron:resume node-js-app cGhwPT09cGhwIHRlc3QucGhwPT09QGRhaWx5
|
||||
```
|
||||
|
||||
Once resumed, the task will execute according to its schedule again. The cron ID can be retrieved from the `cron:list` output.
|
||||
|
||||
#### Executing a cron task on the fly
|
||||
|
||||
Cron tasks can be invoked via the `cron:run` command. This command takes an `app` argument and a `cron id` (retrievable from `cron:list` output).
|
||||
@@ -218,7 +245,7 @@ For tasks that will properly resume, you _should_ use the above method, as runni
|
||||
|
||||
Regularly scheduled tasks can be a bit of a pain with Dokku. The following are general recommendations to follow to help ensure successful task runs.
|
||||
|
||||
- Use the `dokku` user in your cron entry.
|
||||
- Use the `dokku` user in your cron task.
|
||||
- If you do not, the `dokku` binary will attempt to execute with `sudo`, and your cron run with fail with `sudo: no tty present and no askpass program specified`.
|
||||
- Add a `MAILTO` environment variable to ship cron emails to yourself.
|
||||
- Add a `PATH` environment variable or specify the full path to binaries on the host.
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - {{DOC_TITLE}}</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.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.37.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.37.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.37.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.37.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.37.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.37.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.37.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.37.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.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.37.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -48,7 +48,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet">
|
||||
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.36.9/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.37.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="./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">
|
||||
</head>
|
||||
@@ -150,6 +150,7 @@
|
||||
<a href="/{{NAME}}/deployment/builders/lambda/" class="list-group-item">Lambda Builder</a>
|
||||
<a href="/{{NAME}}/deployment/builders/nixpacks/" class="list-group-item">Nixpacks Builder</a>
|
||||
<a href="/{{NAME}}/deployment/builders/null/" class="list-group-item">Null Builder</a>
|
||||
<a href="/{{NAME}}/deployment/builders/railpack/" class="list-group-item">Railpack Builder</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment Methods</a>
|
||||
<a href="/{{NAME}}/deployment/methods/git/" class="list-group-item">Git Deployment</a>
|
||||
|
||||
21
dokku
21
dokku
@@ -135,6 +135,27 @@ execute_dokku_cmd() {
|
||||
local script
|
||||
local argv=("$@")
|
||||
|
||||
local -A PLUGIN_ALIASES
|
||||
PLUGIN_ALIASES["docker-local"]="scheduler-docker-local"
|
||||
PLUGIN_ALIASES["dockerfile"]="builder-dockerfile"
|
||||
PLUGIN_ALIASES["herokuish"]="builder-herokuish"
|
||||
PLUGIN_ALIASES["k3s"]="scheduler-k3s"
|
||||
PLUGIN_ALIASES["lambda"]="builder-lambda"
|
||||
PLUGIN_ALIASES["nixpacks"]="builder-nixpacks"
|
||||
PLUGIN_ALIASES["pack"]="builder-pack"
|
||||
PLUGIN_ALIASES["rails"]="builder-railpack"
|
||||
|
||||
local plugin_alias_source="${PLUGIN_NAME%%:*}"
|
||||
local plugin_alias_target="${PLUGIN_ALIASES[$plugin_alias_source]}"
|
||||
if [[ -n "$plugin_alias_target" ]]; then
|
||||
PLUGIN_NAME="${PLUGIN_NAME/$plugin_alias_source/$plugin_alias_target}"
|
||||
PLUGIN_CMD="${PLUGIN_CMD/$plugin_alias_source/$plugin_alias_target}"
|
||||
# also replace the first argument in $@ with the new PLUGIN_NAME
|
||||
shift 1
|
||||
set -- "$PLUGIN_NAME" "$@"
|
||||
argv=("$PLUGIN_NAME" "${argv[@]:1}")
|
||||
fi
|
||||
|
||||
case "$PLUGIN_NAME" in
|
||||
events | events:*)
|
||||
local PLUGIN_NAME=${PLUGIN_NAME/events/20_events}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
"github.com/tailscale/hujson"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
@@ -25,8 +26,8 @@ var (
|
||||
|
||||
// AppJSON is a struct that represents an app.json file as understood by Dokku
|
||||
type AppJSON struct {
|
||||
// Cron is a list of cron commands to execute
|
||||
Cron []CronCommand `json:"cron"`
|
||||
// Cron is a list of cron tasks to execute
|
||||
Cron []CronTask `json:"cron"`
|
||||
|
||||
// Formation is a map of process types to scale
|
||||
Formation map[string]Formation `json:"formation"`
|
||||
@@ -50,13 +51,19 @@ type AppJSON struct {
|
||||
} `json:"scripts"`
|
||||
}
|
||||
|
||||
// CronCommand is a struct that represents a single cron command from an app.json file
|
||||
type CronCommand struct {
|
||||
// CronTask is a struct that represents a single cron task from an app.json file
|
||||
type CronTask struct {
|
||||
// Command is the command to execute
|
||||
Command string `json:"command"`
|
||||
|
||||
// Maintenance is whether or not the cron task is in maintenance mode
|
||||
Maintenance bool `json:"maintenance"`
|
||||
|
||||
// Schedule is the cron schedule to execute the command on
|
||||
Schedule string `json:"schedule"`
|
||||
|
||||
// ConcurrencyPolicy is the concurrency policy for the cron command
|
||||
ConcurrencyPolicy string `json:"concurrency_policy"`
|
||||
}
|
||||
|
||||
// Formation is a struct that represents the scale for a process from an app.json file
|
||||
@@ -69,6 +76,16 @@ type Formation struct {
|
||||
|
||||
// MaxParallel is the maximum number of processes to start in parallel
|
||||
MaxParallel *int `json:"max_parallel"`
|
||||
|
||||
// Service is a struct that represents how to expose the process to the network
|
||||
// This only applies to non-web processes
|
||||
Service *FormationService `json:"service"`
|
||||
}
|
||||
|
||||
// FormationService is a struct that represents how to expose a process to the network
|
||||
type FormationService struct {
|
||||
// Exposed is whether or not the process is exposed as a service
|
||||
Exposed bool `json:"exposed"`
|
||||
}
|
||||
|
||||
// FormationAutoscaling is a struct that represents the autoscaling configuration for a process from an app.json file
|
||||
@@ -256,8 +273,14 @@ func ReadAppJSON(path string) (AppJSON, error) {
|
||||
return AppJSON{}, nil
|
||||
}
|
||||
|
||||
ast, err := hujson.Parse(b)
|
||||
if err != nil {
|
||||
return AppJSON{}, fmt.Errorf("Cannot parse app.json as jsonc: %v", err)
|
||||
}
|
||||
ast.Standardize()
|
||||
|
||||
var appJSON AppJSON
|
||||
if err = json.Unmarshal(b, &appJSON); err != nil {
|
||||
if err = json.Unmarshal(ast.Pack(), &appJSON); err != nil {
|
||||
return AppJSON{}, fmt.Errorf("Cannot parse app.json: %v", err)
|
||||
}
|
||||
|
||||
|
||||
@@ -133,11 +133,7 @@ func cleanupDeploymentContainer(containerID string, phase string) error {
|
||||
}
|
||||
|
||||
func executeScript(appName string, image string, imageTag string, phase string) error {
|
||||
phaseName := phase
|
||||
if phase == "heroku.postdeploy" {
|
||||
phaseName = "first deploy postdeploy"
|
||||
}
|
||||
common.LogInfo1(fmt.Sprintf("Checking for %s task", phaseName))
|
||||
common.LogInfo1(fmt.Sprintf("Checking for %s task", phase))
|
||||
command := ""
|
||||
phaseSource := ""
|
||||
if phase == "release" {
|
||||
@@ -152,14 +148,14 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
}
|
||||
|
||||
if command == "" {
|
||||
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phaseName))
|
||||
common.LogVerbose(fmt.Sprintf("No %s task found, skipping", phase))
|
||||
return nil
|
||||
}
|
||||
|
||||
if phase == "predeploy" {
|
||||
common.LogVerbose(fmt.Sprintf("Executing %s task from %s: %s", phaseName, phaseSource, command))
|
||||
common.LogVerbose(fmt.Sprintf("Executing %s task from %s: %s", phase, phaseSource, command))
|
||||
} else {
|
||||
common.LogVerbose(fmt.Sprintf("Executing %s task from %s in ephemeral container: %s", phaseName, phaseSource, command))
|
||||
common.LogVerbose(fmt.Sprintf("Executing %s task from %s in ephemeral container: %s", phase, phaseSource, command))
|
||||
}
|
||||
|
||||
isHerokuishImage := common.IsImageHerokuishBased(image, appName)
|
||||
@@ -271,15 +267,15 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
defer cleanupDeploymentContainer(containerID, phase)
|
||||
|
||||
if !waitForExecution(containerID) {
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogVerboseQuietContainerLogs(containerID)
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
return fmt.Errorf("Execution of %s task failed: %s", phaseName, command)
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
return fmt.Errorf("Execution of %s task failed: %s", phase, command)
|
||||
}
|
||||
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("Start of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
common.LogVerboseQuietContainerLogs(containerID)
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phaseName, containerID[0:9]))
|
||||
common.LogInfo2Quiet(fmt.Sprintf("End of %s %s task (%s) output", appName, phase, containerID[0:9]))
|
||||
|
||||
if phase != "predeploy" {
|
||||
return nil
|
||||
|
||||
@@ -6,6 +6,7 @@ require (
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
github.com/spf13/pflag v1.0.10
|
||||
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a
|
||||
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
|
||||
)
|
||||
|
||||
@@ -23,9 +24,10 @@ require (
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/sftp v1.13.5 // indirect
|
||||
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
|
||||
golang.org/x/crypto v0.43.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
github.com/stretchr/testify v1.8.4 // indirect
|
||||
golang.org/x/crypto v0.45.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -39,8 +39,11 @@ github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo
|
||||
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
|
||||
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
|
||||
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
|
||||
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a h1:a6TNDN9CgG+cYjaeN8l2mc4kSz2iMiCDQxPEyltUV/I=
|
||||
github.com/tailscale/hujson v0.0.0-20250605163823-992244df8c5a/go.mod h1:EbW0wDK/qEUYI0A5bqq0C2kF8JTQwWONmGDBbzsxxHo=
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
@@ -48,20 +51,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -72,20 +75,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
|
||||
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package appjson
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
@@ -42,18 +42,17 @@ func TriggerAppJSONGetContent(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
b, err := os.ReadFile(getProcessSpecificAppJSONPath(appName))
|
||||
appJSON, err := ReadAppJSON(getProcessSpecificAppJSONPath(appName))
|
||||
if err != nil {
|
||||
return fmt.Errorf("Cannot read app.json file: %v", err)
|
||||
return err
|
||||
}
|
||||
|
||||
content := strings.TrimSpace(string(b))
|
||||
if content == "" {
|
||||
fmt.Print("{}")
|
||||
return nil
|
||||
content, err := json.Marshal(appJSON)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Print(content)
|
||||
fmt.Print(string(content))
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ require (
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/sftp v1.13.5 // indirect
|
||||
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
|
||||
golang.org/x/crypto v0.43.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
golang.org/x/crypto v0.45.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -45,20 +45,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -69,20 +69,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
|
||||
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
@@ -48,7 +49,7 @@ func TriggerInstall() error {
|
||||
}
|
||||
|
||||
apps, err := common.UnfilteredDokkuApps()
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -17,8 +17,6 @@ trigger-builder-dockerfile-builder-build() {
|
||||
dokku_log_info1 "Building $APP from Dockerfile"
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP")
|
||||
local DOKKU_DOCKERFILE_CACHE_BUILD=$(config_get "$APP" "DOKKU_DOCKERFILE_CACHE_BUILD")
|
||||
local DOKKU_DOCKER_BUILD_OPTS=$(config_get "$APP" "DOKKU_DOCKER_BUILD_OPTS")
|
||||
local DOCKER_BUILD_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=dockerfile" "--label=com.dokku.app-name=$APP")
|
||||
|
||||
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
||||
@@ -34,17 +32,221 @@ trigger-builder-dockerfile-builder-build() {
|
||||
fi
|
||||
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=" $DOKKU_GLOBAL_BUILD_ARGS"
|
||||
|
||||
# strip --link, --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/^--link=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--link[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
DOCKER_ARGS=" $DOCKER_ARGS "
|
||||
eval set -- "$DOCKER_ARGS"
|
||||
|
||||
declare -a DOCKERFILE_ARGS
|
||||
while true; do
|
||||
case "$1" in
|
||||
--add-host)
|
||||
DOCKERFILE_ARGS+=("--add-host")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--add-host=*)
|
||||
DOCKERFILE_ARGS+=("--add-host" "${1#--add-host=}")
|
||||
shift 1
|
||||
;;
|
||||
--allow)
|
||||
DOCKERFILE_ARGS+=("--allow")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--allow=*)
|
||||
DOCKERFILE_ARGS+=("--allow" "${1#--allow=}")
|
||||
shift 1
|
||||
;;
|
||||
--annotation)
|
||||
DOCKERFILE_ARGS+=("--annotation")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--annotation=*)
|
||||
DOCKERFILE_ARGS+=("--annotation" "${1#--annotation=}")
|
||||
shift 1
|
||||
;;
|
||||
--attest)
|
||||
DOCKERFILE_ARGS+=("--attest")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--attest=*)
|
||||
DOCKERFILE_ARGS+=("--attest" "${1#--attest=}")
|
||||
shift 1
|
||||
;;
|
||||
--build-arg)
|
||||
DOCKERFILE_ARGS+=("--build-arg")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--build-arg=*)
|
||||
DOCKERFILE_ARGS+=("--build-arg" "${1#--build-arg=}")
|
||||
shift 1
|
||||
;;
|
||||
--builder)
|
||||
DOCKERFILE_ARGS+=("--builder")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--builder=*)
|
||||
DOCKERFILE_ARGS+=("--builder" "${1#--builder=}")
|
||||
shift 1
|
||||
;;
|
||||
--cache-from)
|
||||
DOCKERFILE_ARGS+=("--cache-from")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-from=*)
|
||||
DOCKERFILE_ARGS+=("--cache-from" "${1#--cache-from=}")
|
||||
shift 1
|
||||
;;
|
||||
--cache-to)
|
||||
DOCKERFILE_ARGS+=("--cache-to")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-to=*)
|
||||
DOCKERFILE_ARGS+=("--cache-to" "${1#--cache-to=}")
|
||||
shift 1
|
||||
;;
|
||||
--call)
|
||||
DOCKERFILE_ARGS+=("--call")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--call=*)
|
||||
DOCKERFILE_ARGS+=("--call" "${1#--call=}")
|
||||
shift 1
|
||||
;;
|
||||
--cgroup-parent)
|
||||
DOCKERFILE_ARGS+=("--cgroup-parent")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cgroup-parent=*)
|
||||
DOCKERFILE_ARGS+=("--cgroup-parent" "${1#--cgroup-parent=}")
|
||||
shift 1
|
||||
;;
|
||||
--label)
|
||||
DOCKERFILE_ARGS+=("--label")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--label=*)
|
||||
DOCKERFILE_ARGS+=("--label" "${1#--label=}")
|
||||
shift 1
|
||||
;;
|
||||
--network)
|
||||
DOCKERFILE_ARGS+=("--network")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--network=*)
|
||||
DOCKERFILE_ARGS+=("--network" "${1#--network=}")
|
||||
shift 1
|
||||
;;
|
||||
--platform)
|
||||
DOCKERFILE_ARGS+=("--platform")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--platform=*)
|
||||
DOCKERFILE_ARGS+=("--platform" "${1#--platform=}")
|
||||
shift 1
|
||||
;;
|
||||
--progress)
|
||||
DOCKERFILE_ARGS+=("--progress")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--progress=*)
|
||||
DOCKERFILE_ARGS+=("--progress" "${1#--progress=}")
|
||||
shift 1
|
||||
;;
|
||||
--provenance)
|
||||
DOCKERFILE_ARGS+=("--provenance")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--provenance=*)
|
||||
DOCKERFILE_ARGS+=("--provenance" "${1#--provenance=}")
|
||||
shift 1
|
||||
;;
|
||||
--sbom)
|
||||
DOCKERFILE_ARGS+=("--sbom")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--sbom=*)
|
||||
DOCKERFILE_ARGS+=("--sbom" "${1#--sbom=}")
|
||||
shift 1
|
||||
;;
|
||||
--secret)
|
||||
DOCKERFILE_ARGS+=("--secret")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--secret=*)
|
||||
DOCKERFILE_ARGS+=("--secret" "${1#--secret=}")
|
||||
shift 1
|
||||
;;
|
||||
--shm-size)
|
||||
DOCKERFILE_ARGS+=("--shm-size")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--shm-size=*)
|
||||
DOCKERFILE_ARGS+=("--shm-size" "${1#--shm-size=}")
|
||||
shift 1
|
||||
;;
|
||||
--ssh)
|
||||
DOCKERFILE_ARGS+=("--platform")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--ssh=*)
|
||||
DOCKERFILE_ARGS+=("--ssh" "${1#--ssh=}")
|
||||
shift 1
|
||||
;;
|
||||
--target)
|
||||
DOCKERFILE_ARGS+=("--target")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--target=*)
|
||||
DOCKERFILE_ARGS+=("--target" "${1#--target=}")
|
||||
shift 1
|
||||
;;
|
||||
--ulimit)
|
||||
DOCKERFILE_ARGS+=("--tag")
|
||||
DOCKERFILE_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--tag=*)
|
||||
DOCKERFILE_ARGS+=("--tag" "${1#--tag=}")
|
||||
shift 1
|
||||
;;
|
||||
--check | -D | --debug | --no-cache)
|
||||
DOCKERFILE_ARGS+=("$1")
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$1" ]]; then
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
eval "$(config_export app "$APP")"
|
||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" ${DOKKU_DOCKER_BUILD_OPTS} -t $IMAGE .
|
||||
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" "${DOCKERFILE_ARGS[@]}" --tag $IMAGE .
|
||||
|
||||
plugn trigger ports-set-detected "$APP" "$(fn-builder-dockerfile-get-detect-port-map "$APP" "$IMAGE" "$SOURCECODE_WORK_DIR/Dockerfile")"
|
||||
if fn-plugn-trigger-exists "post-build-dockerfile"; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -61,7 +61,10 @@ trigger-builder-herokuish-builder-build() {
|
||||
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
|
||||
if [[ -n "$DOKKU_TRACE" ]]; then
|
||||
DOCKER_ARGS+=" --env=TRACE=true "
|
||||
DOCKER_ARGS+=" --env=BUILDPACK_XTRACE=1 "
|
||||
fi
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
|
||||
declare -a ARG_ARRAY
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-lambda plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -27,30 +27,224 @@ trigger-builder-nixpacks-builder-build() {
|
||||
|
||||
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
no_cache="$(fn-builder-nixpacks-computed-no-cache "$APP")"
|
||||
NIXPACKS_ARGS=""
|
||||
if [[ "$no_cache" == "true" ]]; then
|
||||
NIXPACKS_ARGS="$NIXPACKS_ARGS --no-cache"
|
||||
fi
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
|
||||
# strip --link, --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/^--link=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--link[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/^--volume[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" -e "s/^-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
eval "$(config_export app "$APP" --merged)"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/Procfile" ]]; then
|
||||
if procfile-util exists --process-type release; then
|
||||
procfile-util delete --process-type release
|
||||
fi
|
||||
fi
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=" $DOKKU_GLOBAL_BUILD_ARGS"
|
||||
|
||||
DOCKER_ARGS=" $DOCKER_ARGS "
|
||||
eval set -- "$DOCKER_ARGS"
|
||||
|
||||
declare -a NIXPACKS_ARGS
|
||||
while true; do
|
||||
case "$1" in
|
||||
-t | --tag)
|
||||
NIXPACKS_ARGS+=("--tag")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-t=* | --tag=*)
|
||||
if [[ "$1" == "--tag=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--tag" "${1#--tag=}")
|
||||
elif [[ "$1" == "-t=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--tag" "${1#-t=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-i | --install-cmd)
|
||||
NIXPACKS_ARGS+=("--install-cmd")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-i=* | --install-cmd=*)
|
||||
if [[ "$1" == "--install-cmd=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--install-cmd" "${1#--install-cmd=}")
|
||||
elif [[ "$1" == "-i=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--install-cmd" "${1#-i=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-l | --label)
|
||||
NIXPACKS_ARGS+=("--label")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-l=* | --label=*)
|
||||
if [[ "$1" == "--label=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--label" "${1#--label=}")
|
||||
elif [[ "$1" == "-l=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--label" "${1#-l=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-b | --build-cmd)
|
||||
NIXPACKS_ARGS+=("--build-cmd")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-b=* | --build-cmd=*)
|
||||
if [[ "$1" == "--build-cmd=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--build-cmd" "${1#--build-cmd=}")
|
||||
elif [[ "$1" == "-b=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--build-cmd" "${1#-b=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-s | --start-cmd)
|
||||
NIXPACKS_ARGS+=("--start-cmd")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-s=* | --start-cmd=*)
|
||||
if [[ "$1" == "--start-cmd=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--start-cmd" "${1#--start-cmd=}")
|
||||
elif [[ "$1" == "-s=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--start-cmd" "${1#-s=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-p | --pkgs)
|
||||
NIXPACKS_ARGS+=("--pkgs")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-p=* | --pkgs=*)
|
||||
if [[ "$1" == "--pkgs=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--pkgs" "${1#--pkgs=}")
|
||||
elif [[ "$1" == "-p=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--pkgs" "${1#-p=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-a | --apt)
|
||||
NIXPACKS_ARGS+=("--apt")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-a=* | --apt=*)
|
||||
if [[ "$1" == "--apt=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--apt" "${1#--apt=}")
|
||||
elif [[ "$1" == "-a=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--apt" "${1#-a=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-e | --env)
|
||||
NIXPACKS_ARGS+=("--env")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-e=* | --env=*)
|
||||
if [[ "$1" == "--env=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--env" "${1#--env=}")
|
||||
elif [[ "$1" == "-e=*" ]]; then
|
||||
NIXPACKS_ARGS+=("--env" "${1#-e=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
--platform)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--platform=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-key)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-key=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--incremental-cache-image)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--incremental-cache-image=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--libs)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--libs=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-from)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-from=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--docker-host)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--docker-host=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--add-host)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--add-host=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--docker-tls-verify)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--docker-tls-verify=*)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
NIXPACKS_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--no-cache | --inline-cache | --no-error-without-start)
|
||||
NIXPACKS_ARGS+=("$1")
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$1" ]]; then
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
eval "$(config_export app "$APP" --merged)"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
if ! nixpacks build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" $NIXPACKS_ARGS --name "$IMAGE" "$SOURCECODE_WORK_DIR"; then
|
||||
if ! nixpacks build "${DOCKER_BUILD_LABEL_ARGS[@]}" "${NIXPACKS_ARGS[@]}" --name "$IMAGE" "$SOURCECODE_WORK_DIR"; then
|
||||
dokku_log_warn "Failure building image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -38,9 +38,6 @@ cmd-builder-nixpacks-report-single() {
|
||||
"--builder-nixpacks-computed-nixpackstoml-path: $(fn-builder-nixpacks-computed-nixpackstoml-path "$APP")"
|
||||
"--builder-nixpacks-global-nixpackstoml-path: $(fn-builder-nixpacks-global-nixpackstoml-path "$APP")"
|
||||
"--builder-nixpacks-nixpackstoml-path: $(fn-builder-nixpacks-nixpackstoml-path "$APP")"
|
||||
"--builder-nixpacks-computed-no-cache: $(fn-builder-nixpacks-computed-no-cache "$APP")"
|
||||
"--builder-nixpacks-global-no-cache: $(fn-builder-nixpacks-global-no-cache "$APP")"
|
||||
"--builder-nixpacks-no-cache: $(fn-builder-nixpacks-no-cache "$APP")"
|
||||
)
|
||||
|
||||
if [[ -z "$INFO_FLAG" ]]; then
|
||||
@@ -91,26 +88,3 @@ fn-builder-nixpacks-nixpackstoml-path() {
|
||||
|
||||
fn-plugin-property-get "builder-nixpacks" "$APP" "nixpackstoml-path" ""
|
||||
}
|
||||
|
||||
fn-builder-nixpacks-computed-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
file="$(fn-builder-nixpacks-no-cache "$APP")"
|
||||
if [[ "$file" == "" ]]; then
|
||||
file="$(fn-builder-nixpacks-global-no-cache "$APP")"
|
||||
fi
|
||||
|
||||
echo "$file"
|
||||
}
|
||||
|
||||
fn-builder-nixpacks-global-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-nixpacks" "--global" "no-cache" "false"
|
||||
}
|
||||
|
||||
fn-builder-nixpacks-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-nixpacks" "$APP" "no-cache" ""
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-nixpacks plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -9,13 +9,13 @@ cmd-builder-nixpacks-set() {
|
||||
declare cmd="builder-nixpacks:set"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY="$2" VALUE="$3"
|
||||
local VALID_KEYS=("nixpackstoml-path" "no-cache")
|
||||
local VALID_KEYS=("nixpackstoml-path")
|
||||
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
|
||||
|
||||
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
|
||||
|
||||
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
|
||||
dokku_log_fail "Invalid key specified, valid keys include: nixpackstoml-path, no-cache"
|
||||
dokku_log_fail "Invalid key specified, valid keys include: nixpackstoml-path"
|
||||
fi
|
||||
|
||||
if [[ -n "$VALUE" ]]; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-null plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -38,33 +38,261 @@ trigger-builder-pack-builder-build() {
|
||||
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
|
||||
|
||||
DOCKER_ARGS=" $DOCKER_ARGS "
|
||||
declare -a ARG_ARRAY
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
eval set -- "$DOCKER_ARGS"
|
||||
|
||||
declare -a PACK_ARGS
|
||||
while true; do
|
||||
case "$1" in
|
||||
--volume=* | -v=*)
|
||||
PACK_ARGS+=("$1")
|
||||
shift
|
||||
-b | --buildpack)
|
||||
PACK_ARGS+=("--buildpack")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-b=* | --buildpack=*)
|
||||
if [[ "$1" == "--buildpack=*" ]]; then
|
||||
PACK_ARGS+=("--buildpack" "${1#--buildpack=}")
|
||||
elif [[ "$1" == "-b=*" ]]; then
|
||||
PACK_ARGS+=("--buildpack" "${1#-b=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-r | --buildpack-registry)
|
||||
PACK_ARGS+=("--buildpack-registry")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-r=* | --buildpack-registry=*)
|
||||
if [[ "$1" == "--buildpack-registry=*" ]]; then
|
||||
PACK_ARGS+=("--buildpack-registry" "${1#--buildpack-registry=}")
|
||||
elif [[ "$1" == "-r=*" ]]; then
|
||||
PACK_ARGS+=("--buildpack-registry" "${1#-r=}")
|
||||
fi
|
||||
shift 2
|
||||
;;
|
||||
-e | --env)
|
||||
PACK_ARGS+=("--env")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-e=* | --env=*)
|
||||
if [[ "$1" == "--env=*" ]]; then
|
||||
PACK_ARGS+=("--env" "${1#--env=}")
|
||||
elif [[ "$1" == "-e=*" ]]; then
|
||||
PACK_ARGS+=("--env" "${1#-e=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
-t | --tag)
|
||||
PACK_ARGS+=("--tag")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-t=* | --tag=*)
|
||||
if [[ "$1" == "--tag=*" ]]; then
|
||||
PACK_ARGS+=("--tag" "${1#--tag=}")
|
||||
elif [[ "$1" == "-t=*" ]]; then
|
||||
PACK_ARGS+=("--tag" "${1#-t=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
--volume | -v)
|
||||
PACK_ARGS+=("--volume")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--volume=* | -v=*)
|
||||
if [[ "$1" == "--volume=*" ]]; then
|
||||
PACK_ARGS+=("--volume" "${1#--volume=}")
|
||||
elif [[ "$1" == "-v=*" ]]; then
|
||||
PACK_ARGS+=("--volume" "${1#-v=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
--cache)
|
||||
PACK_ARGS+=("--cache")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache=*)
|
||||
PACK_ARGS+=("--cache" "${1#--cache=}")
|
||||
shift 1
|
||||
;;
|
||||
--cache-image)
|
||||
PACK_ARGS+=("--cache-image")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-image=*)
|
||||
PACK_ARGS+=("--cache-image" "${1#--cache-image=}")
|
||||
shift 1
|
||||
;;
|
||||
--creation-time)
|
||||
PACK_ARGS+=("--creation-time")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--creation-time=*)
|
||||
PACK_ARGS+=("--creation-time" "${1#--creation-time=}")
|
||||
shift 1
|
||||
;;
|
||||
--env-file)
|
||||
PACK_ARGS+=("--env-file")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--env-file=*)
|
||||
PACK_ARGS+=("--env-file" "${1#--env-file=}")
|
||||
shift 1
|
||||
;;
|
||||
--extension)
|
||||
PACK_ARGS+=("--extension")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--extension=*)
|
||||
PACK_ARGS+=("--extension" "${1#--extension=}")
|
||||
shift 1
|
||||
;;
|
||||
--gid)
|
||||
PACK_ARGS+=("--gid")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--gid=*)
|
||||
PACK_ARGS+=("--gid" "${1#--gid=}")
|
||||
shift 1
|
||||
;;
|
||||
--insecure-registry)
|
||||
PACK_ARGS+=("--insecure-registry")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--insecure-registry=*)
|
||||
PACK_ARGS+=("--insecure-registry" "${1#--insecure-registry=}")
|
||||
shift 1
|
||||
;;
|
||||
--lifecycle-image)
|
||||
PACK_ARGS+=("--lifecycle-image")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--lifecycle-image=*)
|
||||
PACK_ARGS+=("--lifecycle-image" "${1#--lifecycle-image=}")
|
||||
shift 1
|
||||
;;
|
||||
--network)
|
||||
PACK_ARGS+=("--network")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--network=*)
|
||||
PACK_ARGS+=("--network" "${1#--network=}")
|
||||
shift 1
|
||||
;;
|
||||
--platform)
|
||||
PACK_ARGS+=("--platform")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--platform=*)
|
||||
PACK_ARGS+=("--platform" "${1#--platform=}")
|
||||
shift 1
|
||||
;;
|
||||
--post-buildpack)
|
||||
PACK_ARGS+=("--post-buildpack")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--post-buildpack=*)
|
||||
PACK_ARGS+=("--post-buildpack" "${1#--post-buildpack=}")
|
||||
shift 1
|
||||
;;
|
||||
--pre-buildpack)
|
||||
PACK_ARGS+=("--pre-buildpack")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--pre-buildpack=*)
|
||||
PACK_ARGS+=("--pre-buildpack" "${1#--pre-buildpack=}")
|
||||
shift 1
|
||||
;;
|
||||
--previous-image)
|
||||
PACK_ARGS+=("--previous-image")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--previous-image=*)
|
||||
PACK_ARGS+=("--previous-image" "${1#--previous-image=}")
|
||||
shift 1
|
||||
;;
|
||||
--pull-policy)
|
||||
PACK_ARGS+=("--pull-policy")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--pull-policy=*)
|
||||
PACK_ARGS+=("--pull-policy" "${1#--pull-policy=}")
|
||||
shift 1
|
||||
;;
|
||||
--run-image)
|
||||
PACK_ARGS+=("--run-image")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--run-image=*)
|
||||
PACK_ARGS+=("--run-image" "${1#--run-image=}")
|
||||
shift 1
|
||||
;;
|
||||
--uid)
|
||||
PACK_ARGS+=("--uid")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--uid=*)
|
||||
PACK_ARGS+=("--uid" "${1#--uid=}")
|
||||
shift 1
|
||||
;;
|
||||
--workspace)
|
||||
PACK_ARGS+=("--workspace")
|
||||
PACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--workspace=*)
|
||||
PACK_ARGS+=("--workspace" "${1#--workspace=}")
|
||||
shift 1
|
||||
;;
|
||||
--clear-cache | --disable-system-buildpacks | --publish | --trust-builder | --trust-extra-buildpacks | --userns-host)
|
||||
PACK_ARGS+=("$1")
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$1" ]]; then
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -n "$BUILDPACK_URL" ]; then
|
||||
PACK_ARGS+=("--builder")
|
||||
PACK_ARGS+=("$BUILDPACK_URL")
|
||||
elif [ -f "$SOURCECODE_WORK_DIR/.buildpacks" ]; then
|
||||
while read -r buildpack; do
|
||||
if [ -z "$buildpack" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
PACK_ARGS+=("--builder")
|
||||
PACK_ARGS+=("$buildpack")
|
||||
done <"$SOURCECODE_WORK_DIR/.buildpacks"
|
||||
fi
|
||||
|
||||
pack build "$IMAGE" --builder "$DOKKU_CNB_BUILDER" --path "$SOURCECODE_WORK_DIR" --default-process web "${PACK_ARGS[@]}" "${ENV_ARGS[@]}"
|
||||
docker-image-labeler relabel --label=dokku --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.image-stage=build --label=com.dokku.builder-type=pack --label=com.dokku.app-name=$APP "$IMAGE"
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@ trigger-builder-pack-builder-detect() {
|
||||
echo "pack"
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$(config_get "$APP" DOKKU_CNB_EXPERIMENTAL || true)" == "1" ]]; then
|
||||
echo "pack"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-builder-pack-builder-detect "$@"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
146
plugins/builder-railpack/builder-build
Executable file
146
plugins/builder-railpack/builder-build
Executable file
@@ -0,0 +1,146 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-builder-build() {
|
||||
declare desc="builder-railpack builder-build plugin trigger"
|
||||
declare trigger="builder-build"
|
||||
declare BUILDER_TYPE="$1" APP="$2" SOURCECODE_WORK_DIR="$3"
|
||||
|
||||
if [[ "$BUILDER_TYPE" != "railpack" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Building $APP from railpack"
|
||||
|
||||
if ! command -v "railpack" &>/dev/null; then
|
||||
dokku_log_fail "Missing railpack, install it"
|
||||
fi
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP")
|
||||
local DOCKER_BUILD_LABEL_ARGS=("--label=dokku" "--label=org.label-schema.schema-version=1.0" "--label=org.label-schema.vendor=dokku" "--label=com.dokku.image-stage=build" "--label=com.dokku.builder-type=railpack" "--label=com.dokku.app-name=$APP")
|
||||
|
||||
pushd "$SOURCECODE_WORK_DIR" &>/dev/null
|
||||
|
||||
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/Procfile" ]]; then
|
||||
if procfile-util exists --process-type release; then
|
||||
procfile-util delete --process-type release
|
||||
fi
|
||||
fi
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
|
||||
DOCKER_ARGS=" $DOCKER_ARGS "
|
||||
eval set -- "$DOCKER_ARGS"
|
||||
|
||||
declare -a RAILPACK_ARGS
|
||||
while true; do
|
||||
case "$1" in
|
||||
--platform)
|
||||
RAILPACK_ARGS+=("--platform")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--platform=*)
|
||||
RAILPACK_ARGS+=("--platform" "${1#--platform=}")
|
||||
shift 1
|
||||
;;
|
||||
--progress)
|
||||
RAILPACK_ARGS+=("--progress")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--progress=*)
|
||||
RAILPACK_ARGS+=("--progress" "${1#--progress=}")
|
||||
shift 1
|
||||
;;
|
||||
--cache-key)
|
||||
RAILPACK_ARGS+=("--cache-key")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--cache-key=*)
|
||||
RAILPACK_ARGS+=("--cache-key" "${1#--cache-key=}")
|
||||
shift 1
|
||||
;;
|
||||
-e | --env)
|
||||
RAILPACK_ARGS+=("--env")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
-e=* | --env=*)
|
||||
if [[ "$1" == "--env=*" ]]; then
|
||||
RAILPACK_ARGS+=("--env" "${1#--env=}")
|
||||
elif [[ "$1" == "--e=*" ]]; then
|
||||
RAILPACK_ARGS+=("--env" "${1#-e=}")
|
||||
fi
|
||||
shift 1
|
||||
;;
|
||||
--previous)
|
||||
RAILPACK_ARGS+=("--previous")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--previous=*)
|
||||
RAILPACK_ARGS+=("--previous" "${1#--previous=}")
|
||||
shift 1
|
||||
;;
|
||||
--build-cmd)
|
||||
RAILPACK_ARGS+=("--build-cmd")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--build-cmd=*)
|
||||
RAILPACK_ARGS+=("--build-cmd" "${1#--build-cmd=}")
|
||||
shift 1
|
||||
;;
|
||||
--start-cmd)
|
||||
RAILPACK_ARGS+=("--start-cmd")
|
||||
RAILPACK_ARGS+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
--start-cmd=*)
|
||||
RAILPACK_ARGS+=("--start-cmd" "${1#--start-cmd=}")
|
||||
shift 1
|
||||
;;
|
||||
---show-plan | --error-missing-start)
|
||||
RAILPACK_ARGS+=("$1")
|
||||
shift 1
|
||||
;;
|
||||
*)
|
||||
if [[ -n "$1" ]]; then
|
||||
shift
|
||||
continue
|
||||
fi
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
eval "$(config_export app "$APP" --merged)"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
if ! railpack build "${RAILPACK_ARGS[@]}" --name "$IMAGE-build" "$SOURCECODE_WORK_DIR"; then
|
||||
dokku_log_warn "Failure building image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build -f "$PLUGIN_AVAILABLE_PATH/builder-railpack/dockerfiles/builder-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE-build" "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -t "$IMAGE" "$SOURCECODE_WORK_DIR"; then
|
||||
"$DOCKER_BIN" image remove "$IMAGE-build"
|
||||
dokku_log_warn "Failure injecting docker labels and custom entrypoint on image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" image remove "$IMAGE-build"
|
||||
|
||||
plugn trigger post-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
}
|
||||
|
||||
trigger-builder-railpack-builder-build "$@"
|
||||
17
plugins/builder-railpack/builder-detect
Executable file
17
plugins/builder-railpack/builder-detect
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-builder-detect() {
|
||||
declare desc="builder-railpack builder-detect plugin trigger"
|
||||
declare trigger="builder-detect"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
|
||||
if [[ -f "$SOURCECODE_WORK_DIR/railpack.json" ]]; then
|
||||
echo "railpack"
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
trigger-builder-railpack-builder-detect "$@"
|
||||
30
plugins/builder-railpack/builder-release
Executable file
30
plugins/builder-railpack/builder-release
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-builder-release() {
|
||||
declare desc="builder-railpack builder-release plugin trigger"
|
||||
declare trigger="builder-release"
|
||||
declare BUILDER_TYPE="$1" APP="$2" IMAGE_TAG="$3"
|
||||
|
||||
if [[ "$BUILDER_TYPE" != "railpack" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
plugn trigger pre-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
|
||||
TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")"
|
||||
trap "rm -rf '$TMP_WORK_DIR' >/dev/null" RETURN INT TERM EXIT
|
||||
|
||||
local DOCKER_BUILD_LABEL_ARGS="--label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.app-name=$APP --label=com.dokku.image-stage=release --label=dokku"
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-railpack/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting docker labels on image"
|
||||
return 1
|
||||
fi
|
||||
|
||||
plugn trigger post-release-builder "$BUILDER_TYPE" "$APP" "$IMAGE"
|
||||
}
|
||||
|
||||
trigger-builder-railpack-builder-release "$@"
|
||||
15
plugins/builder-railpack/commands
Executable file
15
plugins/builder-railpack/commands
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/help-functions"
|
||||
|
||||
case "$1" in
|
||||
help | builder-railpack:help)
|
||||
cmd-builder-railpack-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
30
plugins/builder-railpack/core-post-extract
Executable file
30
plugins/builder-railpack/core-post-extract
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-core-post-extract() {
|
||||
declare desc="builder-railpack post-extract plugin trigger"
|
||||
declare trigger="post-extract"
|
||||
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
||||
local NEW_RAILPACK_JSON="$(fn-builder-railpack-computed-railpackjson-path "$APP")"
|
||||
|
||||
pushd "$TMP_WORK_DIR" >/dev/null
|
||||
|
||||
if [[ -z "$NEW_RAILPACK_JSON" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -f "$NEW_RAILPACK_JSON" ]]; then
|
||||
rm -f railpack.json
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$NEW_RAILPACK_JSON" != "railpack.json" ]]; then
|
||||
mv "$NEW_RAILPACK_JSON" railpack.json
|
||||
fi
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
}
|
||||
|
||||
trigger-builder-railpack-core-post-extract "$@"
|
||||
@@ -0,0 +1,4 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
ENTRYPOINT []
|
||||
@@ -0,0 +1,2 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
33
plugins/builder-railpack/help-functions
Executable file
33
plugins/builder-railpack/help-functions
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-help() {
|
||||
declare desc="help command"
|
||||
declare CMD="$1"
|
||||
local plugin_name="builder-railpack"
|
||||
local plugin_description="Manage the railpack builder integration for an app"
|
||||
|
||||
if [[ "$CMD" == "${plugin_name}:help" ]]; then
|
||||
echo -e "Usage: dokku ${plugin_name}[:COMMAND]"
|
||||
echo ''
|
||||
echo "$plugin_description"
|
||||
echo ''
|
||||
echo 'Additional commands:'
|
||||
fn-help-content | sort | column -c2 -t -s,
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
fn-help-content
|
||||
else
|
||||
cat <<help_desc
|
||||
$plugin_name, $plugin_description
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
fn-help-content() {
|
||||
declare desc="return help content"
|
||||
cat <<help_content
|
||||
builder-railpack:report [<app>] [<flag>], Displays a builder-railpack report for one or more apps
|
||||
builder-railpack:set <app> <property> (<value>), Set or clear a builder-railpack property for an app
|
||||
help_content
|
||||
}
|
||||
16
plugins/builder-railpack/install
Executable file
16
plugins/builder-railpack/install
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-install() {
|
||||
declare desc="installs the builder-railpack plugin"
|
||||
declare trigger="install"
|
||||
|
||||
fn-plugin-property-setup "builder-railpack"
|
||||
|
||||
mkdir -p "${DOKKU_LIB_ROOT}/data/builder-railpack"
|
||||
chown -R "${DOKKU_SYSTEM_USER}:${DOKKU_SYSTEM_GROUP}" "${DOKKU_LIB_ROOT}/data/builder-railpack"
|
||||
}
|
||||
|
||||
trigger-builder-railpack-install "$@"
|
||||
90
plugins/builder-railpack/internal-functions
Executable file
90
plugins/builder-railpack/internal-functions
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-report() {
|
||||
declare desc="displays a builder-railpack report for one or more apps"
|
||||
declare cmd="builder-railpack:report"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" INFO_FLAG="$2"
|
||||
|
||||
if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then
|
||||
INFO_FLAG="$APP"
|
||||
APP=""
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then
|
||||
INFO_FLAG="true"
|
||||
fi
|
||||
|
||||
if [[ -z "$APP" ]]; then
|
||||
for app in $(dokku_apps); do
|
||||
cmd-builder-railpack-report-single "$app" "$INFO_FLAG" | tee || true
|
||||
done
|
||||
else
|
||||
cmd-builder-railpack-report-single "$APP" "$INFO_FLAG"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd-builder-railpack-report-single() {
|
||||
declare APP="$1" INFO_FLAG="$2"
|
||||
if [[ "$INFO_FLAG" == "true" ]]; then
|
||||
INFO_FLAG=""
|
||||
fi
|
||||
verify_app_name "$APP"
|
||||
local flag_map=(
|
||||
"--builder-railpack-computed-railpackjson-path: $(fn-builder-railpack-computed-railpackjson-path "$APP")"
|
||||
"--builder-railpack-global-railpackjson-path: $(fn-builder-railpack-global-railpackjson-path "$APP")"
|
||||
"--builder-railpack-railpackjson-path: $(fn-builder-railpack-railpackjson-path "$APP")"
|
||||
)
|
||||
|
||||
if [[ -z "$INFO_FLAG" ]]; then
|
||||
dokku_log_info2_quiet "${APP} builder-railpack information"
|
||||
for flag in "${flag_map[@]}"; do
|
||||
key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')"
|
||||
dokku_log_verbose "$(printf "%-30s %-25s" "${key^}" "${flag#*: }")"
|
||||
done
|
||||
else
|
||||
local match=false
|
||||
local value_exists=false
|
||||
for flag in "${flag_map[@]}"; do
|
||||
valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)"
|
||||
if [[ "$flag" == "${INFO_FLAG}:"* ]]; then
|
||||
value=${flag#*: }
|
||||
size="${#value}"
|
||||
if [[ "$size" -ne 0 ]]; then
|
||||
echo "$value" && match=true && value_exists=true
|
||||
else
|
||||
match=true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
[[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}"
|
||||
[[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed"
|
||||
fi
|
||||
}
|
||||
|
||||
fn-builder-railpack-computed-railpackjson-path() {
|
||||
declare APP="$1"
|
||||
|
||||
file="$(fn-builder-railpack-railpackjson-path "$APP")"
|
||||
if [[ "$file" == "" ]]; then
|
||||
file="$(fn-builder-railpack-global-railpackjson-path "$APP")"
|
||||
fi
|
||||
|
||||
echo "$file"
|
||||
}
|
||||
|
||||
fn-builder-railpack-global-railpackjson-path() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-railpack" "--global" "railpackjson-path" "railpack.json"
|
||||
}
|
||||
|
||||
fn-builder-railpack-railpackjson-path() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-railpack" "$APP" "railpackjson-path" ""
|
||||
}
|
||||
4
plugins/builder-railpack/plugin.toml
Normal file
4
plugins/builder-railpack/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-railpack plugin"
|
||||
version = "0.36.7"
|
||||
[plugin.config]
|
||||
14
plugins/builder-railpack/post-app-clone-setup
Executable file
14
plugins/builder-railpack/post-app-clone-setup
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-post-app-clone-setup() {
|
||||
declare desc="sets up properties for new app"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-railpack" "$OLD_APP" "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-builder-railpack-post-app-clone-setup "$@"
|
||||
15
plugins/builder-railpack/post-app-rename-setup
Executable file
15
plugins/builder-railpack/post-app-rename-setup
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-post-app-rename-setup() {
|
||||
declare desc="updates settings for new app"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
fn-plugin-property-clone "builder-railpack" "$OLD_APP" "$NEW_APP"
|
||||
fn-plugin-property-destroy "builder-railpack" "$OLD_APP"
|
||||
}
|
||||
|
||||
trigger-builder-railpack-post-app-rename-setup "$@"
|
||||
15
plugins/builder-railpack/post-delete
Executable file
15
plugins/builder-railpack/post-delete
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-builder-railpack-post-delete() {
|
||||
declare desc="destroys the builder-railpack properties for a given app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "builder-railpack" "$APP"
|
||||
rm -rf "${DOKKU_LIB_ROOT}/data/builder-railpack/$APP"
|
||||
}
|
||||
|
||||
trigger-builder-railpack-post-delete "$@"
|
||||
6
plugins/builder-railpack/report
Executable file
6
plugins/builder-railpack/report
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-report-single "$@"
|
||||
6
plugins/builder-railpack/subcommands/default
Executable file
6
plugins/builder-railpack/subcommands/default
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/help-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-help "builder-railpack:help"
|
||||
6
plugins/builder-railpack/subcommands/report
Executable file
6
plugins/builder-railpack/subcommands/report
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-report "$@"
|
||||
30
plugins/builder-railpack/subcommands/set
Executable file
30
plugins/builder-railpack/subcommands/set
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-builder-railpack-set() {
|
||||
declare desc="set or clear a builder-railpack property for an app"
|
||||
declare cmd="builder-railpack:set"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY="$2" VALUE="$3"
|
||||
local VALID_KEYS=("railpackjson-path")
|
||||
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
|
||||
|
||||
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
|
||||
|
||||
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
|
||||
dokku_log_fail "Invalid key specified, valid keys include: railpackjson-path"
|
||||
fi
|
||||
|
||||
if [[ -n "$VALUE" ]]; then
|
||||
dokku_log_info2_quiet "Setting ${KEY} to ${VALUE}"
|
||||
fn-plugin-property-write "builder-railpack" "$APP" "$KEY" "$VALUE"
|
||||
else
|
||||
dokku_log_info2_quiet "Unsetting ${KEY}"
|
||||
fn-plugin-property-delete "builder-railpack" "$APP" "$KEY"
|
||||
fi
|
||||
}
|
||||
|
||||
cmd-builder-railpack-set "$@"
|
||||
@@ -21,9 +21,9 @@ require (
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pkg/sftp v1.13.5 // indirect
|
||||
github.com/ryanuber/columnize v2.1.2+incompatible // indirect
|
||||
golang.org/x/crypto v0.43.0 // indirect
|
||||
golang.org/x/sync v0.17.0 // indirect
|
||||
golang.org/x/sys v0.37.0 // indirect
|
||||
golang.org/x/crypto v0.45.0 // indirect
|
||||
golang.org/x/sync v0.18.0 // indirect
|
||||
golang.org/x/sys v0.38.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -45,20 +45,20 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
|
||||
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
|
||||
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
|
||||
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
|
||||
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
||||
golang.org/x/net v0.45.0 h1:RLBg5JKixCy82FtLJpeNlVM0nrSqpCRYzVU1n8kj0tM=
|
||||
golang.org/x/net v0.45.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY=
|
||||
golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
|
||||
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@@ -69,20 +69,20 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
|
||||
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
|
||||
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
|
||||
golang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=
|
||||
golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=
|
||||
golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.30.0 h1:yznKA/E9zq54KzlzBEAWn1NXSQ8DIp/NYMy88xJjl4k=
|
||||
golang.org/x/text v0.30.0/go.mod h1:yDdHFIX9t+tORqspjENWgzaCVXgk0yYnYuSZ8UzzBVM=
|
||||
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
|
||||
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.36.9"
|
||||
version = "0.37.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -109,7 +109,7 @@ func TriggerInstall() error {
|
||||
}
|
||||
|
||||
apps, err := common.UnfilteredDokkuApps()
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, common.NoAppsExist) {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SUBCOMMANDS = subcommands/add subcommands/clear subcommands/list subcommands/remove subcommands/report subcommands/set subcommands/set-property
|
||||
SUBCOMMANDS = subcommands/add subcommands/clear subcommands/detect subcommands/list subcommands/remove subcommands/report subcommands/set subcommands/set-property
|
||||
TRIGGERS = triggers/buildpack-stack-name triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/post-extract triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = buildpacks
|
||||
|
||||
@@ -63,3 +63,32 @@ func validBuildpackURL(buildpack string) (string, error) {
|
||||
|
||||
return buildpack, fmt.Errorf("Invalid buildpack specified: %v", buildpack)
|
||||
}
|
||||
|
||||
func checkoutBareGitRepo(sourceWorkDir string, branch string) (string, error) {
|
||||
tmpdir, err := os.MkdirTemp("", "bare-git-checkout")
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("Unable to create temporary directory: %s", err.Error())
|
||||
}
|
||||
|
||||
args := []string{
|
||||
"--git-dir=" + sourceWorkDir,
|
||||
"--work-tree=" + tmpdir,
|
||||
"checkout", "-f",
|
||||
}
|
||||
|
||||
if branch != "" {
|
||||
args = append(args, branch)
|
||||
}
|
||||
|
||||
result, err := common.CallExecCommand(common.ExecCommandInput{
|
||||
Command: "git",
|
||||
Args: args,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
os.RemoveAll(tmpdir)
|
||||
return "", fmt.Errorf("Unable to checkout bare git repository: %s", result.StderrContents())
|
||||
}
|
||||
|
||||
return tmpdir, nil
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user