Compare commits
236 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25b90d62d2 | ||
|
|
17d2866153 | ||
|
|
d459b4171d | ||
|
|
e4ec973a6e | ||
|
|
3df9a5629f | ||
|
|
02b98e4736 | ||
|
|
f45b5bfd5e | ||
|
|
e39a5663bf | ||
|
|
89cc896c27 | ||
|
|
be95a619bc | ||
|
|
e64b69248a | ||
|
|
441ac29c7c | ||
|
|
ed84f21c08 | ||
|
|
5884576fc2 | ||
|
|
922b6e3722 | ||
|
|
db5630eb32 | ||
|
|
1dc63eecbd | ||
|
|
530066875d | ||
|
|
59aef9a408 | ||
|
|
7b51bcd4ac | ||
|
|
80b782e6ed | ||
|
|
c179958afc | ||
|
|
a3ab4d1b68 | ||
|
|
575ae84e68 | ||
|
|
102c3b3007 | ||
|
|
18f3b940c3 | ||
|
|
baa15d7437 | ||
|
|
9804d42e67 | ||
|
|
0c182415a7 | ||
|
|
1599120c3e | ||
|
|
a53b5953ea | ||
|
|
0d7c4cd036 | ||
|
|
e42e26e16b | ||
|
|
b35a89c5a9 | ||
|
|
a1f4a9a386 | ||
|
|
12531dfb3e | ||
|
|
652b90a074 | ||
|
|
bdd7c58a62 | ||
|
|
3419f18c9f | ||
|
|
87ce52ded1 | ||
|
|
1db1411331 | ||
|
|
e435d01258 | ||
|
|
793e9d377e | ||
|
|
a57680fbbf | ||
|
|
eda71e3ffe | ||
|
|
b186d9d66c | ||
|
|
f16a211b48 | ||
|
|
d70a9be97e | ||
|
|
666bb9dfee | ||
|
|
081a44755e | ||
|
|
2eae6c25af | ||
|
|
4bbee232d8 | ||
|
|
441f7ab22a | ||
|
|
714b27f8a4 | ||
|
|
2d841f47eb | ||
|
|
4c98cd922f | ||
|
|
1c3c712629 | ||
|
|
84ec74e97f | ||
|
|
57cc1c7f8e | ||
|
|
0e67ffc41e | ||
|
|
f4e0d19d43 | ||
|
|
07e7988cdf | ||
|
|
d21aca2c59 | ||
|
|
540e066acf | ||
|
|
a49de4e473 | ||
|
|
4c28ae2630 | ||
|
|
2d07d89d60 | ||
|
|
83d8c8448b | ||
|
|
8eccd50ecb | ||
|
|
09ed45534d | ||
|
|
711945147b | ||
|
|
0b3a6687f6 | ||
|
|
1aec869f9e | ||
|
|
6f9a6eb294 | ||
|
|
96ed840d17 | ||
|
|
5acdf4a43c | ||
|
|
6b4c545592 | ||
|
|
dd6cbcf242 | ||
|
|
d6acf5530e | ||
|
|
94696e81fa | ||
|
|
43d6a2ad94 | ||
|
|
e1425a85e4 | ||
|
|
f5fa94cc9c | ||
|
|
fd85b1f605 | ||
|
|
b386783ec8 | ||
|
|
3b76b81edf | ||
|
|
2eb159b0c3 | ||
|
|
596e7b6f24 | ||
|
|
aa0437bb23 | ||
|
|
a6c22a292d | ||
|
|
0635edba17 | ||
|
|
a0491a5ef2 | ||
|
|
38d172c477 | ||
|
|
5e4c918d40 | ||
|
|
e8aaacff5e | ||
|
|
21d4d640c2 | ||
|
|
b927c1b84d | ||
|
|
d456a96cb5 | ||
|
|
1964fc6b65 | ||
|
|
26e270a49f | ||
|
|
3323623289 | ||
|
|
7a43321d1c | ||
|
|
4a5cc71c3e | ||
|
|
660ccf876e | ||
|
|
69dd81860f | ||
|
|
b1c2c026aa | ||
|
|
b7fa97bf9e | ||
|
|
1bdaab6d72 | ||
|
|
3edc14fc97 | ||
|
|
940d258c5e | ||
|
|
2500ca5106 | ||
|
|
c5a7fd6d43 | ||
|
|
d424af5b1e | ||
|
|
ca383739ab | ||
|
|
0176e888af | ||
|
|
0e320d2832 | ||
|
|
38b96c1e27 | ||
|
|
5da5a6fe5f | ||
|
|
28c9f42a25 | ||
|
|
44461e21df | ||
|
|
164c4eefa7 | ||
|
|
ee6c034baa | ||
|
|
4b399df541 | ||
|
|
f1c7e1113f | ||
|
|
90c68ba02f | ||
|
|
7f2180b47b | ||
|
|
21ff68f624 | ||
|
|
fd162f8895 | ||
|
|
03e80a76b6 | ||
|
|
08fdfd1e38 | ||
|
|
2a6c411edf | ||
|
|
65d7fd9cce | ||
|
|
e0570be562 | ||
|
|
ffa303092f | ||
|
|
382dc01b33 | ||
|
|
7f02155ce1 | ||
|
|
8c17a70dc1 | ||
|
|
b39623ab2b | ||
|
|
98e57287e3 | ||
|
|
68047866be | ||
|
|
bacc5cbcab | ||
|
|
549280e2b6 | ||
|
|
61af5971d5 | ||
|
|
acc206fca7 | ||
|
|
59a81ad3be | ||
|
|
d7b23b84f0 | ||
|
|
3d77de20cc | ||
|
|
365356eb5f | ||
|
|
044cc4a618 | ||
|
|
09541f8aac | ||
|
|
4d0979bbcd | ||
|
|
dba4bb9c2c | ||
|
|
2e4c886ab2 | ||
|
|
dd1962f92d | ||
|
|
1439e8b30b | ||
|
|
8240790381 | ||
|
|
0050aa6b92 | ||
|
|
f53b26f3f0 | ||
|
|
57a9a11ab3 | ||
|
|
a6a0e033a7 | ||
|
|
18492ac83c | ||
|
|
13dd8aa224 | ||
|
|
574304486a | ||
|
|
90feb8dc96 | ||
|
|
7bc241dd48 | ||
|
|
57b884e7c7 | ||
|
|
3ba775d4b3 | ||
|
|
89d6f0eb6e | ||
|
|
465e220315 | ||
|
|
1b767e7632 | ||
|
|
b3304337ca | ||
|
|
40e7f6d15b | ||
|
|
c95659d57d | ||
|
|
a1e7b99b26 | ||
|
|
52f1f2495c | ||
|
|
112ee88fe9 | ||
|
|
2ff06ff4c7 | ||
|
|
df289be994 | ||
|
|
ae76e8784c | ||
|
|
d537cb70cd | ||
|
|
4a70f0bea2 | ||
|
|
e51165d915 | ||
|
|
d10d4cc55c | ||
|
|
2301efa460 | ||
|
|
d00284166f | ||
|
|
f279ce44b2 | ||
|
|
36215828f1 | ||
|
|
0623af86d6 | ||
|
|
c6976499ad | ||
|
|
01bd69100c | ||
|
|
541d73ad93 | ||
|
|
6b159c32cf | ||
|
|
5f2968d1b0 | ||
|
|
0e768d107a | ||
|
|
3557ff16dc | ||
|
|
30131ef363 | ||
|
|
946c424734 | ||
|
|
f42b293836 | ||
|
|
b691c0affc | ||
|
|
48fa04a05b | ||
|
|
8c14bb9aeb | ||
|
|
ca2de6a4a3 | ||
|
|
755499797e | ||
|
|
f2a3cfc0b4 | ||
|
|
a42786a465 | ||
|
|
de0a467c97 | ||
|
|
ab23a4b6f1 | ||
|
|
87aed0eadf | ||
|
|
9a86549359 | ||
|
|
2eeb0069d5 | ||
|
|
f536a05e06 | ||
|
|
26b95854d4 | ||
|
|
775432c73f | ||
|
|
84ee5995f4 | ||
|
|
91e9bb9670 | ||
|
|
c6a8bd669f | ||
|
|
d9d0a932b0 | ||
|
|
a91d45c397 | ||
|
|
98c81513aa | ||
|
|
a7e5f2abdc | ||
|
|
0aa0c884d3 | ||
|
|
dfa39fc590 | ||
|
|
cbd442fc2e | ||
|
|
ebd2778f5b | ||
|
|
5887d4ddfa | ||
|
|
36e9b4b2ae | ||
|
|
81d31c9934 | ||
|
|
4aaefb0c4c | ||
|
|
6aac1ea0d1 | ||
|
|
bd275d9b5d | ||
|
|
8c0dbc7d6a | ||
|
|
07194ca17f | ||
|
|
325c6d44dd | ||
|
|
168ed1716c | ||
|
|
3de8c3002a | ||
|
|
1cbbfb195f |
@@ -84,7 +84,9 @@ jobs:
|
||||
- run:
|
||||
name: run bats tests
|
||||
command: |
|
||||
sudo -E make -e test-ci
|
||||
if ! sudo -E make -e test-ci; then
|
||||
sudo -E make tests-ci-retry-failed
|
||||
fi
|
||||
no_output_timeout: 60m
|
||||
shell: /bin/bash
|
||||
- run:
|
||||
|
||||
23
.github/workflows/bump-formula.yml
vendored
Normal file
23
.github/workflows/bump-formula.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: bump-formula
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
jobs:
|
||||
bump-formula:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Get version
|
||||
id: get_version
|
||||
run: echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
|
||||
- name: Bump Brew
|
||||
env:
|
||||
HOMEBREW_GITHUB_USERNAME: ${{ secrets.HOMEBREW_GITHUB_USERNAME }}
|
||||
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
run: |
|
||||
git config --global user.name 'Dokku Bot'
|
||||
git config --global user.email no-reply@dokku.com
|
||||
brew tap dokku/repo "https://$HOMEBREW_GITHUB_USERNAME:$HOMEBREW_GITHUB_API_TOKEN@github.com/dokku/homebrew-repo.git"
|
||||
brew bump-formula-pr -f --no-browse --no-audit --no-fork --url "https://github.com/dokku/dokku/archive/${{ steps.get_version.outputs.version }}.tar.gz" dokku/repo/dokku
|
||||
@@ -9,7 +9,7 @@ several ways to help out:
|
||||
* Write patches for open bug/feature issues, preferably with test cases
|
||||
included
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Come up with new ways, non-commercial to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
* Sponsor the Dokku project financially on [OpenCollective](https://opencollective.com/dokku#support) or [Patreon](https://www.patreon.com/dokku)
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections
|
||||
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get upgrade -qq -y \
|
||||
&& apt-get install --no-install-recommends --only-upgrade -qq -y openssl openssh-server \
|
||||
&& apt install --no-install-recommends -qq -y rsync /tmp/dokku.deb \
|
||||
&& apt-get -qq -y --no-install-recommends install --only-upgrade openssl openssh-server \
|
||||
&& apt-get -qq -y --no-install-recommends install rsync /tmp/dokku.deb \
|
||||
&& apt-get purge -qq -y syslog-ng-core \
|
||||
&& apt-get autoremove -qq -y \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
@@ -53,4 +53,4 @@ RUN \
|
||||
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
|
||||
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
|
||||
&& sed -i '/imklog/d' /etc/rsyslog.conf \
|
||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/* /var/log/openresty/*
|
||||
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/*.log /var/log/nginx/* /var/log/openresty/*
|
||||
|
||||
262
HISTORY.md
262
HISTORY.md
@@ -1,5 +1,267 @@
|
||||
# History
|
||||
|
||||
## 0.22.9
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4334: @josegonzalez allow git pushes to apps that already exist but have old names
|
||||
- #4335: @josegonzalez Add error checking to plugin:install and plugin:update
|
||||
- #4338: @josegonzalez Strip trailing slashes in hostname from web installer
|
||||
- #4332: @josegonzalez Correct aws release check in release-plugin script
|
||||
- #4311: @nisseknudsen Allow named volume mounts in regex
|
||||
- #4320: @josegonzalez Hardcode cnb workdir to /workspace
|
||||
|
||||
### New Features
|
||||
|
||||
- #4321: @josegonzalez Add git version to output
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4329: @josegonzalez Standardize apt-get usage
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4323: @stianlik Fix typo in nginx documentation
|
||||
|
||||
### Tests
|
||||
|
||||
- #4331: @josegonzalez Switch to upstream bats-core
|
||||
- #4330: @josegonzalez Switch to using uuidgen for unique app names
|
||||
|
||||
### Other
|
||||
|
||||
- #4325: @WaviestBalloon Updated bootstrap.sh to not show when $DOKKU_TAG equals nothing
|
||||
- #4324: @dependabot-preview[bot] chore(deps): bump socket.io from 3.0.5 to 3.1.0 in /tests/apps/.websocket.disabled
|
||||
- #4319: @josegonzalez Update ruby dependencies in test app
|
||||
- #4312: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 187 to 188 in /tests/apps/php
|
||||
|
||||
## 0.22.8
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.8 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4309: @josegonzalez Correct issue where verifying an app name would bail early
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4307: @josegonzalez Specify that the dokku logo is for non-commercial use
|
||||
|
||||
## 0.22.7
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.7/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.7 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4301: @josegonzalez Ensure vector container starts correctly
|
||||
|
||||
## 0.22.6
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.6/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.6 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4295: @josegonzalez Update ps subcommands and triggers
|
||||
|
||||
### New Features
|
||||
|
||||
- #4286: @josegonzalez Add support for templated CHECKS files
|
||||
- #4294: @josegonzalez Enhance ssh client logging output
|
||||
- #4291: @josegonzalez Add log aggregation support via Vector
|
||||
- #4288: @josegonzalez Add the pid of the dokku process to event logs
|
||||
- #4289: @josegonzalez Clean precheck tmp file on exit
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4287: @josegonzalez Refactor parallelized goroutines to use error groups
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4292: @thomasfedb Update docs to note support for Ubuntu 20.04
|
||||
- #4293: @ltalirz Fix path in persistent storage docs
|
||||
|
||||
### Other
|
||||
|
||||
- #4290: @josegonzalez Add support for debug logging plugin trigger stderr and stdout
|
||||
|
||||
## 0.22.5
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.5/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.5 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4279: @josegonzalez Allow vmware-based vm to work on big sur
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4282: @josegonzalez Cleanup brew-bump integration
|
||||
- #4280: @josegonzalez Parallelize report and scheduler retrieval
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4285: @josegonzalez Reference official gitlab-ci integration
|
||||
- #4284: @josegonzalez Drop old doc link to gitlab ci docs
|
||||
- #4283: @josegonzalez Add CI documentation section for Github Actions and Gitlab
|
||||
- #4281: @josegonzalez Add forum link to documentation
|
||||
|
||||
## 0.22.4
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.4 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4274: @josegonzalez Use correct warning message for deprecated code
|
||||
|
||||
### New Features
|
||||
|
||||
- #4273: @josegonzalez Upgrade to golang 1.15
|
||||
|
||||
### Refactors
|
||||
|
||||
- #4275: @josegonzalez Add calls to verify app name in subcommands
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4272: @josegonzalez Correct help output for ssh-keys command
|
||||
|
||||
### Tests
|
||||
|
||||
- #4276: @josegonzalez Upgrade version of plugn used in tests
|
||||
|
||||
## 0.22.3
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.3/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.3 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4268: @josegonzalez Properly parse flags for logs command
|
||||
- #4264: @josegonzalez Correct argument handling when setting the `--app` flag
|
||||
- #4252: @magikid Allow symbolic links for certificate and key files
|
||||
|
||||
### New Features
|
||||
|
||||
- #4270: @josegonzalez Allow renaming old applications to new format
|
||||
- #4261: @josegonzalez Add remove by fingerprint and json format output to ssh-keys plugin
|
||||
- #4262: @josegonzalez Improve ps:restore logging
|
||||
- #4263: @josegonzalez Bump the dokku client formula on release
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4253: @guettli Highlight the default build method used by Dokku
|
||||
- #4250: @rlnd1 Update upgrading.md
|
||||
- #4249: @guettli Fix typo in zero downtime docs
|
||||
- #4247: @josegonzalez Clarify the domain name setting in the docs
|
||||
|
||||
### Tests
|
||||
|
||||
- #4269: @josegonzalez Rename duplicate test
|
||||
- #4266: @josegonzalez Update junit test files when a bats retry is successful
|
||||
- #4265: @josegonzalez Retry failing and skipped tests once
|
||||
|
||||
## 0.22.2
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4243: @josegonzalez Do not delete app when the app name is invalid
|
||||
|
||||
### New Features
|
||||
|
||||
- #4141: @josegonzalez Always initialize git repository
|
||||
|
||||
### Other
|
||||
|
||||
- #4244: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.25.5 to 1.26.0 in /tests/apps/php
|
||||
|
||||
## 0.22.1
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
```shell
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.1/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.1 bash bootstrap.sh
|
||||
```
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #4238: @josegonzalez Ensure dead files are created for docker object retirement
|
||||
- #4239: @josegonzalez Ensure all byte output is trimmed of whitespace
|
||||
- #4228: @Cellane Fix tags:deploy command for images that contain ONBUILD directive
|
||||
- #4233: @josegonzalez Properly parse releease command when there is an entrypoint
|
||||
- #4215: @josegonzalez Implement missing cleanup routines
|
||||
- #4212: @josegonzalez Cleanup docker options during post-delete
|
||||
- #4211: @ml-milan-vit Make the dokku-update command compatible with Dokku 0.22+
|
||||
|
||||
### New Features
|
||||
|
||||
- #4242: @josegonzalez Remove reference to 'whitelist'
|
||||
- #4220: @josegonzalez Update plugn from 0.5.0 to 0.5.1
|
||||
- #4241: @josegonzalez Properly handle stdout when capturing plugn output
|
||||
- #4237: @josegonzalez Release dokku-update 0.2.0
|
||||
- #4225: @znz Accept first pushed branch as deploy-branch
|
||||
|
||||
### Documentation
|
||||
|
||||
- #4236: @josegonzalez Remove note regarding not having an official client
|
||||
- #4234: @josegonzalez Switch to bats --filter for running a single test
|
||||
- #4222: @leopolicastro Fix typo in deployment tasks documentation
|
||||
- #4221: @srr013 Updating readme for clarity on git push step
|
||||
- #4214: @josegonzalez Expand backup and restore documentation
|
||||
- #4213: @josegonzalez Enhance the 'plugin' plugin documentation
|
||||
|
||||
### Tests
|
||||
|
||||
- #4218: @josegonzalez Enable compilation cache
|
||||
|
||||
### Other
|
||||
|
||||
- #4230: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 186 to 187 in /tests/apps/php
|
||||
- #4223: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.35.v20201120 to 11.0.0 in /tests/apps/java
|
||||
- #4224: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 185 to 186 in /tests/apps/php
|
||||
|
||||
## 0.22.0
|
||||
|
||||
Install/update via the bootstrap script:
|
||||
|
||||
16
Makefile
16
Makefile
@@ -2,9 +2,9 @@ DOKKU_VERSION ?= master
|
||||
|
||||
HEROKUISH_VERSION ?= 0.5.19
|
||||
PROCFILE_VERSION ?= 0.11.0
|
||||
PLUGN_VERSION ?= 0.5.0
|
||||
PLUGN_VERSION ?= 0.6.1
|
||||
SIGIL_VERSION ?= 0.6.0
|
||||
SSHCOMMAND_VERSION ?= 0.11.0
|
||||
SSHCOMMAND_VERSION ?= 0.12.0
|
||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||
PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v${PROCFILE_VERSION}/procfile-util_${PROCFILE_VERSION}_linux_x86_64.tgz
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v${PLUGN_VERSION}/plugn_${PLUGN_VERSION}_linux_x86_64.tgz
|
||||
@@ -130,16 +130,16 @@ apt-update:
|
||||
apt-get update -qq
|
||||
|
||||
jq:
|
||||
apt-get install -qq -y jq
|
||||
apt-get -qq -y --no-install-recommends install jq
|
||||
|
||||
dos2unix:
|
||||
apt-get install -qq -y dos2unix
|
||||
apt-get -qq -y --no-install-recommends install dos2unix
|
||||
|
||||
help2man:
|
||||
apt-get install -qq -y help2man
|
||||
apt-get -qq -y --no-install-recommends install help2man
|
||||
|
||||
man-db:
|
||||
apt-get install -qq -y man-db
|
||||
apt-get -qq -y --no-install-recommends install man-db
|
||||
|
||||
sshcommand:
|
||||
wget -qO /tmp/sshcommand_latest.tgz ${SSHCOMMAND_URL}
|
||||
@@ -159,13 +159,13 @@ sigil:
|
||||
tar xzf /tmp/sigil_latest.tgz -C /usr/local/bin
|
||||
|
||||
docker:
|
||||
apt-get install -qq -y curl
|
||||
apt-get -qq -y --no-install-recommends install curl
|
||||
grep -i -E "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
ifndef CI
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
ifdef DOCKER_VERSION
|
||||
apt-get install -qq -y docker-engine=${DOCKER_VERSION} || (apt-cache madison docker-engine ; exit 1)
|
||||
apt-get -qq -y --no-install-recommends install docker-engine=${DOCKER_VERSION} || (apt-cache madison docker-engine ; exit 1)
|
||||
endif
|
||||
sleep 2 # give docker a moment i guess
|
||||
endif
|
||||
|
||||
@@ -99,8 +99,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 https://raw.githubusercontent.com/dokku/dokku/v0.22.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.9/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@@ -31,10 +31,12 @@ Vagrant::configure("2") do |config|
|
||||
|
||||
config.vm.provider :vmware_fusion do |v, override|
|
||||
v.vmx["memsize"] = BOX_MEMORY
|
||||
v.ssh_info_public = true
|
||||
end
|
||||
|
||||
config.vm.provider :vmware_desktop do |v, override|
|
||||
v.vmx["memsize"] = BOX_MEMORY
|
||||
v.ssh_info_public = true
|
||||
end
|
||||
|
||||
config.vm.define "empty", autostart: false
|
||||
@@ -53,7 +55,7 @@ Vagrant::configure("2") do |config|
|
||||
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
|
||||
end
|
||||
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git build-essential >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git build-essential >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "cd /root/dokku && make dokku-installer"
|
||||
vm.vm.provision :shell do |s|
|
||||
s.inline = <<-EOT
|
||||
@@ -70,7 +72,7 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git dos2unix >/dev/null"
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git dos2unix >/dev/null"
|
||||
vm.vm.provision :shell, :inline => "cd /vagrant/ && export DOKKU_BRANCH=`git symbolic-ref -q --short HEAD 2>/dev/null` && export DOKKU_TAG=`git describe --tags --exact-match 2>/dev/null` && cd /root/ && cp /vagrant/bootstrap.sh ./ && dos2unix bootstrap.sh && bash bootstrap.sh"
|
||||
end
|
||||
|
||||
@@ -96,7 +98,7 @@ Vagrant::configure("2") do |config|
|
||||
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
|
||||
vm.vm.hostname = "#{DOKKU_DOMAIN}"
|
||||
vm.vm.network :private_network, ip: DOKKU_IP
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update >/dev/null && apt-get -qq -y install git >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update -qq >/dev/null && apt-get -qq -y --no-install-recommends install git >/dev/null && cd /root/dokku && #{make_cmd}"
|
||||
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all rpm-all"
|
||||
end
|
||||
|
||||
|
||||
14
bootstrap.sh
14
bootstrap.sh
@@ -22,7 +22,11 @@ log-fail() {
|
||||
|
||||
ensure-environment() {
|
||||
local FREE_MEMORY
|
||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||
if [[ -z "$DOKKU_TAG" ]]; then
|
||||
echo "Preparing to install $DOKKU_REPO..."
|
||||
else
|
||||
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
|
||||
fi
|
||||
|
||||
hostname -f >/dev/null 2>&1 || {
|
||||
log-fail "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
|
||||
@@ -42,13 +46,13 @@ install-requirements() {
|
||||
debian)
|
||||
if ! dpkg -l | grep -q software-properties-common; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y install software-properties-common
|
||||
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||
fi
|
||||
;;
|
||||
ubuntu)
|
||||
if ! dpkg -l | grep -q software-properties-common; then
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y install software-properties-common
|
||||
apt-get -qq -y --no-install-recommends install software-properties-common
|
||||
fi
|
||||
|
||||
add-apt-repository universe >/dev/null
|
||||
@@ -100,7 +104,7 @@ install-dokku-from-source() {
|
||||
log-fail "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
|
||||
fi
|
||||
|
||||
apt-get -qq -y install sudo git make software-properties-common
|
||||
apt-get -qq -y --no-install-recommends install sudo git make software-properties-common
|
||||
cd /root
|
||||
if [[ ! -d /root/dokku ]]; then
|
||||
git clone "$DOKKU_REPO" /root/dokku
|
||||
@@ -151,7 +155,7 @@ install-dokku-from-deb-package() {
|
||||
|
||||
echo "--> Initial apt-get update"
|
||||
apt-get update -qq >/dev/null
|
||||
apt-get -qq -y install apt-transport-https
|
||||
apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
if ! command -v docker &>/dev/null; then
|
||||
echo "--> Installing docker"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
GO_ARGS ?= -a
|
||||
GO_ARGS ?=
|
||||
GO_PLUGIN_MAKE_TARGET ?= build
|
||||
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
|
||||
BUILD_IMAGE := golang:1.14.4
|
||||
BUILD_IMAGE := golang:1.15.6
|
||||
|
||||
.PHONY: build-in-docker build clean src-clean
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@ FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
@@ -2,7 +2,7 @@ FROM dokku/build-base:0.0.1
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG WORKDIR=/go/src/github.com/dokku/dokku
|
||||
|
||||
@@ -2,7 +2,7 @@ FROM dokku/build-base:0.0.1
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN apt-get update -qq && apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
|
||||
RUN command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
|
||||
ARG GOLANG_VERSION
|
||||
|
||||
@@ -15,7 +15,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.22.0'
|
||||
VERSION = 'v0.22.9'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
@@ -154,7 +154,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
if 'vhost' in params and params['vhost'].value == 'true':
|
||||
vhost_enable = 'true'
|
||||
with open(vhost_filename, 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
f.write(params['hostname'].value.strip("/"))
|
||||
shutil.chown(vhost_filename, dokku_user, dokku_group)
|
||||
else:
|
||||
try:
|
||||
@@ -165,7 +165,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
hostname_filename = '{0}/HOSTNAME'.format(dokku_root)
|
||||
|
||||
with open(hostname_filename, 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
f.write(params['hostname'].value.strip("/"))
|
||||
|
||||
shutil.chown(hostname_filename, dokku_user, dokku_group)
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ main() {
|
||||
|
||||
# rebuild all applications
|
||||
dokku-log-info "Rebuilding all applications"
|
||||
dokku ps:rebuildall
|
||||
dokku ps:rebuild --all
|
||||
|
||||
dokku-log-info "Waiting for old containers to stop"
|
||||
sleep 120
|
||||
|
||||
@@ -32,8 +32,8 @@ fn-random-name() {
|
||||
}
|
||||
|
||||
fn-client-help-msg() {
|
||||
echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" 1>&2
|
||||
echo "--> i.e. git remote add dokku dokku@<dokku-host>:<app-name>" 1>&2
|
||||
echo "=====> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku"
|
||||
echo " i.e. git remote add dokku dokku@<dokku-host>:<app-name>"
|
||||
exit 20 # exit with specific status. only used in units tests for now
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@ main() {
|
||||
skip=false
|
||||
continue
|
||||
fi
|
||||
is_flag=false
|
||||
|
||||
[[ "$arg" =~ ^--.* ]] && is_flag=true
|
||||
|
||||
if [[ "$arg" == "--app" ]]; then
|
||||
APP=${args[$next_index]}
|
||||
@@ -82,10 +85,10 @@ main() {
|
||||
skip=true
|
||||
shift 2
|
||||
elif [[ "$arg" =~ ^--.* ]]; then
|
||||
[[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break
|
||||
[[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]] && APP_ARG="$arg" && break
|
||||
[[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x
|
||||
else
|
||||
if [[ "$cmd_set" == "true" ]]; then
|
||||
if [[ "$cmd_set" == "true" ]] && [[ "$is_flag" == "false" ]]; then
|
||||
APP_ARG="$arg"
|
||||
break
|
||||
else
|
||||
@@ -104,18 +107,18 @@ main() {
|
||||
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
|
||||
set -e
|
||||
else
|
||||
echo "This is not a git repository"
|
||||
echo " ! This is not a git repository" 1>&2
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$CMD" in
|
||||
apps:create)
|
||||
if [[ -z "$APP_ARG" ]]; then
|
||||
if [[ -z "$APP" ]] && [[ -z "$APP_ARG" ]]; then
|
||||
APP=$(fn-random-name)
|
||||
counter=0
|
||||
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null | grep -q "$APP"; do
|
||||
if [[ $counter -ge 100 ]]; then
|
||||
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
|
||||
echo " ! Could not reasonably generate a new app name. Try cleaning up some apps..." 1>&2
|
||||
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps
|
||||
exit 1
|
||||
else
|
||||
@@ -123,14 +126,14 @@ main() {
|
||||
counter=$((counter + 1))
|
||||
fi
|
||||
done
|
||||
else
|
||||
elif [[ -z "$APP" ]]; then
|
||||
APP="$APP_ARG"
|
||||
fi
|
||||
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then
|
||||
echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}"
|
||||
echo "-----> Application name is ${APP}"
|
||||
else
|
||||
echo "! Dokku remote not added! Do you already have a dokku remote?"
|
||||
echo " ! Dokku remote not added! Do you already have a dokku remote?" 1>&2
|
||||
return
|
||||
fi
|
||||
;;
|
||||
@@ -146,7 +149,12 @@ main() {
|
||||
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
|
||||
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
|
||||
# shellcheck disable=SC2068,SC2086
|
||||
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 $@ || {
|
||||
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
|
||||
return $ssh_exit_code
|
||||
}
|
||||
}
|
||||
|
||||
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"sudo apt-get update -qq >/dev/null",
|
||||
|
||||
"echo '--> Installing make requirement'",
|
||||
"sudo apt-get -qq -y install build-essential",
|
||||
"sudo apt-get -qq -y --no-install-recommends install build-essential",
|
||||
|
||||
"cd /tmp && make install-from-deb",
|
||||
"rm /root/.ssh/authorized_keys"
|
||||
|
||||
@@ -95,7 +95,7 @@ EOF
|
||||
local AWS_RELEASE=true
|
||||
fi
|
||||
|
||||
if [[ "$CI" != "true" ]] && [[ -z "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
if [[ "$AWS_RELEASE" == "true" ]] && [[ -z "$DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN" ]]; then
|
||||
log-info "You are running this without a DOKKU_PLUGIN_GITHUB_ACCESS_TOKEN environment variable."
|
||||
log-info "Doing so disables uploading releases to S3, which may be necessary for installing private plugins."
|
||||
while true; do
|
||||
|
||||
8
deb.mk
8
deb.mk
@@ -6,7 +6,7 @@ DOKKU_ARCHITECTURE = amd64
|
||||
|
||||
DOKKU_UPDATE_DESCRIPTION = 'Binary that handles updating Dokku and related systems'
|
||||
DOKKU_UPDATE_REPO_NAME ?= dokku/dokku
|
||||
DOKKU_UPDATE_VERSION ?= 0.1.0
|
||||
DOKKU_UPDATE_VERSION ?= 0.2.0
|
||||
DOKKU_UPDATE_ARCHITECTURE = amd64
|
||||
DOKKU_UPDATE_PACKAGE_NAME = dokku-update_$(DOKKU_UPDATE_VERSION)_$(DOKKU_UPDATE_ARCHITECTURE).deb
|
||||
|
||||
@@ -34,7 +34,7 @@ export SIGIL_DESCRIPTION
|
||||
install-from-deb:
|
||||
@echo "--> Initial apt-get update"
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get install -qq -y apt-transport-https
|
||||
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
@echo "--> Installing docker"
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
@@ -43,7 +43,7 @@ install-from-deb:
|
||||
wget -nv -O - https://packagecloud.io/dokku/dokku/gpgkey | apt-key add -
|
||||
@echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ $(shell lsb_release -cs 2>/dev/null || echo "bionic") main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
|
||||
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install dokku
|
||||
|
||||
deb-all: deb-setup deb-dokku deb-sigil deb-dokku-update
|
||||
mv $(BUILD_DIRECTORY)/*.deb .
|
||||
@@ -52,7 +52,7 @@ deb-all: deb-setup deb-dokku deb-sigil deb-dokku-update
|
||||
deb-setup:
|
||||
@echo "-> Updating deb repository and installing build requirements"
|
||||
@sudo apt-get update -qq >/dev/null
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git build-essential wget ruby-dev ruby1.9.1 lintian >/dev/null 2>&1
|
||||
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get -qq -y --no-install-recommends install gcc git build-essential wget ruby-dev ruby1.9.1 lintian >/dev/null 2>&1
|
||||
@command -v fpm >/dev/null || sudo gem install fpm --no-ri --no-rdoc
|
||||
@ssh -o StrictHostKeyChecking=no git@github.com || true
|
||||
|
||||
|
||||
4
debian/control
vendored
4
debian/control
vendored
@@ -1,9 +1,9 @@
|
||||
Package: dokku
|
||||
Version: 0.22.0
|
||||
Version: 0.22.9
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.10.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, net-tools, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Depends: locales, git, cpio, curl, man-db, netcat, sshcommand (>= 0.12.0), docker-engine-cs (>= 17.05.0) | docker-engine (>= 17.05.0) | docker-io (>= 17.05.0) | docker.io (>= 17.05.0) | docker-ce (>= 17.05.0) | docker-ee (>= 17.05.0) | moby-engine, net-tools, software-properties-common, procfile-util (>= 0.11.0), python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
|
||||
Recommends: herokuish (>= 0.3.4), parallel, dokku-update, dokku-event-listener
|
||||
Pre-Depends: gliderlabs-sigil, nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
|
||||
@@ -2,7 +2,51 @@
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. Backups should be regularly tested for data integrity and completeness.
|
||||
|
||||
## TLDR
|
||||
|
||||
> Warning: This method has many caveats. Please read this entire document before assuming these backups work as expected, and test your backups on a regular basis.
|
||||
|
||||
### Creating a backup
|
||||
|
||||
To create a backup, run the following command at a time when not executing any Dokku commands or app deployments:
|
||||
|
||||
```shell
|
||||
export BACKUP_TIME=$(date +%Y-%m-%d-%H-%M)
|
||||
sudo mkdir -p /var/lib/dokku/services
|
||||
sudo chown dokku:dokku /var/lib/dokku/services
|
||||
mkdir -p /tmp/dokku-backups/
|
||||
sudo tar -czvf "/tmp/dokku-backups/${BACKUP_TIME}.tar.gz" /home/dokku /var/lib/dokku/config /var/lib/dokku/data /var/lib/dokku/services /var/lib/dokku/plugins
|
||||
```
|
||||
|
||||
This will create a point-in-time backup of your entire Dokku installation in the `/tmp/dokku-backups` directory. This backup may be moved offsite to another location via rsync, sftp, or some other protocol.
|
||||
|
||||
It is recommended that backups are regularly cleaned from the originating server and tested as necessary.
|
||||
|
||||
### Restoring a backup
|
||||
|
||||
To extract the backup onto another server, copy the backup to the server and extract it using the following command.
|
||||
|
||||
```shell
|
||||
sudo tar -xzvf path/to/dokku/backup.tar.gz -C /
|
||||
```
|
||||
|
||||
At this point, all datastores should be individually started and checked for data integrity. Once this is complete, individual applications can be rebuilt. Please consult the [process management documentation](/docs/deployment/process-management.md#rebuilding-apps) for more information on how to rebuild applications.
|
||||
|
||||
## Caveats
|
||||
|
||||
### App config
|
||||
|
||||
Application config is largely held in a small number of places:
|
||||
|
||||
- `/var/lib/dokku/config`: Properties set and managed by plugins
|
||||
- `/var/lib/dokku/data`: Files generated or extracted by various plugins
|
||||
- `/home/dokku`: Certain parts of Dokku core store data in this location
|
||||
|
||||
Compressing these directories when no Dokku commands are running is enough to ensure a complete backup of the system.
|
||||
|
||||
### Code Repositories
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the `dokku` remote in you local app's repo.
|
||||
|
||||
@@ -11,7 +55,14 @@ git remote rm dokku
|
||||
git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
### Docker Image and Tar-based Apps
|
||||
|
||||
These applications may fail to rebuild via the normal `ps:rebuild` method. Redeploy these apps by running the original commands used to deploy them
|
||||
|
||||
### Datastores
|
||||
|
||||
> Please note that point-in-time backups of the `/var/lib/dokku/services` directory may contain partially written data due to how various datastores work. Consult the official datastore documentation for the best documentation surrounding proper backup and restore procedures.
|
||||
|
||||
Some plugins, like the official [dokku-postgres](https://github.com/dokku/dokku-postgres) plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
@@ -22,15 +73,26 @@ dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
Additionally, data for official datastores is located in the `/var/lib/dokku/services` directory. If the directory is restored and the plugin is available, a `dokku $SERVICE:start` may be enough to restart the service with the underlying data, so long as the datastore version does not change and the underlying data is not corrupt. If this is the case, it may be necessary to re-import all the data onto a fresh version of the datastore service.
|
||||
|
||||
### Plugins
|
||||
|
||||
The plugin directory is contained at the `/var/lib/dokku/plugins` directory. Core plugins will automatically be included in new installs, but custom plugins may not. The aforementioned `tar` creation command will back all plugins up, and the `tar` extract command will restore the plugins.
|
||||
|
||||
Note that restoring a plugin will not trigger any `install` or `dependencies` triggers. You will need to run these manually. See the [plugin management documentation](/docs/advanced-usage/plugin-management.md#installing-a-plugin) for more information on how to trigger these two hooks.
|
||||
|
||||
|
||||
### Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
System administrators are highly encouraged to store persistent data in app-specific subdirectories of the path `/var/lib/dokku/data/storage`. This will help ensure restores of the aforementioned primary Dokku directories will restore service to all apps.
|
||||
|
||||
See the [persistent storage documentation](/docs/advanced-usage/persistent-storage.md) for more information on how to attach persistent storage to your application.
|
||||
|
||||
## Disaster Recovery
|
||||
## Recovering app code
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
|
||||
In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
|
||||
|
||||
```shell
|
||||
mkdir [app-name] ; cd !$
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
Sometimes you need to run a command on at deployment time, but before an app is completely deployed. Common use cases include:
|
||||
Sometimes you need to run a command on deployment time, but before an app is completely deployed. Common use cases include:
|
||||
|
||||
* Checking a database is initialized
|
||||
* Running database migrations
|
||||
|
||||
@@ -37,7 +37,7 @@ This example demonstrates how to mount the recommended directory to `/storage` i
|
||||
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
|
||||
```
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage/node-js-app` to `/storage` inside the container.
|
||||
|
||||
Once you have mounted persistent storage, you will also need to restart the application. See the
|
||||
[process scaling documentation](/docs/deployment/process-management.md) for more information.
|
||||
|
||||
@@ -25,7 +25,9 @@ dokku plugins-install
|
||||
|
||||
## Usage
|
||||
|
||||
You can list all installed plugins using the `plugin:list` command:
|
||||
### Listing Plugins
|
||||
|
||||
Installed plugins can be listed via the `plugin:list` command:
|
||||
|
||||
```shell
|
||||
dokku plugin:list
|
||||
@@ -33,45 +35,60 @@ dokku plugin:list
|
||||
|
||||
```
|
||||
plugn: dev
|
||||
00_dokku-standard 0.22.0 enabled dokku core standard plugin
|
||||
20_events 0.22.0 enabled dokku core events logging plugin
|
||||
app-json 0.22.0 enabled dokku core app-json plugin
|
||||
apps 0.22.0 enabled dokku core apps plugin
|
||||
build-env 0.22.0 enabled dokku core build-env plugin
|
||||
buildpacks 0.22.0 enabled dokku core buildpacks plugin
|
||||
certs 0.22.0 enabled dokku core certificate management plugin
|
||||
checks 0.22.0 enabled dokku core checks plugin
|
||||
common 0.22.0 enabled dokku core common plugin
|
||||
config 0.22.0 enabled dokku core config plugin
|
||||
docker-options 0.22.0 enabled dokku core docker-options plugin
|
||||
domains 0.22.0 enabled dokku core domains plugin
|
||||
enter 0.22.0 enabled dokku core enter plugin
|
||||
git 0.22.0 enabled dokku core git plugin
|
||||
logs 0.22.0 enabled dokku core logs plugin
|
||||
network 0.22.0 enabled dokku core network plugin
|
||||
nginx-vhosts 0.22.0 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.22.0 enabled dokku core plugin plugin
|
||||
proxy 0.22.0 enabled dokku core proxy plugin
|
||||
ps 0.22.0 enabled dokku core ps plugin
|
||||
repo 0.22.0 enabled dokku core repo plugin
|
||||
resource 0.22.0 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.22.0 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.22.0 enabled dokku core shell plugin
|
||||
ssh-keys 0.22.0 enabled dokku core ssh-keys plugin
|
||||
storage 0.22.0 enabled dokku core storage plugin
|
||||
tags 0.22.0 enabled dokku core tags plugin
|
||||
tar 0.22.0 enabled dokku core tar plugin
|
||||
trace 0.22.0 enabled dokku core trace plugin
|
||||
00_dokku-standard 0.22.9 enabled dokku core standard plugin
|
||||
20_events 0.22.9 enabled dokku core events logging plugin
|
||||
app-json 0.22.9 enabled dokku core app-json plugin
|
||||
apps 0.22.9 enabled dokku core apps plugin
|
||||
build-env 0.22.9 enabled dokku core build-env plugin
|
||||
buildpacks 0.22.9 enabled dokku core buildpacks plugin
|
||||
certs 0.22.9 enabled dokku core certificate management plugin
|
||||
checks 0.22.9 enabled dokku core checks plugin
|
||||
common 0.22.9 enabled dokku core common plugin
|
||||
config 0.22.9 enabled dokku core config plugin
|
||||
docker-options 0.22.9 enabled dokku core docker-options plugin
|
||||
domains 0.22.9 enabled dokku core domains plugin
|
||||
enter 0.22.9 enabled dokku core enter plugin
|
||||
git 0.22.9 enabled dokku core git plugin
|
||||
logs 0.22.9 enabled dokku core logs plugin
|
||||
network 0.22.9 enabled dokku core network plugin
|
||||
nginx-vhosts 0.22.9 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.22.9 enabled dokku core plugin plugin
|
||||
proxy 0.22.9 enabled dokku core proxy plugin
|
||||
ps 0.22.9 enabled dokku core ps plugin
|
||||
repo 0.22.9 enabled dokku core repo plugin
|
||||
resource 0.22.9 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.22.9 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.22.9 enabled dokku core shell plugin
|
||||
ssh-keys 0.22.9 enabled dokku core ssh-keys plugin
|
||||
storage 0.22.9 enabled dokku core storage plugin
|
||||
tags 0.22.9 enabled dokku core tags plugin
|
||||
tar 0.22.9 enabled dokku core tar plugin
|
||||
trace 0.22.9 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
|
||||
### Checking if a plugin is installed
|
||||
|
||||
You can check if a plugin has been installed via the `plugin:installed` command:
|
||||
|
||||
```shell
|
||||
dokku plugin:installed postgres
|
||||
```
|
||||
|
||||
### Installing a plugin
|
||||
|
||||
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.
|
||||
|
||||
The most common usage is to install a plugin from a url. This url may be any of the following:
|
||||
|
||||
- `git`: For git+ssh based plugin repository clones.
|
||||
- `ssh`: For git+ssh based plugin repository clones.
|
||||
- `file`: For copying plugins from a path on disk.
|
||||
- `https`: For http based plugin repository clones.
|
||||
|
||||
Additionally, any urls with the extensions `.tar.gz` or `.tgz` are treated as Gzipped Tarballs for installation purposes and will be downloaded and extracted into place.
|
||||
|
||||
```shell
|
||||
dokku plugin:install https://github.com/dokku/dokku-postgres.git
|
||||
```
|
||||
@@ -87,7 +104,68 @@ Checking connectivity... done.
|
||||
-----> Plugin postgres enabled
|
||||
```
|
||||
|
||||
You can also uninstall a third-party plugin using the `plugin:uninstall` command:
|
||||
For git-based plugin installation, a commit SHA-like object may be specified (tag/branch/commit sha) via the `--committish` argument and Dokku will attempt to install the specified commit object.
|
||||
|
||||
```shell
|
||||
# where 2.0.0 is a potential git tag
|
||||
dokku plugin:install https://github.com/dokku/dokku-postgres.git --committish 2.0.0
|
||||
```
|
||||
|
||||
Plugin names are interpolated based on the repository name minus the `dokku-` prefix. If the plugin being installed has a name other than what matches the repository name - or another name is desired - the `--name` flag can be used to override this interpolation.
|
||||
|
||||
```shell
|
||||
dokku plugin:install https://github.com/dokku/smoke-test-plugin.git --name smoke-test-plugin
|
||||
```
|
||||
|
||||
The `--core` flag may also be indicated as the sole argument, though it is only for installation of core plugins, and thus not useful for end-user installations.
|
||||
|
||||
```shell
|
||||
dokku plugin:install --core
|
||||
```
|
||||
|
||||
Finally, all flags may be omitted to trigger the `install` procedures for both core and third-party plugins:
|
||||
|
||||
```shell
|
||||
dokku plugin:install
|
||||
```
|
||||
|
||||
### Installing plugin dependencies
|
||||
|
||||
In some cases, plugins will have system-level dependencies. These are not automatically installed via `plugin:install`, and must be separately via the `plugin:install-dependencies` command. This will run through all the `dependencies` trigger for all plugins.
|
||||
|
||||
```shell
|
||||
dokku plugin:install-dependencies
|
||||
```
|
||||
|
||||
This command may also target _just_ core plugins via the `--core` flag. This is usually only useful for source-based installs of Dokku.
|
||||
|
||||
```shell
|
||||
dokku plugin:install-dependencies --core
|
||||
```
|
||||
|
||||
### Updating a plugin
|
||||
|
||||
An installed, third-party plugin can be updated can updated via the `plugin:update` command. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
|
||||
|
||||
Please note that this command is only valid for plugin installs that were backed by a git-repository.
|
||||
|
||||
```shell
|
||||
dokku plugin:update postgres
|
||||
```
|
||||
|
||||
```
|
||||
Plugin (postgres) updated
|
||||
```
|
||||
|
||||
An optional commit SHA-like object may be specified.
|
||||
|
||||
```shell
|
||||
dokku plugin:update postgres 2.0.0
|
||||
```
|
||||
|
||||
### Uninstalling a plugin
|
||||
|
||||
Third party plugins can be uninstalled using the `plugin:uninstall` command:
|
||||
|
||||
```shell
|
||||
dokku plugin:uninstall postgres
|
||||
@@ -97,7 +175,9 @@ dokku plugin:uninstall postgres
|
||||
-----> Plugin postgres uninstalled
|
||||
```
|
||||
|
||||
Enabling or disabling a plugin can also be useful in cases where you are debugging whether a third-party plugin is causing issues in your Dokku installation:
|
||||
### Disabling a plugin
|
||||
|
||||
Disabling a plugin can also be useful for debugging whether a third-party plugin is causing issues in a Dokku installation. Another common use case is for disabling core functionality for replacement with a third-party plugin.
|
||||
|
||||
```shell
|
||||
dokku plugin:disable postgres
|
||||
@@ -107,6 +187,10 @@ dokku plugin:disable postgres
|
||||
-----> Plugin postgres disabled
|
||||
```
|
||||
|
||||
### Enabling a plugin
|
||||
|
||||
Disabled plugins can be re-enabled via the `plugin:enable` command.
|
||||
|
||||
```shell
|
||||
dokku plugin:enable postgres
|
||||
```
|
||||
@@ -115,12 +199,10 @@ dokku plugin:enable postgres
|
||||
-----> Plugin postgres enabled
|
||||
```
|
||||
|
||||
Finally, you can update an installed third-party plugin. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
|
||||
### Triggering a plugin trigger
|
||||
|
||||
The `plugin:trigger` can be used to call any internal plugin trigger. This may have unintended consequences, and thus should only be called for development or debugging purposes.
|
||||
|
||||
```shell
|
||||
dokku plugin:update postgres
|
||||
```
|
||||
|
||||
```
|
||||
Plugin (postgres) updated
|
||||
dokku plugin:trigger some-internal-trigger args-go-here
|
||||
```
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/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.22.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.9\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -39,13 +39,13 @@ h1 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@
|
||||
"0.19.13",
|
||||
"0.20.4",
|
||||
"0.21.4",
|
||||
"0.22.0"
|
||||
"0.22.9"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Given the constraints, running Dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
|
||||
|
||||
While Dokku does not yet have an official client, there are a multitude of ways in which you can interact with your Dokku installation. The easiest is to use the **bash** client, though you may wish to use another.
|
||||
The easiest way to interact with Dokku remotely is by using the official client. Documented below are the various clients that you may wish to use.
|
||||
|
||||
## Official Client
|
||||
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
# Deploying with Gitlab CI
|
||||
|
||||
Gitlab-CI can be used to automatically deploy a Dokku application using the [ilyasemenov/gitlab-ci-git-push image](https://github.com/IlyaSemenov/gitlab-ci-git-push) docker image.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
Make sure you have a Gitlab account and a Dokku project hosted on Gitlab. This method works whether if you are using buildpacks or Dockerfile.
|
||||
|
||||
Make sure you have set up an app on the remote machine following [these instructions](http://dokku.viewdocs.io/dokku/deployment/application-deployment/) and can successfully deploy to it from the local machine.
|
||||
|
||||
## Deploy automatically to production
|
||||
|
||||
### Add a secret variable
|
||||
|
||||
Browse to the repository in question and visit the following path: `the Gitlab project > Settings > CI/CD.`
|
||||
|
||||
Click on `Secret variables > Expand` and fill in the blanks.
|
||||
|
||||
- Key: `SSH_PRIVATE_KEY`
|
||||
- Value: paste in an SSH private key registered in Dokku:
|
||||
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
...
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
||||
- Environment scope: `production` (This make sure that `SSH_PRIVATE_KEY` is not available on merge requests or tests)
|
||||
- Protected: Do not check this checkbox unless you know what you are doing
|
||||
|
||||
### Add CI script
|
||||
|
||||
Create a file named `.gitlab-ci.yml` at the root directory of the repository with the following contents:
|
||||
|
||||
```yaml
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
APP_NAME: node-js-app
|
||||
|
||||
deploy:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
environment:
|
||||
name: production
|
||||
url: https://$APP_NAME.dokku.me/
|
||||
only:
|
||||
- master
|
||||
script:
|
||||
- git-push ssh://dokku@dokku.me:22/$APP_NAME
|
||||
```
|
||||
|
||||
You will need to modify the `APP_NAME` variable to the correct value for your application name.
|
||||
|
||||
Running `git push origin master` will now trigger a gitlab-ci pipeline that will automatically deploy your application to your Dokku server. Go to your project on Gitlab and visit "Project > Pipelines" to see the deployment log.
|
||||
|
||||
|
||||
## Review Applications
|
||||
|
||||
One useful feature of gitlab is to be able to create review applications for non-production branches. This allows teams to review changes _before_ they are pushed to production. First, recreate the `SSH_PRIVATE_KEY` secret - do not delete the existing secret - but scoped to the `review/*` environment. This will allow non-production gitlab environments access to the secret.
|
||||
|
||||
Next, we'll need to create the `review_app` gitlab job in our `.gitlab-ci.yaml`.
|
||||
|
||||
```yaml
|
||||
review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
url: https://$CI_ENVIRONMENT_SLUG.dokku.me/
|
||||
on_stop: stop_review_app
|
||||
only:
|
||||
- branches
|
||||
except:
|
||||
- master
|
||||
script:
|
||||
- mkdir -p ~/.ssh && echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
||||
- ssh-keyscan -H 22 "dokku.me" >> ~/.ssh/known_hosts
|
||||
- ssh -t dokku@dokku.me -- apps:clone --ignore-existing --skip-deploy "$APP_NAME" "$CI_ENVIRONMENT_SLUG"
|
||||
- git-push ssh://dokku@dokku.me:22/$CI_ENVIRONMENT_SLUG
|
||||
```
|
||||
|
||||
The first two lines ensure that Gitlab can talk to the Dokku server. Next, we take advantage of the `apps:clone` command, and clone the existing application and all of it's configuration to a new location. If the new application already exists, the third line of the `script` step will be ignored. We also ignore the first deploy script to speed up the cloning process. Finally, the fourth line of the `script` step will deploy the code as normal.
|
||||
|
||||
The above only runs for non-master branches, and will _also_ trigger an `on_stop` job called `stop_review_app`. When the branch is deleted or the code is merged, the `stop_review_app` job will be triggered.
|
||||
|
||||
```yaml
|
||||
stop_review_app:
|
||||
image: ilyasemenov/gitlab-ci-git-push
|
||||
stage: deploy
|
||||
variables:
|
||||
GIT_STRATEGY: none
|
||||
environment:
|
||||
name: review/$CI_COMMIT_REF_NAME
|
||||
action: stop
|
||||
when: manual
|
||||
script:
|
||||
- mkdir -p ~/.ssh && echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
|
||||
- ssh-keyscan -H 22 "dokku.me" >> ~/.ssh/known_hosts
|
||||
- ssh -t dokku@dokku.me -- --force apps:destroy "$CI_ENVIRONMENT_SLUG"
|
||||
```
|
||||
|
||||
The `stop_review_app` step will delete the temporary application, cleaning up now unused server resources.
|
||||
|
||||
Going further, the following modifications can be done:
|
||||
|
||||
- Notify via chat whenever a review application is created/destroyed.
|
||||
- Push to a separate, staging server as opposed to a production server.
|
||||
- Clone a "staging" application so that review applications do not affect production datasets.
|
||||
@@ -87,6 +87,7 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `PLUGIN_CORE_AVAILABLE_PATH` | `$PLUGIN_CORE_PATH/available"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all available core plugins. |
|
||||
| `PLUGIN_CORE_ENABLED_PATH` | `$PLUGIN_CORE_PATH/enabled"` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | The directory that stores all enabled core plugins. |
|
||||
| `DOKKU_LOGS_DIR` | `/var/log/dokku` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where dokku logs should be written to. |
|
||||
| `DOKKU_LOGS_HOST_DIR` | `$DOKKU_LOGS_DIR` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | A path on the host that will be mounted into the vector logging container. |
|
||||
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
|
||||
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
|
||||
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
|
||||
|
||||
@@ -77,7 +77,7 @@ dokku nginx:access-logs node-js-app -t
|
||||
|
||||
### Checking error logs
|
||||
|
||||
You may check nginx error logs via the `nginx:access-logs` command. This assumes that app error logs are being stored in `/var/log/nginx/$APP-error.log`, as is the default in the generated `nginx.conf`.
|
||||
You may check nginx error logs via the `nginx:error-logs` command. This assumes that app error logs are being stored in `/var/log/nginx/$APP-error.log`, as is the default in the generated `nginx.conf`.
|
||||
|
||||
```shell
|
||||
dokku nginx:error-logs node-js-app
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Deploying to Dokku
|
||||
|
||||
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should set the `DOKKU_DOMAIN` value in the `Vagrantfile` before you initialize the Vagrant VM.
|
||||
> Note: This walkthrough uses the hostname `dokku.me` in commands. When deploying to your own server, you should substitute the domain `dokku.me` for the domain name or IP address associated with your server. Users of the Vagrant VM included with Dokku can use `dokku.me` which points to the IP of the VM.
|
||||
|
||||
## Deploy tutorial
|
||||
|
||||
@@ -103,6 +103,7 @@ Once the deploy is complete, the application's web URL will be generated as abov
|
||||
Dokku supports deploying applications in a few ways:
|
||||
|
||||
- [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) via [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks): See the [herokuish buildpacks documentation](/docs/deployment/methods/herokuish-buildpacks.md) to learn about the different ways to specify a buildpack.
|
||||
- This is the default method used by Dokku.
|
||||
- [Dockerfile](https://docs.docker.com/reference/builder/): See the [dockerfile documentation](/docs/deployment/methods/dockerfiles.md) to learn about the different ways to configure Dockerfile-based deploys.
|
||||
- [Docker Image](https://docs.docker.com/get-started/overview/#docker-objects): See the [docker image documentation](/docs/deployment/methods/images.md) to learn about how to deploy a Docker Image.
|
||||
|
||||
@@ -146,6 +147,7 @@ If you do not enter a fully qualified domain name when pushing your app, Dokku d
|
||||
```shell
|
||||
# from your local machine
|
||||
# the remote username *must* be dokku or pushes will fail
|
||||
# the below example assumes your app server domain or IP is dokku.me. Push in the form of: dokku@{serveripordomain}:{dokkuappname}
|
||||
git remote add dokku dokku@dokku.me:ruby-getting-started
|
||||
git push dokku main:master
|
||||
```
|
||||
|
||||
25
docs/deployment/continuous-integration/generic.md
Normal file
25
docs/deployment/continuous-integration/generic.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Generic CI/CD Integration
|
||||
|
||||
In cases where there is no direct or documented integration available, the Dokku project provides an [Official Docker Image](https://github.com/dokku/ci-docker-image) for use in Continuous Integration/Continuous Deployment (CI/CD) systems.
|
||||
|
||||
Assuming a Docker image can be run as a CI task with environment variables injected, the following CI systems will have their variables automatically detected:
|
||||
|
||||
- [circleci](https://circleci.com/)
|
||||
- [cloudbees](https://www.cloudbees.com/)
|
||||
- [drone](https://www.drone.io/)
|
||||
- [github actions](https://github.com/features/actions)
|
||||
- [gitlab-ci](https://about.gitlab.com/stages-devops-lifecycle/continuous-integration/)
|
||||
- [semaphoreci](https://semaphoreci.com/)
|
||||
- [travisci](https://travis-ci.com/)
|
||||
|
||||
## Simple Usage
|
||||
|
||||
The simplest usage of the image is as follows.
|
||||
|
||||
```shell
|
||||
# where the `.env` file contains `GIT_REMOTE_URL` and `SSH_PRIVATE_KEY`
|
||||
|
||||
docker run --rm -v="$PWD:/app" --env-file=.env dokku/ci-docker-image dokku-deploy
|
||||
```
|
||||
|
||||
For more configuration examples and further documentation, see the [ci-docker-image](https://github.com/dokku/ci-docker-image) readme.
|
||||
31
docs/deployment/continuous-integration/github-actions.md
Normal file
31
docs/deployment/continuous-integration/github-actions.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Github Actions
|
||||
|
||||
The Dokku project has an official Githb Action available on the [Github Marketplace](https://github.com/marketplace/actions/dokku). The simplest usage example is as follows:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: 'deploy'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cloning repo
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Push to dokku
|
||||
uses: dokku/github-action@v1
|
||||
with:
|
||||
git_remote_url: 'ssh://dokku@dokku.me:22/appname'
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
```
|
||||
|
||||
|
||||
For further usage documentation and other advanced examples, see the entry on the [Github Marketplace](https://github.com/marketplace/actions/dokku).
|
||||
25
docs/deployment/continuous-integration/gitlab-ci.md
Normal file
25
docs/deployment/continuous-integration/gitlab-ci.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Gitlab CI
|
||||
|
||||
Gitlab-CI can be used to automatically deploy a Dokku application via the official the [dokku/ci-docker-image](https://github.com/dokku/ci-docker-image). The simplest example is as follows:
|
||||
|
||||
```
|
||||
---
|
||||
image: dokku/ci-docker-image
|
||||
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
GIT_DEPTH: 0
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
variables:
|
||||
GIT_REMOTE_URL: ssh://dokku@dokku.me:22/appname
|
||||
script: dokku-deploy
|
||||
after_script: dokku-unlock
|
||||
```
|
||||
|
||||
For further usage documentation and other advanced examples, see Dokku's [gitlab-ci](https://github.com/dokku/gitlab-ci) repository.
|
||||
@@ -2,7 +2,12 @@
|
||||
|
||||
```
|
||||
logs <app> [-h] [-t] [-n num] [-q] [-p process] # Display recent log output
|
||||
logs:failed [--parallel count] [--all|<app>] # Shows the last failed deploy logs
|
||||
logs:failed [--all|<app>] # Shows the last failed deploy logs
|
||||
logs:report [<app>] [<flag>] # Displays a logs report for one or more apps
|
||||
logs:set [--global|<app>] <key> <value> # Set or clear a logs property for an app
|
||||
logs:vector-logs [--num num] [--tail] # Display vector log output
|
||||
logs:vector-start # Start the vector logging container
|
||||
logs:vector-stop # Stop the vector logging container
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -40,7 +45,7 @@ will show logs continually from the web process.
|
||||
|
||||
In some cases, it may be useful to retrieve the logs from a previously failed deploy.
|
||||
|
||||
You can retrieve these logs by using the `logs:failed` command
|
||||
You can retrieve these logs by using the `logs:failed` command.
|
||||
|
||||
```shell
|
||||
dokku logs:failed node-js-app
|
||||
@@ -51,3 +56,94 @@ You may also fetch all failed app logs by using the `--all` flag.
|
||||
```shell
|
||||
dokku logs:failed --all
|
||||
```
|
||||
|
||||
### Vector Logging Shipping
|
||||
|
||||
> New as of 0.22.6
|
||||
|
||||
Vector is an open-source, lightweight and ultra-fast tool for building observability pipelines. Dokku integrates with it for shipping container logs for the `docker-local` scheduler. Users may configure log-shipping on a per-app or global basis, neither of which interfere with the `dokku logs` commands.
|
||||
|
||||
#### Starting the Vector container
|
||||
|
||||
> Warning: While the default vector image may be updated over time, this will not impact running vector containers. Users are encouraged to view any Dokku and Vector changelogs to ensure their system will continue running as expected.
|
||||
|
||||
Vector may be started via the `logs:vector-start` command.
|
||||
|
||||
```shell
|
||||
dokku logs:vector-start
|
||||
```
|
||||
|
||||
This will start a new container named `vector` with Dokku's vector config mounted and ready for use. If a running container already exists, this command will do nothing. Additionally, if a container exists but is not running, this command will attempt to start the container.
|
||||
|
||||
While the default vector image is hardcoded, users may specify an alternative via the `--vector-image` flag:
|
||||
|
||||
```shell
|
||||
dokku logs:vector-start --vector-image timberio/vector:latest-debian
|
||||
```
|
||||
|
||||
The `vector` container will be started with the following volume mounts:
|
||||
|
||||
- `/var/lib/dokku/data/logs/vector.json:/etc/vector/vector.json`
|
||||
- `/var/run/docker.sock:/var/run/docker.sock`
|
||||
- `/var/log/dokku/apps:/var/log/dokku/apps`
|
||||
|
||||
The final volume mount - `/var/log/dokku/apps` - may be used for users that wish to ship logs to a file on disk that may be later logrotated. This directory is owned by the `dokku` user and group, with permissions set to `0755`. At this time, log-rotation is not configured for this directory.
|
||||
|
||||
#### Stopping the Vector container
|
||||
|
||||
Vector may be stopped via the `logs:vector-stop` command.
|
||||
|
||||
```shell
|
||||
dokku logs:vector-stop
|
||||
```
|
||||
|
||||
The `vector` container will be stopped and removed from the system. If the container is not running, this command will do nothing.
|
||||
|
||||
#### Configuring a log sink
|
||||
|
||||
Vector uses the concept of log "sinks" to send logs to a given endpoint. Log sinks may be configured globally or on a per-app basis by specifying a `vector-sink` in DSN form with the `logs:set` command. Specifying a sink value will reload any running vector container.
|
||||
|
||||
```shell
|
||||
# setting the sink value in quotes is encouraged to avoid
|
||||
# issues with ampersand encoding in shell commands
|
||||
dokku logs:set node-js-app sink "console://?encoding[codec]=json"
|
||||
```
|
||||
|
||||
A sink may be removed by setting an empty value, which will also reload the running vector container.
|
||||
|
||||
```shell
|
||||
dokku logs:set node-js-app vector-sink
|
||||
```
|
||||
|
||||
Only one sink may be specified on a per-app basis at a given time.
|
||||
|
||||
Log sinks can also be specified globally by specifying the `--global` flag to `logs:set` with no app name specified:
|
||||
|
||||
```shell
|
||||
dokku logs:set --global vector-sink "console://?encoding[codec]=json"
|
||||
```
|
||||
|
||||
As with app-specific sink settings, the global value may also be cleared by setting no value.
|
||||
|
||||
```shell
|
||||
dokku logs:set --global vector-sink
|
||||
```
|
||||
|
||||
##### Log Sink DSN Format
|
||||
|
||||
The DSN form of a sink is as follows:
|
||||
|
||||
```
|
||||
SINK_TYPE://?SINK_OPTIONS
|
||||
```
|
||||
|
||||
Valid values for `SINK_TYPE` include all log vector log sinks, while `SINK_OPTIONS` is a query-string form for the sink's options. The following is a short description on how to set various values:
|
||||
|
||||
- `bool`: form: `key=bool`
|
||||
- `string`: form: `key=string`
|
||||
- `int`: form: `key=int`
|
||||
- `[string]`: form: `key[]=string`
|
||||
- `[int]`: form: `key[]=int`
|
||||
- `table`: form: `option[key]=value
|
||||
|
||||
Please read the [sink documentation](https://vector.dev/docs/reference/sinks/) for your sink of choice to configure the sink as desired.
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
> New as of 0.7.0
|
||||
|
||||
```
|
||||
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
|
||||
ssh-keys:list [<name>] # List of all authorized Dokku public ssh keys
|
||||
ssh-keys:remove <name> # Remove SSH public key by name
|
||||
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
|
||||
ssh-keys:list [--format text|json] [<name>] # List of all authorized Dokku public ssh keys
|
||||
ssh-keys:remove [--fingerprint fingerprint|<name>] # Remove SSH public key by name
|
||||
```
|
||||
|
||||
When pushing to Dokku, SSH key-based authorization is the preferred authentication method, for ease of use and increased security.
|
||||
@@ -42,6 +42,20 @@ The keys for a specific user may be listed by specifying a second argument to th
|
||||
dokku ssh-keys:list admin
|
||||
```
|
||||
|
||||
> 0.22.3
|
||||
|
||||
The output format may be specified via the `--format` flag. Supported values include `json` and `text`.
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:list --format json
|
||||
```
|
||||
|
||||
This can additionally be used to filter to keys for a particular user:
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:list --format json admin
|
||||
```
|
||||
|
||||
### Adding SSH keys
|
||||
|
||||
You can add your public key to Dokku with the `ssh-keys:add` command. The output will be the fingerprint of the SSH key:
|
||||
@@ -74,10 +88,16 @@ cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
|
||||
|
||||
As key names are unique, they can be used to remove a public SSH key.
|
||||
|
||||
```SHELL
|
||||
```shell
|
||||
dokku ssh-keys:remove KEY_NAME
|
||||
```
|
||||
|
||||
An SSH Key can also be removed by fingerprint.
|
||||
|
||||
```shell
|
||||
dokku ssh-keys:remove --fingerprint FINGERPRINT
|
||||
```
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
Support for scoping commands to specific users can be added through plugins that take advantage of the [user-auth](/docs/development/plugin-triggers.md#user-auth) plugin trigger to handle command authorization.
|
||||
|
||||
@@ -10,7 +10,7 @@ checks:run <app> [process-type(s)] Runs zero-downtime checks for all proce
|
||||
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
```
|
||||
|
||||
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by for an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
|
||||
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds *after* the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
|
||||
|
||||
You may both create user-defined checks for web processes using a `CHECKS` file, as well as customize any and all parts of this experience using the checks plugin.
|
||||
|
||||
@@ -157,6 +157,38 @@ https://static.dokku.me/logo.png
|
||||
|
||||
While a full URL may be used in order to invoke checks, if you are using relative URLs, the port *must* be omitted.
|
||||
|
||||
> Changed as of 0.22.5
|
||||
|
||||
Please note that dollar sign bracket characters (`{` and `}`) must be escaped when used within a `CHECKS` file. Escaping follows golang template rules. The proper way to do this is via one of the following methods:
|
||||
|
||||
```
|
||||
# escaping the `{` character
|
||||
# using double-quotes
|
||||
{{"{"}}
|
||||
|
||||
# using raw string constants
|
||||
{{`{`}}
|
||||
|
||||
# escaping the `}` character
|
||||
# using double-quotes
|
||||
{{"}"}}
|
||||
|
||||
# using raw string constants
|
||||
{{`}`}}
|
||||
```
|
||||
|
||||
### Templating Checks Files
|
||||
|
||||
> New as of 0.22.5
|
||||
|
||||
An app's `CHECKS` file is sent through a single pass of the [`sigil`](https://github.com/gliderlabs/sigil/) templating tool. This enables usage of Golang templating within application `CHECKS` files. In addition to general templating access, access to app environment variables is also allowed via the `var` function:
|
||||
|
||||
```
|
||||
{{ var "SOME_ENV_VAR" }}
|
||||
```
|
||||
|
||||
This may be useful if certain zero-downtime checks require access to an app-specific value, such as a domain name.
|
||||
|
||||
### Check settings
|
||||
|
||||
The default behavior is to wait for `5` seconds before running the checks, to timeout the checks after `30` seconds, and to attempt the checks `5` times. If the checks fail `5` times, the deployment is considered failed and the old container will continue serving traffic.
|
||||
|
||||
@@ -327,7 +327,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
case "$DOKKU_DISTRO" in
|
||||
debian|ubuntu)
|
||||
apt-get install -qq -y nginx
|
||||
apt-get -qq -y --no-install-recommends install nginx
|
||||
;;
|
||||
|
||||
opensuse)
|
||||
@@ -451,7 +451,6 @@ echo -n "$STDIN$output"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -470,7 +469,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$2"
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -488,7 +486,6 @@ verify_app_name "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; $IMAGE_SOURCE_TYPE="$2" IMAGE_TAG="$3"; PROC_TYPE="$4"; CONTAINER_INDEX="$5"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -506,7 +503,6 @@ verify_app_name "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_SOURCE_TYPE="$3"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -526,7 +522,6 @@ verify_app_name "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1060,7 +1055,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1077,7 +1072,7 @@ APP="$1"; verify_app_name "$APP"
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1199,7 +1194,7 @@ sudo service haproxy reload
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
TMP_WORK_DIR="$2"
|
||||
REV="$3" # optional, may not be sent for tar-based builds
|
||||
|
||||
@@ -1224,7 +1219,7 @@ popd >/dev/null
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/haproxy/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
|
||||
haproxy-build-config "$APP"
|
||||
```
|
||||
@@ -1244,7 +1239,6 @@ haproxy-build-config "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1267,7 +1261,6 @@ verify_app_name "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1287,7 +1280,6 @@ verify_app_name "$APP"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1373,7 +1365,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
@@ -1394,7 +1385,6 @@ fi
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
CID=$(docker run "${DOCKER_COMMIT_LABEL_ARGS[@]}" -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
@@ -1415,7 +1405,7 @@ docker commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" $CID $IMAGE >/dev/null
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1432,7 +1422,7 @@ APP="$1"; verify_app_name "$APP"
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
APP="$1"
|
||||
|
||||
# TODO
|
||||
```
|
||||
@@ -1470,13 +1460,12 @@ echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Installing GraphicsMagick..."
|
||||
|
||||
CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick >/dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
(apt-get update -qq && apt-get -qq -y --no-install-recommends install graphicsmagick && apt-get clean)"
|
||||
|
||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $CID) -eq 0
|
||||
@@ -1518,7 +1507,6 @@ APP="$1"; IMAGE_TAG="$2";
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
# TODO
|
||||
```
|
||||
|
||||
@@ -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.22.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.22.9-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'
|
||||
|
||||
@@ -75,20 +75,14 @@ bats tests/unit/10_apps.bats tests/unit/10_certs.bats
|
||||
|
||||
In order to increase testing velocity, a wrapper script around Bats is available that can be used to run a single test case within a suite.
|
||||
|
||||
Tests within a suite may be listed by specifying the suite as a parameter to the `tests/bats-exec-test-single` script.
|
||||
Tests within a suite may be listed by specifying the suite as a parameter to `bats`.
|
||||
|
||||
```shell
|
||||
tests/bats-exec-test-single tests/unit/10_apps.bats
|
||||
bats tests/unit/10_apps.bats
|
||||
```
|
||||
|
||||
A single test can be specified as a second parameter. The test is selected by fuzzy-match, and only the first match is executed.
|
||||
A single test can be specified via the `--filter` argument. The tests are selected via regex match, and all matches are executed.
|
||||
|
||||
```shell
|
||||
tests/bats-exec-test-single tests/unit/10_apps.bats clone
|
||||
```
|
||||
|
||||
Some special characters are translated in the test listing, specifically the characters `( ) :`, while others are not. The fuzzy matching happens on test names as listed by this script, so executing a test with a more specific name will work as expected.
|
||||
|
||||
```shell
|
||||
tests/bats-exec-test-single tests/unit/10_apps.bats clone_-2d-2dskip-2ddeploy
|
||||
bats --filter clone tests/unit/10_apps.bats
|
||||
```
|
||||
|
||||
@@ -5,7 +5,7 @@ As of 0.3.18, Dokku defaults to being installed via Debian package. While certai
|
||||
```shell
|
||||
# install prerequisites
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get install -qq -y apt-transport-https
|
||||
sudo apt-get -qq -y --no-install-recommends install apt-transport-https
|
||||
|
||||
# install docker
|
||||
wget -nv -O - https://get.docker.com/ | sh
|
||||
@@ -16,7 +16,7 @@ OS_ID="$(lsb_release -cs 2>/dev/null || echo "bionic")"
|
||||
echo "xenial bionic focal" | grep -q "$OS_ID" || OS_ID="bionic"
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ ${OS_ID} main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq >/dev/null
|
||||
sudo apt-get install -qq -y dokku
|
||||
sudo apt-get -qq -y install dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
```
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.22.0
|
||||
docker pull dokku/dokku:0.22.9
|
||||
```
|
||||
|
||||
Next, run the image.
|
||||
@@ -17,7 +17,7 @@ docker run \
|
||||
--publish 8443:443 \
|
||||
--volume /var/lib/dokku:/mnt/dokku \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
dokku/dokku:0.22.0
|
||||
dokku/dokku:0.22.9
|
||||
```
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
@@ -6,7 +6,7 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
|
||||
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of [Ubuntu 16.04/18.04 x64](https://www.ubuntu.com/download), [Debian 9+ x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- A fresh installation of [Ubuntu 16.04/18.04/20.04 x64](https://www.ubuntu.com/download), [Debian 9+ x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
|
||||
- At least 1 GB of system memory <sup>[2]</sup>
|
||||
|
||||
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
|
||||
@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# for debian systems, installs Dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.0/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.22.0 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.22.9/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.22.9 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -46,6 +46,7 @@ Why do we recommend stopping all apps?
|
||||
|
||||
```shell
|
||||
# for 0.22.0 and newer versions, use
|
||||
dokku ps:stop --all
|
||||
|
||||
# for versions between 0.11.4 and 0.21.4, use
|
||||
dokku ps:stopall
|
||||
@@ -88,17 +89,17 @@ When installing from source, this is available from `contrib/dokku-update`, and
|
||||
|
||||
## Upgrading using `apt`
|
||||
|
||||
If Dokku was installed in a Debian or Ubuntu system, via `apt install dokku` or `bootstrap.sh`, you can upgrade with `apt`:
|
||||
If Dokku was installed in a Debian or Ubuntu system, via `apt-get install dokku` or `bootstrap.sh`, you can upgrade with `apt-get`:
|
||||
|
||||
```shell
|
||||
# update your local apt cache
|
||||
sudo apt update
|
||||
sudo apt-get update
|
||||
|
||||
# update dokku and its dependencies
|
||||
sudo apt install -qq -y dokku herokuish sshcommand plugn gliderlabs-sigil
|
||||
sudo apt-get -qq -y install dokku herokuish sshcommand plugn gliderlabs-sigil
|
||||
|
||||
# or just upgrade every package:
|
||||
sudo apt upgrade
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
|
||||
## Upgrading from source
|
||||
|
||||
@@ -8,15 +8,34 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
The Official Dokku website is always a great place to visit. It features links to oft-used developer tools, community plugins, and guides on using Dokku.
|
||||
|
||||
## The IRC and Slack Channels
|
||||
## Monitored Locations
|
||||
|
||||
The [Code Of Conduct](https://github.com/dokku/.github/blob/master/CODE_OF_CONDUCT.md) applies to all actively monitored Dokku discussion areas. Please be mindful of your neighbors on the internet.
|
||||
|
||||
### Forums
|
||||
|
||||
- [Github Discussions](https://github.com/dokku/dokku/discussions)
|
||||
|
||||
GitHub Discussions is a new way for the Dokku community to interact with each other! This is a place to ask questions to the community or discuss potential feature requests before filing issues.
|
||||
|
||||
### The Slack Channel
|
||||
|
||||
- [irc.freenode.net/#dokku](https://webchat.freenode.net/?channels=dokku)
|
||||
- [Gliderlabs Slack](https://glider-slackin.herokuapp.com/) (Join the `#dokku` channel)
|
||||
|
||||
If you’re stumped, give us a holler in the Dokku IRC or Slack channels. Someone from the development team is usually there, especially during the daylight hours for North and South America users. We’d love to hear from you, whether you need some help, want to find users in your area, or would like to donate your brand new sports car.
|
||||
If you’re stumped, give us a holler in the Dokku Slack channel. Someone from the development team is usually there, especially during the daylight hours for North and South American users. We’d love to hear from you, whether you need some help, want to find users in your area, or would like to donate your brand new sports car.
|
||||
|
||||
## Stack Overflow
|
||||
## Unmonitored Locations
|
||||
|
||||
- [https://stackoverflow.com/questions/tagged/dokku](https://stackoverflow.com/questions/tagged/dokku)
|
||||
You may find help on these locations, but they are not actively monitored by the development team. The [Code of Conduct](https://github.com/dokku/.github/blob/master/CODE_OF_CONDUCT.md) still applies.
|
||||
|
||||
### Stack Overflow
|
||||
|
||||
- [The Dokku tag on Stack Overflow](https://stackoverflow.com/questions/tagged/dokku)
|
||||
|
||||
Tag your questions with `dokku` to enable existing users of Stack Overflow to find your questions.
|
||||
|
||||
### IRC (on freenode)
|
||||
|
||||
- [irc.freenode.net/#dokku](https://webchat.freenode.net/?channels=dokku)
|
||||
|
||||
This location isn't as well monitored as Slack, and loses history.
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/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.22.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
@@ -91,6 +91,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/discussions">Forums</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&id=f526006fd5">Newsletter</a>
|
||||
</li>
|
||||
@@ -127,12 +130,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.22.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.22.9/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.22.0 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.22.9 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -9,26 +9,26 @@
|
||||
<meta name="author" content="">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/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.22.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -42,7 +42,7 @@
|
||||
</script>
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.9/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
@@ -84,6 +84,9 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/discussions">Forums</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&id=f526006fd5">Newsletter</a>
|
||||
</li>
|
||||
@@ -172,12 +175,16 @@
|
||||
<a href="/{{NAME}}/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/{{NAME}}/development/release-process/" class="list-group-item">Release Process</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Continuous Integration</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/github-actions/" class="list-group-item">Github Actions</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/gitlab-ci/" class="list-group-item">Gitlab CI</a>
|
||||
<a href="/{{NAME}}/deployment/continuous-integration/generic/" class="list-group-item">Generic</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
<a href="/{{NAME}}/community/clients/" class="list-group-item">Clients</a>
|
||||
<a href="/{{NAME}}/community/plugins/" class="list-group-item">Plugins</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Tutorials</a>
|
||||
<a href="/{{NAME}}/community/tutorials/deploying-with-gitlab-ci/" class="list-group-item">Deploying with Gitlab CI</a>
|
||||
<a href="/{{NAME}}/community/tutorials/run-on-external-volume/" class="list-group-item">Run on External Volume</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
|
||||
"community/tutorials/deploying-with-gitlab-ci": "deployment/continuous-integration/gitlab-ci/",
|
||||
|
||||
"plugins": "community/plugins/"
|
||||
}
|
||||
}
|
||||
|
||||
8
dokku
8
dokku
@@ -59,6 +59,7 @@ export DOKKU_VALID_EXIT=0
|
||||
export DOKKU_PID="$BASHPID"
|
||||
|
||||
export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_LOGS_HOST_DIR=${DOKKU_LOGS_HOST_DIR:=$DOKKU_LOGS_DIR}
|
||||
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
|
||||
|
||||
export DOKKU_CONTAINER_LABEL=dokku
|
||||
@@ -144,12 +145,7 @@ execute_dokku_cmd() {
|
||||
if [[ "$(readlink -f "$PLUGIN_ENABLED_PATH/${PLUGIN_NAME%%:*}")" == *core-plugins* ]]; then
|
||||
[[ ${argv[0]} == "$PLUGIN_CMD" ]] && shift 1
|
||||
if [[ -n $DOKKU_APP_NAME ]]; then
|
||||
if [[ "$PLUGIN_CMD" == config* ]] && [[ ${argv[1]} == "--no-restart" ]]; then
|
||||
shift 1
|
||||
set -- "--no-restart" "$DOKKU_APP_NAME" "$@"
|
||||
else
|
||||
set -- "$DOKKU_APP_NAME" "$@"
|
||||
fi
|
||||
set -- "$DOKKU_APP_NAME" "$@"
|
||||
fi
|
||||
set -- "$PLUGIN_CMD" "$@"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -16,6 +16,7 @@ cmd-report() {
|
||||
"$DOCKER_BIN" version | sed "s/^/ /"
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
"$DOCKER_BIN" -D system info | sed "s/^/ /"
|
||||
dokku_log_info1 "git version: $(git --version)"
|
||||
dokku_log_info1 "sigil version: $(sigil -v)"
|
||||
dokku_log_info1 "herokuish version: "
|
||||
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
|
||||
|
||||
@@ -8,8 +8,7 @@ cmd-urls() {
|
||||
declare cmd="url"
|
||||
declare APP="$2"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
|
||||
verify_app_name "$APP"
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -2,6 +2,7 @@ package appjson
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -11,6 +12,7 @@ import (
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
shellquote "github.com/kballard/go-shellquote"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
// AppJSON is a struct that represents an app.json file as understood by Dokku
|
||||
@@ -25,7 +27,12 @@ type AppJSON struct {
|
||||
|
||||
func constructScript(command string, shell string, isHerokuishImage bool, hasEntrypoint bool) []string {
|
||||
if hasEntrypoint {
|
||||
return []string{command}
|
||||
words, err := shellquote.Split(strings.TrimSpace(command))
|
||||
if err != nil {
|
||||
common.LogWarn(fmt.Sprintf("Skipping command construction for app with ENTRYPOINT: %v", err.Error()))
|
||||
return nil
|
||||
}
|
||||
return words
|
||||
}
|
||||
|
||||
script := []string{"set -eo pipefail;"}
|
||||
@@ -125,16 +132,31 @@ func getReleaseCommand(appName string, image string) string {
|
||||
}
|
||||
|
||||
func getDokkuAppShell(appName string) string {
|
||||
dokkuAppShell := "/bin/bash"
|
||||
if b, _ := common.PlugnTriggerOutput("config-get-global", []string{"DOKKU_APP_SHELL"}...); strings.TrimSpace(string(b[:])) != "" {
|
||||
dokkuAppShell = strings.TrimSpace(string(b[:]))
|
||||
shell := "/bin/bash"
|
||||
globalShell := ""
|
||||
appShell := ""
|
||||
|
||||
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[:]))
|
||||
return nil
|
||||
})
|
||||
errs.Go(func() error {
|
||||
b, _ := common.PlugnTriggerOutput("config-global", []string{"DOKKU_APP_SHELL"}...)
|
||||
appShell = strings.TrimSpace(string(b[:]))
|
||||
return nil
|
||||
})
|
||||
|
||||
errs.Wait()
|
||||
if appShell != "" {
|
||||
shell = appShell
|
||||
} else if globalShell != "" {
|
||||
shell = globalShell
|
||||
}
|
||||
|
||||
if b, _ := common.PlugnTriggerOutput("config-get", []string{appName, "DOKKU_APP_SHELL"}...); strings.TrimSpace(string(b[:])) != "" {
|
||||
dokkuAppShell = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
|
||||
return dokkuAppShell
|
||||
return shell
|
||||
}
|
||||
|
||||
func executeScript(appName string, imageTag string, phase string) error {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
module github.com/dokku/dokku/plugins/app-json
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -6,3 +6,5 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNU
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// ReportSingleApp is an internal function that displays the app report for one or more apps
|
||||
func ReportSingleApp(appName, infoFlag string) error {
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
deploySource := ""
|
||||
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
|
||||
deploySource = string(b[:])
|
||||
}
|
||||
|
||||
locked := "false"
|
||||
if appIsLocked(appName) {
|
||||
locked = "true"
|
||||
}
|
||||
|
||||
infoFlags := map[string]string{
|
||||
"--app-dir": common.AppRoot(appName),
|
||||
"--app-deploy-source": deploySource,
|
||||
"--app-locked": locked,
|
||||
}
|
||||
|
||||
trimPrefix := false
|
||||
uppercaseFirstCharacter := true
|
||||
return common.ReportSingleApp("app", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
@@ -12,15 +12,7 @@ import (
|
||||
|
||||
// checks if an app exists
|
||||
func appExists(appName string) error {
|
||||
if err := common.IsValidAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !common.DirectoryExists(common.AppRoot(appName)) {
|
||||
return fmt.Errorf("App %s does not exist", appName)
|
||||
}
|
||||
|
||||
return nil
|
||||
return common.VerifyAppName(appName)
|
||||
}
|
||||
|
||||
// checks if an app is locked
|
||||
@@ -52,10 +44,6 @@ func createApp(appName string) error {
|
||||
|
||||
// destroys an app
|
||||
func destroyApp(appName string) error {
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if os.Getenv("DOKKU_APPS_FORCE_DELETE") != "1" {
|
||||
if err := common.AskForDestructiveConfirmation(appName, "app"); err != nil {
|
||||
return err
|
||||
@@ -83,6 +71,17 @@ func destroyApp(appName string) error {
|
||||
|
||||
forceCleanup := true
|
||||
common.DockerCleanup(appName, forceCleanup)
|
||||
|
||||
// remove contents for apps that are symlinks to other folders
|
||||
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
// then remove the folder and/or the symlink
|
||||
if err := os.RemoveAll(common.AppRoot(appName)); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -140,7 +139,7 @@ func maybeCreateApp(appName string) error {
|
||||
}
|
||||
|
||||
b, _ := common.PlugnTriggerOutput("config-get-global", []string{"DOKKU_DISABLE_APP_AUTOCREATION"}...)
|
||||
disableAutocreate := string(b[:])
|
||||
disableAutocreate := strings.TrimSpace(string(b[:]))
|
||||
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)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
module github.com/dokku/dokku/plugins/apps
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -4,3 +4,7 @@ github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4qu
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
52
plugins/apps/report.go
Normal file
52
plugins/apps/report.go
Normal file
@@ -0,0 +1,52 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// ReportSingleApp is an internal function that displays the app report for one or more apps
|
||||
func ReportSingleApp(appName, infoFlag string) error {
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--app-dir": reportDir,
|
||||
"--app-deploy-source": reportDeploySource,
|
||||
"--app-locked": reportLocked,
|
||||
}
|
||||
|
||||
flagKeys := []string{}
|
||||
for flagKey := range flags {
|
||||
flagKeys = append(flagKeys, flagKey)
|
||||
}
|
||||
|
||||
trimPrefix := false
|
||||
uppercaseFirstCharacter := true
|
||||
infoFlags := common.CollectReport(appName, infoFlag, flags)
|
||||
return common.ReportSingleApp("app", appName, infoFlag, infoFlags, flagKeys, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportDir(appName string) string {
|
||||
return common.AppRoot(appName)
|
||||
}
|
||||
|
||||
func reportDeploySource(appName string) string {
|
||||
deploySource := ""
|
||||
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
|
||||
deploySource = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
|
||||
return deploySource
|
||||
}
|
||||
|
||||
func reportLocked(appName string) string {
|
||||
locked := "false"
|
||||
if appIsLocked(appName) {
|
||||
locked = "true"
|
||||
}
|
||||
|
||||
return locked
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/apps"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// main entrypoint to all subcommands
|
||||
@@ -64,10 +65,12 @@ func main() {
|
||||
err = apps.CommandRename(oldAppName, newAppName, *skipDeploy)
|
||||
case "report":
|
||||
args := flag.NewFlagSet("apps:report", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
infoFlag := args.Arg(1)
|
||||
err = apps.CommandReport(appName, infoFlag)
|
||||
osArgs, infoFlag, flagErr := common.ParseReportArgs("apps", os.Args[2:])
|
||||
if flagErr == nil {
|
||||
args.Parse(osArgs)
|
||||
appName := args.Arg(0)
|
||||
err = apps.CommandReport(appName, infoFlag)
|
||||
}
|
||||
case "unlock":
|
||||
args := flag.NewFlagSet("apps:unlock", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
@@ -19,7 +18,7 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
|
||||
return errors.New("Please specify an new app name")
|
||||
}
|
||||
|
||||
if err := common.IsValidAppName(oldAppName); err != nil {
|
||||
if err := common.VerifyAppName(oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -27,10 +26,6 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
|
||||
return err
|
||||
}
|
||||
|
||||
if err := appExists(oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := appExists(newAppName); err == nil {
|
||||
if ignoreExisting {
|
||||
common.LogWarn("Name is already taken")
|
||||
@@ -62,8 +57,8 @@ func CommandClone(oldAppName string, newAppName string, skipDeploy bool, ignoreE
|
||||
|
||||
// CommandCreate creates app via command line
|
||||
func CommandCreate(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.IsValidAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return createApp(appName)
|
||||
@@ -71,8 +66,8 @@ func CommandCreate(appName string) error {
|
||||
|
||||
// CommandDestroy destroys an app
|
||||
func CommandDestroy(appName string, force bool) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if force {
|
||||
@@ -84,10 +79,6 @@ func CommandDestroy(appName string, force bool) error {
|
||||
|
||||
// CommandExists checks if an app exists
|
||||
func CommandExists(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
return appExists(appName)
|
||||
}
|
||||
|
||||
@@ -109,10 +100,6 @@ func CommandList() error {
|
||||
|
||||
// CommandLock locks an app for deployment
|
||||
func CommandLock(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -128,10 +115,6 @@ func CommandLock(appName string) error {
|
||||
|
||||
// CommandLocked checks if an app is locked for deployment
|
||||
func CommandLocked(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -154,7 +137,7 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
|
||||
return errors.New("Please specify an new app name")
|
||||
}
|
||||
|
||||
if err := common.IsValidAppName(oldAppName); err != nil {
|
||||
if err := common.VerifyAppName(oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -162,10 +145,6 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
|
||||
return err
|
||||
}
|
||||
|
||||
if err := appExists(oldAppName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := appExists(newAppName); err == nil {
|
||||
return errors.New("Name is already taken")
|
||||
}
|
||||
@@ -197,11 +176,6 @@ func CommandRename(oldAppName string, newAppName string, skipDeploy bool) error
|
||||
|
||||
// CommandReport displays an app report for one or more apps
|
||||
func CommandReport(appName string, infoFlag string) error {
|
||||
if strings.HasPrefix(appName, "--") {
|
||||
infoFlag = appName
|
||||
appName = ""
|
||||
}
|
||||
|
||||
if len(appName) == 0 {
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
@@ -220,10 +194,6 @@ func CommandReport(appName string, infoFlag string) error {
|
||||
|
||||
// CommandUnlock unlocks an app for deployment
|
||||
func CommandUnlock(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
@@ -31,16 +28,6 @@ func TriggerAppMaybeCreate(appName string) error {
|
||||
func TriggerPostDelete(appName string) error {
|
||||
imageRepo := common.GetAppImageRepo(appName)
|
||||
|
||||
// remove contents for apps that are symlinks to other folders
|
||||
if err := os.RemoveAll(fmt.Sprintf("%v/", common.AppRoot(appName))); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
// then remove the folder and/or the symlink
|
||||
if err := os.RemoveAll(common.AppRoot(appName)); err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
}
|
||||
|
||||
imagesByAppLabel, err := listImagesByAppLabel(appName)
|
||||
if err != nil {
|
||||
common.LogWarn(err.Error())
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-cnb plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -15,7 +15,11 @@ trigger-builder-dockerfile-builder-release() {
|
||||
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
echo "FROM $IMAGE" | suppress_output "$DOCKER_BIN" image build --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku -t "$IMAGE" -
|
||||
if "$DOCKER_BIN" image history --format "{{ json . }}" "$IMAGE" | grep -q "ONBUILD"; then
|
||||
dokku_log_warn "Image contains one or more ONBUILD directives, skipping label injection"
|
||||
else
|
||||
echo "FROM $IMAGE" | suppress_output "$DOCKER_BIN" image build --label=com.dokku.image-stage=release --label=com.dokku.app-name=$APP --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=dokku -t "$IMAGE" -
|
||||
fi
|
||||
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-dockerfile plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -13,7 +13,6 @@ trigger-builder-herokuish-pre-build-buildpack() {
|
||||
local DOCKER_COMMIT_LABEL_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL com.dokku.app-name=$APP")
|
||||
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$APP"
|
||||
|
||||
verify_app_name "$APP"
|
||||
IMAGE=$(get_app_image_name "$APP")
|
||||
|
||||
[[ -z $(config_get --global CURL_CONNECT_TIMEOUT) ]] && config_set --global CURL_CONNECT_TIMEOUT=90
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
module github.com/dokku/dokku/plugins/buildpacks
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 // indirect
|
||||
github.com/dokku/dokku/plugins/common v0.0.0-00010101000000-000000000000
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
)
|
||||
|
||||
replace github.com/dokku/dokku/plugins/common => ../common
|
||||
|
||||
@@ -4,3 +4,7 @@ github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4qu
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -12,16 +12,26 @@ func ReportSingleApp(appName, infoFlag string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
|
||||
if err != nil {
|
||||
return err
|
||||
flags := map[string]common.ReportFunc{
|
||||
"--buildpacks-list": reportList,
|
||||
}
|
||||
|
||||
infoFlags := map[string]string{
|
||||
"--buildpacks-list": strings.Join(buildpacks, ","),
|
||||
flagKeys := []string{}
|
||||
for flagKey := range flags {
|
||||
flagKeys = append(flagKeys, flagKey)
|
||||
}
|
||||
|
||||
trimPrefix := false
|
||||
uppercaseFirstCharacter := true
|
||||
return common.ReportSingleApp("buildpacks", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
|
||||
infoFlags := common.CollectReport(appName, infoFlag, flags)
|
||||
return common.ReportSingleApp("buildpacks", appName, infoFlag, infoFlags, flagKeys, trimPrefix, uppercaseFirstCharacter)
|
||||
}
|
||||
|
||||
func reportList(appName string) string {
|
||||
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return strings.Join(buildpacks, ",")
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/buildpacks"
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// main entrypoint to all subcommands
|
||||
@@ -43,10 +44,12 @@ func main() {
|
||||
err = buildpacks.CommandRemove(appName, buildpack, *index)
|
||||
case "report":
|
||||
args := flag.NewFlagSet("buildpacks:report", flag.ExitOnError)
|
||||
args.Parse(os.Args[2:])
|
||||
appName := args.Arg(0)
|
||||
infoFlag := args.Arg(1)
|
||||
err = buildpacks.CommandReport(appName, infoFlag)
|
||||
osArgs, infoFlag, flagErr := common.ParseReportArgs("buildpacks", os.Args[2:])
|
||||
if flagErr == nil {
|
||||
args.Parse(osArgs)
|
||||
appName := args.Arg(0)
|
||||
err = buildpacks.CommandReport(appName, infoFlag)
|
||||
}
|
||||
case "set":
|
||||
args := flag.NewFlagSet("buildpacks:set", flag.ExitOnError)
|
||||
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
|
||||
|
||||
@@ -3,15 +3,14 @@ package buildpacks
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
// CommandAdd implements buildpacks:add
|
||||
func CommandAdd(appName string, buildpack string, index int) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
buildpack, err := validBuildpackURL(buildpack)
|
||||
@@ -24,8 +23,8 @@ func CommandAdd(appName string, buildpack string, index int) error {
|
||||
|
||||
// CommandClear implements buildpacks:clear
|
||||
func CommandClear(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return common.PropertyDelete("buildpacks", appName, "buildpacks")
|
||||
@@ -33,8 +32,8 @@ func CommandClear(appName string) error {
|
||||
|
||||
// CommandList implements buildpacks:list
|
||||
func CommandList(appName string) (err error) {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
|
||||
@@ -51,8 +50,8 @@ func CommandList(appName string) (err error) {
|
||||
|
||||
// CommandRemove implements buildpacks:remove
|
||||
func CommandRemove(appName string, buildpack string, index int) (err error) {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if index != 0 && buildpack != "" {
|
||||
@@ -106,11 +105,6 @@ func CommandRemove(appName string, buildpack string, index int) (err error) {
|
||||
|
||||
// CommandReport displays a buildpacks report for one or more apps
|
||||
func CommandReport(appName string, infoFlag string) error {
|
||||
if strings.HasPrefix(appName, "--") {
|
||||
infoFlag = appName
|
||||
appName = ""
|
||||
}
|
||||
|
||||
if len(appName) == 0 {
|
||||
apps, err := common.DokkuApps()
|
||||
if err != nil {
|
||||
@@ -129,8 +123,8 @@ func CommandReport(appName string, infoFlag string) error {
|
||||
|
||||
// CommandSet implements buildpacks:set
|
||||
func CommandSet(appName string, buildpack string, index int) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
buildpack, err := validBuildpackURL(buildpack)
|
||||
|
||||
@@ -6,7 +6,6 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
is_ssl_enabled() {
|
||||
declare desc="returns 0 if ssl is enabled for given app"
|
||||
local APP=$1
|
||||
verify_app_name "$APP"
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
if [[ -e "$APP_SSL_PATH/server.crt" ]] && [[ -e "$APP_SSL_PATH/server.key" ]]; then
|
||||
@@ -19,7 +18,6 @@ is_ssl_enabled() {
|
||||
get_ssl_hostnames() {
|
||||
declare desc="returns a string of ssl hostnames extracted from an app's ssl certificate"
|
||||
local APP=$1
|
||||
verify_app_name "$APP"
|
||||
local SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
local SSL_HOSTNAME=$(openssl x509 -in "$SSL_PATH/server.crt" -noout -subject | tr '/' '\n' | grep CN= | cut -c4-)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -16,9 +16,9 @@ is_file_import() {
|
||||
local KEY_FILE="$2"
|
||||
|
||||
if [[ $CRT_FILE ]] && [[ $KEY_FILE ]]; then
|
||||
if [[ ! -f $CRT_FILE ]]; then
|
||||
if [[ ! -r $CRT_FILE ]]; then
|
||||
dokku_log_fail "CRT file specified not found, please check file paths"
|
||||
elif [[ ! -f $KEY_FILE ]]; then
|
||||
elif [[ ! -r $KEY_FILE ]]; then
|
||||
dokku_log_fail "KEY file specified not found, please check file paths"
|
||||
else
|
||||
return 0
|
||||
@@ -34,7 +34,6 @@ cmd-certs-set() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" CRT_FILE="$2" KEY_FILE="$3"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$APP"
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ cmd-certs-generate() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" DOMAIN="$2"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$APP"
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ cmd-certs-remove() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$APP"
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ cmd-certs-show() {
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY_TYPE="$2"
|
||||
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$APP"
|
||||
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
is_app_proctype_checks_disabled() {
|
||||
declare desc="return true if app's proctype(s) checks are disabled"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local PROCTYPE="$2" status=false
|
||||
local DOKKU_CHECKS_DISABLED=$(config_get "$APP" DOKKU_CHECKS_DISABLED || true)
|
||||
|
||||
@@ -21,7 +20,6 @@ is_app_proctype_checks_disabled() {
|
||||
is_app_proctype_checks_skipped() {
|
||||
declare desc="return true if app's proctype(s) checks are skipped"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local PROCTYPE="$2" status=false
|
||||
local DOKKU_CHECKS_SKIPPED=$(config_get "$APP" DOKKU_CHECKS_SKIPPED || true)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
"unicode"
|
||||
|
||||
"github.com/ryanuber/columnize"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
type errfunc func() error
|
||||
@@ -64,23 +65,43 @@ func CommandUsage(helpHeader string, helpContent string) {
|
||||
|
||||
// GetAppScheduler fetches the scheduler for a given application
|
||||
func GetAppScheduler(appName string) string {
|
||||
if appName == "--global" {
|
||||
appName = ""
|
||||
}
|
||||
appScheduler := ""
|
||||
globalScheduler := ""
|
||||
|
||||
ctx := context.Background()
|
||||
errs, ctx := errgroup.WithContext(ctx)
|
||||
|
||||
if appName != "--global" {
|
||||
errs.Go(func() error {
|
||||
appScheduler = getAppScheduler(appName)
|
||||
return nil
|
||||
})
|
||||
}
|
||||
errs.Go(func() error {
|
||||
globalScheduler = GetGlobalScheduler()
|
||||
return nil
|
||||
})
|
||||
errs.Wait()
|
||||
|
||||
if appScheduler == "" {
|
||||
appScheduler = globalScheduler
|
||||
}
|
||||
return appScheduler
|
||||
}
|
||||
|
||||
func getAppScheduler(appName string) string {
|
||||
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SCHEDULER"}...)
|
||||
value := string(b[:])
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
if value != "" {
|
||||
return value
|
||||
}
|
||||
|
||||
return GetGlobalScheduler()
|
||||
return ""
|
||||
}
|
||||
|
||||
// GetGlobalScheduler fetchs the global scheduler
|
||||
func GetGlobalScheduler() string {
|
||||
b, _ := PlugnTriggerOutput("config-get-global", []string{"DOKKU_SCHEDULER"}...)
|
||||
value := string(b[:])
|
||||
value := strings.TrimSpace(string(b[:]))
|
||||
if value != "" {
|
||||
return value
|
||||
}
|
||||
@@ -90,27 +111,38 @@ func GetGlobalScheduler() string {
|
||||
|
||||
// GetDeployingAppImageName returns deploying image identifier for a given app, tag tuple. validate if tag is presented
|
||||
func GetDeployingAppImageName(appName, imageTag, imageRepo string) (string, error) {
|
||||
if appName == "" {
|
||||
LogFail("(GetDeployingAppImageName) APP must not be empty")
|
||||
}
|
||||
imageRemoteRepository := ""
|
||||
newImageTag := ""
|
||||
newImageRepo := ""
|
||||
|
||||
b, err := PlugnTriggerOutput("deployed-app-repository", []string{appName}...)
|
||||
if err != nil {
|
||||
ctx := context.Background()
|
||||
errs, ctx := errgroup.WithContext(ctx)
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-repository", []string{appName}...)
|
||||
if err == nil {
|
||||
imageRemoteRepository = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
return err
|
||||
})
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
if err == nil {
|
||||
newImageTag = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
errs.Go(func() error {
|
||||
b, err := PlugnTriggerOutput("deployed-app-image-repo", []string{appName}...)
|
||||
if err == nil {
|
||||
newImageRepo = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
||||
if err := errs.Wait(); err != nil {
|
||||
return "", err
|
||||
}
|
||||
imageRemoteRepository := string(b[:])
|
||||
|
||||
b, err = PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
newImageTag := string(b[:])
|
||||
|
||||
b, err = PlugnTriggerOutput("deployed-app-image-repo", []string{appName}...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
newImageRepo := string(b[:])
|
||||
|
||||
if newImageRepo != "" {
|
||||
imageRepo = newImageRepo
|
||||
@@ -140,10 +172,6 @@ func GetAppImageRepo(appName string) string {
|
||||
// GetAppContainerIDs returns a list of docker container ids for given app and optional container_type
|
||||
func GetAppContainerIDs(appName string, containerType string) ([]string, error) {
|
||||
var containerIDs []string
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
return containerIDs, err
|
||||
}
|
||||
|
||||
appRoot := AppRoot(appName)
|
||||
containerFilePath := fmt.Sprintf("%v/CONTAINER", appRoot)
|
||||
_, err := os.Stat(containerFilePath)
|
||||
@@ -170,10 +198,6 @@ func GetAppContainerIDs(appName string, containerType string) ([]string, error)
|
||||
// GetAppRunningContainerIDs return a list of running docker container ids for given app and optional container_type
|
||||
func GetAppRunningContainerIDs(appName string, containerType string) ([]string, error) {
|
||||
var runningContainerIDs []string
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
return runningContainerIDs, err
|
||||
}
|
||||
|
||||
if !IsDeployed(appName) {
|
||||
LogFail(fmt.Sprintf("App %v has not been deployed", appName))
|
||||
}
|
||||
@@ -193,10 +217,6 @@ func GetAppRunningContainerIDs(appName string, containerType string) ([]string,
|
||||
|
||||
// GetRunningImageTag retrieves current image tag for a given app and returns empty string if no deployed containers are found
|
||||
func GetRunningImageTag(appName string) (string, error) {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
containerIDs, err := GetAppContainerIDs(appName, "")
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -241,11 +261,6 @@ func DokkuApps() (apps []string, err error) {
|
||||
|
||||
// GetAppImageName returns image identifier for a given app, tag tuple. validate if tag is presented
|
||||
func GetAppImageName(appName, imageTag, imageRepo string) (imageName string) {
|
||||
err := VerifyAppName(appName)
|
||||
if err != nil {
|
||||
LogFail(err.Error())
|
||||
}
|
||||
|
||||
if imageRepo == "" {
|
||||
imageRepo = GetAppImageRepo(appName)
|
||||
}
|
||||
@@ -286,8 +301,29 @@ func GetenvWithDefault(key string, defaultValue string) (val string) {
|
||||
return
|
||||
}
|
||||
|
||||
// ParseReportArgs splits out flags from non-flags for input into report commands
|
||||
func ParseReportArgs(pluginName string, arguments []string) ([]string, string, error) {
|
||||
osArgs := []string{}
|
||||
infoFlags := []string{}
|
||||
for _, argument := range arguments {
|
||||
if strings.HasPrefix(argument, "--") {
|
||||
infoFlags = append(infoFlags, argument)
|
||||
} else {
|
||||
osArgs = append(osArgs, argument)
|
||||
}
|
||||
}
|
||||
|
||||
if len(infoFlags) == 0 {
|
||||
return osArgs, "", nil
|
||||
}
|
||||
if len(infoFlags) == 1 {
|
||||
return osArgs, infoFlags[0], nil
|
||||
}
|
||||
return osArgs, "", fmt.Errorf("%s:report command allows only a single flag", pluginName)
|
||||
}
|
||||
|
||||
// ReportSingleApp is an internal function that displays a report for an app
|
||||
func ReportSingleApp(reportType string, appName string, infoFlag string, infoFlags map[string]string, trimPrefix bool, uppercaseFirstCharacter bool) error {
|
||||
func ReportSingleApp(reportType string, appName string, infoFlag string, infoFlags map[string]string, infoFlagKeys []string, trimPrefix bool, uppercaseFirstCharacter bool) error {
|
||||
flags := []string{}
|
||||
for key := range infoFlags {
|
||||
flags = append(flags, key)
|
||||
@@ -297,7 +333,11 @@ func ReportSingleApp(reportType string, appName string, infoFlag string, infoFla
|
||||
if len(infoFlag) == 0 {
|
||||
LogInfo2Quiet(fmt.Sprintf("%s %v information", appName, reportType))
|
||||
for _, k := range flags {
|
||||
v := infoFlags[k]
|
||||
v, ok := infoFlags[k]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
|
||||
prefix := "--"
|
||||
if trimPrefix {
|
||||
prefix = fmt.Sprintf("--%v-", reportType)
|
||||
@@ -316,19 +356,17 @@ func ReportSingleApp(reportType string, appName string, infoFlag string, infoFla
|
||||
|
||||
for _, k := range flags {
|
||||
if infoFlag == k {
|
||||
v := infoFlags[k]
|
||||
v, ok := infoFlags[k]
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
fmt.Println(v)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
keys := reflect.ValueOf(infoFlags).MapKeys()
|
||||
strkeys := make([]string, len(keys))
|
||||
for i := 0; i < len(keys); i++ {
|
||||
strkeys[i] = keys[i].String()
|
||||
}
|
||||
|
||||
return fmt.Errorf("Invalid flag passed, valid flags: %s", strings.Join(strkeys, ", "))
|
||||
sort.Strings(infoFlagKeys)
|
||||
return fmt.Errorf("Invalid flag passed, valid flags: %s", strings.Join(infoFlagKeys, ", "))
|
||||
}
|
||||
|
||||
// RightPad right-pads the string with pad up to len runes
|
||||
@@ -395,10 +433,10 @@ func UcFirst(str string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// IsValidAppName verifies app name format
|
||||
// IsValidAppName verifies that the app name matches naming restrictions
|
||||
func IsValidAppName(appName string) error {
|
||||
if appName == "" {
|
||||
return fmt.Errorf("APP must not be null")
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
r, _ := regexp.Compile("^[a-z0-9][^/:_A-Z]*$")
|
||||
@@ -406,18 +444,30 @@ func IsValidAppName(appName string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
appRoot := AppRoot(appName)
|
||||
if DirectoryExists(appRoot) {
|
||||
os.RemoveAll(appRoot)
|
||||
}
|
||||
|
||||
return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores")
|
||||
}
|
||||
|
||||
// VerifyAppName verifies app name format and app existence"
|
||||
// isValidAppNameOld verifies that the app name matches the old naming restrictions
|
||||
func isValidAppNameOld(appName string) error {
|
||||
if appName == "" {
|
||||
return errors.New("Please specify an app to run the command on")
|
||||
}
|
||||
|
||||
r, _ := regexp.Compile("^[a-z0-9][^/:A-Z]*$")
|
||||
if r.MatchString(appName) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return errors.New("App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, or colons")
|
||||
}
|
||||
|
||||
// VerifyAppName checks if an app conforming to either the old or new
|
||||
// naming conventions exists
|
||||
func VerifyAppName(appName string) error {
|
||||
if err := IsValidAppName(appName); err != nil {
|
||||
return err
|
||||
newErr := IsValidAppName(appName)
|
||||
oldErr := isValidAppNameOld(appName)
|
||||
if newErr != nil && oldErr != nil {
|
||||
return newErr
|
||||
}
|
||||
|
||||
appRoot := AppRoot(appName)
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/codeskyblue/go-sh"
|
||||
)
|
||||
@@ -20,12 +21,45 @@ func ContainerIsRunning(containerID string) bool {
|
||||
return strings.TrimSpace(string(b[:])) == "true"
|
||||
}
|
||||
|
||||
// CopyFromImage copies a file from named image to destination
|
||||
func CopyFromImage(appName string, image string, source string, destination string) error {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
return err
|
||||
// ContainerStart runs 'docker container start' against an existing container
|
||||
// whether that container is running or not
|
||||
func ContainerStart(containerID string) bool {
|
||||
cmd := sh.Command(DockerBin(), "container", "start", containerID)
|
||||
cmd.Stdout = nil
|
||||
cmd.Stderr = nil
|
||||
if err := cmd.Run(); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// ContainerExists checks to see if a container exists
|
||||
func ContainerExists(containerID string) bool {
|
||||
cmd := sh.Command(DockerBin(), "container", "inspect", containerID)
|
||||
cmd.Stdout = nil
|
||||
cmd.Stderr = nil
|
||||
if err := cmd.Run(); err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// ContainerWaitTilReady will wait timeout seconds and then check if a container is running
|
||||
// returning an error if it is not running at the end of the timeout
|
||||
func ContainerWaitTilReady(containerID string, timeout time.Duration) error {
|
||||
time.Sleep(timeout)
|
||||
|
||||
if !ContainerIsRunning(containerID) {
|
||||
return fmt.Errorf("Container %s is not running", containerID)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CopyFromImage copies a file from named image to destination
|
||||
func CopyFromImage(appName string, image string, source string, destination string) error {
|
||||
if !VerifyImage(image) {
|
||||
return fmt.Errorf("Invalid docker image for copying content")
|
||||
}
|
||||
@@ -137,7 +171,7 @@ func DockerCleanup(appName string, forceCleanup bool) error {
|
||||
skipCleanup := false
|
||||
if appName != "" {
|
||||
b, _ := PlugnTriggerOutput("config-get", []string{appName, "DOKKU_SKIP_CLEANUP"}...)
|
||||
output := string(b[:])
|
||||
output := strings.TrimSpace(string(b[:]))
|
||||
if output == "true" {
|
||||
skipCleanup = true
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ dokku_log_plugn_trigger_call() {
|
||||
|
||||
local l_hook="$1"
|
||||
shift
|
||||
dokku_log_event "INVOKED: ${l_hook}( $* ) NAME=$NAME FINGERPRINT=$FINGERPRINT"
|
||||
dokku_log_event "INVOKED: ${l_hook}( $* ) NAME=$NAME FINGERPRINT=$FINGERPRINT DOKKU_PID=$DOKKU_PID"
|
||||
}
|
||||
|
||||
dokku_container_log_verbose_quiet() {
|
||||
@@ -180,24 +180,71 @@ dokku_container_log_verbose_quiet() {
|
||||
IFS=$OIFS
|
||||
}
|
||||
|
||||
is_valid_app_name() {
|
||||
declare desc="verify app name format"
|
||||
fn-is-valid-app-name() {
|
||||
declare desc="verify that the app name matches naming restrictions"
|
||||
local APP="$1"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "APP must not be null"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
if [[ "$APP" =~ ^[a-z].* ]] || [[ "$APP" =~ ^[0-9].* ]]; then
|
||||
if [[ ! $APP =~ [A-Z] ]] && [[ ! $APP =~ [:] ]] && [[ ! $APP =~ [_] ]]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -d "$DOKKU_ROOT/$APP" ]] && rm -rf "${DOKKU_ROOT:?}/$APP"
|
||||
return 1
|
||||
}
|
||||
|
||||
fn-is-valid-app-name-old() {
|
||||
declare desc="verify that the app name matches the old naming restrictions"
|
||||
local APP="$1"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
if [[ "$APP" =~ ^[a-z].* ]] || [[ "$APP" =~ ^[0-9].* ]]; then
|
||||
if [[ ! $APP =~ [A-Z] ]] && [[ ! $APP =~ [:] ]]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
is_valid_app_name() {
|
||||
declare desc="verify that the app name matches naming restrictions"
|
||||
local APP="$1"
|
||||
|
||||
if fn-is-valid-app-name "$APP"; then
|
||||
return
|
||||
fi
|
||||
|
||||
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
|
||||
}
|
||||
|
||||
is_valid_app_name_old() {
|
||||
declare desc="verify that the app name matches the old naming restrictions"
|
||||
local APP="$1"
|
||||
|
||||
if fn-is-valid-app-name-old "$APP"; then
|
||||
return
|
||||
fi
|
||||
|
||||
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, or colons"
|
||||
}
|
||||
|
||||
verify_app_name() {
|
||||
declare desc="verify app name format and app existence"
|
||||
local APP="$1"
|
||||
is_valid_app_name "$APP"
|
||||
declare APP="$1"
|
||||
local VALID_NEW=false
|
||||
local VALID_OLD=false
|
||||
if fn-is-valid-app-name "$APP" 2>/dev/null; then
|
||||
VALID_NEW=true
|
||||
fi
|
||||
|
||||
if fn-is-valid-app-name-old "$APP" 2>/dev/null; then
|
||||
VALID_OLD=true
|
||||
fi
|
||||
|
||||
if [[ "$VALID_NEW" == "false" ]] && [[ "$VALID_OLD" == "false" ]]; then
|
||||
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
|
||||
fi
|
||||
|
||||
[[ ! -d "$DOKKU_ROOT/$APP" ]] && dokku_log_fail "App $APP does not exist"
|
||||
|
||||
return 0
|
||||
@@ -217,7 +264,6 @@ get_app_image_repo() {
|
||||
declare desc="central definition of image repo pattern"
|
||||
local APP="$1"
|
||||
local IMAGE_REPO="dokku/$APP"
|
||||
is_valid_app_name "$APP"
|
||||
echo "$IMAGE_REPO"
|
||||
}
|
||||
|
||||
@@ -226,7 +272,6 @@ get_deploying_app_image_name() {
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$2"
|
||||
IMAGE_REPO="$3"
|
||||
is_valid_app_name "$APP"
|
||||
|
||||
local IMAGE_REMOTE_REPOSITORY=$(plugn trigger deployed-app-repository "$APP")
|
||||
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
|
||||
@@ -247,7 +292,6 @@ get_app_image_name() {
|
||||
local APP="$1"
|
||||
local IMAGE_TAG="$2"
|
||||
IMAGE_REPO="$3"
|
||||
is_valid_app_name "$APP"
|
||||
|
||||
if [[ -z "$IMAGE_REPO" ]]; then
|
||||
IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
@@ -286,7 +330,6 @@ get_app_scheduler() {
|
||||
get_running_image_tag() {
|
||||
declare desc="retrieve current image tag for a given app. returns empty string if no deployed containers are found"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
|
||||
local CIDS=($(get_app_container_ids "$APP"))
|
||||
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" container inspect --format '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
|
||||
@@ -418,7 +461,6 @@ copy_from_image() {
|
||||
declare desc="copy file from named image to destination"
|
||||
declare IMAGE="$1" SRC_FILE="$2" DST_FILE="$3"
|
||||
local WORK_DIR=""
|
||||
verify_app_name "$APP"
|
||||
|
||||
local DOCKER_CREATE_LABEL_ARGS="--label=com.dokku.app-name=$APP"
|
||||
|
||||
@@ -426,6 +468,8 @@ copy_from_image() {
|
||||
if ! is_abs_path "$SRC_FILE"; then
|
||||
if is_image_herokuish_based "$IMAGE" "$APP"; then
|
||||
WORKDIR="/app"
|
||||
elif is_image_cnb_based "$IMAGE"; then
|
||||
WORKDIR="/workspace"
|
||||
else
|
||||
WORKDIR="$("$DOCKER_BIN" image inspect --format '{{.Config.WorkingDir}}' "$IMAGE")"
|
||||
fi
|
||||
@@ -466,7 +510,6 @@ get_app_container_ids() {
|
||||
declare desc="returns list of docker container ids for given app and optional container_type"
|
||||
local APP="$1"
|
||||
local CONTAINER_TYPE="$2"
|
||||
verify_app_name "$APP"
|
||||
[[ -f $DOKKU_ROOT/$APP/CONTAINER ]] && DOKKU_CIDS+=$(<"$DOKKU_ROOT/$APP/CONTAINER")
|
||||
|
||||
if [[ -n "$CONTAINER_TYPE" ]]; then
|
||||
@@ -564,7 +607,6 @@ is_app_running() {
|
||||
local APP="$1"
|
||||
|
||||
dokku_log_warn "Deprecated: ps#fn-ps-is-app-running"
|
||||
verify_app_name "$APP"
|
||||
|
||||
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
|
||||
|
||||
@@ -579,7 +621,6 @@ dokku_build() {
|
||||
declare desc="build phase"
|
||||
declare APP="$1" IMAGE_SOURCE_TYPE="$2" SOURCECODE_WORK_DIR="$3"
|
||||
|
||||
verify_app_name "$APP"
|
||||
plugn trigger builder-build "$IMAGE_SOURCE_TYPE" "$APP" "$SOURCECODE_WORK_DIR"
|
||||
}
|
||||
|
||||
@@ -600,6 +641,7 @@ cmd-deploy() {
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
verify_app_name "$APP"
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
plugn trigger scheduler-deploy "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
@@ -613,8 +655,6 @@ release_and_deploy() {
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local DOKKU_DOCKERFILE_PORTS
|
||||
|
||||
verify_app_name "$APP"
|
||||
|
||||
if verify_image "$IMAGE"; then
|
||||
if is_image_herokuish_based "$IMAGE" "$APP"; then
|
||||
local IMAGE_SOURCE_TYPE="herokuish"
|
||||
@@ -838,7 +878,6 @@ get_app_raw_tcp_ports() {
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local DOCKERFILE_PORTS="$(config_get "$APP" DOKKU_DOCKERFILE_PORTS)"
|
||||
for p in $DOCKERFILE_PORTS; do
|
||||
if [[ ! "$p" =~ .*udp.* ]]; then
|
||||
@@ -853,7 +892,6 @@ get_app_raw_tcp_ports() {
|
||||
get_container_ports() {
|
||||
declare desc="returns published ports from app containers"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local APP_CIDS="$(get_app_container_ids "$APP")"
|
||||
local cid
|
||||
|
||||
@@ -869,7 +907,6 @@ get_app_urls() {
|
||||
declare URL_TYPE="$1" APP="$2"
|
||||
local urls
|
||||
|
||||
verify_app_name "$APP"
|
||||
urls=$(plugn trigger app-urls "$APP" "$URL_TYPE")
|
||||
if [[ -n "$urls" ]]; then
|
||||
echo "$urls" | sort
|
||||
@@ -1028,7 +1065,6 @@ merge_dedupe_list() {
|
||||
acquire_app_deploy_lock() {
|
||||
declare desc="acquire advisory lock for use in git/tar deploys"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local LOCK_TYPE="${2:-waiting}"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
local LOCK_WAITING_MSG="$APP currently has a deploy lock in place. Waiting..."
|
||||
@@ -1040,7 +1076,6 @@ acquire_app_deploy_lock() {
|
||||
release_app_deploy_lock() {
|
||||
declare desc="release advisory lock used in git/tar deploys"
|
||||
local APP="$1"
|
||||
verify_app_name "$APP"
|
||||
local APP_DEPLOY_LOCK_FILE="$DOKKU_ROOT/$APP/.deploy.lock"
|
||||
|
||||
release_advisory_lock "$APP_DEPLOY_LOCK_FILE"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
module github.com/dokku/dokku/plugins/common
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
|
||||
)
|
||||
|
||||
@@ -4,3 +4,5 @@ github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27 h1:HHUr4P/aKh4qu
|
||||
github.com/codeskyblue/go-sh v0.0.0-20190412065543-76bd3d59ff27/go.mod h1:VQx0hjo2oUeQkQUET7wRwradO6f+fN5jzXgB/zROxxE=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3 h1:utdYOikI1XjNtTFGCwSM6OmFJblU4ld4gACoJsbadJg=
|
||||
github.com/ryanuber/columnize v1.1.2-0.20190319233515-9e6335e58db3/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a h1:DcqTD9SDLc+1P/r1EmRBwnVsrOwW+kk2vWf9n+1sGhs=
|
||||
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -93,6 +95,28 @@ func LogVerboseQuietContainerLogs(containerID string) {
|
||||
}
|
||||
}
|
||||
|
||||
// LogVerboseQuietContainerLogsTail is the verbose log formatter for container logs with tail mode enabled
|
||||
func LogVerboseQuietContainerLogsTail(containerID string, lines int, tail bool) {
|
||||
args := []string{"container", "logs", containerID}
|
||||
if lines > 0 {
|
||||
args = append(args, "--tail", strconv.Itoa(lines))
|
||||
}
|
||||
if tail {
|
||||
args = append(args, "--follow")
|
||||
}
|
||||
sc := NewShellCmdWithArgs(DockerBin(), args...)
|
||||
stdout, _ := sc.Command.StdoutPipe()
|
||||
sc.Command.Start()
|
||||
|
||||
scanner := bufio.NewScanner(stdout)
|
||||
scanner.Split(bufio.ScanLines)
|
||||
for scanner.Scan() {
|
||||
m := scanner.Text()
|
||||
LogVerboseQuiet(m)
|
||||
}
|
||||
sc.Command.Wait()
|
||||
}
|
||||
|
||||
// LogWarn is the warning log formatter
|
||||
func LogWarn(text string) {
|
||||
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ! %s", text))
|
||||
@@ -110,7 +134,7 @@ func LogStderr(text string) {
|
||||
|
||||
// LogDebug is the debug log formatter
|
||||
func LogDebug(text string) {
|
||||
if os.Getenv("DOKKU_TRACE") == "" {
|
||||
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ? %s", text))
|
||||
if os.Getenv("DOKKU_TRACE") == "1" {
|
||||
fmt.Fprintln(os.Stderr, fmt.Sprintf(" ? %s", strings.TrimPrefix(text, " ? ")))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,25 +6,20 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
// ParallelCommand is a type that declares functions
|
||||
// parallelCommand is a type that declares functions
|
||||
// the ps plugins can execute in parallel
|
||||
type ParallelCommand func(string) error
|
||||
type parallelCommand func(string) error
|
||||
|
||||
// ParallelCommandRun contains all the arguments
|
||||
// necessary for a parallel command run
|
||||
type ParallelCommandRun struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
// ParallelCommandResult is the result of a parallel
|
||||
// parallelCommandResult is the result of a parallel
|
||||
// command run
|
||||
type ParallelCommandResult struct {
|
||||
Name string
|
||||
Error error
|
||||
type parallelCommandResult struct {
|
||||
Name string
|
||||
CommandName string
|
||||
Error error
|
||||
}
|
||||
|
||||
// RunCommandAgainstAllApps runs a given ParallelCommand against all apps
|
||||
func RunCommandAgainstAllApps(command ParallelCommand, commandName string, parallelCount int) error {
|
||||
// RunCommandAgainstAllApps runs a given parallelCommand against all apps
|
||||
func RunCommandAgainstAllApps(command parallelCommand, commandName string, parallelCount int) error {
|
||||
runInSerial := false
|
||||
|
||||
if parallelCount < -1 {
|
||||
@@ -49,8 +44,8 @@ func RunCommandAgainstAllApps(command ParallelCommand, commandName string, paral
|
||||
return RunCommandAgainstAllAppsInParallel(command, commandName, parallelCount)
|
||||
}
|
||||
|
||||
// RunCommandAgainstAllAppsInParallel runs a given ParallelCommand against all apps in parallel
|
||||
func RunCommandAgainstAllAppsInParallel(command ParallelCommand, commandName string, parallelCount int) error {
|
||||
// RunCommandAgainstAllAppsInParallel runs a given parallelCommand against all apps in parallel
|
||||
func RunCommandAgainstAllAppsInParallel(command parallelCommand, commandName string, parallelCount int) error {
|
||||
apps, err := DokkuApps()
|
||||
if err != nil {
|
||||
LogWarn(err.Error())
|
||||
@@ -58,19 +53,19 @@ func RunCommandAgainstAllAppsInParallel(command ParallelCommand, commandName str
|
||||
}
|
||||
|
||||
jobs := make(chan string, parallelCount)
|
||||
results := make(chan ParallelCommandResult, len(apps))
|
||||
results := make(chan parallelCommandResult, len(apps))
|
||||
|
||||
go allocateJobs(apps, jobs)
|
||||
done := make(chan error)
|
||||
go aggregateResults(results, done)
|
||||
createParallelWorkerPool(jobs, results, command, parallelCount)
|
||||
createParallelWorkerPool(jobs, results, command, commandName, parallelCount)
|
||||
err = <-done
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// RunCommandAgainstAllAppsSerially runs a given ParallelCommand against all apps serially
|
||||
func RunCommandAgainstAllAppsSerially(command ParallelCommand, commandName string) error {
|
||||
// RunCommandAgainstAllAppsSerially runs a given parallelCommand against all apps serially
|
||||
func RunCommandAgainstAllAppsSerially(command parallelCommand, commandName string) error {
|
||||
apps, err := DokkuApps()
|
||||
if err != nil {
|
||||
LogWarn(err.Error())
|
||||
@@ -81,6 +76,7 @@ func RunCommandAgainstAllAppsSerially(command ParallelCommand, commandName strin
|
||||
for _, appName := range apps {
|
||||
LogInfo1(fmt.Sprintf("Running %s against app %s", commandName, appName))
|
||||
if err = command(appName); err != nil {
|
||||
LogWarn(fmt.Sprintf("Error running %s against app %s: %s", commandName, appName, err.Error()))
|
||||
errorCount++
|
||||
}
|
||||
}
|
||||
@@ -99,12 +95,12 @@ func allocateJobs(input []string, jobs chan string) {
|
||||
close(jobs)
|
||||
}
|
||||
|
||||
func aggregateResults(results chan ParallelCommandResult, done chan error) {
|
||||
func aggregateResults(results chan parallelCommandResult, done chan error) {
|
||||
var parallelError error
|
||||
errorCount := 0
|
||||
for result := range results {
|
||||
if result.Error != nil {
|
||||
LogWarn(fmt.Sprintf("Error running command against %s", result.Name))
|
||||
LogWarn(fmt.Sprintf("Error running %s against %s: %s", result.CommandName, result.Name, result.Error.Error()))
|
||||
errorCount++
|
||||
}
|
||||
}
|
||||
@@ -114,24 +110,57 @@ func aggregateResults(results chan ParallelCommandResult, done chan error) {
|
||||
done <- parallelError
|
||||
}
|
||||
|
||||
func createParallelWorker(jobs chan string, results chan ParallelCommandResult, command ParallelCommand, wg *sync.WaitGroup, workerID int) {
|
||||
func createParallelWorker(jobs chan string, results chan parallelCommandResult, command parallelCommand, commandName string, wg *sync.WaitGroup, workerID int) {
|
||||
for job := range jobs {
|
||||
LogInfo1(fmt.Sprintf("Running command against %s", job))
|
||||
output := ParallelCommandResult{
|
||||
Name: job,
|
||||
Error: command(job),
|
||||
output := parallelCommandResult{
|
||||
Name: job,
|
||||
CommandName: commandName,
|
||||
Error: command(job),
|
||||
}
|
||||
results <- output
|
||||
}
|
||||
wg.Done()
|
||||
}
|
||||
|
||||
func createParallelWorkerPool(jobs chan string, results chan ParallelCommandResult, command ParallelCommand, numberOfWorkers int) {
|
||||
func createParallelWorkerPool(jobs chan string, results chan parallelCommandResult, command parallelCommand, commandName string, numberOfWorkers int) {
|
||||
var wg sync.WaitGroup
|
||||
for i := 0; i < numberOfWorkers; i++ {
|
||||
wg.Add(1)
|
||||
go createParallelWorker(jobs, results, command, &wg, i)
|
||||
go createParallelWorker(jobs, results, command, commandName, &wg, i)
|
||||
}
|
||||
wg.Wait()
|
||||
close(results)
|
||||
}
|
||||
|
||||
// ReportFunc is a type that declares functions
|
||||
// useful for :report subcommands
|
||||
type ReportFunc func(string) string
|
||||
|
||||
// CollectReport iterates over a set of report functions
|
||||
// to collect the :report output in parallel
|
||||
func CollectReport(appName string, infoFlag string, flags map[string]ReportFunc) map[string]string {
|
||||
var sm sync.Map
|
||||
var wg sync.WaitGroup
|
||||
for flag, fn := range flags {
|
||||
if infoFlag != "" && infoFlag != flag {
|
||||
continue
|
||||
}
|
||||
|
||||
wg.Add(1)
|
||||
go func(flag string, fn ReportFunc) {
|
||||
defer wg.Done()
|
||||
s := fn(appName)
|
||||
sm.Store(flag, s)
|
||||
}(flag, fn)
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
infoFlags := map[string]string{}
|
||||
sm.Range(func(key interface{}, value interface{}) bool {
|
||||
infoFlags[key.(string)] = value.(string)
|
||||
return true
|
||||
})
|
||||
|
||||
return infoFlags
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.9"
|
||||
[plugin.config]
|
||||
|
||||
@@ -12,9 +12,14 @@ import (
|
||||
)
|
||||
|
||||
// CommandPropertySet is a generic function that will set a property for a given plugin/app combination
|
||||
func CommandPropertySet(pluginName, appName, property, value string, properties map[string]string) {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
LogFail(err.Error())
|
||||
func CommandPropertySet(pluginName, appName, property, value string, properties map[string]string, globalProperties map[string]bool) {
|
||||
if appName != "--global" {
|
||||
if err := VerifyAppName(appName); err != nil {
|
||||
LogFail(err.Error())
|
||||
}
|
||||
}
|
||||
if appName == "--global" && !globalProperties[property] {
|
||||
LogFail("Property cannot be specified globally")
|
||||
}
|
||||
if property == "" {
|
||||
LogFail("No property specified")
|
||||
|
||||
@@ -2,6 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -79,7 +80,34 @@ func PlugnTrigger(triggerName string, args ...string) error {
|
||||
|
||||
// PlugnTriggerOutput fire the given plugn trigger with the given args
|
||||
func PlugnTriggerOutput(triggerName string, args ...string) ([]byte, error) {
|
||||
return PlugnTriggerSetup(triggerName, args...).Output()
|
||||
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, _ := ioutil.ReadAll(rE)
|
||||
readStdout, _ := ioutil.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
|
||||
}
|
||||
|
||||
// PlugnTriggerSetup sets up a plugn trigger call
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
@@ -145,9 +144,14 @@ func getEnvironment(appName string, merged bool) (env *Env) {
|
||||
}
|
||||
|
||||
func getAppNameOrGlobal(appName string, global bool) (string, error) {
|
||||
if appName == "" && !global {
|
||||
return appName, errors.New("Please specify an app to run the command on or --global")
|
||||
if global {
|
||||
return appName, nil
|
||||
}
|
||||
|
||||
if err := common.VerifyAppName(appName); err != nil {
|
||||
return appName, err
|
||||
}
|
||||
|
||||
return appName, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ trigger-config-docker-args() {
|
||||
IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
STDIN=$(cat)
|
||||
trigger="$0 config_docker_args"
|
||||
verify_app_name "$APP"
|
||||
|
||||
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
|
||||
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"
|
||||
|
||||
@@ -56,6 +56,10 @@ func newEnvFromString(rep string) (env *Env, err error) {
|
||||
|
||||
//LoadAppEnv loads an environment for the given app
|
||||
func LoadAppEnv(appName string) (env *Env, err error) {
|
||||
err = common.VerifyAppName(appName)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
appfile, err := getAppFile(appName)
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user