Compare commits

...

54 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
d10d4cc55c Release 0.22.2
# 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
2020-12-15 19:14:31 -05:00
Jose Diaz-Gonzalez
2301efa460 Merge pull request #4244 from dokku/dependabot/composer/tests/apps/php/monolog/monolog-1.26.0
chore(deps): bump monolog/monolog from 1.25.5 to 1.26.0 in /tests/apps/php
2020-12-15 14:04:14 -05:00
Jose Diaz-Gonzalez
d00284166f Merge pull request #4141 from dokku/always-initialize-repo
feat: always initialize git repository
2020-12-15 14:01:09 -05:00
Jose Diaz-Gonzalez
f279ce44b2 Merge pull request #4243 from dokku/4129-avoid-deletion
Do not delete app when the app name is invalid
2020-12-15 03:28:52 -05:00
Jose Diaz-Gonzalez
36215828f1 feat: always initialize git repository
This fixes issues where alternative tools that don't trigger the init via sshcommand - such as git-http-backend - are not able to setup applications correctly.

Note that those apps could always manually trigger git:initialize if desired, but if the app already exists, then this should already _just work_ without that extra initialization.
2020-12-15 01:42:10 -05:00
dependabot-preview[bot]
0623af86d6 chore(deps): bump monolog/monolog in /tests/apps/php
Bumps [monolog/monolog](https://github.com/Seldaek/monolog) from 1.25.5 to 1.26.0.
- [Release notes](https://github.com/Seldaek/monolog/releases)
- [Changelog](https://github.com/Seldaek/monolog/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Seldaek/monolog/compare/1.25.5...1.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-15 06:30:16 +00:00
Jose Diaz-Gonzalez
c6976499ad fix: do not delete app when the app name is invalid
Let folks call apps:destroy instead.

Refs #4129
2020-12-15 01:14:30 -05:00
Jose Diaz-Gonzalez
01bd69100c Release 0.22.1
# History

## 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
2020-12-13 22:04:14 -05:00
Jose Diaz-Gonzalez
541d73ad93 Merge pull request #4238 from dokku/ensure-dead-files
Ensure dead files are created for docker object retirement
2020-12-13 21:59:47 -05:00
Jose Diaz-Gonzalez
6b159c32cf Merge pull request #4239 from dokku/4229-trim-whitespace
Ensure all byte output is trimmed of whitespace
2020-12-13 21:59:23 -05:00
Jose Diaz-Gonzalez
5f2968d1b0 Merge pull request #4242 from dokku/remove-whitelist-word
Remove reference to 'whitelist'
2020-12-13 21:58:37 -05:00
Jose Diaz-Gonzalez
0e768d107a Merge pull request #4218 from dokku/faster-compiles
Enable compilation cache
2020-12-13 15:39:29 -05:00
Jose Diaz-Gonzalez
3557ff16dc Merge pull request #4220 from dokku/update-plugn
Update plugn from 0.5.0 to 0.5.1
2020-12-13 15:23:35 -05:00
Jose Diaz-Gonzalez
30131ef363 Merge pull request #4241 from dokku/quieter-plugn-capture
Properly handle stdout when capturing plugn output
2020-12-13 15:15:48 -05:00
Jose Diaz-Gonzalez
946c424734 Merge pull request #4228 from Cellane/patch-1
Fix tags:deploy command for images that contain ONBUILD directive
2020-12-13 03:14:03 -05:00
Jose Diaz-Gonzalez
f42b293836 feat: remove reference to 'whitelist'
The term doesn't even 'make sense' in this context. 'allowed_prefixes' is a much better variable name.
2020-12-13 02:10:52 -05:00
Jose Diaz-Gonzalez
b691c0affc feat: properly handle stdout when capturing plugn output
The previous output would also include a message like `exit status 1`. This allows us to silence that output and instead only capture that which was return from the subprocess.
2020-12-13 02:08:44 -05:00
Jose Diaz-Gonzalez
48fa04a05b fix: ensure dead files are created for docker object retirement 2020-12-13 02:05:30 -05:00
Jose Diaz-Gonzalez
8c14bb9aeb fix: ensure all byte output is trimmed of whitespace
This otherwise causes issues when interpreting the output as part of a variable, such as when constructing the deploying app image.

Closes #4229
2020-12-13 02:04:35 -05:00
Jose Diaz-Gonzalez
ca2de6a4a3 Merge pull request #4237 from dokku/update-dokku-update
Release dokku-update 0.2.0
2020-12-12 23:11:03 -05:00
Jose Diaz-Gonzalez
755499797e feat: release dokku-update 0.2.0 2020-12-12 23:10:21 -05:00
Jose Diaz-Gonzalez
f2a3cfc0b4 tests: add unit test for label skipping 2020-12-12 16:33:39 -05:00
Milan Vit
a42786a465 Fixes tags:deploy command for images that contain ONBUILD directive
Fixes #4226
2020-12-12 16:07:31 -05:00
Jose Diaz-Gonzalez
de0a467c97 Merge pull request #4233 from dokku/4232-fix-release-command
Properly parse releease command when there is an entrypoint
2020-12-12 15:57:38 -05:00
Jose Diaz-Gonzalez
ab23a4b6f1 Merge pull request #4236 from dokku/josegonzalez-patch-1
Remove note regarding not having an official client
2020-12-12 15:56:11 -05:00
Jose Diaz-Gonzalez
87aed0eadf docs: remove note regarding not having an official client
Closes #4235

[ci skip]
2020-12-12 15:55:38 -05:00
Jose Diaz-Gonzalez
9a86549359 chore: fix mispelling
[ci skip]
2020-12-11 14:19:44 -05:00
Jose Diaz-Gonzalez
2eeb0069d5 Merge pull request #4234 from dokku/use-bats-filter
Switch to bats --filter for running a single test
2020-12-11 14:14:51 -05:00
Jose Diaz-Gonzalez
f536a05e06 fix: switch to bats --filter for running a single test 2020-12-11 11:45:15 -05:00
Jose Diaz-Gonzalez
26b95854d4 fix: properly parse releease command when there is an entrypoint
Closes #4232
2020-12-11 11:44:13 -05:00
Jose Diaz-Gonzalez
775432c73f Merge pull request #4230 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-187
chore(deps-dev): bump heroku/heroku-buildpack-php from 186 to 187 in /tests/apps/php
2020-12-10 11:00:36 -05:00
dependabot-preview[bot]
84ee5995f4 chore(deps-dev): bump heroku/heroku-buildpack-php in /tests/apps/php
Bumps [heroku/heroku-buildpack-php](https://github.com/heroku/heroku-buildpack-php) from 186 to 187.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v186...v187)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-10 06:21:51 +00:00
Jose Diaz-Gonzalez
91e9bb9670 Merge pull request #4225 from znz/accept-first-pushed-branch-as-deploy-branch
Accept first pushed branch as deploy-branch
2020-12-08 16:04:05 -05:00
Jose Diaz-Gonzalez
c6a8bd669f Merge pull request #4223 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-11.0.0
chore(deps): bump jetty-servlet from 9.4.35.v20201120 to 11.0.0 in /tests/apps/java
2020-12-08 14:08:26 -05:00
Jose Diaz-Gonzalez
d9d0a932b0 Merge pull request #4224 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-186
chore(deps-dev): bump heroku/heroku-buildpack-php from 185 to 186 in /tests/apps/php
2020-12-08 12:54:04 -05:00
Jose Diaz-Gonzalez
a91d45c397 Merge pull request #4222 from leopolicastro/patch-1
Fix typo
2020-12-08 10:50:54 -05:00
Kazuhiro NISHIYAMA
98c81513aa Accept first pushed branch as deploy-branch
And set to DOKKU_DEPLOY_BRANCH.

Idea from https://github.com/dokku/dokku/pull/4167#issuecomment-717607136
2020-12-08 23:15:11 +09:00
dependabot-preview[bot]
a7e5f2abdc chore(deps-dev): bump heroku/heroku-buildpack-php in /tests/apps/php
Bumps [heroku/heroku-buildpack-php](https://github.com/heroku/heroku-buildpack-php) from 185 to 186.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/main/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v185...v186)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-08 07:14:57 +00:00
dependabot-preview[bot]
0aa0c884d3 chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.35.v20201120 to 11.0.0.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.35.v20201120...jetty-11.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-12-08 05:54:29 +00:00
Leo Policastro
dfa39fc590 Fix typo 2020-12-07 22:03:11 -05:00
Jose Diaz-Gonzalez
cbd442fc2e Merge pull request #4221 from srr013/patch-1
Updating readme for clarity on git push step
2020-12-05 15:07:48 -05:00
Scott Rossignol
ebd2778f5b Updating readme for clarity on git push step
https://www.digitalocean.com/community/questions/refactorin-git-remote-add-dokku-dokku-dokku-me-ruby-rails-sample
2020-12-05 10:17:11 -05:00
Jose Diaz-Gonzalez
5887d4ddfa Update plugn from 0.5.0 to 0.5.1 2020-12-05 02:32:15 -05:00
Jose Diaz-Gonzalez
36e9b4b2ae feat: enable compilation cache
Not sure why it was disabled but lets see if tests fail?
2020-12-04 16:58:45 -05:00
Jose Diaz-Gonzalez
81d31c9934 Merge pull request #4215 from dokku/plugin-cleanup
Implement missing cleanup routines
2020-12-02 14:19:07 -05:00
Jose Diaz-Gonzalez
4aaefb0c4c fix: implement missing cleanup routines
Without these, there was potential for configuration for certain plugins to continue to exist after an app was deleted.
2020-12-02 03:27:06 -05:00
Jose Diaz-Gonzalez
6aac1ea0d1 Merge pull request #4214 from dokku/4180-backup-docs
Expand backup and restore documentation
2020-12-02 02:54:48 -05:00
Jose Diaz-Gonzalez
bd275d9b5d docs: expand backup and restore documentation
This documentation should fill the need for users that wish to backup and restore their installations. While there are certainly other methods to trigger this process - and many caveats - this should give users more confidence as to how to approach the general problem.

Closes #4180
2020-12-02 02:54:07 -05:00
Jose Diaz-Gonzalez
8c0dbc7d6a Merge pull request #4213 from dokku/4192-plugin-docs
Enhance the 'plugin' plugin documentation
2020-12-02 01:30:49 -05:00
Jose Diaz-Gonzalez
07194ca17f docs: add documentation to the plugin plugin
These plugin docs will be good enough to tide end-users over until the 'plugin' plugin can be rewritten in golang.

Closes #4192
2020-12-02 01:30:12 -05:00
Jose Diaz-Gonzalez
325c6d44dd Merge pull request #4212 from dokku/cleanup-options
Cleanup docker options during post-delete
2020-12-02 00:14:02 -05:00
Jose Diaz-Gonzalez
168ed1716c fix: cleanup docker options during post-delete
While the directory removal should be enough, we should also force-clean just to be sure.
2020-12-01 22:38:20 -05:00
Jose Diaz-Gonzalez
3de8c3002a Merge pull request #4211 from ml-milan-vit/patch-1
🐛 Make the dokku-update command compatible with Dokku 0.22+
2020-12-01 18:41:22 -05:00
Milan Vit
1cbbfb195f 🐛 Make the dokku-update command compatible with Dokku 0.22+ 2020-12-02 08:39:21 +09:00
79 changed files with 511 additions and 278 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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:

View File

@@ -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
View File

@@ -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
View File

@@ -1,5 +1,5 @@
Package: dokku
Version: 0.22.0
Version: 0.22.2
Section: web
Priority: optional
Architecture: amd64

View File

@@ -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 !$

View File

@@ -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

View File

@@ -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
```

View File

@@ -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>

View File

@@ -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"

View File

@@ -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;
}

View File

@@ -19,6 +19,6 @@
"0.19.13",
"0.20.4",
"0.21.4",
"0.22.0"
"0.22.2"
]
}

View File

@@ -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

View File

@@ -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
```

View File

@@ -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'

View File

@@ -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
```

View File

@@ -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:

View File

@@ -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.

View File

@@ -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">&nbsp;# go to your server's IP and follow the web installer</span>

View File

@@ -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>

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core standard plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core events logging plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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;"}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core app-json plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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"

View File

@@ -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)

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core apps plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-cnb plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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"
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-dockerfile plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core builder-herokuish plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core buildpacks plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core certificate management plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core checks plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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")
}

View File

@@ -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
}

View File

@@ -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"
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core common plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core config plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core docker-options plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View 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 "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core domains plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core enter plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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
}

View File

@@ -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
}

View File

@@ -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
View 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 "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core logs plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core network plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core nginx-vhosts plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core plugin plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core proxy plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core ps plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core repo plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core resource plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core scheduler-docker-local plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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

View File

@@ -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:

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core shell plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core ssh-keys plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core storage plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core tags plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core tar plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core trace plugin"
version = "0.22.0"
version = "0.22.2"
[plugin.config]

View File

@@ -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

View File

@@ -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>

View File

@@ -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": [],

View File

@@ -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 "$@"

View File

@@ -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

View File

@@ -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" {

View File

@@ -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

View File

@@ -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
}

View File

@@ -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"