Compare commits
228 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f47aaea03 | ||
|
|
ec30ca12f0 | ||
|
|
eed8a240b6 | ||
|
|
87c4627ff9 | ||
|
|
a6cad2cca4 | ||
|
|
092d6a2da4 | ||
|
|
4cfd22f498 | ||
|
|
53437289f3 | ||
|
|
31002c1029 | ||
|
|
2516c79264 | ||
|
|
d2cf2e7b91 | ||
|
|
19a5235ec6 | ||
|
|
c4c3edc167 | ||
|
|
0a1f787310 | ||
|
|
f4b1ce259a | ||
|
|
d5d2826773 | ||
|
|
8265517a96 | ||
|
|
ef043e2941 | ||
|
|
1abca18683 | ||
|
|
580ce20d77 | ||
|
|
4a1a2a326a | ||
|
|
e2d51bfeb3 | ||
|
|
1a727772c8 | ||
|
|
ffd821c5b0 | ||
|
|
f6167a0452 | ||
|
|
c98fe7b06b | ||
|
|
d6d785ccc7 | ||
|
|
9fcd41f349 | ||
|
|
56a3d9f9e8 | ||
|
|
d7b04e32b4 | ||
|
|
a74d2ea2aa | ||
|
|
aadded8913 | ||
|
|
61d5406c4c | ||
|
|
55527222ed | ||
|
|
bf7388377c | ||
|
|
8633110155 | ||
|
|
74a9a0f7d6 | ||
|
|
5739df650e | ||
|
|
e3cfaab92b | ||
|
|
d33da92e1f | ||
|
|
91b9c66e2d | ||
|
|
d953b578ec | ||
|
|
1e392582f6 | ||
|
|
0145fb2358 | ||
|
|
272f2a7e42 | ||
|
|
fad22e433b | ||
|
|
a1caa4b916 | ||
|
|
9439e0414c | ||
|
|
f7d85c57d0 | ||
|
|
602169e4e0 | ||
|
|
2352dde73b | ||
|
|
51e8a30304 | ||
|
|
48ac2278d9 | ||
|
|
dbd4ebac86 | ||
|
|
731181f14b | ||
|
|
37e5855620 | ||
|
|
3664ee75ea | ||
|
|
6b5cbc4a43 | ||
|
|
f5c1fa56e5 | ||
|
|
9247331d5d | ||
|
|
f64cf3bdfa | ||
|
|
ca312fe8f7 | ||
|
|
df8dd766b6 | ||
|
|
565f736a14 | ||
|
|
79d9076383 | ||
|
|
e1d67f795d | ||
|
|
32f13dcc9b | ||
|
|
2274eeafda | ||
|
|
4d22ccda78 | ||
|
|
c533700f73 | ||
|
|
f42596ad5d | ||
|
|
0c5887cc64 | ||
|
|
2119268ebc | ||
|
|
be9a608d3f | ||
|
|
ca893cdc4d | ||
|
|
0ab4e2bc99 | ||
|
|
9a7c8cdaf6 | ||
|
|
c9b9c2ab25 | ||
|
|
6e3631afeb | ||
|
|
36ade1ecd0 | ||
|
|
43c255436d | ||
|
|
a759b03739 | ||
|
|
4b0699023c | ||
|
|
991b6fdae0 | ||
|
|
159b01e5f8 | ||
|
|
efc35ab104 | ||
|
|
8c6736824d | ||
|
|
dcd85f577e | ||
|
|
89cff8957f | ||
|
|
83b89453a5 | ||
|
|
5553da1be1 | ||
|
|
41b0898db9 | ||
|
|
5a5531bce3 | ||
|
|
54e1b973a6 | ||
|
|
9597943b6b | ||
|
|
e98cbe93cf | ||
|
|
2f2d4f5dd6 | ||
|
|
5d24b10144 | ||
|
|
58772984cd | ||
|
|
4de97a1094 | ||
|
|
e470a880f9 | ||
|
|
4bae815f82 | ||
|
|
005eb2e11b | ||
|
|
bb5ab0a777 | ||
|
|
ea609801b5 | ||
|
|
a7c90c42cb | ||
|
|
54e324a4bc | ||
|
|
e641fae3c9 | ||
|
|
c277f529a0 | ||
|
|
68a280e0b6 | ||
|
|
2fd6767e5a | ||
|
|
0d26a90bf6 | ||
|
|
cdff4ae867 | ||
|
|
f34fd277b3 | ||
|
|
0ea9e7aa42 | ||
|
|
1cc8b3723d | ||
|
|
e0409caf75 | ||
|
|
883809f35e | ||
|
|
c26a49bb4e | ||
|
|
135497afda | ||
|
|
a9933c7f02 | ||
|
|
ff18061987 | ||
|
|
6d07fea704 | ||
|
|
e43927a69e | ||
|
|
ca55f58446 | ||
|
|
cf742bb3e0 | ||
|
|
79bce7d2d5 | ||
|
|
e50b941cee | ||
|
|
91c8e62da5 | ||
|
|
dc20a38756 | ||
|
|
34768ca5b4 | ||
|
|
5d8ccee919 | ||
|
|
4d07ac6d6b | ||
|
|
b026103ae2 | ||
|
|
b78431a800 | ||
|
|
e6f964bec1 | ||
|
|
c53d21c834 | ||
|
|
a78a865752 | ||
|
|
a1790d674c | ||
|
|
795d4941ee | ||
|
|
9cb54950fc | ||
|
|
50958fc448 | ||
|
|
4bd64dfd7b | ||
|
|
eaf641f9e3 | ||
|
|
10468ce47d | ||
|
|
55461f0149 | ||
|
|
eb9a75496c | ||
|
|
76dd78e441 | ||
|
|
87a008c86b | ||
|
|
64cc239d5b | ||
|
|
c8afdb553d | ||
|
|
1d2549e7d7 | ||
|
|
681dc93ad9 | ||
|
|
dd26850854 | ||
|
|
68d05b230d | ||
|
|
0d6bde2eff | ||
|
|
b9d3390289 | ||
|
|
d2b167d6ad | ||
|
|
ee08b8c0fd | ||
|
|
791d91d937 | ||
|
|
a411661ecb | ||
|
|
08e968b15e | ||
|
|
1bc63001db | ||
|
|
aff6ab8902 | ||
|
|
455c59a4b7 | ||
|
|
eb1f842254 | ||
|
|
d1e3f51df3 | ||
|
|
d9297f2534 | ||
|
|
c840fc5f9e | ||
|
|
77d9594c09 | ||
|
|
7c61b53cc8 | ||
|
|
b976cc60d2 | ||
|
|
a90c441095 | ||
|
|
ac2ea7597e | ||
|
|
d68eacced4 | ||
|
|
25469845e1 | ||
|
|
d4b484a33a | ||
|
|
59958181e4 | ||
|
|
92139a0cd3 | ||
|
|
0e1c3d5fc0 | ||
|
|
7df3e6241b | ||
|
|
0dad6a0e58 | ||
|
|
131567ba6d | ||
|
|
67273e1db0 | ||
|
|
5184704a31 | ||
|
|
c4c961bef1 | ||
|
|
60865c21d7 | ||
|
|
bfe552ee43 | ||
|
|
0134cd98d0 | ||
|
|
8f5a834cf0 | ||
|
|
4d18c8d9d9 | ||
|
|
78c1b1af5b | ||
|
|
e6a4bf81a1 | ||
|
|
ac38c9058c | ||
|
|
2b7da4a79d | ||
|
|
202d4ed042 | ||
|
|
628b68c0e2 | ||
|
|
daf86d0e8d | ||
|
|
ff6e7937b7 | ||
|
|
4e92e33395 | ||
|
|
2a21524a4a | ||
|
|
87bde84115 | ||
|
|
caaf19f5a3 | ||
|
|
b054143319 | ||
|
|
f2892208c1 | ||
|
|
38ca3eac1c | ||
|
|
fd0ac54e7e | ||
|
|
c4ccf57495 | ||
|
|
5148600ea0 | ||
|
|
b94f6cd9d0 | ||
|
|
52b095d7ac | ||
|
|
dfa7409486 | ||
|
|
ea51db27a2 | ||
|
|
58fd25ebf4 | ||
|
|
00925b6c09 | ||
|
|
54f74cccd0 | ||
|
|
5af90b76a3 | ||
|
|
07417af819 | ||
|
|
23a27d9fb7 | ||
|
|
2ad1572080 | ||
|
|
881d16ea90 | ||
|
|
dff13a8f1b | ||
|
|
c8897f42e4 | ||
|
|
b6cf0ac410 | ||
|
|
db476d3b51 | ||
|
|
f0c6f45596 | ||
|
|
b7a3ef2f8a | ||
|
|
e61421b53b |
26
.github/ISSUE_TEMPLATE/documentation.yaml
vendored
Normal file
26
.github/ISSUE_TEMPLATE/documentation.yaml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: Documentation Issue
|
||||
description: Let us know that something in the docs needs clarification
|
||||
labels: ["needs: investigation", "type: documentation"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Consider [sponsoring Dokku](https://github.com/sponsors/dokku). Sponsorship goes directly to supporting activities such as fixing bugs and general maintenance.
|
||||
- type: input
|
||||
id: docs-link
|
||||
attributes:
|
||||
label: Link to the documentation page
|
||||
description: Which docs page is impacted?
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Documentation problem
|
||||
description: Describe what you think is incorrect, not well documented, or missing from the documentation
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: report-output
|
||||
attributes:
|
||||
label: dokku report
|
||||
description: Please paste the output of the command `dokku report` so we know what systems any issue might apply to
|
||||
1
.github/commands/ci-setup
vendored
1
.github/commands/ci-setup
vendored
@@ -7,6 +7,7 @@ DOKKU_DOMAIN=${DOKKU_DOMAIN:="dokku.me"}
|
||||
echo "=====> set hostname"
|
||||
hostname
|
||||
internal_ip="$(ifconfig eth0 | grep 'inet ' | awk '{print $2}')"
|
||||
echo "CI_SERVER_IP=${internal_ip}" >>"$GITHUB_ENV"
|
||||
sudo hostname "$DOKKU_DOMAIN"
|
||||
echo "$DOKKU_DOMAIN" | sudo tee /etc/hostname
|
||||
hostname
|
||||
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
||||
PACKER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get changed files in the docs folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v42.0.5
|
||||
uses: tj-actions/changed-files@v44.0.0
|
||||
with:
|
||||
files: contrib/images/digitalocean/**
|
||||
- name: Run `packer validate`
|
||||
|
||||
178
HISTORY.md
178
HISTORY.md
@@ -1,5 +1,183 @@
|
||||
# History
|
||||
|
||||
## 0.34.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.34.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.34.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #6779: @josegonzalez Add --global flag to ps:set
|
||||
- #6778: @josegonzalez Popd out of tmp directory after a git push-based deployment
|
||||
- #6777: @josegonzalez Use correct function name in openresty:report output
|
||||
|
||||
### Documentation
|
||||
|
||||
- #6781: @josegonzalez Update builder management docs to warn that globally setting a builder will force all apps to use that builder
|
||||
- #6780: @josegonzalez Clarify ssh-keys commands to run when adding ssh keys in docker-based installation
|
||||
|
||||
### Other
|
||||
|
||||
- #6776: @josegonzalez Use a long git sha in the git:report output
|
||||
|
||||
## 0.34.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.34.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.34.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #6775: @josegonzalez Ensure files get created with the correct permissions when building with herokuish
|
||||
- #6739: @AndrewKvalheim Dereference annotated git tags when deploying via git:sync
|
||||
- #6743: @testwill Fix typo in app-json output
|
||||
|
||||
### New Features
|
||||
|
||||
- #6768: @josegonzalez Migrate away from transitional packages
|
||||
|
||||
### Documentation
|
||||
|
||||
- #6763: @iloveitaly Add docker-compose example to installation docs
|
||||
- #6757: @josegonzalez Add documentation issue template
|
||||
- #6742: @josegonzalez Remove trailing whitespace from history doc
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #6772: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 43.0.1 to 44.0.0
|
||||
- #6766: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.14 to 9.5.15 in /docs/_build
|
||||
- #6744: @dependabot[bot] chore(deps): bump github.com/docker/docker from 24.0.7+incompatible to 24.0.9+incompatible in /plugins/scheduler-k3s
|
||||
- #6754: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/dockerfile-app-json-formations
|
||||
- #6745: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/nodejs-express
|
||||
- #6746: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 43.0.0 to 43.0.1
|
||||
- #6747: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/.websocket.disabled
|
||||
- #6748: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/nodejs-express-noprocfile
|
||||
- #6749: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/nodejs-express-noappjson
|
||||
- #6750: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/dockerfile-procfile-bad
|
||||
- #6751: @dependabot[bot] chore(deps): bump importlib-metadata from 7.0.2 to 7.1.0 in /docs/_build
|
||||
- #6752: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/dockerfile-procfile
|
||||
- #6753: @dependabot[bot] chore(deps): bump express from 4.18.3 to 4.19.1 in /tests/apps/gitsubmodules
|
||||
- #6741: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.31.1 to 1.32.0 in /plugins/common
|
||||
- #6740: @dependabot[bot] chore(deps): bump github.com/onsi/gomega from 1.31.1 to 1.32.0 in /plugins/config
|
||||
|
||||
## 0.34.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.34.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.34.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
See the [0.34.0 migration guide](/docs/appendices/0.34.0-migration-guide.md) for more information on migrating to 0.34.0.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #6724: @josegonzalez Correctly check if a repository has code or not in git plugin
|
||||
- #6721: @josegonzalez Correct issue where cron properties cannot be retrieved if global
|
||||
- #6720: @josegonzalez Add nginx-property binary to gitignore
|
||||
- #6708: @josegonzalez Correctly handle quoted spaces over ssh
|
||||
- #6707: @josegonzalez Correct issue where removing by index failed due to incorrect input validation
|
||||
- #6705: @josegonzalez Ensure we cleanup the data directory on app deletion
|
||||
- #6703: @josegonzalez Use copytruncate in logrotate commands
|
||||
|
||||
### New Features
|
||||
|
||||
- #6725: @josegonzalez Warn when publish ports if scaling up or zero downtime is enabled
|
||||
- #6719: @josegonzalez Add a make target to copy the dokku binary over
|
||||
- #6717: @josegonzalez Add ability to only build synced repo if there are changes
|
||||
- #6715: @josegonzalez Add disk utilization to report output
|
||||
- #6704: @josegonzalez Switch the default k3s routing layer from traefik to nginx
|
||||
|
||||
### Removals
|
||||
|
||||
- #6700: @josegonzalez Remove priority property from traefik plugin
|
||||
|
||||
### Refactors
|
||||
|
||||
- #6714: @josegonzalez Use CallPlugnTrigger instead of PlugnTriggerSetup
|
||||
- #6713: @josegonzalez Use CallPlugnTrigger instead of PlugnTrigger
|
||||
- #6712: @josegonzalez Use CallPlugnTrigger instead of PlugnTriggerOutput
|
||||
- #6711: @josegonzalez Use CallPlugnTrigger instead of PlugnTriggerOutputAsString
|
||||
- #6681: @josegonzalez Migrate to single ingress per app/domain combination when using nginx for k3s proxying
|
||||
- #6156: @josegonzalez Migrate the app deploy lock to the data directory
|
||||
|
||||
### Documentation
|
||||
|
||||
- #6738: @josegonzalez Update migration guide for 0.34.x
|
||||
- #6731: @strugee Clarify alternate proxy support status
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #6736: @dependabot[bot] chore(deps): bump mkdocs-material from 9.5.13 to 9.5.14 in /docs/_build
|
||||
- #6729: @dependabot[bot] chore(deps): update markdown requirement from <3.6,>=3.2.1 to >=3.2.1,<3.7 in /docs/_build
|
||||
- #6728: @dependabot[bot] chore(deps): bump zipp from 3.17.0 to 3.18.1 in /docs/_build
|
||||
- #6727: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.1.0 to 43.0.0
|
||||
- #6723: @dependabot[bot] chore(deps): bump zipp from 3.17.0 to 3.18.0 in /docs/_build
|
||||
- #6722: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.1.0 to 43.0.0
|
||||
- #6710: @dependabot[bot] chore(deps): bump google.golang.org/protobuf from 1.32.0 to 1.33.0 in /plugins/scheduler-k3s
|
||||
- #6709: @dependabot[bot] chore(deps): bump zipp from 3.17.0 to 3.18.0 in /docs/_build
|
||||
|
||||
### Other
|
||||
|
||||
- #6718: @josegonzalez Write current process id to all acquired lock files
|
||||
- #6706: @josegonzalez Remove git:unlock command
|
||||
- #6650: @bastianh Do not expose all containers via traefik by default
|
||||
- #6632: @josegonzalez Simplify file ownership in the container by setting the process ownership during the build process
|
||||
- #6630: @josegonzalez Remove unused code for copying cache directories
|
||||
|
||||
## 0.33.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget -NP . https://dokku.com/install/v0.33.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.33.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #6695: @josegonzalez Do not attempt to install both k3s and traefik
|
||||
- #6687: @josegonzalez Correct issue where ClusterTriggerAuthentication objects were filtered based on prefix
|
||||
- #6686: @josegonzalez Validate input for the autoscaling-auth:set command
|
||||
- #6678: @josegonzalez Handle case where most builders didn't detect amd64 images on arm64
|
||||
- #6677: @josegonzalez Handle case where keda isn't installed properly
|
||||
- #6676: @josegonzalez Drop extra logging call from app-json plugin
|
||||
- #6674: @josegonzalez Remove systemd reverse dependency by dropping software-properties-common
|
||||
|
||||
### New Features
|
||||
|
||||
- #6698: @josegonzalez Upgrade ingress-nginx
|
||||
- #6588: @taraszka Add extra tags to every image dokku push when push-extra-tags are set
|
||||
- #6680: @josegonzalez Wait until helm charts are installed before marking a deploy as failed or completed
|
||||
|
||||
### Documentation
|
||||
|
||||
- #6699: @josegonzalez Add a placeholder migration guide for 0.33.0
|
||||
- #6682: @josegonzalez Fix reference to formation key in autoscaling example
|
||||
|
||||
### Tests
|
||||
|
||||
- #6696: @josegonzalez Run k3s tests with a specified server ip
|
||||
- #6679: @josegonzalez Split out k3s tests to speed up ci
|
||||
|
||||
### Dependencies
|
||||
|
||||
- #6697: @dependabot[bot] chore(deps): bump timberio/vector from 0.36.0-debian to 0.36.1-debian in /plugins/logs
|
||||
- #6685: @dependabot[bot] chore(deps): bump github.com/go-jose/go-jose/v3 from 3.0.1 to 3.0.3 in /plugins/scheduler-k3s
|
||||
- #6692: @dependabot[bot] chore(deps): bump packaging from 23.2 to 24.0 in /docs/_build
|
||||
- #6693: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.7 to 42.1.0
|
||||
- #6689: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.6 to 42.0.7
|
||||
- #6683: @dependabot[bot] chore(deps): bump importlib-metadata from 7.0.1 to 7.0.2 in /docs/_build
|
||||
- #6684: @dependabot[bot] chore(deps): bump tj-actions/changed-files from 42.0.5 to 42.0.6
|
||||
|
||||
## 0.33.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
7
Makefile
7
Makefile
@@ -75,9 +75,12 @@ go-clean:
|
||||
fi ;\
|
||||
done
|
||||
|
||||
copyfiles:
|
||||
$(MAKE) go-build || exit 1
|
||||
copydokku:
|
||||
cp dokku /usr/local/bin/dokku
|
||||
chmod 0755 /usr/local/bin/dokku
|
||||
|
||||
copyfiles: copydokku
|
||||
$(MAKE) go-build || exit 1
|
||||
mkdir -p ${CORE_PLUGINS_PATH} ${PLUGINS_PATH}
|
||||
rm -rf ${CORE_PLUGINS_PATH}/*
|
||||
test -d ${CORE_PLUGINS_PATH}/enabled || PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn init
|
||||
|
||||
@@ -86,8 +86,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.33.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.33.8 bash bootstrap.sh
|
||||
wget -NP . https://dokku.com/install/v0.34.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.34.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.
|
||||
|
||||
@@ -168,10 +168,6 @@ install-dokku-from-deb-package() {
|
||||
NO_INSTALL_RECOMMENDS=" --no-install-recommends "
|
||||
fi
|
||||
|
||||
echo "--> Initial apt-get update"
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
if ! command -v docker &>/dev/null; then
|
||||
echo "--> Installing docker"
|
||||
if uname -r | grep -q linode; then
|
||||
|
||||
@@ -96,11 +96,11 @@
|
||||
},
|
||||
{
|
||||
"name": "herokuish",
|
||||
"version": "0.7.3",
|
||||
"version": "0.8.0",
|
||||
"urls": {
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.7.3/herokuish_0.7.3_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.7.3/herokuish_0.7.3_linux_x86_64.tgz",
|
||||
"arm": "https://github.com/gliderlabs/herokuish/releases/download/v0.7.3/herokuish_0.7.3_linux_x86_64.tgz"
|
||||
"amd64": "https://github.com/gliderlabs/herokuish/releases/download/v0.8.0/herokuish_0.8.0_linux_x86_64.tgz",
|
||||
"arm64": "https://github.com/gliderlabs/herokuish/releases/download/v0.8.0/herokuish_0.8.0_linux_x86_64.tgz",
|
||||
"arm": "https://github.com/gliderlabs/herokuish/releases/download/v0.8.0/herokuish_0.8.0_linux_x86_64.tgz"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -188,9 +188,14 @@ main() {
|
||||
[[ " storage:ensure-directory " == *" $CMD "* ]] && unset APP
|
||||
[[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP
|
||||
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
|
||||
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
||||
if [[ -n "$@" ]] && [[ -n "$APP" ]]; then
|
||||
set -- "$APP" "$@"
|
||||
set -- "--app" "$@"
|
||||
fi
|
||||
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
||||
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@ || {
|
||||
local ssh_args=("-o" "LogLevel=QUIET" "-p" "$DOKKU_PORT" "-t" "dokku@$DOKKU_REMOTE_HOST" "--")
|
||||
ssh_args+=("$@")
|
||||
ssh "${ssh_args[@]}" || {
|
||||
ssh_exit_code="$?"
|
||||
echo " ! Failed to execute dokku command over ssh: exit code $?" 1>&2
|
||||
echo " ! If there was no output from Dokku, ensure your configured SSH Key can connect to the remote server" 1>&2
|
||||
|
||||
@@ -4,12 +4,10 @@ set -o errexit
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
pkgs=(apt-transport-https
|
||||
ca-certificates
|
||||
pkgs=(ca-certificates
|
||||
curl
|
||||
jq
|
||||
linux-image-extra-virtual
|
||||
software-properties-common
|
||||
)
|
||||
|
||||
echo '--> Updating apt repositories'
|
||||
|
||||
@@ -15,7 +15,6 @@ pkgs=(apache2-utils
|
||||
netcat
|
||||
net-tools
|
||||
|
||||
software-properties-common
|
||||
parallel
|
||||
python3-software-properties
|
||||
rsync
|
||||
@@ -25,7 +24,7 @@ pkgs=(apache2-utils
|
||||
unzip
|
||||
|
||||
nginx
|
||||
dnsutils
|
||||
bind9-dnsutils
|
||||
cgroupfs-mount
|
||||
cgroup-lite
|
||||
sudo
|
||||
|
||||
4
deb.mk
4
deb.mk
@@ -11,10 +11,6 @@ endif
|
||||
.PHONY: install-from-deb deb-all deb-dokku deb-setup
|
||||
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
@echo "--> Installing docker"
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
|
||||
6
debian/control
vendored
6
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.33.8
|
||||
Version: 0.34.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, software-properties-common, parallel, procfile-util, python-software-properties | python3-software-properties, rsync, rsyslog, dos2unix, jq, unzip, util-linux
|
||||
Depends: apache2-utils, locales, git, cpio, curl, man-db, netcat, sshcommand, docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, docker-compose-plugin | moby-compose, docker-buildx-plugin | moby-buildx, docker-container-healthchecker, docker-image-labeler, lambda-builder, net-tools, netrc, parallel, procfile-util, rsync, rsyslog, dos2unix, jq, unzip, util-linux
|
||||
Recommends: herokuish, bash-completion, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python3, debconf
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, bind9-dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
Dokku is an extensible, open source Platform as a Service
|
||||
|
||||
10
docs/_build/requirements.txt
vendored
10
docs/_build/requirements.txt
vendored
@@ -1,16 +1,16 @@
|
||||
beautifulsoup4==4.12.3
|
||||
click==8.1.7
|
||||
ghp-import==2.1.0
|
||||
importlib-metadata==7.0.1
|
||||
importlib-metadata==7.1.0
|
||||
Jinja2==3.1.3
|
||||
Markdown>=3.2.1,<3.6
|
||||
Markdown>=3.2.1,<3.7
|
||||
MarkupSafe==2.1.5
|
||||
mergedeep==1.3.4
|
||||
mkdocs==1.5.3
|
||||
mkdocs-exclude==1.0.2
|
||||
mkdocs-material==9.5.13
|
||||
mkdocs-material==9.5.15
|
||||
mkdocs-material-extensions==1.3.1
|
||||
packaging==23.2
|
||||
packaging==24.0
|
||||
Pygments==2.17.2
|
||||
pymdown-extensions==10.7.1
|
||||
pyparsing==3.1.2
|
||||
@@ -20,4 +20,4 @@ pyyaml_env_tag==0.1
|
||||
six==1.16.0
|
||||
soupsieve==2.5
|
||||
watchdog==4.0.0
|
||||
zipp==3.17.0
|
||||
zipp==3.18.1
|
||||
|
||||
@@ -36,35 +36,35 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.33.8 enabled dokku core standard plugin
|
||||
20_events 0.33.8 enabled dokku core events logging plugin
|
||||
app-json 0.33.8 enabled dokku core app-json plugin
|
||||
apps 0.33.8 enabled dokku core apps plugin
|
||||
build-env 0.33.8 enabled dokku core build-env plugin
|
||||
buildpacks 0.33.8 enabled dokku core buildpacks plugin
|
||||
certs 0.33.8 enabled dokku core certificate management plugin
|
||||
checks 0.33.8 enabled dokku core checks plugin
|
||||
common 0.33.8 enabled dokku core common plugin
|
||||
config 0.33.8 enabled dokku core config plugin
|
||||
docker-options 0.33.8 enabled dokku core docker-options plugin
|
||||
domains 0.33.8 enabled dokku core domains plugin
|
||||
enter 0.33.8 enabled dokku core enter plugin
|
||||
git 0.33.8 enabled dokku core git plugin
|
||||
logs 0.33.8 enabled dokku core logs plugin
|
||||
network 0.33.8 enabled dokku core network plugin
|
||||
nginx-vhosts 0.33.8 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.33.8 enabled dokku core plugin plugin
|
||||
proxy 0.33.8 enabled dokku core proxy plugin
|
||||
ps 0.33.8 enabled dokku core ps plugin
|
||||
repo 0.33.8 enabled dokku core repo plugin
|
||||
resource 0.33.8 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.33.8 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.33.8 enabled dokku core shell plugin
|
||||
ssh-keys 0.33.8 enabled dokku core ssh-keys plugin
|
||||
storage 0.33.8 enabled dokku core storage plugin
|
||||
tags 0.33.8 enabled dokku core tags plugin
|
||||
tar 0.33.8 enabled dokku core tar plugin
|
||||
trace 0.33.8 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.34.2 enabled dokku core standard plugin
|
||||
20_events 0.34.2 enabled dokku core events logging plugin
|
||||
app-json 0.34.2 enabled dokku core app-json plugin
|
||||
apps 0.34.2 enabled dokku core apps plugin
|
||||
build-env 0.34.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.34.2 enabled dokku core buildpacks plugin
|
||||
certs 0.34.2 enabled dokku core certificate management plugin
|
||||
checks 0.34.2 enabled dokku core checks plugin
|
||||
common 0.34.2 enabled dokku core common plugin
|
||||
config 0.34.2 enabled dokku core config plugin
|
||||
docker-options 0.34.2 enabled dokku core docker-options plugin
|
||||
domains 0.34.2 enabled dokku core domains plugin
|
||||
enter 0.34.2 enabled dokku core enter plugin
|
||||
git 0.34.2 enabled dokku core git plugin
|
||||
logs 0.34.2 enabled dokku core logs plugin
|
||||
network 0.34.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.34.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.34.2 enabled dokku core plugin plugin
|
||||
proxy 0.34.2 enabled dokku core proxy plugin
|
||||
ps 0.34.2 enabled dokku core ps plugin
|
||||
repo 0.34.2 enabled dokku core repo plugin
|
||||
resource 0.34.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.34.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.34.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.34.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.34.2 enabled dokku core storage plugin
|
||||
tags 0.34.2 enabled dokku core tags plugin
|
||||
tar 0.34.2 enabled dokku core tar plugin
|
||||
trace 0.34.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
|
||||
@@ -135,3 +135,34 @@ dokku registry:set node-js-app push-on-release
|
||||
# globally
|
||||
dokku registry:set --global push-on-release
|
||||
```
|
||||
|
||||
### Push extra tags
|
||||
|
||||
To push the image on release with extra tags, set the `push-extra-tags` to a comma-separated list of tags via the `registry:set` command. The default value for this property is empty. Setting the property will result in the image being tagged with extra tags every release.
|
||||
|
||||
```shell
|
||||
# multiple-tags
|
||||
dokku registry:set node-js-app push-extra-tags foo,bar
|
||||
```
|
||||
The `push-extra-tags` can be set to a single tag too.
|
||||
|
||||
```shell
|
||||
# single tag
|
||||
dokku registry:set node-js-app push-extra-tags foo
|
||||
```
|
||||
|
||||
This property can be set for a single app or globally via the `--global` flag. When set globally, the app-specific value will always overide the global value. The default global value for this property is `false`.
|
||||
|
||||
```shell
|
||||
dokku registry:set --global push-extra-tags foo,bar
|
||||
```
|
||||
|
||||
Setting the property value to an empty string will reset the value to the system default. Resetting the value can be done per app or globally.
|
||||
|
||||
```shell
|
||||
# per-app
|
||||
dokku registry:set node-js-app push-extra-tags
|
||||
|
||||
# globally
|
||||
dokku registry:set --global push-extra-tags
|
||||
```
|
||||
|
||||
3
docs/appendices/0.33.0-migration-guide.md
Normal file
3
docs/appendices/0.33.0-migration-guide.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 0.33.0 Migration Guide
|
||||
|
||||
Dokku 0.33.0 did not introduce any refactors, removals, or deprecations, and focused solely on system improvements.
|
||||
19
docs/appendices/0.34.0-migration-guide.md
Normal file
19
docs/appendices/0.34.0-migration-guide.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# 0.34.0 Migration Guide
|
||||
|
||||
## Removals
|
||||
|
||||
- The `disable-chown` property of the `scheduler-docker-local` plugin has been removed. Mounted paths will no longer have file permissions changed during the pre-deploy phase. Files baked into the container image for herokuish builds will always be owned by the correct user.
|
||||
- The `git:unlock` command has been removed. It was previously used to "unlock" a temporary directory that already existed. The directory the `git:unlock` command used to cleanup is now properly removed on exit of the `git:from-image` command.
|
||||
- The k3s plugin no longer supports port mappings other than `https:443` and `http:80`. If no matching port map is specified, Dokku will use expose the app on the first port mapping, with priority given to `https` mappings over `http`.
|
||||
- Golang functions to invoke plugin triggers named `PlugnTrigger*` have been removed in favor of `CallPlugnTrigger`.
|
||||
|
||||
## Changes
|
||||
|
||||
- The k3s scheduler now creates an Ingress object per domain instead of one per port mapping. This will cause a short amount of downtime during the next app deploy after upgrading to 0.34.0
|
||||
- App lock files have been removed from the `/home/dokku` directory and moved into the `data/apps` directory.
|
||||
- Logs are now rotated via `copytruncate` instead of `create` in logrotate.
|
||||
- The k3s scheduler now defaults to nginx as it's default proxy implementation. The traefik proxy implementation is still available, though users will need to set the global `ingress-class` k3s property to `traefik` via the following command:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:set --global ingress-class traefik
|
||||
```
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.33.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.34.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"0.30.11",
|
||||
"0.31.5",
|
||||
"0.32.4",
|
||||
"0.33.8"
|
||||
"0.33.9",
|
||||
"0.34.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ The `selected` property can also be set globally. The global default is an empty
|
||||
dokku builder:set --global selected herokuish
|
||||
```
|
||||
|
||||
> [!WARNING]
|
||||
> Selecting a global builder will result in _all_ applications using that builder unless a manual override is selected.
|
||||
|
||||
The default value may be set by passing an empty value for the option.
|
||||
|
||||
```shell
|
||||
|
||||
@@ -10,13 +10,12 @@ git:from-archive [--archive-type ARCHIVE_TYPE] <app> <archive-url> [<git-usernam
|
||||
git:from-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a given docker image
|
||||
git:generate-deploy-key # Generates a deploy ssh key
|
||||
git:load-image [--build-dir DIRECTORY] <app> <docker-image> [<git-username> <git-email>] # Updates an app's git repository with a docker image loaded from stdin
|
||||
git:sync [--build] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
|
||||
git:sync [--build|build-if-changes] <app> <repository> [<git-ref>] # Clone or fetch an app from remote git repo
|
||||
git:initialize <app> # Initialize a git repository for an app
|
||||
git:public-key # Outputs the dokku public deploy key
|
||||
git:report [<app>] [<flag>] # Displays a git report for one or more apps
|
||||
git:set <app> <key> (<value>) # Set or clear a git property for an app
|
||||
git:status <app> # Show the working tree status for an app
|
||||
git:unlock <app> [--force] # Removes previous git clone folder for new deployment
|
||||
```
|
||||
|
||||
Git-based deployment has been the traditional method of deploying applications in Dokku. As of v0.12.0, Dokku introduces a few ways to customize the experience of deploying via `git push`. A Git-based deployment currently supports building applications via:
|
||||
@@ -158,6 +157,12 @@ By default, this command does not trigger an application build. To do so during
|
||||
dokku git:sync --build node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||
```
|
||||
|
||||
When running `git:sync` without a reference, it may be useful to only build when there are changes. To do so, specify the `--build-if-changes` flag.
|
||||
|
||||
```shell
|
||||
dokku git:sync --build-if-changes node-js-app https://github.com/heroku/node-js-getting-started.git
|
||||
```
|
||||
|
||||
### Initializing from private repositories
|
||||
|
||||
> [!IMPORTANT]
|
||||
|
||||
@@ -32,20 +32,6 @@ dokku scheduler:set node-js-app selected
|
||||
|
||||
Many builders only produce amd64-compatible images. The docker-local scheduler will automatically detect these and run them via the `--platform=linux/amd64` on arm64 deploy targets.
|
||||
|
||||
### Disabling chown of persistent storage
|
||||
|
||||
The `scheduler-docker-local` plugin will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. You may disable this by running the following `scheduler-docker-local:set` command for your application:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app disable-chown true
|
||||
```
|
||||
|
||||
Once set, you may re-enable it by setting a blank value for `disable-chown`:
|
||||
|
||||
```shell
|
||||
dokku scheduler-docker-local:set node-js-app disable-chown
|
||||
```
|
||||
|
||||
### Disabling the init process
|
||||
|
||||
The `scheduler-docker-local` injects an init process by default via the `--init`. For some apps - such as those where the built docker image uses S6 as the init - this may be undesirable and cause issues with process starts. You may disable this by running the following `scheduler-docker-local:set` command for your application:
|
||||
|
||||
@@ -58,12 +58,12 @@ By default, Dokku will attempt to auto-detect the IP address of the server. In c
|
||||
dokku scheduler-k3s:initialize --server-ip 192.168.20.15
|
||||
```
|
||||
|
||||
Dokku's k3s integration natively uses `Traefik` as it's ingress load balancer via [Traefik's CRDs](https://doc.traefik.io/traefik/providers/kubernetes-crd/), but a cluster can be set to use `nginx` via the [ingress-nginx](https://github.com/kubernetes/ingress-nginx) project. Switching to nginx will result in any `nginx` plugin settings being respected, either by turning them into annotations or creating a custom server snippet.
|
||||
Dokku's k3s integration natively uses `nginx` as it's ingress load balancer via [ingress-nginx](https://github.com/kubernetes/ingress-nginx). Properties set by the `nginx` plugin will be respected, either by turning them into annotations or creating a custom server/location snippet that the `ingress-nginx` project can use.
|
||||
|
||||
To change the ingress, set the `--ingress-class` flag:
|
||||
Dokku can also use Traefik on cluster initialization via the [Traefik's CRDs](https://doc.traefik.io/traefik/providers/kubernetes-crd/). To change the ingress, set the `--ingress-class` flag:
|
||||
|
||||
```shell
|
||||
dokku scheduler-k3s:initialize --ingress-class nginx
|
||||
dokku scheduler-k3s:initialize --ingress-class traefik
|
||||
```
|
||||
|
||||
### Adding nodes to the cluster
|
||||
@@ -365,7 +365,7 @@ dokku scheduler-k3s:labels:set node-js-app label.key --resource-type deployment
|
||||
|
||||
Autoscaling in k3s is managed by [Keda](https://keda.sh/), which integrates with a variety of external metric providers to allow for autoscaling application workloads.
|
||||
|
||||
To enable autoscaling, use the `app.json` `formations.$PROCESS_TYPE.autoscaling` key to manage rules. In addition to the existing configuration used for process management, each process type in the `formations.$PROCESS_TYPE.autoscaling` key can have the following keys:
|
||||
To enable autoscaling, use the `app.json` `formation.$PROCESS_TYPE.autoscaling` key to manage rules. In addition to the existing configuration used for process management, each process type in the `formation.$PROCESS_TYPE.autoscaling` key can have the following keys:
|
||||
|
||||
- `min_quantity`: The minimum number of instances the application can run. If not specified, the `quantity` specified for the app is used.
|
||||
- `max_quantity`: The maximum number of instances the application can run. If not specified, the higher value of `quantity` and the `min_quantity` is used.
|
||||
@@ -377,7 +377,7 @@ Autoscaling triggers are passed as is to Keda, and should match the configuratio
|
||||
|
||||
```json
|
||||
{
|
||||
"formations": {
|
||||
"formation": {
|
||||
"web": {
|
||||
"autoscaling": {
|
||||
"min_quantity": 1,
|
||||
|
||||
@@ -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.33.8-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.34.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,10 +3,6 @@
|
||||
As of 0.3.18, Dokku defaults to being installed via Debian package. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` Bash script. The following are the steps run by said script:
|
||||
|
||||
```shell
|
||||
# install prerequisites
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
# install docker
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.33.8
|
||||
docker pull dokku/dokku:0.34.2
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -19,7 +19,30 @@ 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.33.8
|
||||
dokku/dokku:0.34.2
|
||||
```
|
||||
|
||||
Alternatively, you can use `docker-compose.yml`:
|
||||
|
||||
```yaml
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
dokku:
|
||||
image: dokku/dokku:0.34.2
|
||||
container_name: dokku
|
||||
ports:
|
||||
- "3022:22"
|
||||
- "8080:80"
|
||||
- "8443:443"
|
||||
volumes:
|
||||
- "/var/lib/dokku:/mnt/dokku"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
environment:
|
||||
DOKKU_HOSTNAME: dokku.me
|
||||
DOKKU_HOST_ROOT: /var/lib/dokku/home/dokku
|
||||
DOKKU_LIB_HOST_ROOT: /var/lib/dokku/var/lib/dokku
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
The above command will start a new docker container that is ready when a message similar to `Runit started as PID 12345` appears.
|
||||
@@ -61,19 +84,25 @@ redis: https://github.com/dokku/dokku-redis.git
|
||||
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.
|
||||
|
||||
```Dockerfile
|
||||
FROM dokku/dokku:0.33.8
|
||||
FROM dokku/dokku:0.34.2
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
|
||||
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis
|
||||
```
|
||||
|
||||
## SSH Key Management
|
||||
|
||||
To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.
|
||||
To initialize ssh-keys within the container, use `docker exec` to enter the container:
|
||||
|
||||
```shell
|
||||
docker exec -it dokku bash
|
||||
```
|
||||
|
||||
Next, run the appropriate ssh-keys commands:
|
||||
|
||||
```shell
|
||||
echo "$CONTENTS_OF_YOUR_PUBLIC_SSH_KEY_HERE" | dokku ssh-keys:add KEY_NAME
|
||||
```
|
||||
|
||||
Please see the [user management documentation](/docs/deployment/user-management.md) for more information.
|
||||
|
||||
## Pushing Applications
|
||||
|
||||
@@ -37,8 +37,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.33.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.33.8 bash bootstrap.sh
|
||||
wget -NP . https://dokku.com/install/v0.34.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.34.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.34](/docs/appendices/0.34.0-migration-guide.md)
|
||||
- [Upgrading to 0.33](/docs/appendices/0.33.0-migration-guide.md)
|
||||
- [Upgrading to 0.32](/docs/appendices/0.32.0-migration-guide.md)
|
||||
- [Upgrading to 0.31](/docs/appendices/0.31.0-migration-guide.md)
|
||||
- [Upgrading to 0.30](/docs/appendices/0.30.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.33.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.34.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.34.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.34.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.34.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.34.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.34.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.34.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.34.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.34.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8</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.34.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.33.8 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.34.2 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
@@ -226,8 +226,8 @@
|
||||
</svg>
|
||||
Create</a>
|
||||
<a class="nav-link" id="nav-deploy-tab" data-bs-toggle="tab" href="#nav-deploy" role="tab" aria-controls="nav-deploy" aria-selected="false">
|
||||
<svg width="32" height="32" viewBox="0 0.33.82" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.33.8 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<svg width="32" height="32" viewBox="0 0.34.22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M29.8709 1.40551C29.8591 1.34642 29.8311 1.29205 29.7903 1.24881C29.7495 1.20556 29.6976 1.17524 29.6407 1.16141C25.8466 0.20375 17.082 3.61605 12.3285 8.51812C11.4813 9.38524 10.7088 10.3268 10.0198 11.3321C8.55457 11.1953 7.08939 11.3105 5.84189 11.8721C2.31916 13.4706 1.29423 17.6454 1.00817 19.4376C0.992669 19.5358 0.999288 19.6364 1.02751 19.7315C1.05574 19.8267 1.10481 19.9138 1.17093 19.9862C1.23705 20.0586 1.31844 20.1144 1.40878 20.1491C1.49913 20.1838 1.59601 20.1966 1.69192 20.1865L7.34824 19.5456C7.35215 19.9859 7.37777 20.4257 7.42498 20.8633C7.4545 21.1658 7.58527 21.4482 7.79477 21.6618L9.98487 23.9221C10.1921 24.1384 10.466 24.2734 10.7593 24.3037C11.1808 24.3522 11.6044 24.3786 12.0285 24.3829L11.4082 30.2153C11.3985 30.34.2 11.411 30.414 11.4446 30.507C11.4783 30.6001 11.5323 30.684 11.6023 30.7521C11.6724 30.8202 11.7567 30.8708 11.8487 30.9C11.9408 30.9291 12.0381 30.936 12.1331 30.9202C13.8704 30.6322 17.9241 29.5744 19.4639 25.9396C20.0081 24.6508 20.1198 23.1466 19.9942 21.6417C20.9712 20.9312 21.8861 20.134 22.7285 19.2591C27.4994 14.3627 30.7849 5.51625 29.8709 1.40551ZM18.4878 12.9162C18.0711 12.4862 17.7873 11.9384 17.6723 11.3419C17.5573 10.7455 17.6162 10.1273 17.8417 9.56541C18.0672 9.00356 18.449 8.52333 18.939 8.18546C19.4289 7.84759 20.005 7.66725 20.5942 7.66725C21.1835 7.66725 21.7595 7.84759 22.2494 8.18546C22.7394 8.52333 23.1212 9.00356 23.3467 9.56541C23.5722 10.1273 23.6311 10.7455 23.5161 11.3419C23.4011 11.9384 23.1173 12.4862 22.7006 12.9162C22.4242 13.202 22.0959 13.4288 21.7344 13.5835C21.373 13.7383 20.9855 13.8179 20.5942 13.8179C20.2029 13.8179 19.8154 13.7383 19.454 13.5835C19.0926 13.4288 18.7642 13.202 18.4878 12.9162Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M5.29982 22.8765C4.60428 22.9646 3.95721 23.29 3.46136 23.801C2.232 25.074 2.11548 29.7889 2.11548 29.7889C2.11548 29.7889 6.68686 29.6687 7.91692 28.3985C8.41409 27.8876 8.72993 27.2187 8.81347 26.4997" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
Deploy</a>
|
||||
@@ -382,11 +382,11 @@
|
||||
<path d="M349.4,526.666C349.111,527.157,348.412,528.058,348.297,529.367C348.275,529.592,348.093,529.731,348.121,529.384C348.246,528.107,348.805,527.306,349.23,526.61C349.422,526.327,349.513,526.459,349.402,526.667L349.4,526.666Z" fill="#002B64" transform="translate(348.784,528.021) translate(-348.784,-528.021)"/>
|
||||
<path d="M349.112,526.377C348.782,526.842,347.705,527.923,347.479,529.217C347.439,529.438,347.245,529.564,347.302,529.219C347.535,527.956,348.464,526.962,348.943,526.301C349.159,526.035,349.238,526.174,349.111,526.372L349.112,526.377Z" fill="#002B64" transform="translate(348.232,527.793) translate(-348.232,-527.793)"/>
|
||||
<path d="M348.823,526.088C348.43,526.504,347.147,527.879,346.743,529.122C346.671,529.335,346.462,529.431,346.567,529.098C346.974,527.879,348.098,526.568,348.667,525.978C348.918,525.745,348.976,525.894,348.823,526.072L348.823,526.088Z" fill="#002B64" transform="translate(347.723,527.587) translate(-347.723,-527.587)"/>
|
||||
<path d="M336.092,563.3L336.092,570.461L335.188,570.461L335.188,569.233C334.368,570.213,333.434,570.704,332.388,570.704C331.334,570.704,330.444,570.33.829.726,569.584C329.005,568.829,328.647,567.934,328.647,566.899C328.647,565.855,329.012,564.964,329.739,564.237C330.467,563.491,331.341,563.117,332.356,563.117C333.526,563.117,334.474,563.617,335.202,564.615L335.202,563.307L336.106,563.307L336.092,563.3ZM335.257,566.933C335.257,566.114,334.981,565.426,334.433,564.868C333.884,564.301,333.209,564.019,332.409,564.019C331.617,564.019,330.947,564.31,330.398,564.895C329.85,565.472,329.574,566.155,329.574,566.947C329.574,567.739,329.854,568.428,330.412,569.013C330.97,569.589,331.635,569.876,332.409,569.876C333.191,569.876,333.861,569.596,334.419,569.038C334.977,568.48,335.257,567.778,335.257,566.933" fill="#A57242" transform="translate(332.377,566.91) translate(-332.377,-566.91)"/>
|
||||
<path d="M336.092,563.3L336.092,570.461L335.188,570.461L335.188,569.233C334.368,570.213,333.434,570.704,332.388,570.704C331.334,570.704,330.444,570.34.229.726,569.584C329.005,568.829,328.647,567.934,328.647,566.899C328.647,565.855,329.012,564.964,329.739,564.237C330.467,563.491,331.341,563.117,332.356,563.117C333.526,563.117,334.474,563.617,335.202,564.615L335.202,563.307L336.106,563.307L336.092,563.3ZM335.257,566.933C335.257,566.114,334.981,565.426,334.433,564.868C333.884,564.301,333.209,564.019,332.409,564.019C331.617,564.019,330.947,564.31,330.398,564.895C329.85,565.472,329.574,566.155,329.574,566.947C329.574,567.739,329.854,568.428,330.412,569.013C330.97,569.589,331.635,569.876,332.409,569.876C333.191,569.876,333.861,569.596,334.419,569.038C334.977,568.48,335.257,567.778,335.257,566.933" fill="#A57242" transform="translate(332.377,566.91) translate(-332.377,-566.91)"/>
|
||||
<path d="M338.213,570.415L338.213,560.73L340.224,560.73C341.601,560.73,342.611,560.833,343.253,561.04C343.901,561.238,344.458,561.556,344.926,561.997C345.395,562.428,345.755,562.958,346.005,563.59C346.258,564.218,346.384,564.957,346.384,565.802C346.384,566.64,346.186,567.429,345.789,568.166C345.401,568.903,344.871,569.46,344.197,569.839C343.531,570.218,342.569,570.406,341.305,570.406L338.207,570.406L338.213,570.415ZM339.138,569.488L340.258,569.488C341.429,569.488,342.273,569.429,342.806,569.312C343.336,569.195,343.8,568.966,344.197,568.624C344.591,568.273,344.894,567.851,345.101,567.355C345.308,566.859,345.411,566.295,345.411,565.654C345.411,565.016,345.289,564.426,345.046,563.887C344.812,563.348,344.474,562.902,344.034,562.551C343.593,562.2,343.072,561.966,342.468,561.849C341.874,561.723,340.997,561.66,339.829,561.66L339.141,561.66L339.141,569.486" fill="#A57242" transform="translate(342.296,565.572) translate(-342.296,-565.572)"/>
|
||||
<path d="M325.591,561.235C325.591,561.028,325.663,560.847,325.807,560.696C325.96,560.543,326.14,560.466,326.346,560.466C326.562,560.466,326.741,560.543,326.885,560.696C327.038,560.839,327.115,561.019,327.115,561.235C327.115,561.442,327.039,561.623,326.885,561.774C326.742,561.918,326.562,561.99,326.346,561.99C326.139,561.99,325.958,561.914,325.807,561.761C325.663,561.608,325.591,561.433,325.591,561.235L325.591,561.235ZM325.887,563.232L326.819,563.232L326.819,570.392L325.887,570.392L325.887,563.232Z" fill="#A57242" transform="translate(326.353,565.429) translate(-326.353,-565.429)"/>
|
||||
<path d="M300,570.415L301.377,560.73L301.526,560.73L305.473,568.671L309.375,560.73L309.523,560.73L310.914,570.415L309.957,570.415L309.011,563.484L305.592,570.415L305.348,570.415L301.883,563.415L300.937,570.415L300.006,570.415" fill="#A57242" transform="translate(305.457,565.572) translate(-305.457,-565.572)"/>
|
||||
<path d="M319.679,563.3L319.679,570.461L318.775,570.461L318.775,569.233C317.956,570.213,317.022,570.704,315.975,570.704C314.922,570.704,314.031,570.33.813.313,569.584C312.592,568.829,312.234,567.934,312.234,566.899C312.234,565.855,312.599,564.964,313.327,564.237C314.054,563.491,314.929,563.117,315.943,563.117C317.114,563.117,318.061,563.617,318.789,564.615L318.789,563.307L319.693,563.307L319.679,563.3ZM318.844,566.933C318.844,566.114,318.569,565.426,318.02,564.868C317.472,564.301,316.797,564.019,315.996,564.019C315.204,564.019,314.534,564.31,313.985,564.895C313.437,565.472,313.162,566.155,313.162,566.947C313.162,567.739,313.442,568.428,313.999,569.013C314.557,569.589,315.222,569.876,315.996,569.876C316.779,569.876,317.449,569.596,318.006,569.038C318.564,568.48,318.842,567.778,318.844,566.933" fill="#A57242" transform="translate(315.963,566.91) translate(-315.963,-566.91)"/>
|
||||
<path d="M319.679,563.3L319.679,570.461L318.775,570.461L318.775,569.233C317.956,570.213,317.022,570.704,315.975,570.704C314.922,570.704,314.031,570.34.213.313,569.584C312.592,568.829,312.234,567.934,312.234,566.899C312.234,565.855,312.599,564.964,313.327,564.237C314.054,563.491,314.929,563.117,315.943,563.117C317.114,563.117,318.061,563.617,318.789,564.615L318.789,563.307L319.693,563.307L319.679,563.3ZM318.844,566.933C318.844,566.114,318.569,565.426,318.02,564.868C317.472,564.301,316.797,564.019,315.996,564.019C315.204,564.019,314.534,564.31,313.985,564.895C313.437,565.472,313.162,566.155,313.162,566.947C313.162,567.739,313.442,568.428,313.999,569.013C314.557,569.589,315.222,569.876,315.996,569.876C316.779,569.876,317.449,569.596,318.006,569.038C318.564,568.48,318.842,567.778,318.844,566.933" fill="#A57242" transform="translate(315.963,566.91) translate(-315.963,-566.91)"/>
|
||||
<path d="M321.342,563.3L322.287,563.3L322.287,564.34C322.54,563.918,322.783,563.608,323.015,563.408C323.258,563.21,323.522,563.112,323.811,563.112C324.107,563.112,324.406,563.193,324.702,563.355L324.215,564.138C324.08,564.057,323.94,564.017,323.797,564.017C323.517,564.017,323.254,564.161,323.001,564.448C322.758,564.735,322.579,565.109,322.462,565.568C322.345,566.018,322.286,566.842,322.286,568.047L322.286,570.479L321.341,570.479L321.341,563.319" fill="#A57242" transform="translate(323.022,566.795) translate(-323.022,-566.795)"/>
|
||||
<path d="M348.198,560.776L350.114,560.776C351.131,560.776,351.9,560.983,352.432,561.396C352.962,561.799,353.228,562.385,353.228,563.149C353.228,563.571,353.121,563.964,352.905,564.322C352.698,564.673,352.393,564.955,351.987,565.171C352.652,565.387,353.157,565.71,353.497,566.142C353.848,566.573,354.023,567.087,354.023,567.679C354.023,568.48,353.731,569.146,353.146,569.676C352.561,570.197,351.806,570.459,350.878,570.459L348.216,570.459L348.216,560.774L348.198,560.776ZM349.173,561.719L349.173,564.817L349.726,564.817C350.571,564.817,351.202,564.682,351.615,564.413C352.028,564.143,352.235,563.72,352.235,563.144C352.235,562.192,351.588,561.715,350.291,561.715L349.171,561.715L349.173,561.719ZM349.171,565.8L349.171,569.518L350.371,569.518C351.064,569.518,351.571,569.45,351.895,569.315C352.228,569.171,352.499,568.955,352.705,568.668C352.912,568.372,353.015,568.069,353.015,567.764C353.015,567.459,352.956,567.188,352.84,566.954C352.723,566.72,352.548,566.513,352.314,566.334C352.089,566.154,351.814,566.02,351.49,565.93C351.176,565.84,350.581,565.795,349.709,565.795L349.17,565.795" fill="#A57242" transform="translate(351.111,565.617) translate(-351.111,-565.617)"/>
|
||||
</g>
|
||||
@@ -402,7 +402,7 @@
|
||||
<ellipse fill="white" rx="51.2566" ry="51.2566" transform="translate(461.257,119.257)"/>
|
||||
<path d="M475.312,132.542C475.678,129.494,475.568,129.047,477.839,129.541L478.415,129.591C480.161,129.671,482.445,129.311,483.786,128.687C486.675,127.347,488.387,125.109,485.539,125.697C479.043,127.038,478.596,124.838,478.596,124.838C485.456,114.66,488.324,101.74,485.849,98.5769C479.097,89.9505,467.411,94.0298,467.216,94.1357L467.154,94.1472C465.87,93.8808,464.434,93.7217,462.82,93.6956C459.88,93.6473,457.649,94.4663,455.957,95.7498C455.957,95.7498,435.11,87.1609,436.08,106.551C436.286,110.676,441.992,137.763,448.798,129.582C451.285,126.59,453.689,124.06,453.689,124.06C454.883,124.853,456.312,125.258,457.811,125.112L457.927,125.014C457.891,125.385,457.907,125.748,457.973,126.179C456.22,128.138,456.735,128.481,453.23,129.203C449.684,129.934,451.767,131.235,453.127,131.575C454.776,131.988,458.591,132.572,461.17,128.963L461.067,129.375C461.755,129.925,461.708,133.33,461.806,135.762C461.904,138.195,462.066,140.465,462.562,141.803C463.058,143.141,463.643,146.588,468.25,145.601C472.1,144.776,475.044,143.588,475.312,132.542" fill="black" transform="translate(461.523,119.428) translate(-461.523,-119.428)"/>
|
||||
<path d="M475.312,132.542C475.678,129.494,475.568,129.047,477.839,129.541L478.415,129.591C480.161,129.671,482.445,129.311,483.786,128.687C486.675,127.347,488.387,125.109,485.539,125.697C479.043,127.038,478.596,124.838,478.596,124.838C485.456,114.66,488.324,101.74,485.849,98.5769C479.097,89.9505,467.411,94.0298,467.216,94.1357L467.154,94.1472C465.87,93.8808,464.434,93.7217,462.82,93.6956C459.88,93.6473,457.649,94.4663,455.957,95.7498C455.957,95.7498,435.11,87.1609,436.08,106.551C436.286,110.676,441.992,137.763,448.798,129.582C451.285,126.59,453.689,124.06,453.689,124.06C454.883,124.853,456.312,125.258,457.811,125.112L457.927,125.014C457.891,125.385,457.907,125.748,457.973,126.179C456.22,128.138,456.735,128.481,453.23,129.203C449.684,129.934,451.767,131.235,453.127,131.575C454.776,131.988,458.591,132.572,461.17,128.963L461.067,129.375C461.755,129.925,461.708,133.33,461.806,135.762C461.904,138.195,462.066,140.465,462.562,141.803C463.058,143.141,463.643,146.588,468.25,145.601C472.1,144.776,475.044,143.588,475.312,132.542" stroke="black" stroke-width="5.4" transform="translate(461.523,119.428) translate(-461.523,-119.428)"/>
|
||||
<path d="M485.539,125.697C479.042,127.037,478.596,124.838,478.596,124.838C485.455,114.659,488.323,101.738,485.848,98.5761C479.097,89.9502,467.411,94.0297,467.216,94.1356L467.153,94.1469C465.869,93.8804,464.433,93.7217,462.818,93.6953C459.878,93.6471,457.648,94.466,455.956,95.7492C455.956,95.7492,435.109,87.1608,436.078,106.551C436.284,110.676,441.991,137.763,448.797,129.581C451.284,126.59,453.688,124.06,453.688,124.06C454.882,124.853,456.311,125.258,457.809,125.112L457.925,125.014C457.889,125.385,457.906,125.748,457.972,126.178C456.219,128.137,456.734,128.481,453.229,129.203C449.682,129.934,451.766,131.235,453.126,131.575C454.775,131.988,458.59,132.572,461.168,128.963L461.065,129.375C461.752,129.925,462.235,132.954,462.154,135.7C462.073,138.445,462.019,140.33.862.561,141.803C463.102,143.275,463.641,146.588,468.249,145.601C472.099,144.776,474.094,142.638,474.372,139.071C474.569,136.536,475.014,136.911,475.043,134.644L475.4,133.571C475.812,130.133,475.466,129.025,477.838,129.54L478.414,129.591C480.16,129.67,482.445,129.31,483.786,128.687C486.674,127.347,488.386,125.109,485.539,125.697L485.539,125.697Z" fill="#336791" transform="translate(461.522,119.431) translate(-461.522,-119.431)"/>
|
||||
<path d="M485.539,125.697C479.042,127.037,478.596,124.838,478.596,124.838C485.455,114.659,488.323,101.738,485.848,98.5761C479.097,89.9502,467.411,94.0297,467.216,94.1356L467.153,94.1469C465.869,93.8804,464.433,93.7217,462.818,93.6953C459.878,93.6471,457.648,94.466,455.956,95.7492C455.956,95.7492,435.109,87.1608,436.078,106.551C436.284,110.676,441.991,137.763,448.797,129.581C451.284,126.59,453.688,124.06,453.688,124.06C454.882,124.853,456.311,125.258,457.809,125.112L457.925,125.014C457.889,125.385,457.906,125.748,457.972,126.178C456.219,128.137,456.734,128.481,453.229,129.203C449.682,129.934,451.766,131.235,453.126,131.575C454.775,131.988,458.59,132.572,461.168,128.963L461.065,129.375C461.752,129.925,462.235,132.954,462.154,135.7C462.073,138.445,462.019,140.34.262.561,141.803C463.102,143.275,463.641,146.588,468.249,145.601C472.099,144.776,474.094,142.638,474.372,139.071C474.569,136.536,475.014,136.911,475.043,134.644L475.4,133.571C475.812,130.133,475.466,129.025,477.838,129.54L478.414,129.591C480.16,129.67,482.445,129.31,483.786,128.687C486.674,127.347,488.386,125.109,485.539,125.697L485.539,125.697Z" fill="#336791" transform="translate(461.522,119.431) translate(-461.522,-119.431)"/>
|
||||
<path d="M461.448,127.667C461.269,134.063,461.493,140.503,462.119,142.068C462.745,143.633,464.085,146.677,468.693,145.69C472.543,144.865,473.944,143.268,474.551,139.742C474.999,137.149,475.862,129.945,475.973,128.469" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(468.681,136.775) translate(-468.681,-136.775)"/>
|
||||
<path d="M455.925,95.6064C455.925,95.6064,435.063,87.0798,436.033,106.47C436.239,110.595,441.946,137.683,448.752,129.501C451.239,126.509,453.488,124.162,453.488,124.162" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(445.963,112.386) translate(-445.963,-112.386)"/>
|
||||
<path d="M467.194,94.0502C466.472,94.2766,478.799,89.5439,485.804,98.4954C488.279,101.658,485.411,114.578,478.551,124.757" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" transform="translate(476.923,108.879) translate(-476.923,-108.879)"/>
|
||||
@@ -418,7 +418,7 @@
|
||||
<g id="mysql" data-bs-toggle="svg-tooltip" data-bs-placement="bottom" title="MySQL" filter="url(#filter9_d_55_77)" transform="translate(79.2566,394.257) translate(-79.2566,-394.257)" style="animation: 30s linear infinite both mysql_t;">
|
||||
<ellipse fill="white" rx="51.2566" ry="51.2566" transform="translate(79.2566,394.257)"/>
|
||||
<path d="M39,411.45L41.6356,411.45L41.6356,401.092L45.7157,410.121C46.1971,411.214,46.8562,411.601,48.1485,411.601C49.4411,411.601,50.0746,411.214,50.5563,410.121L54.6364,401.092L54.6364,411.449L57.272,411.449L57.272,401.109C57.272,400.1,56.8664,399.612,56.0303,399.36C54.0283,398.738,52.685,399.276,52.0767,400.621L48.0726,409.533L44.1953,400.621C43.6124,399.276,42.2439,398.738,40.2419,399.36C39.4055,399.612,39,400.1,39,401.109L39,411.45L39,411.45ZM59.4635,403.019L62.0983,403.019L62.0983,408.725C62.0736,409.035,62.1982,409.763,63.642,409.785C64.3786,409.797,69.327,409.785,69.3732,409.785L69.3732,402.991L72.0141,402.991C72.0263,402.991,72.0115,412.257,72.0117,412.296C72.026,414.581,69.1626,415.078,67.8428,415.116L59.5205,415.116L59.5205,413.351C59.5353,413.351,67.8366,413.353,67.8575,413.351C69.5538,413.173,69.3535,412.334,69.3533,412.051L69.3533,411.363L63.7512,411.363C61.1447,411.339,59.4852,410.207,59.4647,408.905C59.4626,408.785,59.5209,403.076,59.4633,403.019L59.4635,403.019Z" fill="#00618A" transform="translate(55.5095,407.109) translate(-55.5095,-407.109)"/>
|
||||
<path d="M74.0451,411.45L81.6224,411.45C82.5094,411.45,83.371,411.265,84.0554,410.945C85.1957,410.424,85.7533,409.718,85.7533,408.793L85.7533,406.876C85.7533,406.12,85.1198,405.413,83.8779,404.943C83.2189,404.69,82.408,404.556,81.6224,404.556L78.4289,404.556C77.365,404.556,76.8581,404.236,76.7314,403.53C76.706,403.446,76.706,403.379,76.706,403.295L76.706,402.101C76.706,402.034,76.706,401.966,76.7314,401.882C76.8581,401.344,77.137,401.193,78.0745,401.109C78.1504,401.109,78.2518,401.092,78.328,401.092L85.8547,401.092L85.8547,399.344L78.4546,399.344C77.3902,399.344,76.8326,399.411,76.3259,399.562C74.7546,400.05,74.0704,400.823,74.0704,402.168L74.0704,403.698C74.0704,404.875,75.4136,405.884,77.6689,406.12C77.9226,406.136,78.1759,406.153,78.4291,406.153L81.1661,406.153C81.2677,406.153,81.3691,406.153,81.445,406.17C82.2814,406.237,82.636,406.389,82.8897,406.691C83.0416,406.842,83.0922,406.994,83.0922,407.162L83.0922,408.692C83.0922,408.877,82.9656,409.113,82.7124,409.314C82.4841,409.516,82.104,409.651,81.5971,409.684C81.4957,409.684,81.4198,409.701,81.3184,409.701L74.0449,409.701L74.0449,411.449L74.0451,411.45ZM102.195,408.406C102.195,410.205,103.538,411.214,106.25,411.416C106.503,411.433,106.757,411.45,107.01,411.45L113.878,411.45L113.878,409.701L106.959,409.701C105.413,409.701,104.831,409.314,104.831,408.39L104.831,399.343L102.195,399.343L102.195,408.406ZM87.4354,408.498L87.4354,402.264C87.4354,400.68,88.5529,399.719,90.762,399.416C90.9976,399.383,91.2352,399.366,91.4732,399.366L96.476,399.366C96.7298,399.366,96.9587,399.383,97.2126,399.416C99.4219,399.719,100.539,400.68,100.539,402.264L100.539,408.498C100.539,409.783,100.065,410.47,98.971,410.919L101.567,413.251L98.507,413.251L96.4066,411.364L94.2921,411.497L91.4732,411.497C90.9907,411.497,90.4829,411.43,89.9241,411.278C88.2481,410.823,87.4354,409.947,87.4354,408.498L87.4354,408.498ZM90.28,408.346C90.28,408.431,90.31.0,408.515,90.3309,408.616C90.4831,409.341,91.1688,409.745,92.21,409.745L94.6044,409.745L92.4049,407.769L95.465,407.769L97.3835,409.492C97.7369,409.305,97.9697,409.018,98.0509,408.65C98.0762,408.566,98.0762,408.481,98.0762,408.397L98.0762,402.416C98.0762,402.348,98.0762,402.264,98.0509,402.18C97.8984,401.506,97.2128,401.118,96.1971,401.118L92.21,401.118C91.042,401.118,90.2802,401.624,90.2802,402.416L90.2802,408.346L90.28,408.346Z" fill="#E48E00" transform="translate(93.9614,406.297) translate(-93.9614,-406.297)"/>
|
||||
<path d="M74.0451,411.45L81.6224,411.45C82.5094,411.45,83.371,411.265,84.0554,410.945C85.1957,410.424,85.7533,409.718,85.7533,408.793L85.7533,406.876C85.7533,406.12,85.1198,405.413,83.8779,404.943C83.2189,404.69,82.408,404.556,81.6224,404.556L78.4289,404.556C77.365,404.556,76.8581,404.236,76.7314,403.53C76.706,403.446,76.706,403.379,76.706,403.295L76.706,402.101C76.706,402.034,76.706,401.966,76.7314,401.882C76.8581,401.344,77.137,401.193,78.0745,401.109C78.1504,401.109,78.2518,401.092,78.328,401.092L85.8547,401.092L85.8547,399.344L78.4546,399.344C77.3902,399.344,76.8326,399.411,76.3259,399.562C74.7546,400.05,74.0704,400.823,74.0704,402.168L74.0704,403.698C74.0704,404.875,75.4136,405.884,77.6689,406.12C77.9226,406.136,78.1759,406.153,78.4291,406.153L81.1661,406.153C81.2677,406.153,81.3691,406.153,81.445,406.17C82.2814,406.237,82.636,406.389,82.8897,406.691C83.0416,406.842,83.0922,406.994,83.0922,407.162L83.0922,408.692C83.0922,408.877,82.9656,409.113,82.7124,409.314C82.4841,409.516,82.104,409.651,81.5971,409.684C81.4957,409.684,81.4198,409.701,81.3184,409.701L74.0449,409.701L74.0449,411.449L74.0451,411.45ZM102.195,408.406C102.195,410.205,103.538,411.214,106.25,411.416C106.503,411.433,106.757,411.45,107.01,411.45L113.878,411.45L113.878,409.701L106.959,409.701C105.413,409.701,104.831,409.314,104.831,408.39L104.831,399.343L102.195,399.343L102.195,408.406ZM87.4354,408.498L87.4354,402.264C87.4354,400.68,88.5529,399.719,90.762,399.416C90.9976,399.383,91.2352,399.366,91.4732,399.366L96.476,399.366C96.7298,399.366,96.9587,399.383,97.2126,399.416C99.4219,399.719,100.539,400.68,100.539,402.264L100.539,408.498C100.539,409.783,100.065,410.47,98.971,410.919L101.567,413.251L98.507,413.251L96.4066,411.364L94.2921,411.497L91.4732,411.497C90.9907,411.497,90.4829,411.43,89.9241,411.278C88.2481,410.823,87.4354,409.947,87.4354,408.498L87.4354,408.498ZM90.28,408.346C90.28,408.431,90.31.0,408.515,90.34.2,408.616C90.4831,409.341,91.1688,409.745,92.21,409.745L94.6044,409.745L92.4049,407.769L95.465,407.769L97.3835,409.492C97.7369,409.305,97.9697,409.018,98.0509,408.65C98.0762,408.566,98.0762,408.481,98.0762,408.397L98.0762,402.416C98.0762,402.348,98.0762,402.264,98.0509,402.18C97.8984,401.506,97.2128,401.118,96.1971,401.118L92.21,401.118C91.042,401.118,90.2802,401.624,90.2802,402.416L90.2802,408.346L90.28,408.346Z" fill="#E48E00" transform="translate(93.9614,406.297) translate(-93.9614,-406.297)"/>
|
||||
<path d="M116.197,396.443C114.577,396.399,113.339,396.549,112.281,396.993C111.981,397.119,111.501,397.122,111.452,397.497C111.617,397.67,111.643,397.927,111.774,398.139C112.027,398.546,112.453,399.091,112.834,399.377C113.25,399.69,113.678,400.024,114.124,400.294C114.917,400.775,115.802,401.05,116.565,401.532C117.015,401.816,117.462,402.174,117.901,402.495C118.118,402.653,118.264,402.9,118.546,402.999L118.546,402.953C118.398,402.765,118.36,402.507,118.224,402.311L117.625,401.715C117.039,400.942,116.296,400.262,115.506,399.698C114.876,399.248,113.465,398.64,113.203,397.91L113.156,397.864C113.603,397.814,114.126,397.653,114.539,397.543C115.231,397.358,115.85,397.406,116.565,397.222C116.888,397.131,117.21,397.039,117.533,396.947L117.533,396.764C117.171,396.395,116.914,395.906,116.519,395.572C115.488,394.698,114.362,393.824,113.203,393.096C112.56,392.692,111.765,392.43,111.083,392.087C110.854,391.972,110.451,391.913,110.3,391.721C109.942,391.266,109.747,390.691,109.471,390.162C108.893,389.054,108.325,387.843,107.813,386.677C107.463,385.882,107.235,385.098,106.799,384.385C104.707,380.962,102.456,378.897,98.9679,376.866C98.2258,376.434,97.3322,376.264,96.3879,376.041L94.8677,375.949C94.5584,375.82,94.2366,375.444,93.9462,375.261C92.7908,374.535,89.8272,372.955,88.9714,375.032C88.431,376.344,89.779,377.623,90.2611,378.288C90.5995,378.754,91.0327,379.276,91.2745,379.8C91.4336,380.145,91.4611,380.49,91.5971,380.855C91.9321,381.753,92.2231,382.73,92.6565,383.56C92.8755,383.98,93.1169,384.422,93.3937,384.798C93.5635,385.028,93.8543,385.13,93.9003,385.485C93.6158,385.882,93.5996,386.496,93.4397,386.998C92.7198,389.258,92.9913,392.066,94.0386,393.738C94.36,394.251,95.1169,395.352,96.1576,394.93C97.0681,394.561,96.8647,393.417,97.1251,392.408C97.184,392.18,97.1477,392.011,97.2632,391.858L97.2632,391.904L98.0924,393.554C98.706,394.538,99.7954,395.566,100.718,396.26C101.197,396.619,101.574,397.241,102.193,397.451L102.193,397.406L102.146,397.406C102.027,397.22,101.839,397.142,101.686,396.993C101.325,396.641,100.924,396.204,100.626,395.801C99.7868,394.667,99.0449,393.426,98.369,392.133C98.0462,391.516,97.7656,390.836,97.4935,390.208C97.3886,389.966,97.3899,389.6,97.1713,389.474C96.8733,389.934,96.4343,390.306,96.2038,390.85C95.8352,391.718,95.7876,392.777,95.6511,393.875C95.5703,393.904,95.606,393.884,95.5588,393.921C94.9172,393.767,94.6916,393.11,94.4534,392.546C93.85,391.12,93.7381,388.823,94.2687,387.182C94.4062,386.757,95.0268,385.419,94.7756,385.027C94.6557,384.636,94.26,384.409,94.0386,384.11C93.7646,383.74,93.491,383.253,93.3014,382.826C92.8078,381.714,92.5773,380.466,92.0577,379.342C91.8093,378.805,91.3892,378.261,91.0442,377.783C90.6623,377.254,90.2346,376.864,89.9386,376.224C89.8333,375.997,89.6903,375.633,89.8463,375.399C89.8961,375.241,89.9661,375.175,90.1229,375.124C90.3901,374.919,91.1343,375.192,91.4126,375.307C92.1515,375.613,92.768,375.904,93.3937,376.316C93.6942,376.514,93.998,376.898,94.361,377.004L94.7756,377.004C95.4241,377.152,96.1507,377.05,96.7565,377.233C97.8274,377.557,98.7871,378.061,99.6585,378.608C102.314,380.277,104.485,382.652,105.97,385.485C106.209,385.942,106.312,386.377,106.523,386.861C106.947,387.837,107.482,388.841,107.905,389.795C108.326,390.747,108.737,391.708,109.333,392.5C109.646,392.917,110.856,393.14,111.406,393.371C111.791,393.533,112.423,393.702,112.788,393.921C113.485,394.34,114.161,394.838,114.815,395.297C115.142,395.526,116.147,396.029,116.197,396.443L116.197,396.443Z" fill="#00618A" transform="translate(103.696,388.499) translate(-103.696,-388.499)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M95.6047,378.975C95.2669,378.969,95.028,379.012,94.7754,379.067L94.7754,379.113L94.8216,379.113C94.9827,379.442,95.2669,379.654,95.4664,379.938C95.6199,380.259,95.7735,380.58,95.9272,380.901L95.9731,380.855C96.2584,380.655,96.3891,380.335,96.3877,379.846C96.2734,379.727,96.2564,379.576,96.1574,379.434C96.0257,379.243,95.7708,379.135,95.6047,378.975L95.6047,378.975Z" fill="#00618A" transform="translate(95.5816,379.938) translate(-95.5816,-379.938)"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M115.115,409.651C115.115,410.806,116.032,411.584,117.058,411.584C118.083,411.584,119,410.806,119,409.651C119,408.497,118.083,407.718,117.058,407.718C116.032,407.718,115.115,408.497,115.115,409.651L115.115,409.651ZM118.565,409.651C118.565,410.527,117.892,411.182,117.058,411.182C116.214,411.182,115.551,410.527,115.551,409.651C115.551,408.775,116.213,408.12,117.058,408.12C117.892,408.12,118.565,408.775,118.565,409.651ZM117.581,410.754L118.016,410.754L117.379,409.785C117.721,409.749,117.98,409.584,117.98,409.182C117.98,408.734,117.695,408.548,117.146,408.548L116.281,408.548L116.281,410.754L116.654,410.754L116.654,409.801L117.001,409.801L117.581,410.754L117.581,410.754ZM116.654,409.491L116.654,408.857L117.084,408.857C117.307,408.857,117.576,408.899,117.576,409.156C117.576,409.466,117.332,409.491,117.052,409.491L116.654,409.491L116.654,409.491Z" fill="#E48E00" transform="translate(117.058,409.651) translate(-117.058,-409.651)"/>
|
||||
|
||||
@@ -116,16 +116,6 @@ dokku traefik:set --global log-level DEBUG
|
||||
|
||||
After modifying, the Traefik container will need to be restarted.
|
||||
|
||||
### Setting rule priority
|
||||
|
||||
By default, app deployments will result in the newer traefik rules using a higher priority in order to have any newer rules respected by Traefik. Rule priorities will always increase according to the current unix timestamp. The priority may be fixed by setting the app-level `priority` property:
|
||||
|
||||
```shell
|
||||
dokku traefik:set node-js-app priority 12345
|
||||
```
|
||||
|
||||
After modifying, the app container will need to be recreated via a `ps:rebuild` or an app deployment.
|
||||
|
||||
### SSL Configuration
|
||||
|
||||
The traefik plugin only supports automatic ssl certificates from it's letsencrypt integration. Managed certificates provided by the `certs` plugin are ignored.
|
||||
|
||||
@@ -12,7 +12,7 @@ proxy:report [<app>] [<flag>] # Displays a proxy report fo
|
||||
proxy:set [<app>|--global] <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. This allows other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
@@ -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.33.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.34.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.34.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.34.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.34.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.34.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.34.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.34.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.34.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.34.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.33.8/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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.33.8/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.34.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>
|
||||
|
||||
19
dokku
19
dokku
@@ -55,7 +55,7 @@ export DOKKU_SYSTEM_USER=${DOKKU_SYSTEM_USER:="dokku"}
|
||||
export DOKKU_API_VERSION=1
|
||||
export DOKKU_NOT_IMPLEMENTED_EXIT=10
|
||||
export DOKKU_VALID_EXIT=0
|
||||
export DOKKU_PID="$BASHPID"
|
||||
export DOKKU_PID="${DOKKU_PID:=$$}"
|
||||
|
||||
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_LOGS_HOST_DIR=${DOKKU_LOGS_HOST_DIR:=$DOKKU_LOGS_DIR}
|
||||
@@ -88,8 +88,8 @@ fi
|
||||
! has_tty && DOKKU_QUIET_OUTPUT=1
|
||||
|
||||
if [[ $(id -un) != "dokku" ]]; then
|
||||
unset TMP TMPDIR TEMP TEMPDIR
|
||||
if [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]] && [[ $1 != "scheduler-k3s:initialize" ]] && [[ $1 != "scheduler-k3s:uninstall" ]]; then
|
||||
unset DOKKU_PID TMP TMPDIR TEMP TEMPDIR
|
||||
export SSH_USER=$(id -un)
|
||||
sudo -u dokku -E -H "$0" "$@"
|
||||
exit $?
|
||||
@@ -106,15 +106,20 @@ fi
|
||||
|
||||
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then
|
||||
export -n SSH_ORIGINAL_COMMAND
|
||||
if [[ $1 =~ config-* ]] || [[ $1 =~ docker-options* ]]; then
|
||||
xargs $0 <<<$SSH_ORIGINAL_COMMAND
|
||||
exit $?
|
||||
else
|
||||
exit_code=0
|
||||
if [[ $1 =~ git-* ]] || [[ $1 =~ git:* ]]; then
|
||||
set -f
|
||||
$0 $SSH_ORIGINAL_COMMAND
|
||||
exit_code=$?
|
||||
set +f
|
||||
else
|
||||
readarray -t -O "${#ssh_arg_array[@]}" ssh_arg_array < <(printf '%s' "$SSH_ORIGINAL_COMMAND" | xargs -n 1)
|
||||
set -f
|
||||
$0 "${ssh_arg_array[@]}"
|
||||
exit_code=$?
|
||||
set +f
|
||||
exit $?
|
||||
fi
|
||||
exit $exit_code
|
||||
fi
|
||||
|
||||
if ! dokku_auth "$@"; then
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -17,6 +17,10 @@ cmd-report() {
|
||||
dokku_log_info1 "uname: $(uname -a)"
|
||||
dokku_log_info1 "memory: "
|
||||
free -m | sed "s/^/ /"
|
||||
dokku_log_info1 "disk utilization: "
|
||||
df -h --type btrfs --type ext4 --type ext3 --type ext2 --type vfat --type iso9660 | sed "s/^/ /"
|
||||
dokku_log_info1 "disk inode utilization: "
|
||||
df -hi --type btrfs --type ext4 --type ext3 --type ext2 --type vfat --type iso9660 | sed "s/^/ /"
|
||||
dokku_log_info1 "docker version: "
|
||||
"$DOCKER_BIN" version | sed "s/^/ /"
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
|
||||
@@ -56,16 +56,12 @@ EOF
|
||||
cat >"$DOKKU_LOGROTATE_FILE" <<EOF
|
||||
$DOKKU_LOGS_DIR/*.log {
|
||||
daily
|
||||
rotate 7
|
||||
missingok
|
||||
notifempty
|
||||
su syslog dokku
|
||||
rotate 7
|
||||
compress
|
||||
delaycompress
|
||||
postrotate
|
||||
reload rsyslog &>/dev/null || true
|
||||
endscript
|
||||
create 664 syslog dokku
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
EOF
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -223,8 +223,6 @@ func GetAutoscalingConfig(appName string, processType string, replicas int) (For
|
||||
return FormationAutoscaling{}, false, err
|
||||
}
|
||||
|
||||
common.LogWarn(fmt.Sprintf("appJSON: %v", appJSON))
|
||||
|
||||
formation, ok := appJSON.Formation[processType]
|
||||
if !ok {
|
||||
return FormationAutoscaling{}, false, nil
|
||||
|
||||
@@ -102,8 +102,11 @@ func getPhaseScript(appName string, phase string) (string, error) {
|
||||
func getReleaseCommand(appName string, image string) string {
|
||||
processType := "release"
|
||||
port := "5000"
|
||||
b, _ := common.PlugnTriggerOutput("procfile-get-command", []string{appName, processType, port}...)
|
||||
return strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "procfile-get-command",
|
||||
Args: []string{appName, processType, port},
|
||||
})
|
||||
return results.StdoutContents()
|
||||
}
|
||||
|
||||
func getDokkuAppShell(appName string) string {
|
||||
@@ -114,13 +117,19 @@ func getDokkuAppShell(appName string) string {
|
||||
ctx := context.Background()
|
||||
errs, ctx := errgroup.WithContext(ctx)
|
||||
errs.Go(func() error {
|
||||
b, _ := common.PlugnTriggerOutput("config-get-global", []string{"DOKKU_APP_SHELL"}...)
|
||||
globalShell = strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTriggerWithContext(ctx, common.PlugnTriggerInput{
|
||||
Trigger: "config-get-global",
|
||||
Args: []string{"DOKKU_APP_SHELL"},
|
||||
})
|
||||
globalShell = results.StdoutContents()
|
||||
return nil
|
||||
})
|
||||
errs.Go(func() error {
|
||||
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_APP_SHELL"}...)
|
||||
appShell = strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTriggerWithContext(ctx, common.PlugnTriggerInput{
|
||||
Trigger: "config-get",
|
||||
Args: []string{appName, "DOKKU_APP_SHELL"},
|
||||
})
|
||||
appShell = results.StdoutContents()
|
||||
return nil
|
||||
})
|
||||
|
||||
@@ -204,8 +213,13 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
}
|
||||
|
||||
var dockerArgs []string
|
||||
if b, err := common.PlugnTriggerSetup("docker-args-deploy", []string{appName, imageTag}...).SetInput("").Output(); err == nil {
|
||||
words, err := shellquote.Split(strings.TrimSpace(string(b[:])))
|
||||
results, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "docker-args-deploy",
|
||||
Args: []string{appName, imageTag},
|
||||
Stdin: strings.NewReader(""),
|
||||
})
|
||||
if err == nil {
|
||||
words, err := shellquote.Split(results.StdoutContents())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -213,8 +227,13 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
dockerArgs = append(dockerArgs, words...)
|
||||
}
|
||||
|
||||
if b, err := common.PlugnTriggerSetup("docker-args-process-deploy", []string{appName, imageSourceType, imageTag}...).SetInput("").Output(); err == nil {
|
||||
words, err := shellquote.Split(strings.TrimSpace(string(b[:])))
|
||||
results, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "docker-args-process-deploy",
|
||||
Args: []string{appName, imageSourceType, imageTag},
|
||||
Stdin: strings.NewReader(""),
|
||||
})
|
||||
if err == nil {
|
||||
words, err := shellquote.Split(results.StdoutContents())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -325,11 +344,11 @@ func executeScript(appName string, image string, imageTag string, phase string)
|
||||
StreamStderr: true,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Commiting of '%s' to image failed: %w", phase, err)
|
||||
return fmt.Errorf("Committing of '%s' to image failed: %w", phase, err)
|
||||
}
|
||||
|
||||
if result.ExitCode != 0 {
|
||||
return fmt.Errorf("Commiting of '%s' to image failed: %s", phase, command)
|
||||
return fmt.Errorf("Committing of '%s' to image failed: %s", phase, command)
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -398,12 +417,15 @@ func createdContainerID(appName string, dockerArgs []string, image string, comma
|
||||
arguments = append(arguments, image)
|
||||
arguments = append(arguments, command...)
|
||||
|
||||
b, err := common.PlugnTriggerOutput("config-export", []string{appName, "false", "true", "json"}...)
|
||||
results, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "config-export",
|
||||
Args: []string{appName, "false", "true", "json"},
|
||||
})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
var env map[string]string
|
||||
if err := json.Unmarshal(b, &env); err != nil {
|
||||
if err := json.Unmarshal(results.StdoutBytes(), &env); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -420,7 +442,11 @@ func createdContainerID(appName string, dockerArgs []string, image string, comma
|
||||
}
|
||||
|
||||
containerID := result.StdoutContents()
|
||||
err = common.PlugnTrigger("post-container-create", []string{"app", containerID, appName, phase}...)
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-container-create",
|
||||
Args: []string{"app", containerID, appName, phase},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return containerID, err
|
||||
}
|
||||
|
||||
@@ -440,12 +466,27 @@ func setScale(appName string, image string) error {
|
||||
}
|
||||
|
||||
if len(args) == 3 {
|
||||
return common.PlugnTrigger("ps-can-scale", []string{appName, "true"}...)
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("ps-can-scale", []string{appName, "false"}...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "ps-can-scale",
|
||||
Args: []string{appName, "true"},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
return common.PlugnTrigger("ps-set-scale", args...)
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "ps-can-scale",
|
||||
Args: []string{appName, "false"},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "ps-set-scale",
|
||||
Args: args,
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ require (
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -101,11 +101,17 @@ func TriggerCorePostExtract(appName string, sourceWorkDir string) error {
|
||||
}
|
||||
|
||||
processSpecificAppJSON := fmt.Sprintf("%s.%s", existingAppJSON, os.Getenv("DOKKU_PID"))
|
||||
b, _ := common.PlugnTriggerOutput("git-get-property", []string{appName, "source-image"}...)
|
||||
appSourceImage := strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "git-get-property",
|
||||
Args: []string{appName, "source-image"},
|
||||
})
|
||||
appSourceImage := results.StdoutContents()
|
||||
|
||||
b, _ = common.PlugnTriggerOutput("builder-get-property", []string{appName, "build-dir"}...)
|
||||
buildDir := strings.TrimSpace(string(b[:]))
|
||||
results, _ = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "builder-get-property",
|
||||
Args: []string{appName, "build-dir"},
|
||||
})
|
||||
buildDir := results.StdoutContents()
|
||||
|
||||
repoDefaultAppJSONPath := path.Join(sourceWorkDir, "app.json")
|
||||
if appSourceImage == "" {
|
||||
@@ -179,7 +185,7 @@ func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
return common.CloneAppData("app-json", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostCreate ensures apps the correct data directory structure
|
||||
// TriggerPostCreate ensures apps have the correct data directory structure
|
||||
func TriggerPostCreate(appName string) error {
|
||||
return common.CreateAppDataDirectory("app-json", appName)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
SUBCOMMANDS = subcommands/clone subcommands/create subcommands/destroy subcommands/exists subcommands/list subcommands/lock subcommands/locked subcommands/rename subcommands/report subcommands/unlock
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/deploy-source-set triggers/install triggers/post-app-clone-setup triggers/post-app-rename-setup triggers/post-delete triggers/report
|
||||
TRIGGERS = triggers/app-create triggers/app-destroy triggers/app-exists triggers/app-maybe-create triggers/deploy-source-set triggers/install triggers/post-app-clone-setup triggers/post-app-rename triggers/post-app-rename-setup triggers/post-create triggers/post-delete triggers/report
|
||||
BUILD = commands subcommands triggers
|
||||
PLUGIN_NAME = apps
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
@@ -17,8 +16,8 @@ func appExists(appName string) error {
|
||||
|
||||
// checks if an app is locked
|
||||
func appIsLocked(appName string) bool {
|
||||
lockfilePath := fmt.Sprintf("%v/.deploy.lock", common.AppRoot(appName))
|
||||
_, err := os.Stat(lockfilePath)
|
||||
lockPath := getLockPath(appName)
|
||||
_, err := os.Stat(lockPath)
|
||||
return !os.IsNotExist(err)
|
||||
}
|
||||
|
||||
@@ -39,11 +38,12 @@ func createApp(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("post-create", []string{appName}...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-create",
|
||||
Args: []string{appName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// destroys an app
|
||||
@@ -57,19 +57,41 @@ func destroyApp(appName string) error {
|
||||
common.LogInfo1(fmt.Sprintf("Destroying %s (including all add-ons)", appName))
|
||||
|
||||
imageTag, _ := common.GetRunningImageTag(appName, "")
|
||||
if err := common.PlugnTrigger("pre-delete", []string{appName, imageTag}...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "pre-delete",
|
||||
Args: []string{appName, imageTag},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
scheduler := common.GetAppScheduler(appName)
|
||||
removeContainers := "true"
|
||||
if err := common.PlugnTrigger("scheduler-stop", []string{scheduler, appName, removeContainers}...); err != nil {
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "scheduler-stop",
|
||||
Args: []string{scheduler, appName, removeContainers},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := common.PlugnTrigger("scheduler-post-delete", []string{scheduler, appName, imageTag}...); err != nil {
|
||||
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "scheduler-post-delete",
|
||||
Args: []string{scheduler, appName, imageTag},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := common.PlugnTrigger("post-delete", []string{appName, imageTag}...); err != nil {
|
||||
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-delete",
|
||||
Args: []string{appName, imageTag},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -77,7 +99,12 @@ func destroyApp(appName string) error {
|
||||
common.DockerCleanup(appName, forceCleanup)
|
||||
|
||||
common.LogInfo1("Retiring old containers and images")
|
||||
if err := common.PlugnTrigger("scheduler-retire", []string{scheduler, appName}...); err != nil {
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "scheduler-retire",
|
||||
Args: []string{scheduler, appName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -94,14 +121,22 @@ func destroyApp(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// returns the lock path
|
||||
func getLockPath(appName string) string {
|
||||
return fmt.Sprintf("%v/.deploy.lock", common.GetAppDataDirectory("apps", appName))
|
||||
}
|
||||
|
||||
// creates an app if allowed
|
||||
func maybeCreateApp(appName string) error {
|
||||
if err := appExists(appName); err == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
b, _ := common.PlugnTriggerOutput("config-get-global", []string{"DOKKU_DISABLE_APP_AUTOCREATION"}...)
|
||||
disableAutocreate := strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "config-get-global",
|
||||
Args: []string{"DOKKU_DISABLE_APP_AUTOCREATION"},
|
||||
})
|
||||
disableAutocreate := results.StdoutContents()
|
||||
if disableAutocreate == "true" {
|
||||
common.LogWarn("App auto-creation disabled.")
|
||||
return fmt.Errorf("Re-enable app auto-creation or create an app with 'dokku apps:create %s'", appName)
|
||||
|
||||
@@ -9,8 +9,6 @@ require (
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -41,10 +41,17 @@ func main() {
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppRename(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = apps.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
case "post-create":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerPostCreate(appName)
|
||||
case "post-delete":
|
||||
appName := flag.Arg(0)
|
||||
err = apps.TriggerPostDelete(appName)
|
||||
|
||||
@@ -40,7 +40,12 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("post-app-clone-setup", []string{oldAppName, newAppName}...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-app-clone-setup",
|
||||
Args: []string{oldAppName, newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -48,15 +53,21 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
|
||||
os.Setenv("SKIP_REBUILD", "true")
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("git-has-code", []string{newAppName}...); err != nil {
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "git-has-code",
|
||||
Args: []string{newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
os.Setenv("SKIP_REBUILD", "true")
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("post-app-clone", []string{oldAppName, newAppName}...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-app-clone",
|
||||
Args: []string{oldAppName, newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// CommandCreate creates app via command line
|
||||
@@ -108,8 +119,8 @@ func CommandLock(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
lockfilePath := fmt.Sprintf("%v/.deploy.lock", common.AppRoot(appName))
|
||||
if _, err := os.Create(lockfilePath); err != nil {
|
||||
lockPath := getLockPath(appName)
|
||||
if _, err := os.Create(lockPath); err != nil {
|
||||
return errors.New("Unable to create deploy lock")
|
||||
}
|
||||
|
||||
@@ -158,7 +169,12 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
|
||||
return err
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("post-app-rename-setup", []string{oldAppName, newAppName}...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-app-rename-setup",
|
||||
Args: []string{oldAppName, newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -171,15 +187,21 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
|
||||
os.Setenv("SKIP_REBUILD", "true")
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("git-has-code", []string{newAppName}...); err != nil {
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "git-has-code",
|
||||
Args: []string{newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
os.Setenv("SKIP_REBUILD", "true")
|
||||
}
|
||||
|
||||
if err := common.PlugnTrigger("post-app-rename", []string{oldAppName, newAppName}...); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
_, err = common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-app-rename",
|
||||
Args: []string{oldAppName, newAppName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
// CommandReport displays an app report for one or more apps
|
||||
@@ -206,7 +228,7 @@ func CommandUnlock(appName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
lockfilePath := fmt.Sprintf("%v/.deploy.lock", common.AppRoot(appName))
|
||||
lockfilePath := getLockPath(appName)
|
||||
if _, err := os.Stat(lockfilePath); !os.IsNotExist(err) {
|
||||
common.LogWarn("A deploy may be in progress.")
|
||||
common.LogWarn("Removing the app lock will not stop in progress deploys.")
|
||||
|
||||
@@ -43,6 +43,10 @@ func TriggerInstall() error {
|
||||
return fmt.Errorf("Unable to install the apps plugin: %s", err.Error())
|
||||
}
|
||||
|
||||
if err := common.SetupAppData("apps"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
apps, err := common.UnfilteredDokkuApps()
|
||||
if err != nil {
|
||||
return nil
|
||||
@@ -79,7 +83,12 @@ func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.CloneAppData("apps", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostAppRename removes the old app data
|
||||
func TriggerPostAppRename(oldAppName string, newAppName string) error {
|
||||
return common.MigrateAppDataDirectory("apps", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames apps files
|
||||
@@ -92,14 +101,22 @@ func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.CloneAppData("apps", oldAppName, newAppName)
|
||||
}
|
||||
|
||||
// TriggerPostDelete is the apps post-delete plugin trigger
|
||||
// TriggerPostCreate ensures apps have the correct data directory structure
|
||||
func TriggerPostCreate(appName string) error {
|
||||
return common.CreateAppDataDirectory("apps", appName)
|
||||
}
|
||||
|
||||
// TriggerPostDelete destroys the apps data for a given app container
|
||||
func TriggerPostDelete(appName string) error {
|
||||
if err := common.PropertyDestroy("apps", appName); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
dataErr := common.RemoveAppDataDirectory("apps", appName)
|
||||
propertyErr := common.PropertyDestroy("apps", appName)
|
||||
|
||||
if dataErr != nil {
|
||||
return dataErr
|
||||
}
|
||||
|
||||
return nil
|
||||
return propertyErr
|
||||
}
|
||||
|
||||
@@ -22,8 +22,14 @@ trigger-builder-dockerfile-builder-release() {
|
||||
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-dockerfile/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
|
||||
local DOCKER_BUILD_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 fn-force-arm64-image "$IMAGE"; then
|
||||
dokku_log_warn "Detected linux/amd64 image, forcing --platform=linux/amd64"
|
||||
DOCKER_BUILD_ARGS+=("--platform=linux/amd64")
|
||||
fi
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-dockerfile/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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -48,7 +48,7 @@ trigger-builder-herokuish-builder-build() {
|
||||
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"
|
||||
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
|
||||
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/copy-source.Dockerfile" --build-arg APP_IMAGE="$DOKKU_IMAGE" --build-arg DOKKU_APP_USER=$DOKKU_APP_USER -t $IMAGE "$SOURCECODE_WORK_DIR"; then
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/copy-source.Dockerfile" --build-arg APP_IMAGE="$DOKKU_IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" --build-arg "TRACE=$DOKKU_TRACE" -t $IMAGE "$SOURCECODE_WORK_DIR"; then
|
||||
DOKKU_SKIP_IMAGE_CLEANUP_REGISTRATION=1 plugn trigger scheduler-register-retired "$APP" "$TAR_CID"
|
||||
dokku_log_warn "Failure extracting app code"
|
||||
return 1
|
||||
|
||||
@@ -26,8 +26,17 @@ trigger-builder-herokuish-builder-release() {
|
||||
config_export global >"$TMP_WORK_DIR/00-global-env.sh"
|
||||
config_export app "$APP" >"$TMP_WORK_DIR/01-app-env.sh"
|
||||
|
||||
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-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t "$IMAGE" "$TMP_WORK_DIR"; then
|
||||
local DOCKER_BUILD_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 fn-force-arm64-image "$IMAGE"; then
|
||||
dokku_log_warn "Detected linux/amd64 image, forcing --platform=linux/amd64"
|
||||
DOCKER_BUILD_ARGS+=("--platform=linux/amd64")
|
||||
fi
|
||||
|
||||
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
|
||||
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/builder-release.Dockerfile" --build-arg APP_IMAGE="$IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" -t "$IMAGE" "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting environment variables"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
COPY 00-global-env.sh 01-app-env.sh /app/.profile.d/
|
||||
ARG DOKKU_APP_USER herokuishuser
|
||||
COPY --chown=$DOKKU_APP_USER 00-global-env.sh 01-app-env.sh /app/.profile.d/
|
||||
USER $DOKKU_APP_USER
|
||||
ENV HEROKUISH_SETUIDGUID false
|
||||
|
||||
@@ -2,6 +2,8 @@ ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
ARG DOKKU_APP_USER herokuishuser
|
||||
RUN USER=$DOKKU_APP_USER /exec true
|
||||
ARG TRACE
|
||||
RUN TRACE=$TRACE USER=$DOKKU_APP_USER /exec true
|
||||
COPY --chown=$DOKKU_APP_USER . /app
|
||||
WORKDIR /app
|
||||
WORKDIR /app
|
||||
ENV HEROKUISH_DISABLE_CHOWN true
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
ARG APP_IMAGE
|
||||
FROM $APP_IMAGE
|
||||
|
||||
COPY .env.d /tmp/env
|
||||
COPY .env /app/.env
|
||||
ARG DOKKU_APP_USER herokuishuser
|
||||
COPY --chown=$DOKKU_APP_USER .env.d /tmp/env
|
||||
COPY --chown=$DOKKU_APP_USER .env /app/.env
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-builder-herokuish-post-app-clone-setup() {
|
||||
declare desc="builder-herokuish post-app-clone-setup plugin trigger"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
local NEW_CACHE_DIR="$DOKKU_ROOT/$NEW_APP/cache"
|
||||
local NEW_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$NEW_APP/cache"
|
||||
|
||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
|
||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
rm -rf "$NEW_CACHE_DIR"
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-post-app-clone-setup "$@"
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-builder-herokuish-post-app-clone-setup() {
|
||||
declare desc="builder-herokuish post-app-clone-setup plugin trigger"
|
||||
declare trigger="post-app-clone-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
local OLD_CACHE_DIR="$DOKKU_ROOT/$OLD_APP/cache"
|
||||
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
|
||||
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" &>/dev/null; then
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$NEW_APP"
|
||||
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
rm -rf "$OLD_CACHE_DIR"
|
||||
|
||||
pushd "$DOKKU_ROOT/$OLD_APP/." >/dev/null
|
||||
find ./* \( -name ".cache" -o -name "cache" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
}
|
||||
|
||||
trigger-builder-herokuish-post-app-clone-setup "$@"
|
||||
@@ -39,7 +39,9 @@ trigger-builder-herokuish-pre-build-buildpack() {
|
||||
echo "$dotenv_contents" >"$TMP_WORK_DIR/.env"
|
||||
config_export app "$APP" --format envfile --merged >>"$TMP_WORK_DIR/.env"
|
||||
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/pre-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
|
||||
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
|
||||
if ! suppress_output "$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS -f "$PLUGIN_AVAILABLE_PATH/builder-herokuish/dockerfiles/pre-build.Dockerfile" --build-arg APP_IMAGE="$IMAGE" --build-arg "DOKKU_APP_USER=$DOKKU_APP_USER" -t $IMAGE "$TMP_WORK_DIR"; then
|
||||
dokku_log_warn "Failure injecting BUILD_ENV into build environment"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-lambda plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -12,14 +12,13 @@ trigger-builder-nixpacks-builder-release() {
|
||||
return
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
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 IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
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-nixpacks/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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-nixpacks plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-null plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-pack plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -9,8 +9,6 @@ require (
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -44,7 +44,7 @@ func rewriteBuildpacksFile(sourceWorkDir string) error {
|
||||
|
||||
func validBuildpackURL(buildpack string) (string, error) {
|
||||
if buildpack == "" {
|
||||
return buildpack, errors.New("Must specify a buildpack to add")
|
||||
return buildpack, errors.New("Must specify a buildpack url or reference")
|
||||
}
|
||||
|
||||
reHerokuValue := regexp.MustCompile(`(?m)^([\w-]+\/[\w-]+)$`)
|
||||
|
||||
@@ -9,8 +9,6 @@ require (
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -40,8 +40,11 @@ func reportComputedStack(appName string) string {
|
||||
return stack
|
||||
}
|
||||
|
||||
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
||||
if dokkuImage := strings.TrimSpace(string(b[:])); dokkuImage != "" {
|
||||
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "config-get",
|
||||
Args: []string{appName, "DOKKU_IMAGE"},
|
||||
})
|
||||
if dokkuImage := results.StdoutContents(); dokkuImage != "" {
|
||||
common.LogWarn("Deprecated: use buildpacks:set-property instead of specifying DOKKU_IMAGE environment variable")
|
||||
return dokkuImage
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ func CommandRemove(appName string, buildpack string, index int) (err error) {
|
||||
}
|
||||
|
||||
buildpack, err = validBuildpackURL(buildpack)
|
||||
if err != nil {
|
||||
if index == 0 && err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -149,7 +149,12 @@ func CommandSetProperty(appName string, property string, value string) error {
|
||||
common.CommandPropertySet("buildpacks", appName, property, value, DefaultProperties, GlobalProperties)
|
||||
if property == "stack" && oldStack != value {
|
||||
if appName != "--global" {
|
||||
return common.PlugnTrigger("post-stack-set", []string{appName, value}...)
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-stack-set",
|
||||
Args: []string{appName, value},
|
||||
StreamStdio: true,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
apps, err := common.DokkuApps()
|
||||
@@ -157,7 +162,12 @@ func CommandSetProperty(appName string, property string, value string) error {
|
||||
return err
|
||||
}
|
||||
for _, app := range apps {
|
||||
if err := common.PlugnTrigger("post-stack-set", []string{app, value}...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-stack-set",
|
||||
Args: []string{app, value},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
@@ -22,8 +21,11 @@ func TriggerBuildpackStackName(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_IMAGE"}...)
|
||||
dokkuImage := strings.TrimSpace(string(b[:]))
|
||||
results, _ := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "config-get",
|
||||
Args: []string{appName, "DOKKU_IMAGE"},
|
||||
})
|
||||
dokkuImage := results.StdoutContents()
|
||||
if dokkuImage != "" {
|
||||
common.LogWarn("Deprecated: use buildpacks:set-property instead of specifying DOKKU_IMAGE environment variable")
|
||||
fmt.Println(dokkuImage)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core caddy-vhosts plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -124,8 +124,11 @@ func GetAppScheduler(appName string) string {
|
||||
}
|
||||
|
||||
func getAppScheduler(appName string) string {
|
||||
b, _ := PlugnTriggerOutput("scheduler-detect", []string{appName}...)
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
results, _ := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "scheduler-detect",
|
||||
Args: []string{appName},
|
||||
})
|
||||
value := results.StdoutContents()
|
||||
if value != "" {
|
||||
return value
|
||||
}
|
||||
@@ -134,8 +137,11 @@ func getAppScheduler(appName string) string {
|
||||
|
||||
// GetGlobalScheduler fetchs the global scheduler
|
||||
func GetGlobalScheduler() string {
|
||||
b, _ := PlugnTriggerOutput("scheduler-detect", []string{"--global"}...)
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
results, _ := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "scheduler-detect",
|
||||
Args: []string{"--global"},
|
||||
})
|
||||
value := results.StdoutContents()
|
||||
if value != "" {
|
||||
return value
|
||||
}
|
||||
@@ -152,24 +158,34 @@ func GetDeployingAppImageName(appName, imageTag, imageRepo string) (string, erro
|
||||
ctx := context.Background()
|
||||
errs, ctx := errgroup.WithContext(ctx)
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-repository", []string{appName}...)
|
||||
results, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "deployed-app-repository",
|
||||
Args: []string{appName},
|
||||
})
|
||||
if err == nil {
|
||||
imageRemoteRepository = strings.TrimSpace(string(b[:]))
|
||||
imageRemoteRepository = results.StdoutContents()
|
||||
}
|
||||
return err
|
||||
})
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
results, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "deployed-app-image-tag",
|
||||
Args: []string{appName},
|
||||
})
|
||||
|
||||
if err == nil {
|
||||
newImageTag = strings.TrimSpace(string(b[:]))
|
||||
newImageTag = results.StdoutContents()
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-repo", []string{appName}...)
|
||||
results, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "deployed-app-image-repo",
|
||||
Args: []string{appName},
|
||||
})
|
||||
if err == nil {
|
||||
newImageRepo = strings.TrimSpace(string(b[:]))
|
||||
newImageRepo = results.StdoutContents()
|
||||
}
|
||||
return err
|
||||
})
|
||||
@@ -251,11 +267,14 @@ func GetAppRunningContainerIDs(appName string, containerType string) ([]string,
|
||||
|
||||
// GetRunningImageTag retrieves current deployed image tag for a given app
|
||||
func GetRunningImageTag(appName string, imageTag string) (string, error) {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
results, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "deployed-app-image-tag",
|
||||
Args: []string{appName},
|
||||
})
|
||||
if err != nil {
|
||||
return imageTag, err
|
||||
}
|
||||
newImageTag := strings.TrimSpace(string(b[:]))
|
||||
newImageTag := results.StdoutContents()
|
||||
if newImageTag != "" {
|
||||
imageTag = newImageTag
|
||||
}
|
||||
@@ -326,7 +345,10 @@ func IsDeployed(appName string) bool {
|
||||
if deployed == "" {
|
||||
deployed = "false"
|
||||
scheduler := GetAppScheduler(appName)
|
||||
_, err := PlugnTriggerOutput("scheduler-is-deployed", []string{scheduler, appName}...)
|
||||
_, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "scheduler-is-deployed",
|
||||
Args: []string{scheduler, appName},
|
||||
})
|
||||
if err == nil {
|
||||
deployed = "true"
|
||||
}
|
||||
|
||||
@@ -182,9 +182,11 @@ func DockerCleanup(appName string, forceCleanup bool) error {
|
||||
triggerArgs = []string{"DOKKU_SKIP_CLEANUP"}
|
||||
}
|
||||
|
||||
b, _ := PlugnTriggerOutput(triggerName, triggerArgs...)
|
||||
output := strings.TrimSpace(string(b[:]))
|
||||
if output == "true" {
|
||||
results, _ := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: triggerName,
|
||||
Args: triggerArgs,
|
||||
})
|
||||
if results.StdoutContents() == "true" {
|
||||
skipCleanup = true
|
||||
}
|
||||
}
|
||||
@@ -309,9 +311,12 @@ func IsImageHerokuishBased(image string, appName string) bool {
|
||||
|
||||
dokkuAppUser := ""
|
||||
if len(appName) != 0 {
|
||||
b, err := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_APP_USER"}...)
|
||||
results, err := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "config-get",
|
||||
Args: []string{appName, "DOKKU_APP_USER"},
|
||||
})
|
||||
if err == nil {
|
||||
dokkuAppUser = strings.TrimSpace(string(b))
|
||||
dokkuAppUser = results.StdoutContents()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,16 @@ func (ecr ExecCommandResponse) StderrContents() string {
|
||||
return strings.TrimSpace(ecr.Stderr)
|
||||
}
|
||||
|
||||
// StderrBytes returns the trimmed stderr of the command as bytes
|
||||
func (ecr ExecCommandResponse) StderrBytes() []byte {
|
||||
return []byte(ecr.StderrContents())
|
||||
}
|
||||
|
||||
// StdoutBytes returns the trimmed stdout of the command as bytes
|
||||
func (ecr ExecCommandResponse) StdoutBytes() []byte {
|
||||
return []byte(ecr.StdoutContents())
|
||||
}
|
||||
|
||||
// CallExecCommand executes a command on the local host
|
||||
func CallExecCommand(input ExecCommandInput) (ExecCommandResponse, error) {
|
||||
ctx := context.Background()
|
||||
|
||||
@@ -203,6 +203,17 @@ dokku_container_log_verbose_quiet() {
|
||||
IFS=$OIFS
|
||||
}
|
||||
|
||||
fn-force-arm64-image() {
|
||||
declare IMAGE="$1"
|
||||
local image_architecture="$("$DOCKER_BIN" image inspect --format '{{.Architecture}}' "$IMAGE")"
|
||||
|
||||
if [[ "$image_architecture" == "amd64" ]] && [[ "$(dpkg --print-architecture 2>/dev/null || true)" != "amd64" ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-is-valid-app-name() {
|
||||
declare desc="verify that the app name matches naming restrictions"
|
||||
local APP="$1"
|
||||
@@ -933,7 +944,7 @@ acquire_app_deploy_lock() {
|
||||
declare desc="acquire advisory lock for use in deploys"
|
||||
local APP="$1"
|
||||
local LOCK_TYPE="${2:-waiting}"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock"
|
||||
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
|
||||
local LOCK_FAILED_MSG="$APP currently has a deploy lock in place. Exiting..."
|
||||
|
||||
@@ -943,7 +954,7 @@ acquire_app_deploy_lock() {
|
||||
release_app_deploy_lock() {
|
||||
declare desc="release advisory lock used in deploys"
|
||||
local APP="$1"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_LIB_ROOT/data/apps/$APP/.deploy.lock"
|
||||
|
||||
release_advisory_lock "$APP_DEPLOY_LOCK_FILE"
|
||||
}
|
||||
@@ -972,6 +983,7 @@ acquire_advisory_lock() {
|
||||
dokku_log_fail "Run 'apps:unlock' to release the existing deploy lock"
|
||||
fi
|
||||
fi
|
||||
echo "$DOKKU_PID" >"$LOCK_FILE"
|
||||
}
|
||||
|
||||
release_advisory_lock() {
|
||||
@@ -986,13 +998,14 @@ suppress_output() {
|
||||
declare desc="suppress all output from a given command unless there is an error"
|
||||
local TMP_COMMAND_OUTPUT
|
||||
TMP_COMMAND_OUTPUT=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
|
||||
trap "rm -rf '$TMP_COMMAND_OUTPUT' >/dev/null" RETURN
|
||||
|
||||
"$@" >"$TMP_COMMAND_OUTPUT" 2>&1 || {
|
||||
local exit_code="$?"
|
||||
cat "$TMP_COMMAND_OUTPUT"
|
||||
rm -rf "$TMP_COMMAND_OUTPUT" >/dev/null
|
||||
return "$exit_code"
|
||||
}
|
||||
rm -rf "$TMP_COMMAND_OUTPUT" >/dev/null
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,11 @@ func filterApps(apps []string) ([]string, error) {
|
||||
}
|
||||
|
||||
args := append([]string{sshUser, sshName}, apps...)
|
||||
b, _ := PlugnTriggerOutput("user-auth-app", args...)
|
||||
filteredApps := strings.Split(strings.TrimSpace(string(b[:])), "\n")
|
||||
results, _ := CallPlugnTrigger(PlugnTriggerInput{
|
||||
Trigger: "user-auth-app",
|
||||
Args: args,
|
||||
})
|
||||
filteredApps := strings.Split(results.StdoutContents(), "\n")
|
||||
filteredApps = removeEmptyEntries(filteredApps)
|
||||
|
||||
if len(filteredApps) == 0 {
|
||||
|
||||
@@ -4,11 +4,10 @@ go 1.21
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
|
||||
github.com/fatih/color v1.16.0
|
||||
github.com/hashicorp/go-multierror v1.1.1
|
||||
github.com/melbahja/goph v1.4.0
|
||||
github.com/onsi/gomega v1.31.1
|
||||
github.com/onsi/gomega v1.32.0
|
||||
github.com/otiai10/copy v1.14.0
|
||||
github.com/ryanuber/columnize v2.1.2+incompatible
|
||||
github.com/spf13/pflag v1.0.5
|
||||
@@ -17,7 +16,6 @@ require (
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/kr/fs v0.1.0 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
@@ -31,8 +27,8 @@ github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
|
||||
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
|
||||
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
|
||||
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
|
||||
github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk=
|
||||
github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg=
|
||||
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
|
||||
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
|
||||
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,158 +1,10 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/codeskyblue/go-sh"
|
||||
)
|
||||
|
||||
// ShellCmd represents a shell command to be run for dokku
|
||||
type ShellCmd struct {
|
||||
Env map[string]string
|
||||
Command *exec.Cmd
|
||||
CommandString string
|
||||
Args []string
|
||||
ShowOutput bool
|
||||
ExitError *exec.ExitError
|
||||
}
|
||||
|
||||
// NewShellCmd returns a new ShellCmd struct
|
||||
//
|
||||
// Deprecated: use CallExecCommand instead
|
||||
func NewShellCmd(command string) *ShellCmd {
|
||||
items := strings.Split(command, " ")
|
||||
cmd := items[0]
|
||||
args := items[1:]
|
||||
return NewShellCmdWithArgs(cmd, args...)
|
||||
}
|
||||
|
||||
// NewShellCmdWithArgs returns a new ShellCmd struct
|
||||
//
|
||||
// Deprecated: use CallExecCommand instead
|
||||
func NewShellCmdWithArgs(cmd string, args ...string) *ShellCmd {
|
||||
commandString := strings.Join(append([]string{cmd}, args...), " ")
|
||||
|
||||
return &ShellCmd{
|
||||
Command: exec.Command(cmd, args...),
|
||||
CommandString: commandString,
|
||||
Args: args,
|
||||
ShowOutput: true,
|
||||
}
|
||||
}
|
||||
|
||||
func (sc *ShellCmd) setup() {
|
||||
env := os.Environ()
|
||||
for k, v := range sc.Env {
|
||||
env = append(env, fmt.Sprintf("%s=%s", k, v))
|
||||
}
|
||||
sc.Command.Env = env
|
||||
if sc.ShowOutput {
|
||||
sc.Command.Stdout = os.Stdout
|
||||
sc.Command.Stderr = os.Stderr
|
||||
}
|
||||
}
|
||||
|
||||
// Execute is a lightweight wrapper around exec.Command
|
||||
func (sc *ShellCmd) Execute() bool {
|
||||
sc.setup()
|
||||
|
||||
if err := sc.Command.Run(); err != nil {
|
||||
exitError, ok := err.(*exec.ExitError)
|
||||
if ok {
|
||||
sc.ExitError = exitError
|
||||
}
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// Start is a wrapper around exec.Command.Start()
|
||||
func (sc *ShellCmd) Start() error {
|
||||
sc.setup()
|
||||
|
||||
return sc.Command.Start()
|
||||
}
|
||||
|
||||
// Output is a lightweight wrapper around exec.Command.Output()
|
||||
func (sc *ShellCmd) Output() ([]byte, error) {
|
||||
sc.setup()
|
||||
return sc.Command.Output()
|
||||
}
|
||||
|
||||
// CombinedOutput is a lightweight wrapper around exec.Command.CombinedOutput()
|
||||
func (sc *ShellCmd) CombinedOutput() ([]byte, error) {
|
||||
sc.setup()
|
||||
return sc.Command.CombinedOutput()
|
||||
}
|
||||
|
||||
// PlugnTrigger fire the given plugn trigger with the given args
|
||||
//
|
||||
// Deprecated: use CallPlugnTrigger instead
|
||||
func PlugnTrigger(triggerName string, args ...string) error {
|
||||
LogDebug(fmt.Sprintf("plugn trigger %s %v", triggerName, args))
|
||||
return PlugnTriggerSetup(triggerName, args...).Run()
|
||||
}
|
||||
|
||||
// PlugnTriggerOutput fire the given plugn trigger with the given args
|
||||
//
|
||||
// Deprecated: use CallPlugnTrigger with CaptureOutput=true instead
|
||||
func PlugnTriggerOutput(triggerName string, args ...string) ([]byte, error) {
|
||||
LogDebug(fmt.Sprintf("plugn trigger %s %v", triggerName, args))
|
||||
rE, wE, _ := os.Pipe()
|
||||
rO, wO, _ := os.Pipe()
|
||||
session := PlugnTriggerSetup(triggerName, args...)
|
||||
session.Stderr = wE
|
||||
session.Stdout = wO
|
||||
err := session.Run()
|
||||
wE.Close()
|
||||
wO.Close()
|
||||
|
||||
readStderr, _ := io.ReadAll(rE)
|
||||
readStdout, _ := io.ReadAll(rO)
|
||||
|
||||
stderr := string(readStderr[:])
|
||||
if err != nil {
|
||||
err = fmt.Errorf(stderr)
|
||||
}
|
||||
|
||||
if os.Getenv("DOKKU_TRACE") == "1" {
|
||||
for _, line := range strings.Split(stderr, "\n") {
|
||||
LogDebug(fmt.Sprintf("plugn trigger %s stderr: %s", triggerName, line))
|
||||
}
|
||||
for _, line := range strings.Split(string(readStdout[:]), "\n") {
|
||||
LogDebug(fmt.Sprintf("plugn trigger %s stdout: %s", triggerName, line))
|
||||
}
|
||||
}
|
||||
|
||||
return readStdout, err
|
||||
}
|
||||
|
||||
// PlugnTriggerOutputAsString fires the given plugn trigger with the given args and returns the string contents instead of bytes
|
||||
//
|
||||
// Deprecated: use CallPlugnTrigger with CaptureOutput=true instead
|
||||
func PlugnTriggerOutputAsString(triggerName string, args ...string) (string, error) {
|
||||
b, err := PlugnTriggerOutput(triggerName, args...)
|
||||
return strings.TrimSpace(string(b[:])), err
|
||||
}
|
||||
|
||||
// PlugnTriggerSetup sets up a plugn trigger call
|
||||
//
|
||||
// Deprecated: use CallPlugnTrigger instead
|
||||
func PlugnTriggerSetup(triggerName string, args ...string) *sh.Session {
|
||||
shellArgs := make([]interface{}, len(args)+2)
|
||||
shellArgs[0] = "trigger"
|
||||
shellArgs[1] = triggerName
|
||||
for i, arg := range args {
|
||||
shellArgs[i+2] = arg
|
||||
}
|
||||
return sh.Command("plugn", shellArgs...)
|
||||
}
|
||||
|
||||
// PlugnTriggerExists returns whether a plugin trigger exists (ignoring the existence of any within the 20_events plugin)
|
||||
func PlugnTriggerExists(triggerName string) bool {
|
||||
pluginPath := MustGetEnv("PLUGIN_PATH")
|
||||
|
||||
1
plugins/config/.gitignore
vendored
1
plugins/config/.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
/triggers
|
||||
/config-*
|
||||
/config_sub
|
||||
/post-*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
GOARCH ?= amd64
|
||||
SUBCOMMANDS = subcommands/bundle subcommands/clear subcommands/export subcommands/get subcommands/keys subcommands/show subcommands/set subcommands/unset
|
||||
TRIGGERS = triggers/config-export triggers/config-get triggers/config-get-global
|
||||
TRIGGERS = triggers/config-export triggers/config-get triggers/config-get-global triggers/post-app-clone-setup triggers/post-app-rename-setup
|
||||
BUILD = commands config_sub subcommands triggers
|
||||
PLUGIN_NAME = config
|
||||
|
||||
|
||||
@@ -129,14 +129,24 @@ func UnsetAll(appName string, restart bool) (err error) {
|
||||
|
||||
func triggerRestart(appName string) {
|
||||
common.LogInfo1(fmt.Sprintf("Restarting app %s", appName))
|
||||
if err := common.PlugnTrigger("release-and-deploy", appName); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "release-and-deploy",
|
||||
Args: []string{appName},
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
common.LogWarn(fmt.Sprintf("Failure while restarting app: %s", err))
|
||||
}
|
||||
}
|
||||
|
||||
func triggerUpdate(appName string, operation string, args []string) {
|
||||
args = append([]string{appName, operation}, args...)
|
||||
if err := common.PlugnTrigger("post-config-update", args...); err != nil {
|
||||
_, err := common.CallPlugnTrigger(common.PlugnTriggerInput{
|
||||
Trigger: "post-config-update",
|
||||
Args: args,
|
||||
StreamStdio: true,
|
||||
})
|
||||
if err != nil {
|
||||
common.LogWarn(fmt.Sprintf("Failure while triggering post-config-update: %s", err))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/ryanuber/columnize"
|
||||
)
|
||||
|
||||
//ExportFormat types of possible exports
|
||||
// ExportFormat types of possible exports
|
||||
type ExportFormat int
|
||||
|
||||
const (
|
||||
@@ -40,14 +40,14 @@ const (
|
||||
ExportFormatPackArgKeys
|
||||
)
|
||||
|
||||
//Env is a representation for global or app environment
|
||||
// Env is a representation for global or app environment
|
||||
type Env struct {
|
||||
name string
|
||||
filename string
|
||||
env map[string]string
|
||||
}
|
||||
|
||||
//newEnvFromString creates an env from the given ENVFILE contents representation
|
||||
// newEnvFromString creates an env from the given ENVFILE contents representation
|
||||
func newEnvFromString(rep string) (env *Env, err error) {
|
||||
envMap, err := godotenv.Unmarshal(rep)
|
||||
env = &Env{
|
||||
@@ -58,7 +58,7 @@ func newEnvFromString(rep string) (env *Env, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
//LoadAppEnv loads an environment for the given app
|
||||
// LoadAppEnv loads an environment for the given app
|
||||
func LoadAppEnv(appName string) (env *Env, err error) {
|
||||
appfile, err := getAppFile(appName)
|
||||
if err != nil {
|
||||
@@ -67,7 +67,7 @@ func LoadAppEnv(appName string) (env *Env, err error) {
|
||||
return loadFromFile(appName, appfile)
|
||||
}
|
||||
|
||||
//LoadMergedAppEnv loads an app environment merged with the global environment
|
||||
// LoadMergedAppEnv loads an app environment merged with the global environment
|
||||
func LoadMergedAppEnv(appName string) (env *Env, err error) {
|
||||
env, err = LoadAppEnv(appName)
|
||||
if err != nil {
|
||||
@@ -83,7 +83,7 @@ func LoadMergedAppEnv(appName string) (env *Env, err error) {
|
||||
return global, err
|
||||
}
|
||||
|
||||
//LoadGlobalEnv loads the global environment
|
||||
// LoadGlobalEnv loads the global environment
|
||||
func LoadGlobalEnv() (*Env, error) {
|
||||
return loadFromFile("<global>", getGlobalFile())
|
||||
}
|
||||
@@ -93,13 +93,13 @@ func (e *Env) Filename() string {
|
||||
return e.filename
|
||||
}
|
||||
|
||||
//Get an environment variable
|
||||
// Get an environment variable
|
||||
func (e *Env) Get(key string) (value string, ok bool) {
|
||||
value, ok = e.env[key]
|
||||
return
|
||||
}
|
||||
|
||||
//GetDefault an environment variable or a default if it doesn't exist
|
||||
// GetDefault an environment variable or a default if it doesn't exist
|
||||
func (e *Env) GetDefault(key string, defaultValue string) string {
|
||||
v, ok := e.env[key]
|
||||
if !ok {
|
||||
@@ -108,8 +108,8 @@ func (e *Env) GetDefault(key string, defaultValue string) string {
|
||||
return v
|
||||
}
|
||||
|
||||
//GetBoolDefault gets the bool value of the given key with the given default
|
||||
//right now that is evaluated as `value != "0"`
|
||||
// GetBoolDefault gets the bool value of the given key with the given default
|
||||
// right now that is evaluated as `value != "0"`
|
||||
func (e *Env) GetBoolDefault(key string, defaultValue bool) bool {
|
||||
v, ok := e.Get(key)
|
||||
if !ok {
|
||||
@@ -118,17 +118,17 @@ func (e *Env) GetBoolDefault(key string, defaultValue bool) bool {
|
||||
return v != "0"
|
||||
}
|
||||
|
||||
//Set an environment variable
|
||||
// Set an environment variable
|
||||
func (e *Env) Set(key string, value string) {
|
||||
e.env[key] = value
|
||||
}
|
||||
|
||||
//Unset an environment variable
|
||||
// Unset an environment variable
|
||||
func (e *Env) Unset(key string) {
|
||||
delete(e.env, key)
|
||||
}
|
||||
|
||||
//Keys gets the keys in this environment
|
||||
// Keys gets the keys in this environment
|
||||
func (e *Env) Keys() (keys []string) {
|
||||
keys = make([]string, 0, len(e.env))
|
||||
for k := range e.env {
|
||||
@@ -138,12 +138,12 @@ func (e *Env) Keys() (keys []string) {
|
||||
return
|
||||
}
|
||||
|
||||
//Len returns the number of items in this environment
|
||||
// Len returns the number of items in this environment
|
||||
func (e *Env) Len() int {
|
||||
return len(e.env)
|
||||
}
|
||||
|
||||
//Map returns the Env as a map
|
||||
// Map returns the Env as a map
|
||||
func (e *Env) Map() map[string]string {
|
||||
return e.env
|
||||
}
|
||||
@@ -152,14 +152,14 @@ func (e *Env) String() string {
|
||||
return e.EnvfileString()
|
||||
}
|
||||
|
||||
//Merge merges the given environment on top of the receiver
|
||||
// Merge merges the given environment on top of the receiver
|
||||
func (e *Env) Merge(other *Env) {
|
||||
for _, k := range other.Keys() {
|
||||
e.Set(k, other.GetDefault(k, ""))
|
||||
}
|
||||
}
|
||||
|
||||
//Write an Env back to the file it was read from as an exportfile
|
||||
// Write an Env back to the file it was read from as an exportfile
|
||||
func (e *Env) Write() error {
|
||||
if e.filename == "" {
|
||||
return errors.New("this Env was created unbound to a file")
|
||||
@@ -167,7 +167,7 @@ func (e *Env) Write() error {
|
||||
return godotenv.Write(e.Map(), e.filename)
|
||||
}
|
||||
|
||||
//Export the Env in the given format
|
||||
// Export the Env in the given format
|
||||
func (e *Env) Export(format ExportFormat) string {
|
||||
switch format {
|
||||
case ExportFormatExports:
|
||||
@@ -194,23 +194,23 @@ func (e *Env) Export(format ExportFormat) string {
|
||||
}
|
||||
}
|
||||
|
||||
//EnvfileString returns the contents of this Env in dotenv format
|
||||
// EnvfileString returns the contents of this Env in dotenv format
|
||||
func (e *Env) EnvfileString() string {
|
||||
rep, _ := godotenv.Marshal(e.Map())
|
||||
return rep
|
||||
}
|
||||
|
||||
//ExportfileString returns the contents of this Env as bash exports
|
||||
// ExportfileString returns the contents of this Env as bash exports
|
||||
func (e *Env) ExportfileString() string {
|
||||
return e.stringWithPrefixAndSeparator("export ", "\n")
|
||||
}
|
||||
|
||||
//DockerArgsString gets the contents of this Env in the form -env=KEY=VALUE --env...
|
||||
// DockerArgsString gets the contents of this Env in the form -env=KEY=VALUE --env...
|
||||
func (e *Env) DockerArgsString() string {
|
||||
return e.stringWithPrefixAndSeparator("--env=", " ")
|
||||
}
|
||||
|
||||
//DockerArgsKeysString gets the contents of this Env in the form -env=KEY --env...
|
||||
// DockerArgsKeysString gets the contents of this Env in the form -env=KEY --env...
|
||||
func (e *Env) DockerArgsKeysString() string {
|
||||
keys := e.Keys()
|
||||
entries := make([]string, len(keys))
|
||||
@@ -220,7 +220,7 @@ func (e *Env) DockerArgsKeysString() string {
|
||||
return strings.Join(entries, " ")
|
||||
}
|
||||
|
||||
//JSONString returns the contents of this Env as a key/value json object
|
||||
// JSONString returns the contents of this Env as a key/value json object
|
||||
func (e *Env) JSONString() string {
|
||||
data, err := json.Marshal(e.Map())
|
||||
if err != nil {
|
||||
@@ -230,7 +230,7 @@ func (e *Env) JSONString() string {
|
||||
return string(data)
|
||||
}
|
||||
|
||||
//JSONListString returns the contents of this Env as a json list of objects containing the name and the value of the env var
|
||||
// JSONListString returns the contents of this Env as a json list of objects containing the name and the value of the env var
|
||||
func (e *Env) JSONListString() string {
|
||||
var list []map[string]string
|
||||
for _, key := range e.Keys() {
|
||||
@@ -249,7 +249,7 @@ func (e *Env) JSONListString() string {
|
||||
return string(data)
|
||||
}
|
||||
|
||||
//PackArgKeysAsString gets the contents of this Env in the form -env KEY --env...
|
||||
// PackArgKeysAsString gets the contents of this Env in the form -env KEY --env...
|
||||
func (e *Env) PackArgKeysAsString() string {
|
||||
keys := e.Keys()
|
||||
entries := make([]string, len(keys))
|
||||
@@ -259,13 +259,13 @@ func (e *Env) PackArgKeysAsString() string {
|
||||
return strings.Join(entries, " ")
|
||||
}
|
||||
|
||||
//ShellString gets the contents of this Env in the form "KEY='value' KEY2='value'"
|
||||
// ShellString gets the contents of this Env in the form "KEY='value' KEY2='value'"
|
||||
// for passing the environment in the shell
|
||||
func (e *Env) ShellString() string {
|
||||
return e.stringWithPrefixAndSeparator("", " ")
|
||||
}
|
||||
|
||||
//ExportBundle writes a tarfile of the environment to the given io.Writer.
|
||||
// ExportBundle writes a tarfile of the environment to the given io.Writer.
|
||||
// for every environment variable there is a file with the variable's key
|
||||
// with its content set to the variable's value
|
||||
func (e *Env) ExportBundle(dest io.Writer) error {
|
||||
@@ -287,7 +287,7 @@ func (e *Env) ExportBundle(dest io.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//stringWithPrefixAndSeparator makes a string of the environment
|
||||
// stringWithPrefixAndSeparator makes a string of the environment
|
||||
// with the given prefix and separator for each entry
|
||||
func (e *Env) stringWithPrefixAndSeparator(prefix string, separator string) string {
|
||||
keys := e.Keys()
|
||||
@@ -299,12 +299,12 @@ func (e *Env) stringWithPrefixAndSeparator(prefix string, separator string) stri
|
||||
return strings.Join(entries, separator)
|
||||
}
|
||||
|
||||
//singleQuoteEscape escapes the value as if it were shell-quoted in single quotes
|
||||
// singleQuoteEscape escapes the value as if it were shell-quoted in single quotes
|
||||
func singleQuoteEscape(value string) string { // so that 'esc'aped' -> 'esc'\''aped'
|
||||
return strings.Replace(value, "'", "'\\''", -1)
|
||||
}
|
||||
|
||||
//prettyPrintEnvEntries in columns
|
||||
// prettyPrintEnvEntries in columns
|
||||
func prettyPrintEnvEntries(prefix string, entries map[string]string) string {
|
||||
colConfig := columnize.DefaultConfig()
|
||||
colConfig.Prefix = prefix
|
||||
|
||||
@@ -5,15 +5,13 @@ go 1.21
|
||||
require (
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/joho/godotenv v1.2.0
|
||||
github.com/onsi/gomega v1.31.1
|
||||
github.com/onsi/gomega v1.32.0
|
||||
github.com/ryanuber/columnize v2.1.2+incompatible
|
||||
github.com/spf13/pflag v1.0.5
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 // indirect
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/fatih/color v1.16.0 // indirect
|
||||
github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
github.com/alexellis/go-execute/v2 v2.2.1 h1:4Ye3jiCKQarstODOEmqDSRCqxMHLkC92Bhse743RdOI=
|
||||
github.com/alexellis/go-execute/v2 v2.2.1/go.mod h1:FMdRnUTiFAmYXcv23txrp3VYZfLo24nMpiIneWgKHTQ=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q=
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4quafGxDT9LDasjGdlGkzLbfmmrlng3kA=
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
@@ -33,8 +29,8 @@ github.com/melbahja/goph v1.4.0 h1:z0PgDbBFe66lRYl3v5dGb9aFgPy0kotuQ37QOwSQFqs=
|
||||
github.com/melbahja/goph v1.4.0/go.mod h1:uG+VfK2Dlhk+O32zFrRlc3kYKTlV6+BtvPWd/kK7U68=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
|
||||
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
|
||||
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
|
||||
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
|
||||
github.com/onsi/gomega v1.32.0 h1:JRYU78fJ1LPxlckP6Txi/EYqJvjtMrDC04/MM5XRHPk=
|
||||
github.com/onsi/gomega v1.32.0/go.mod h1:a4x4gW6Pz2yK1MAmvluYme5lvYTn61afQ2ETw/8n4Lg=
|
||||
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
|
||||
github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w=
|
||||
github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.33.8"
|
||||
version = "0.34.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -36,6 +36,14 @@ func main() {
|
||||
case "config-get-global":
|
||||
key := flag.Arg(0)
|
||||
err = config.TriggerConfigGetGlobal(key)
|
||||
case "post-app-clone-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = config.TriggerPostAppCloneSetup(oldAppName, newAppName)
|
||||
case "post-app-rename-setup":
|
||||
oldAppName := flag.Arg(0)
|
||||
newAppName := flag.Arg(1)
|
||||
err = config.TriggerPostAppRenameSetup(oldAppName, newAppName)
|
||||
default:
|
||||
err = fmt.Errorf("Invalid plugin trigger call: %s", trigger)
|
||||
}
|
||||
|
||||
@@ -44,3 +44,43 @@ func TriggerConfigGetGlobal(key string) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppCloneSetup creates new buildpacks files
|
||||
func TriggerPostAppCloneSetup(oldAppName string, newAppName string) error {
|
||||
oldEnv, err := LoadAppEnv(oldAppName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to load old environment: %s", err.Error())
|
||||
}
|
||||
|
||||
newEnv, err := LoadAppEnv(newAppName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to load new environment: %s", err.Error())
|
||||
}
|
||||
|
||||
newEnv.Merge(oldEnv)
|
||||
if err := newEnv.Write(); err != nil {
|
||||
return fmt.Errorf("Unable to write new environment: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// TriggerPostAppRenameSetup renames buildpacks files
|
||||
func TriggerPostAppRenameSetup(oldAppName string, newAppName string) error {
|
||||
oldEnv, err := LoadAppEnv(oldAppName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to load old environment: %s", err.Error())
|
||||
}
|
||||
|
||||
newEnv, err := LoadAppEnv(newAppName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Unable to load new environment: %s", err.Error())
|
||||
}
|
||||
|
||||
newEnv.Merge(oldEnv)
|
||||
if err := newEnv.Write(); err != nil {
|
||||
return fmt.Errorf("Unable to write new environment: %s", err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user