Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
67
HISTORY.md
67
HISTORY.md
@@ -1,5 +1,72 @@
|
||||
# History
|
||||
|
||||
## 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:
|
||||
|
||||
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ DOKKU_VERSION ?= master
|
||||
|
||||
HEROKUISH_VERSION ?= 0.5.19
|
||||
PROCFILE_VERSION ?= 0.11.0
|
||||
PLUGN_VERSION ?= 0.5.0
|
||||
PLUGN_VERSION ?= 0.5.1
|
||||
SIGIL_VERSION ?= 0.6.0
|
||||
SSHCOMMAND_VERSION ?= 0.11.0
|
||||
SSHCOMMAND_URL ?= https://github.com/dokku/sshcommand/releases/download/v${SSHCOMMAND_VERSION}/sshcommand_${SSHCOMMAND_VERSION}_linux_x86_64.tgz
|
||||
|
||||
@@ -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.2/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.22.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
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
|
||||
|
||||
@@ -15,7 +15,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.22.0'
|
||||
VERSION = 'v0.22.2'
|
||||
|
||||
def bytes_to_string(b):
|
||||
if type(b) == bytes:
|
||||
|
||||
@@ -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
|
||||
|
||||
2
deb.mk
2
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
|
||||
|
||||
|
||||
2
debian/control
vendored
2
debian/control
vendored
@@ -1,5 +1,5 @@
|
||||
Package: dokku
|
||||
Version: 0.22.0
|
||||
Version: 0.22.2
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.2 enabled dokku core standard plugin
|
||||
20_events 0.22.2 enabled dokku core events logging plugin
|
||||
app-json 0.22.2 enabled dokku core app-json plugin
|
||||
apps 0.22.2 enabled dokku core apps plugin
|
||||
build-env 0.22.2 enabled dokku core build-env plugin
|
||||
buildpacks 0.22.2 enabled dokku core buildpacks plugin
|
||||
certs 0.22.2 enabled dokku core certificate management plugin
|
||||
checks 0.22.2 enabled dokku core checks plugin
|
||||
common 0.22.2 enabled dokku core common plugin
|
||||
config 0.22.2 enabled dokku core config plugin
|
||||
docker-options 0.22.2 enabled dokku core docker-options plugin
|
||||
domains 0.22.2 enabled dokku core domains plugin
|
||||
enter 0.22.2 enabled dokku core enter plugin
|
||||
git 0.22.2 enabled dokku core git plugin
|
||||
logs 0.22.2 enabled dokku core logs plugin
|
||||
network 0.22.2 enabled dokku core network plugin
|
||||
nginx-vhosts 0.22.2 enabled dokku core nginx-vhosts plugin
|
||||
plugin 0.22.2 enabled dokku core plugin plugin
|
||||
proxy 0.22.2 enabled dokku core proxy plugin
|
||||
ps 0.22.2 enabled dokku core ps plugin
|
||||
repo 0.22.2 enabled dokku core repo plugin
|
||||
resource 0.22.2 enabled dokku core resource plugin
|
||||
scheduler-docker-local 0.22.2 enabled dokku core scheduler-docker-local plugin
|
||||
shell 0.22.2 enabled dokku core shell plugin
|
||||
ssh-keys 0.22.2 enabled dokku core ssh-keys plugin
|
||||
storage 0.22.2 enabled dokku core storage plugin
|
||||
tags 0.22.2 enabled dokku core tags plugin
|
||||
tar 0.22.2 enabled dokku core tar plugin
|
||||
trace 0.22.2 enabled dokku core trace plugin
|
||||
```
|
||||
|
||||
> Warning: All plugin commands other than `plugin:list` and `plugin:help` require sudo access and must be run directly from the Dokku server.
|
||||
|
||||
### 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.2/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.22.2\/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.2\/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.2\/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.2\/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.2\/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.2\/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.2/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/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.2"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -146,6 +146,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
|
||||
```
|
||||
|
||||
@@ -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.2-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Pull the dokku/dokku image:
|
||||
|
||||
```shell
|
||||
docker pull dokku/dokku:0.22.0
|
||||
docker pull dokku/dokku:0.22.2
|
||||
```
|
||||
|
||||
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.2
|
||||
```
|
||||
|
||||
Dokku is run in the following configuration:
|
||||
|
||||
@@ -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.2/bootstrap.sh;
|
||||
sudo DOKKU_TAG=v0.22.2 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -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.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.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.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.0/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
.sponsors {
|
||||
@@ -127,12 +127,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.22.0/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.22.2/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.2 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.2/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/docs/assets/favicons/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-title" content="Dokku">
|
||||
<meta name="application-name" content="Dokku">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.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.2/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.22.2/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.2/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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -25,7 +25,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;"}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core app-json plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package apps
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/dokku/dokku/plugins/common"
|
||||
)
|
||||
|
||||
@@ -12,7 +14,7 @@ func ReportSingleApp(appName, infoFlag string) error {
|
||||
|
||||
deploySource := ""
|
||||
if b, err := common.PlugnTriggerSetup("deploy-source", []string{appName}...).SetInput("").Output(); err != nil {
|
||||
deploySource = string(b[:])
|
||||
deploySource = strings.TrimSpace(string(b[:]))
|
||||
}
|
||||
|
||||
locked := "false"
|
||||
|
||||
@@ -140,7 +140,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,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-cnb plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[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.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core builder-herokuish plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core buildpacks plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -69,7 +69,7 @@ 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
|
||||
}
|
||||
@@ -80,7 +80,7 @@ func GetAppScheduler(appName string) string {
|
||||
// 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
|
||||
}
|
||||
@@ -98,19 +98,19 @@ func GetDeployingAppImageName(appName, imageTag, imageRepo string) (string, erro
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
imageRemoteRepository := string(b[:])
|
||||
imageRemoteRepository := strings.TrimSpace(string(b[:]))
|
||||
|
||||
b, err = PlugnTriggerOutput("deployed-app-image-tag", []string{appName}...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
newImageTag := string(b[:])
|
||||
newImageTag := strings.TrimSpace(string(b[:]))
|
||||
|
||||
b, err = PlugnTriggerOutput("deployed-app-image-repo", []string{appName}...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
newImageRepo := string(b[:])
|
||||
newImageRepo := strings.TrimSpace(string(b[:]))
|
||||
|
||||
if newImageRepo != "" {
|
||||
imageRepo = newImageRepo
|
||||
@@ -406,11 +406,6 @@ 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")
|
||||
}
|
||||
|
||||
|
||||
@@ -137,7 +137,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
|
||||
}
|
||||
|
||||
@@ -190,7 +190,6 @@ is_valid_app_name() {
|
||||
fi
|
||||
fi
|
||||
|
||||
[[ -d "$DOKKU_ROOT/$APP" ]] && rm -rf "${DOKKU_ROOT:?}/$APP"
|
||||
dokku_log_fail "App name must begin with lowercase alphanumeric character, and cannot include uppercase characters, colons, or underscores"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -2,6 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
@@ -79,7 +80,21 @@ 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()
|
||||
rescueStderr := os.Stderr
|
||||
r, w, _ := os.Pipe()
|
||||
os.Stderr = w
|
||||
out, err := PlugnTriggerSetup(triggerName, args...).Output()
|
||||
w.Close()
|
||||
|
||||
readStderr, _ := ioutil.ReadAll(r)
|
||||
os.Stderr = rescueStderr
|
||||
|
||||
var stderr error
|
||||
if err != nil {
|
||||
stderr = fmt.Errorf(string(readStderr[:]))
|
||||
}
|
||||
|
||||
return out, stderr
|
||||
}
|
||||
|
||||
// PlugnTriggerSetup sets up a plugn trigger call
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/docker-options/post-delete
Executable file
14
plugins/docker-options/post-delete
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
trigger-docker-options-post-delete() {
|
||||
declare desc="deletes docker options files for an app"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
rm -f "$(fn-get-phase-file-path "$APP" "build")" "$(fn-get-phase-file-path "$APP" "deploy")" "$(fn-get-phase-file-path "$APP" "run")"
|
||||
}
|
||||
|
||||
trigger-docker-options-post-delete "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core domains plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core enter plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -139,12 +139,15 @@ cmd-git-hook() {
|
||||
# if block if you wish to run it for others as well.
|
||||
if [[ $refname == "refs/heads/${DOKKU_DEPLOY_BRANCH}" ]]; then
|
||||
# broken out into plugin so we might support other methods to receive an app
|
||||
# shellcheck disable=SC2086
|
||||
git_receive_app "$APP" "$newrev"
|
||||
else
|
||||
if [[ $(find "$PLUGIN_PATH"/enabled/*/receive-branch 2>/dev/null | wc -l) != 1 ]]; then
|
||||
# shellcheck disable=SC2086
|
||||
plugn trigger receive-branch $APP $newrev $refname
|
||||
elif [[ -z "$(fn-git-deploy-branch "$APP" "")" ]]; then
|
||||
echo $'\e[1G\e[K'"-----> Set ${refname/refs\/heads\//} to DOKKU_DEPLOY_BRANCH."
|
||||
fn-plugin-property-write "git" "$app" "deploy-branch" "${refname/refs\/heads\//}"
|
||||
git_receive_app "$APP" "$newrev"
|
||||
else
|
||||
echo $'\e[1G\e[K'"-----> WARNING: deploy did not complete, you must push to ${DOKKU_DEPLOY_BRANCH}."
|
||||
echo $'\e[1G\e[K'"-----> for example, try 'git push <dokku> ${refname/refs\/heads\//}:${DOKKU_DEPLOY_BRANCH}'"
|
||||
@@ -169,9 +172,14 @@ git_build() {
|
||||
local REF="$REV"
|
||||
else
|
||||
DOKKU_DEPLOY_BRANCH="$(fn-git-deploy-branch "$APP")"
|
||||
REF=$(<"$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
|
||||
if [[ -f "$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH" ]]; then
|
||||
REF=$(<"$DOKKU_ROOT/$APP/refs/heads/$DOKKU_DEPLOY_BRANCH")
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z "$REF" ]]; then
|
||||
return
|
||||
fi
|
||||
# shellcheck disable=SC2086
|
||||
git_build_app_repo $APP $REF
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ fn-git-last-updated-at() {
|
||||
fn-git-deploy-branch() {
|
||||
declare desc="retrieve the deploy branch for a given application"
|
||||
local APP="$1"
|
||||
local DEFAULT_BRANCH="${2-master}"
|
||||
|
||||
local DOKKU_DEPLOY_BRANCH="$(fn-plugin-property-get "git" "$APP" "deploy-branch" "")"
|
||||
local DOKKU_GLOBAL_DEPLOY_BRANCH="$(fn-plugin-property-get "git" "--global" "deploy-branch" "")"
|
||||
@@ -93,6 +94,6 @@ fn-git-deploy-branch() {
|
||||
elif [[ -n "$DOKKU_GLOBAL_DEPLOY_BRANCH" ]]; then
|
||||
echo "$DOKKU_GLOBAL_DEPLOY_BRANCH"
|
||||
else
|
||||
echo "master"
|
||||
echo "$DEFAULT_BRANCH"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core git plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
14
plugins/git/post-create
Executable file
14
plugins/git/post-create
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/git/functions"
|
||||
|
||||
trigger-git-post-create() {
|
||||
declare desc="initializes an app with the correct git repository structure"
|
||||
declare trigger="post-create"
|
||||
declare APP="$1"
|
||||
|
||||
fn-git-create-hook "$APP"
|
||||
}
|
||||
|
||||
trigger-git-post-create "$@"
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core logs plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core network plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core nginx-vhosts plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
|
||||
trigger-nginx-vhosts-post-delete() {
|
||||
declare desc="nginx-vhosts post-delete trigger"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "nginx" "$APP"
|
||||
restart_nginx "$@" >/dev/null
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core plugin plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core proxy plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ps plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core repo plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core resource plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -214,6 +214,7 @@ fn-scheduler-docker-local-register-retired() {
|
||||
|
||||
CURRENT_TIME="$(date +%s)"
|
||||
DEAD_TIME=$((CURRENT_TIME + WAIT))
|
||||
touch "$DEAD_FILE"
|
||||
if ! grep -q "$DOCKER_ID" "$DEAD_FILE"; then
|
||||
echo "${APP} ${DOCKER_ID} ${DEAD_TIME}" >>"${DEAD_FILE}"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-docker-local plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
|
||||
trigger-scheduler-docker-local-post-delete() {
|
||||
declare desc="scheduler-docker-local post-delete plugin trigger"
|
||||
declare trigger="post-delete"
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-destroy "scheduler-docker-local" "$APP"
|
||||
rm -rf "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP"
|
||||
|
||||
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
|
||||
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
|
||||
return
|
||||
|
||||
@@ -23,11 +23,11 @@ output = []
|
||||
data = json.load(sys.stdin)
|
||||
for container in data:
|
||||
env = []
|
||||
whitelist = ['CACHE_PATH=', 'DOCKER_', 'DOKKU_', 'DYNO=', 'PATH=', 'PORT=', 'USER=']
|
||||
allowed_prefixes = ['CACHE_PATH=', 'DOCKER_', 'DOKKU_', 'DYNO=', 'PATH=', 'PORT=', 'USER=']
|
||||
for e in container['Config']['Env']:
|
||||
append = False
|
||||
for w in whitelist:
|
||||
if e.startswith(w):
|
||||
for s in allowed_prefixes:
|
||||
if e.startswith(s):
|
||||
append = True
|
||||
break
|
||||
if append:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core shell plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core ssh-keys plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core storage plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tags plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core tar plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core trace plugin"
|
||||
version = "0.22.0"
|
||||
version = "0.22.2"
|
||||
[plugin.config]
|
||||
|
||||
5
tests.mk
5
tests.mk
@@ -182,6 +182,10 @@ deploy-test-checks-root:
|
||||
@echo deploying checks-root app...
|
||||
cd tests && ./test_deploy ./apps/checks-root dokku.me '' true
|
||||
|
||||
deploy-test-main-branch:
|
||||
@echo deploying checks-root app to main branch...
|
||||
cd tests && ./test_deploy ./apps/checks-root dokku.me '' true main
|
||||
|
||||
deploy-test-clojure:
|
||||
@echo deploying config app...
|
||||
cd tests && ./test_deploy ./apps/clojure dokku.me
|
||||
@@ -253,6 +257,7 @@ deploy-test-static:
|
||||
deploy-tests:
|
||||
@echo running deploy tests...
|
||||
@$(QUIET) $(MAKE) deploy-test-checks-root
|
||||
@$(QUIET) $(MAKE) deploy-test-main-branch
|
||||
@$(QUIET) $(MAKE) deploy-test-go-fail-predeploy
|
||||
@$(QUIET) $(MAKE) deploy-test-go-fail-postdeploy
|
||||
@$(QUIET) $(MAKE) deploy-test-config
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dependency>
|
||||
<groupId>org.eclipse.jetty</groupId>
|
||||
<artifactId>jetty-servlet</artifactId>
|
||||
<version>9.4.35.v20201120</version>
|
||||
<version>11.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
||||
27
tests/apps/php/composer.lock
generated
27
tests/apps/php/composer.lock
generated
@@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "monolog/monolog",
|
||||
"version": "1.25.5",
|
||||
"version": "1.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Seldaek/monolog.git",
|
||||
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0"
|
||||
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1817faadd1846cd08be9a49e905dc68823bc38c0",
|
||||
"reference": "1817faadd1846cd08be9a49e905dc68823bc38c0",
|
||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||
"reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -33,7 +33,7 @@
|
||||
"graylog2/gelf-php": "~1.0",
|
||||
"php-amqplib/php-amqplib": "~2.4",
|
||||
"php-console/php-console": "^3.1.3",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.0",
|
||||
"phpstan/phpstan": "^0.12.59",
|
||||
"phpunit/phpunit": "~4.5",
|
||||
"ruflin/elastica": ">=0.90 <3.0",
|
||||
"sentry/sentry": "^0.13",
|
||||
@@ -53,11 +53,6 @@
|
||||
"sentry/sentry": "Allow sending log messages to a Sentry server"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Monolog\\": "src/Monolog"
|
||||
@@ -91,7 +86,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-07-23T08:35:51+00:00"
|
||||
"time": "2020-12-14T12:56:38+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
@@ -1005,16 +1000,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "heroku/heroku-buildpack-php",
|
||||
"version": "v185",
|
||||
"version": "v187",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/heroku/heroku-buildpack-php.git",
|
||||
"reference": "f9f96a05c4b5bd552594bb789413d8665ba77c64"
|
||||
"reference": "9a4c8992a3f1ce3c887cd184920a1765d5b05b73"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/f9f96a05c4b5bd552594bb789413d8665ba77c64",
|
||||
"reference": "f9f96a05c4b5bd552594bb789413d8665ba77c64",
|
||||
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/9a4c8992a3f1ce3c887cd184920a1765d5b05b73",
|
||||
"reference": "9a4c8992a3f1ce3c887cd184920a1765d5b05b73",
|
||||
"shasum": ""
|
||||
},
|
||||
"bin": [
|
||||
@@ -1045,7 +1040,7 @@
|
||||
"nginx",
|
||||
"php"
|
||||
],
|
||||
"time": "2020-11-23T03:47:09+00:00"
|
||||
"time": "2020-12-09T14:17:53+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
fn-available-tests() {
|
||||
declare PROCESSED_TEST_FILE="$1"
|
||||
AVAILABLE_TESTS="$(grep -o -E '^test_[^ ]+' "$PROCESSED_TEST_FILE")"
|
||||
AVAILABLE_TESTS=${AVAILABLE_TESTS//-28/(}
|
||||
AVAILABLE_TESTS=${AVAILABLE_TESTS//-29/)}
|
||||
AVAILABLE_TESTS=${AVAILABLE_TESTS//-3a/:}
|
||||
echo "$AVAILABLE_TESTS"
|
||||
}
|
||||
|
||||
fn-matched-test() {
|
||||
declare TEST_NAME="$1" AVAILABLE_TESTS="$2"
|
||||
|
||||
if [[ -z "$TEST_NAME" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "$AVAILABLE_TESTS" | grep "$TEST_NAME" | head -1
|
||||
}
|
||||
|
||||
fn-real-test-name() {
|
||||
declare TEST_NAME="$1"
|
||||
|
||||
REAL_TEST_NAME=${TEST_NAME::-2}
|
||||
REAL_TEST_NAME=${REAL_TEST_NAME//(/-28}
|
||||
REAL_TEST_NAME=${REAL_TEST_NAME//)/-29}
|
||||
REAL_TEST_NAME=${REAL_TEST_NAME//:/-3a}
|
||||
echo "$REAL_TEST_NAME"
|
||||
}
|
||||
|
||||
main() {
|
||||
declare TEST_FILE="$1" TEST_NAME="$2"
|
||||
local AVAILABLE_TESTS
|
||||
|
||||
if [[ -z "$TEST_FILE" ]]; then
|
||||
echo "No test file specified"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -e "$TEST_FILE" ]]; then
|
||||
echo "not found: '$TEST_FILE'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TMP_OUTPUT=$(mktemp "/tmp/${FUNCNAME[0]}.XXXXXX")
|
||||
trap 'rm -rf "$TMP_OUTPUT" >/dev/null' RETURN INT TERM EXIT
|
||||
|
||||
eval "$(grep "export BATS_TEST_PATTERN" </usr/local/libexec/bats-core/bats)"
|
||||
/usr/local/libexec/bats-core/bats-preprocess <"$TEST_FILE" >"$TMP_OUTPUT"
|
||||
AVAILABLE_TESTS="$(fn-available-tests "$TMP_OUTPUT")"
|
||||
MATCHED_TEST=$(fn-matched-test "$TEST_NAME" "$AVAILABLE_TESTS")
|
||||
|
||||
if [[ -z "$MATCHED_TEST" ]]; then
|
||||
if [[ -n "$TEST_NAME" ]]; then
|
||||
echo "test '$TEST_NAME' not found in ${TEST_FILE}"
|
||||
fi
|
||||
|
||||
echo "available test are:"
|
||||
echo "$AVAILABLE_TESTS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Running test: ${MATCHED_TEST}"
|
||||
export BATS_TEST_SOURCE="$TMP_OUTPUT"
|
||||
/usr/local/libexec/bats-core/bats-exec-test "$TEST_FILE" "$(fn-real-test-name "$MATCHED_TEST")"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -6,6 +6,7 @@ APP="$1"
|
||||
TARGET="$2"
|
||||
FORWARDED_PORT="$3"
|
||||
SHOULD_FAIL="$4"
|
||||
BRANCH="${5:-master}"
|
||||
REMOTE="dokku@$TARGET"
|
||||
REPO="test-$(basename "$APP")-$RANDOM"
|
||||
|
||||
@@ -43,9 +44,9 @@ git add .
|
||||
[[ -x pre-commit ]] && ./pre-commit "$REMOTE" "$REPO"
|
||||
git commit -m 'initial commit'
|
||||
if [[ "$SHOULD_FAIL" == true ]]; then
|
||||
git push target master && succeeded git-push
|
||||
git push target "master:$BRANCH" && succeeded git-push
|
||||
else
|
||||
git push target master || failed git-push
|
||||
git push target "master:$BRANCH" || failed git-push
|
||||
fi
|
||||
if [[ -x post-deploy ]]; then
|
||||
./post-deploy "$REMOTE" "$REPO" || failed post-deploy
|
||||
|
||||
@@ -70,22 +70,11 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile entrypoint" {
|
||||
run deploy_app dockerfile-entrypoint
|
||||
run deploy_app dockerfile-entrypoint dokku@dokku.me:$TEST_APP add_release_command
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Cmd}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output 'null'
|
||||
|
||||
run docker inspect "dokku/${TEST_APP}:latest" --format "{{json .Config.Entrypoint}}"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
assert_output '["./entrypoint"]'
|
||||
assert_output_contains "touch /app/release.test"
|
||||
}
|
||||
|
||||
@test "(app-json) app.json dockerfile release" {
|
||||
|
||||
@@ -52,7 +52,7 @@ teardown() {
|
||||
run /bin/bash -c "test -d $DOKKU_ROOT/$TEST_APP/refs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku git:initialize $TEST_APP"
|
||||
echo "output: $output"
|
||||
@@ -69,7 +69,7 @@ teardown() {
|
||||
run /bin/bash -c "test -d $DOKKU_ROOT/$TEST_APP/refs"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
assert_success
|
||||
|
||||
deploy_app
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ load test_helper
|
||||
|
||||
setup() {
|
||||
global_setup
|
||||
deploy_app
|
||||
create_app
|
||||
}
|
||||
|
||||
teardown() {
|
||||
@@ -20,10 +20,16 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(tags) tags:create, tags, tags:destroy" {
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku tags:create $TEST_APP v0.9.0"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku tags $TEST_APP | grep -q -E 'v0.9.0'"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -40,6 +46,11 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(tags) tags:deploy" {
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku tags:create $TEST_APP v0.9.0"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
@@ -64,3 +75,27 @@ teardown() {
|
||||
echo "status: $status"
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(tags) tags:deploy (onbuild)" {
|
||||
run /bin/bash -c "docker image pull gliderlabs/logspout:v3.2.13"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "docker image tag gliderlabs/logspout:v3.2.13 dokku/$TEST_APP:3.2.13"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku storage:mount $TEST_APP /var/run/docker.sock:/var/run/docker.sock"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku tags:deploy $TEST_APP 3.2.13"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_output_contains "Image contains one or more ONBUILD directives, skipping label injection"
|
||||
assert_output_contains "COPY failed" 0
|
||||
assert_success
|
||||
}
|
||||
|
||||
@@ -450,6 +450,13 @@ some lame nginx config
|
||||
EOF
|
||||
}
|
||||
|
||||
add_release_command() {
|
||||
local APP="$1"
|
||||
local APP_REPO_DIR="$2"
|
||||
[[ -z "$APP" ]] && local APP="$TEST_APP"
|
||||
echo "release: touch /app/release.test" >> "$APP_REPO_DIR/Procfile"
|
||||
}
|
||||
|
||||
build_nginx_config() {
|
||||
# simulate nginx post-deploy
|
||||
dokku domains:setup "$TEST_APP"
|
||||
|
||||
Reference in New Issue
Block a user