Compare commits

...

202 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
b4ab5a5764 Release 0.19.10
# History

## 0.19.10

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh
sudo DOKKU_TAG=v0.19.10 bash bootstrap.sh
```

### Bug Fixes

- #3784: @josegonzalez Ensure checks attempts are tracked per-check instead of globally

### New Features

- #3793: @josegonzalez Omit DWARF symbol table and debug information from go binaries
- #3792: @josegonzalez Unify property function implementations

### Documentation

- #3712: @fruitl00p Added new plugin

### Other

- #3790: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/python-flask
- #3791: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/multi
- #3787: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/multi
- #3788: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/python-flask
- #3785: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/python-flask
- #3786: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/multi
- #3748: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-dokku-scale
- #3749: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noappjson
- #3747: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/config
- #3746: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile
- #3741: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express
- #3783: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.23.v20191118 to 9.4.24.v20191120 in /tests/apps/java
- #3777: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 3.4.32 to 3.4.35 in /tests/apps/php
- #3774: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/python-flask
- #3779: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.25.1 to 1.25.2 in /tests/apps/php
- #3782: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.22.v20191022 to 9.4.23.v20191118 in /tests/apps/java
2019-11-27 22:51:00 -05:00
Jose Diaz-Gonzalez
645ba5728f Merge pull request #3793 from dokku/slimmer-builds
Omit DWARF symbol table and debug information from go binaries
2019-11-27 22:30:32 -05:00
Jose Diaz-Gonzalez
02d653a1aa refactor: omit DWARF symbol table and debug information from go binaries
This will reduce the size of binaries in exchange for worse debugging output. This is acceptable for our users and worth it to save money on packagecloud package hosting - which is currently free under a given repository size.
2019-11-27 21:12:16 -05:00
Jose Diaz-Gonzalez
39c7699962 Merge pull request #3712 from fruitl00p/patch-6
Added new plugin
2019-11-27 20:39:52 -05:00
Jose Diaz-Gonzalez
9b05804edf Merge pull request #3792 from dokku/list-properties
Unify property function implementations
2019-11-27 20:39:26 -05:00
Jose Diaz-Gonzalez
fe9472ff09 fix: correct issue where output was not sent to stdout 2019-11-27 18:58:22 -05:00
Jose Diaz-Gonzalez
79b344bbe4 feat: add list-length method to shell functions 2019-11-27 17:08:18 -05:00
Jose Diaz-Gonzalez
e3f0160e5f fix: correct issue where common plugin was ignored for go builds
It was previously ignored because there was nothing to build, and it was simply linked to.
2019-11-27 17:02:07 -05:00
Jose Diaz-Gonzalez
4d9e8f5f7d refactor: unify property function implementations
Rather than reimplementing the property functions in two different languages - and potentially having compatibility issues - standardize on golang for the implementation through the use of a generated binary.

This also implements all the list functions for use with shell-based plugins.

Note that the interface to the prop binary is experimental, and it should not be used directly.
2019-11-27 16:37:10 -05:00
Jose Diaz-Gonzalez
2429503b21 Merge pull request #3784 from dokku/better-checks-context
Ensure checks attempts are tracked per-check instead of globally
2019-11-27 15:19:12 -05:00
Jose Diaz-Gonzalez
ff4b0de04c docs: clarify comments 2019-11-27 14:31:51 -05:00
Jose Diaz-Gonzalez
9078dabc82 Merge pull request #3790 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-20.0.4
chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/python-flask
2019-11-27 12:10:41 -05:00
dependabot-preview[bot]
a18bb02115 chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.3 to 20.0.4.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.3...20.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 15:41:33 +00:00
Jose Diaz-Gonzalez
8ea12f6c5d Merge pull request #3791 from dokku/dependabot/pip/tests/apps/multi/gunicorn-20.0.4
chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/multi
2019-11-27 10:40:29 -05:00
dependabot-preview[bot]
a1b1d5cba1 chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.3 to 20.0.4.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.3...20.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-27 06:43:02 +00:00
Jose Diaz-Gonzalez
bb4b6df651 Merge pull request #3787 from dokku/dependabot/pip/tests/apps/multi/gunicorn-20.0.3
chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/multi
2019-11-26 09:27:51 -05:00
Jose Diaz-Gonzalez
3568cbef8c Merge pull request #3788 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-20.0.3
chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/python-flask
2019-11-26 09:27:34 -05:00
dependabot-preview[bot]
8382bebcf2 chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.2 to 20.0.3.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.2...20.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 06:49:34 +00:00
dependabot-preview[bot]
02dca4a1a3 chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.2 to 20.0.3.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.2...20.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-26 06:43:18 +00:00
Jose Diaz-Gonzalez
4dd000ca9e Merge pull request #3785 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-20.0.2
chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/python-flask
2019-11-25 13:24:13 -05:00
dependabot-preview[bot]
297041bfc4 chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.0 to 20.0.2.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.0...20.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 16:40:39 +00:00
Jose Diaz-Gonzalez
52f6e8c59b Merge pull request #3786 from dokku/dependabot/pip/tests/apps/multi/gunicorn-20.0.2
chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/multi
2019-11-25 11:39:34 -05:00
dependabot-preview[bot]
c6ec59be87 chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 20.0.0 to 20.0.2.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/20.0.0...20.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-25 06:52:34 +00:00
Jose Diaz-Gonzalez
404f08626b Merge pull request #3748 from dokku/dependabot/npm_and_yarn/tests/apps/dockerfile-dokku-scale/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-dokku-scale
2019-11-24 10:21:06 -05:00
Jose Diaz-Gonzalez
6a9629cdc4 Merge pull request #3749 from dokku/dependabot/npm_and_yarn/tests/apps/nodejs-express-noappjson/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noappjson
2019-11-23 16:55:51 -05:00
Jose Diaz-Gonzalez
d6c3c52cec Merge pull request #3747 from dokku/dependabot/npm_and_yarn/tests/apps/config/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/config
2019-11-23 15:43:59 -05:00
Jose Diaz-Gonzalez
52cd280782 Merge pull request #3746 from dokku/dependabot/npm_and_yarn/tests/apps/dockerfile-procfile/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile
2019-11-23 15:43:46 -05:00
Jose Diaz-Gonzalez
815febdb39 feat: remove unnecessary logger from test app
The logger middleware was moved to the `morgan` package in newer versions of express.
2019-11-23 13:17:35 -05:00
Jose Diaz-Gonzalez
2d76284a8c feat: remove unnecessary logger from test app
The logger middleware was moved to the `morgan` package in newer versions of express.
2019-11-23 13:17:34 -05:00
Jose Diaz-Gonzalez
347b0f5389 feat: remove unnecessary logger from test app
The logger middleware was moved to the `morgan` package in newer versions of express.
2019-11-23 13:16:22 -05:00
dependabot-preview[bot]
9e9a19a817 chore(deps): [security] bump express in /tests/apps/config
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-23 18:15:38 +00:00
dependabot-preview[bot]
ddfc3ba696 chore(deps): [security] bump express
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-23 18:15:36 +00:00
dependabot-preview[bot]
d581f2de64 chore(deps): [security] bump express
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-23 18:15:35 +00:00
Jose Diaz-Gonzalez
a35798e357 feat: remove unnecessary logger from test app
The logger middleware was moved to the `morgan` package in newer versions of express.
2019-11-23 13:15:27 -05:00
Jose Diaz-Gonzalez
0c25465df4 Merge pull request #3741 from dokku/dependabot/npm_and_yarn/tests/apps/nodejs-express/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express
2019-11-23 13:14:19 -05:00
Jose Diaz-Gonzalez
906e2c5615 feat: remove unnecessary logger from test app
The logger middleware was moved to the `morgan` package in newer versions of express.
2019-11-23 11:51:12 -05:00
Jose Diaz-Gonzalez
3b04b80a94 Merge pull request #3783 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-9.4.24.v20191120
chore(deps): bump jetty-servlet from 9.4.23.v20191118 to 9.4.24.v20191120 in /tests/apps/java
2019-11-23 11:27:08 -05:00
Jose Diaz-Gonzalez
00a175bef7 fix: correct issue where attempts were done globally instead of per check 2019-11-23 10:23:09 -05:00
Jose Diaz-Gonzalez
a3a37a1948 feat: minimize number of check-related output messages 2019-11-23 10:16:55 -05:00
dependabot-preview[bot]
6527552a62 chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.23.v20191118 to 9.4.24.v20191120.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.23.v20191118...jetty-9.4.24.v20191120)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-22 06:44:31 +00:00
Jose Diaz-Gonzalez
55e2681ad7 Merge pull request #3777 from dokku/dependabot/composer/tests/apps/php/symfony/http-kernel-3.4.35
chore(deps): [security] bump symfony/http-kernel from 3.4.32 to 3.4.35 in /tests/apps/php
2019-11-20 07:57:13 -05:00
Jose Diaz-Gonzalez
81257cafa1 Merge pull request #3774 from dokku/dependabot/pip/tests/apps/python-flask/gunicorn-20.0.0
chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/python-flask
2019-11-20 07:56:18 -05:00
dependabot-preview[bot]
8964f77978 chore(deps): bump gunicorn in /tests/apps/python-flask
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 19.9.0 to 20.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/19.9.0...20.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-20 11:50:54 +00:00
Jose Diaz-Gonzalez
72d480c9dd Merge pull request #3779 from dokku/dependabot/composer/tests/apps/php/monolog/monolog-1.25.2
chore(deps): bump monolog/monolog from 1.25.1 to 1.25.2 in /tests/apps/php
2019-11-20 06:49:09 -05:00
Jose Diaz-Gonzalez
e66c2373a7 Merge pull request #3782 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-9.4.23.v20191118
chore(deps): bump jetty-servlet from 9.4.22.v20191022 to 9.4.23.v20191118 in /tests/apps/java
2019-11-20 06:46:08 -05:00
dependabot-preview[bot]
af38710352 chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.22.v20191022 to 9.4.23.v20191118.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.22.v20191022...jetty-9.4.23.v20191118)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-20 06:52:24 +00:00
Jose Diaz-Gonzalez
d432cb514c Release 0.19.9
# History

## 0.19.9

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.9/bootstrap.sh
sudo DOKKU_TAG=v0.19.9 bash bootstrap.sh
```

### Bug Fixes

- #3781: @michaelshobbs Respect DOKKU_APP_USER in is_image_herokuish_based

### Other

- #3773: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.25.0 to 1.25.1 in /tests/apps/gogrpc
- #3772: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/multi
- #3778: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 3.4.32 to 3.4.35 in /tests/apps/php
- #3768: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.24.0 to 1.25.0 in /tests/apps/gogrpc
2019-11-19 18:04:28 -05:00
Jose Diaz-Gonzalez
db4311c655 Merge pull request #3781 from dokku/mh/fix/custom-dokku-app-user
fix: respect DOKKU_APP_USER in is_image_herokuish_based
2019-11-19 18:02:50 -05:00
Michael Hobbs
c4d69b662f add is_image_herokuish_based tests 2019-11-19 15:09:54 -07:00
Michael Hobbs
972830a5f3 fix: respect DOKKU_APP_USER in is_image_herokuish_based 2019-11-19 15:07:29 -07:00
Jose Diaz-Gonzalez
e3c81afb6a Merge pull request #3773 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/grpc-1.25.1
chore(deps): bump google.golang.org/grpc from 1.25.0 to 1.25.1 in /tests/apps/gogrpc
2019-11-14 03:01:11 -05:00
dependabot-preview[bot]
fe206d53d9 chore(deps): bump monolog/monolog in /tests/apps/php
Bumps [monolog/monolog](https://github.com/Seldaek/monolog) from 1.25.1 to 1.25.2.
- [Release notes](https://github.com/Seldaek/monolog/releases)
- [Changelog](https://github.com/Seldaek/monolog/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Seldaek/monolog/compare/1.25.1...1.25.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 07:57:30 +00:00
dependabot-preview[bot]
096e9346ad chore(deps): [security] bump symfony/http-kernel in /tests/apps/php
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 3.4.32 to 3.4.35. **This update includes a security fix.**
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-kernel/compare/v3.4.32...v3.4.35)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-14 06:57:54 +00:00
Jose Diaz-Gonzalez
5f342dcf27 Merge pull request #3772 from dokku/dependabot/pip/tests/apps/multi/gunicorn-20.0.0
chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/multi
2019-11-14 01:56:51 -05:00
Jose Diaz-Gonzalez
e02528280b Merge pull request #3778 from dokku/dependabot/composer/tests/apps/php/symfony/http-foundation-3.4.35
chore(deps): [security] bump symfony/http-foundation from 3.4.32 to 3.4.35 in /tests/apps/php
2019-11-14 01:56:29 -05:00
dependabot-preview[bot]
63358c3d34 chore(deps): [security] bump symfony/http-foundation in /tests/apps/php
Bumps [symfony/http-foundation](https://github.com/symfony/http-foundation) from 3.4.32 to 3.4.35. **This update includes a security fix.**
- [Release notes](https://github.com/symfony/http-foundation/releases)
- [Changelog](https://github.com/symfony/http-foundation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-foundation/compare/v3.4.32...v3.4.35)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-13 11:34:11 +00:00
dependabot-preview[bot]
0f5ed9844b chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.25.0...v1.25.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-11 09:37:16 +00:00
dependabot-preview[bot]
200de06d1e chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/multi
Bumps [gunicorn](https://github.com/benoitc/gunicorn) from 19.9.0 to 20.0.0.
- [Release notes](https://github.com/benoitc/gunicorn/releases)
- [Commits](https://github.com/benoitc/gunicorn/compare/19.9.0...20.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-11 09:37:00 +00:00
Jose Diaz-Gonzalez
3d1ab26777 Merge pull request #3768 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/grpc-1.25.0
chore(deps): bump google.golang.org/grpc from 1.24.0 to 1.25.0 in /tests/apps/gogrpc
2019-11-09 16:44:49 +09:00
Jose Diaz-Gonzalez
71295b7658 Release 0.19.8
# History

## 0.19.8

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.8/bootstrap.sh
sudo DOKKU_TAG=v0.19.8 bash bootstrap.sh
```
2019-11-07 12:47:22 +09:00
dependabot-preview[bot]
9539c28ef4 chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.24.0...v1.25.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-06 06:54:37 +00:00
Jose Diaz-Gonzalez
d8653f97b7 Release 0.19.7
# History

## 0.19.7

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.7/bootstrap.sh
sudo DOKKU_TAG=v0.19.7 bash bootstrap.sh
```

### Documentation

- #3765: @znz Fix typo in desc of is_tls13_available

### Other

- #3739: @safeforge dokku run do not supports interactive mode.
- #3762: @dependabot-preview[bot] chore(deps): bump handlebars from 4.4.5 to 4.5.1 in /tests/apps/.websocket.disabled
2019-11-04 21:52:05 -05:00
Jose Diaz-Gonzalez
a5e6739e16 Merge pull request #3739 from safeforge/dokku-run-interactive
dokku run do not supports interactive mode.
2019-11-04 21:51:22 -05:00
Jose Diaz-Gonzalez
dd7d1d2f8d Merge pull request #3765 from znz/fix-typo
Fix typo in desc of is_tls13_available
2019-10-31 15:20:56 -04:00
Kazuhiro NISHIYAMA
2a747138af Fix typo in desc of is_tls13_available
[ci skip]
2019-10-31 17:08:56 +09:00
dependabot-preview[bot]
935c231518 chore(deps): [security] bump express in /tests/apps/nodejs-express
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-29 16:33:58 +00:00
dependabot-preview[bot]
10385e9877 chore(deps): [security] bump express in /tests/apps/dockerfile-procfile
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-29 16:33:57 +00:00
Jose Diaz-Gonzalez
32027da467 Merge pull request #3762 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/handlebars-4.5.1
chore(deps): bump handlebars from 4.4.5 to 4.5.1 in /tests/apps/.websocket.disabled
2019-10-29 12:30:01 -04:00
dependabot-preview[bot]
3dd583213c chore(deps): bump handlebars in /tests/apps/.websocket.disabled
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.4.5 to 4.5.1.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/v4.5.1/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.4.5...v4.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-29 07:00:51 +00:00
Jose Diaz-Gonzalez
91f4de2f68 Release 0.19.6
# History

## 0.19.6

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.6/bootstrap.sh
sudo DOKKU_TAG=v0.19.6 bash bootstrap.sh
```

### Other

- #3761: @pithyless Fix type-errors in dokku-installer.py
- #3759: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 163 to 164 in /tests/apps/php
- #3758: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.21.v20190926 to 9.4.22.v20191022 in /tests/apps/java
2019-10-28 18:00:05 -04:00
Jose Diaz-Gonzalez
4b8acf5c34 Merge pull request #3761 from pithyless/patch-1
Fix type-errors in dokku-installer.py
2019-10-28 17:59:46 -04:00
Norbert Wójtowicz
53e272ab22 Fix type-errors in dokku-installer.py 2019-10-28 16:55:31 +01:00
Jose Diaz-Gonzalez
6decb6f19a Merge pull request #3759 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-164
chore(deps-dev): bump heroku/heroku-buildpack-php from 163 to 164 in /tests/apps/php
2019-10-25 11:42:20 -04:00
dependabot-preview[bot]
ce3b8c3d5c 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 163 to 164.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v163...v164)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-25 07:53:11 +00:00
Jose Diaz-Gonzalez
b86fb133b2 Merge pull request #3758 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-9.4.22.v20191022
chore(deps): bump jetty-servlet from 9.4.21.v20190926 to 9.4.22.v20191022 in /tests/apps/java
2019-10-24 18:04:13 -04:00
dependabot-preview[bot]
6d68ddfcb9 chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.21.v20190926 to 9.4.22.v20191022.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.21.v20190926...jetty-9.4.22.v20191022)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-24 07:06:15 +00:00
Jose Diaz-Gonzalez
827354d3d1 Release 0.19.5
# History

## 0.19.5

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.5/bootstrap.sh
sudo DOKKU_TAG=v0.19.5 bash bootstrap.sh
```

### Bug Fixes

- #3756: @jayjun Redirect missing key_file warning to stderr
2019-10-23 01:11:10 -04:00
Jose Diaz-Gonzalez
81ab56d7ee Merge pull request #3756 from jayjun/stderr
Redirect missing key_file warning to stderr
2019-10-22 23:12:27 -04:00
Tan Jay Jun
58a7e535dd Redirect missing key_file warning to stderr 2019-10-23 10:54:56 +08:00
Jose Diaz-Gonzalez
721b464de9 Release 0.19.4
# History

## 0.19.4

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.4/bootstrap.sh
sudo DOKKU_TAG=v0.19.4 bash bootstrap.sh
```

### Bug Fixes

- #3755: @dean1012 Warn if key_file is missing on install but do not exit
2019-10-22 22:31:16 -04:00
Jose Diaz-Gonzalez
accfc3b793 Merge pull request #3755 from dean1012/issue-3717
Warn if key_file is missing on install but do not exit
2019-10-22 22:30:23 -04:00
Jerry Smith
80b20ec4c1 Fixes for issue #3717
* Adjusts documentation
* Changes error messages when ssh key is not present
* Moves error messages to stderr
* Removes erroneous exit line
2019-10-22 20:22:03 -05:00
Jose Diaz-Gonzalez
a355b8019a Release 0.19.3
# History

## 0.19.3

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
```

### Bug Fixes

- #3753: @josegonzalez Always use python3 for the installer

### Other

- #3743: @dependabot-preview[bot] chore(deps): [security] bump express from 3.1.2 to 4.17.1 in /tests/apps/.websocket.disabled
- #3744: @dependabot-preview[bot] chore(deps): [security] bump handlebars from 1.0.12 to 4.4.5 in /tests/apps/.websocket.disabled
- #3750: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile-bad
- #3745: @dependabot-preview[bot] chore(deps): [security] bump express from 3.3.8 to 4.17.1 in /tests/apps/gitsubmodules
- #3742: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noprocfile
- #3729: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.12.0 to 1.25.1 in /tests/apps/php
- #3732: @dependabot-preview[bot] chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
- #3728: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 7.6.0.v20120127 to 9.4.21.v20190926 in /tests/apps/java
- #3730: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.15.6 to 0.16.0 in /tests/apps/python-flask
- #3737: @dependabot-preview[bot] chore(deps): bump express3-handlebars from 0.2.3 to 0.5.2 in /tests/apps/.websocket.disabled
- #3734: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 59 to 163 in /tests/apps/php
- #3735: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 2.6.4 to 2.8.51 in /tests/apps/php
- #3723: @dependabot-preview[bot] chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
- #3731: @dependabot-preview[bot] chore(deps): bump jinja2 from 2.10.1 to 2.10.3 in /tests/apps/python-flask
- #3736: @dependabot-preview[bot] chore(deps): bump socket.io from 0.9.19 to 2.3.0 in /tests/apps/.websocket.disabled
- #3726: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.23.0 to 1.24.0 in /tests/apps/gogrpc
- #3727: @dependabot-preview[bot] chore(deps): bump maven-dependency-plugin from 2.4 to 3.1.1 in /tests/apps/java
- #3733: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 2.6.4 to 2.8.50 in /tests/apps/php
- #3720: @dependabot-preview[bot] chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
- #3721: @dependabot-preview[bot] chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
- #3719: @dependabot-preview[bot] chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
2019-10-22 13:14:25 -04:00
Jose Diaz-Gonzalez
1494e07c34 Merge pull request #3753 from dokku/3740-python-3-installer
Always use python3 for the installer
2019-10-22 13:13:52 -04:00
Jose Diaz-Gonzalez
c9cf213afb fix: always use python3 for the installer
This actually breaks compatability since now we drop python2 support completely, but it's worth it to fix the weird issues with trying to support both versions.

Closes #3740
Closes #3752
Refs #3717
2019-10-22 01:49:00 -04:00
Jose Diaz-Gonzalez
291e052ece Merge pull request #3743 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/express-4.17.1
chore(deps): [security] bump express from 3.1.2 to 4.17.1 in /tests/apps/.websocket.disabled
2019-10-22 00:25:18 -04:00
dependabot-preview[bot]
72deeec81f chore(deps): [security] bump express in /tests/apps/.websocket.disabled
Bumps [express](https://github.com/expressjs/express) from 3.1.2 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/3.1.2...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 15:25:48 +00:00
Jose Diaz-Gonzalez
5e6630f042 Merge pull request #3744 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/handlebars-4.4.5
chore(deps): [security] bump handlebars from 1.0.12 to 4.4.5 in /tests/apps/.websocket.disabled
2019-10-21 11:24:32 -04:00
Jose Diaz-Gonzalez
b44aa8b8ea Merge pull request #3750 from dokku/dependabot/npm_and_yarn/tests/apps/dockerfile-procfile-bad/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile-bad
2019-10-21 11:24:05 -04:00
dependabot-preview[bot]
ad2d219691 chore(deps): [security] bump express
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 13:02:34 +00:00
Jose Diaz-Gonzalez
986400c8e2 Merge pull request #3745 from dokku/dependabot/npm_and_yarn/tests/apps/gitsubmodules/express-4.17.1
chore(deps): [security] bump express from 3.3.8 to 4.17.1 in /tests/apps/gitsubmodules
2019-10-21 09:01:08 -04:00
Salvatore Ferrucci
48ee225dbe disable interactive mode when container is detached 2019-10-21 13:48:21 +02:00
dependabot-preview[bot]
9f395318b3 chore(deps): [security] bump express in /tests/apps/gitsubmodules
Bumps [express](https://github.com/expressjs/express) from 3.3.8 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/3.3.8...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 08:31:21 +00:00
Jose Diaz-Gonzalez
3f0051a04f Merge pull request #3742 from dokku/dependabot/npm_and_yarn/tests/apps/nodejs-express-noprocfile/express-4.17.1
chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noprocfile
2019-10-21 04:29:46 -04:00
dependabot-preview[bot]
8841f91767 chore(deps): [security] bump handlebars
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 1.0.12 to 4.4.5. **This update includes a security fix.**
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/v4.4.5/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v1.0.12...v4.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 07:18:39 +00:00
dependabot-preview[bot]
afc2d13b40 chore(deps): [security] bump express
Bumps [express](https://github.com/expressjs/express) from 2.5.11 to 4.17.1. **This update includes a security fix.**
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/2.5.11...4.17.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 07:16:59 +00:00
Jose Diaz-Gonzalez
45395743fe Merge pull request #3729 from dokku/dependabot/composer/tests/apps/php/monolog/monolog-1.25.1
chore(deps): bump monolog/monolog from 1.12.0 to 1.25.1 in /tests/apps/php
2019-10-20 23:46:35 -04:00
dependabot-preview[bot]
1d1458862b chore(deps): bump monolog/monolog in /tests/apps/php
Bumps [monolog/monolog](https://github.com/Seldaek/monolog) from 1.12.0 to 1.25.1.
- [Release notes](https://github.com/Seldaek/monolog/releases)
- [Changelog](https://github.com/Seldaek/monolog/blob/1.25.1/CHANGELOG.md)
- [Commits](https://github.com/Seldaek/monolog/compare/1.12.0...1.25.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-21 02:48:02 +00:00
Jose Diaz-Gonzalez
92c81cc05d Merge pull request #3732 from dokku/dependabot/composer/tests/apps/php/silex/silex-2.2.4
chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
2019-10-20 22:46:40 -04:00
dependabot-preview[bot]
60bed60fa9 chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
Bumps [silex/silex](https://github.com/silexphp/Silex) from 1.2.3 to 2.2.4.
- [Release notes](https://github.com/silexphp/Silex/releases)
- [Changelog](https://github.com/silexphp/Silex/blob/master/doc/changelog.rst)
- [Commits](https://github.com/silexphp/Silex/compare/v1.2.3...v2.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-20 16:34:27 +00:00
Jose Diaz-Gonzalez
baec410580 Merge pull request #3728 from dokku/dependabot/maven/tests/apps/java/org.eclipse.jetty-jetty-servlet-9.4.21.v20190926
chore(deps): bump jetty-servlet from 7.6.0.v20120127 to 9.4.21.v20190926 in /tests/apps/java
2019-10-20 12:32:17 -04:00
Jose Diaz-Gonzalez
77e51a39fa Merge pull request #3730 from dokku/dependabot/pip/tests/apps/python-flask/werkzeug-0.16.0
chore(deps): bump werkzeug from 0.15.6 to 0.16.0 in /tests/apps/python-flask
2019-10-20 12:31:53 -04:00
Jose Diaz-Gonzalez
907f2d6344 Merge pull request #3737 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/express3-handlebars-0.5.2
chore(deps): bump express3-handlebars from 0.2.3 to 0.5.2 in /tests/apps/.websocket.disabled
2019-10-20 12:31:34 -04:00
Jose Diaz-Gonzalez
0a9997ee3a Merge pull request #3734 from dokku/dependabot/composer/tests/apps/php/heroku/heroku-buildpack-php-163
chore(deps-dev): bump heroku/heroku-buildpack-php from 59 to 163 in /tests/apps/php
2019-10-20 12:31:01 -04:00
dependabot-preview[bot]
ed60adfdc8 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 59 to 163.
- [Release notes](https://github.com/heroku/heroku-buildpack-php/releases)
- [Changelog](https://github.com/heroku/heroku-buildpack-php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/heroku/heroku-buildpack-php/compare/v59...v163)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-20 03:12:23 +00:00
Jose Diaz-Gonzalez
1406283b63 Merge pull request #3735 from dokku/dependabot/composer/tests/apps/php/symfony/http-kernel-2.8.51
chore(deps): [security] bump symfony/http-kernel from 2.6.4 to 2.8.51 in /tests/apps/php
2019-10-19 23:10:28 -04:00
Jose Diaz-Gonzalez
e34d8431da Merge pull request #3723 from dokku/dependabot/bundler/tests/apps/multi/sass-globbing-1.1.5
chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
2019-10-19 22:50:46 -04:00
dependabot-preview[bot]
09a5c292cd chore(deps): bump jetty-servlet in /tests/apps/java
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 7.6.0.v20120127 to 9.4.21.v20190926.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-7.6.0.v20120127...jetty-9.4.21.v20190926)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 22:10:24 +00:00
dependabot-preview[bot]
9f9ebc99ec chore(deps): bump werkzeug in /tests/apps/python-flask
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 0.15.6 to 0.16.0.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/0.15.6...0.16.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 22:09:47 +00:00
dependabot-preview[bot]
35ed98ae71 chore(deps): bump express3-handlebars in /tests/apps/.websocket.disabled
Bumps [express3-handlebars](https://github.com/ericf/express3-handlebars) from 0.2.3 to 0.5.2.
- [Release notes](https://github.com/ericf/express3-handlebars/releases)
- [Changelog](https://github.com/ericf/express-handlebars/blob/master/HISTORY.md)
- [Commits](https://github.com/ericf/express3-handlebars/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 22:09:34 +00:00
Jose Diaz-Gonzalez
8f70e25e12 Merge pull request #3731 from dokku/dependabot/pip/tests/apps/python-flask/jinja2-2.10.3
chore(deps): bump jinja2 from 2.10.1 to 2.10.3 in /tests/apps/python-flask
2019-10-19 18:08:39 -04:00
Jose Diaz-Gonzalez
605bbb165a Merge pull request #3736 from dokku/dependabot/npm_and_yarn/tests/apps/dot-websocket.disabled/socket.io-2.3.0
chore(deps): bump socket.io from 0.9.19 to 2.3.0 in /tests/apps/.websocket.disabled
2019-10-19 18:08:12 -04:00
dependabot-preview[bot]
54703c9216 chore(deps): [security] bump symfony/http-kernel in /tests/apps/php
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 2.6.4 to 2.8.51. **This update includes security fixes.**
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-kernel/compare/v2.6.4...v2.8.51)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 22:08:08 +00:00
Jose Diaz-Gonzalez
daf03a6389 Merge pull request #3726 from dokku/dependabot/go_modules/tests/apps/gogrpc/google.golang.org/grpc-1.24.0
chore(deps): bump google.golang.org/grpc from 1.23.0 to 1.24.0 in /tests/apps/gogrpc
2019-10-19 18:07:24 -04:00
dependabot-preview[bot]
e67324cac9 chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
Bumps [sass-globbing](https://github.com/chriseppstein/sass-globbing) from 1.1.1 to 1.1.5.
- [Release notes](https://github.com/chriseppstein/sass-globbing/releases)
- [Changelog](https://github.com/chriseppstein/sass-globbing/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/chriseppstein/sass-globbing/compare/1.1.1...1.1.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-19 22:07:16 +00:00
Jose Diaz-Gonzalez
8ab1abd3b4 Merge pull request #3727 from dokku/dependabot/maven/tests/apps/java/org.apache.maven.plugins-maven-dependency-plugin-3.1.1
chore(deps): bump maven-dependency-plugin from 2.4 to 3.1.1 in /tests/apps/java
2019-10-19 18:07:10 -04:00
Jose Diaz-Gonzalez
23731f6561 Merge pull request #3733 from dokku/dependabot/composer/tests/apps/php/symfony/http-foundation-2.8.50
chore(deps): [security] bump symfony/http-foundation from 2.6.4 to 2.8.50 in /tests/apps/php
2019-10-19 18:06:40 -04:00
Jose Diaz-Gonzalez
9fe3f49cb4 Merge pull request #3720 from dokku/dependabot/bundler/tests/apps/multi/compass-1.0.3
chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
2019-10-19 18:05:45 -04:00
Salvatore Ferrucci
750a31013f scheduler-docker-local: start container with --interactive (+)
attach container's STDIN if it has tty
2019-10-19 12:08:52 +02:00
Jose Diaz-Gonzalez
814385eda9 Merge pull request #3721 from dokku/dependabot/bundler/tests/apps/ruby/sinatra-1.4.8
chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
2019-10-19 02:50:29 -04:00
dependabot-preview[bot]
438261b1f9 chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
Bumps [sinatra](https://github.com/sinatra/sinatra) from 1.4.4 to 1.4.8.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v1.4.4...v1.4.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 20:27:37 +00:00
Jose Diaz-Gonzalez
2044496750 Merge pull request #3719 from dokku/dependabot/bundler/tests/apps/ruby/thin-1.7.2
chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
2019-10-18 16:26:16 -04:00
dependabot-preview[bot]
798793f7f8 chore(deps): bump socket.io in /tests/apps/.websocket.disabled
Bumps [socket.io](https://github.com/socketio/socket.io) from 0.9.19 to 2.3.0.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Commits](https://github.com/socketio/socket.io/compare/0.9.19...2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 17:07:47 +00:00
dependabot-preview[bot]
e799709391 chore(deps): [security] bump symfony/http-foundation in /tests/apps/php
Bumps [symfony/http-foundation](https://github.com/symfony/http-foundation) from 2.6.4 to 2.8.50. **This update includes security fixes.**
- [Release notes](https://github.com/symfony/http-foundation/releases)
- [Changelog](https://github.com/symfony/http-foundation/blob/master/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-foundation/compare/v2.6.4...v2.8.50)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 17:07:00 +00:00
dependabot-preview[bot]
2326195eea chore(deps): bump jinja2 in /tests/apps/python-flask
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.1 to 2.10.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.1...2.10.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 17:06:52 +00:00
dependabot-preview[bot]
40564464f9 chore(deps): bump maven-dependency-plugin in /tests/apps/java
Bumps [maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 2.4 to 3.1.1.
- [Release notes](https://github.com/apache/maven-dependency-plugin/releases)
- [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-2.4...maven-dependency-plugin-3.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 17:04:33 +00:00
dependabot-preview[bot]
54c987ea16 chore(deps): bump google.golang.org/grpc in /tests/apps/gogrpc
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.23.0...v1.24.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 17:04:32 +00:00
dependabot-preview[bot]
a513047e5a chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
Bumps [compass](https://github.com/chriseppstein/compass) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/chriseppstein/compass/releases)
- [Commits](https://github.com/chriseppstein/compass/compare/1.0.1...1.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 16:59:23 +00:00
dependabot-preview[bot]
1c17e43bb7 chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
Bumps [thin](https://github.com/macournoyer/thin) from 1.6.1 to 1.7.2.
- [Release notes](https://github.com/macournoyer/thin/releases)
- [Changelog](https://github.com/macournoyer/thin/blob/master/CHANGELOG)
- [Commits](https://github.com/macournoyer/thin/compare/v1.6.1...v1.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-18 16:59:02 +00:00
Jose Diaz-Gonzalez
431dc6c1a0 Release 0.19.2
# History

## 0.19.2

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.2/bootstrap.sh
sudo DOKKU_TAG=v0.19.2 bash bootstrap.sh
```

### Bug Fixes

- #3718: @josegonzalez Detect correct python binary to use
2019-10-18 12:30:02 -04:00
Jose Diaz-Gonzalez
8bb559c965 Merge pull request #3718 from dokku/3714-python-support
Detect correct python binary to use
2019-10-18 12:29:28 -04:00
Jose Diaz-Gonzalez
50863a9b76 fix: detect correct python binary to use
Ideally python usage goes away - the dokku-installer should become a mandatory cli command, and the plugin is rewritten in golang - but for now, we need to use the correct binary when running dokku.

Closes #3714
2019-10-17 14:24:47 -04:00
Jose Diaz-Gonzalez
a1860bae14 Release 0.19.1
# History

## 0.19.1

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.1/bootstrap.sh
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh
```

### Bug Fixes

- #3713: @josegonzalez Require nginx 1.13+ in order to enable tls1.3
2019-10-14 20:12:50 -04:00
Jose Diaz-Gonzalez
fa8267ca09 Merge pull request #3713 from dokku/3711-tls13-support
Require nginx 1.13+ in order to enable tls1.3
2019-10-14 20:11:56 -04:00
Jose Diaz-Gonzalez
9dae004651 fix: require nginx 1.13+ in order to enable tls1.3
Closes #3711
2019-10-14 11:47:43 -04:00
Jose Diaz-Gonzalez
f9e163c63a fix: correct minor issue in history.md 2019-10-14 11:40:41 -04:00
Jose Diaz-Gonzalez
e561f87b17 fix: correct tag release 2019-10-14 11:40:27 -04:00
Robin Speekenbrink
48ade9853f Added new plugin
This adds the Nginx Trust Proxy plugin

This plugin allows dokku to be run behind (multiple) proxies in and gives developers the opportunity to support reverse proxy layers
2019-10-14 17:35:32 +02:00
Jose Diaz-Gonzalez
78621481a6 Release 0.19.0
# History

## 0.19.0

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.0/bootstrap.sh
sudo DOKKU_TAG=v0.19.0 bash bootstrap.sh
```

### Bug Fixes

- #3688: @josegonzalez Correct shfmt issues
- #3684: @josegonzalez Do not push betafish releases to docker hub
- #3681: @josegonzalez Proper openresty support

### New Features

- #3687: @josegonzalez Add scheduler-post-run trigger
- #3702: @josegonzalez Cleanup build and destroy logging output
- #3693: @josegonzalez Remove ssh-keys user-auth trigger in favor of direct check in dokku binary
- #3691: @josegonzalez Silence trigger logging
- #3685: @josegonzalez Allow passing labels to one-off dokku containers
- #3680: @josegonzalez Follow updated intermediate recommendations from the Mozilla SSL Config Generator
- #3677: @josegonzalez Improve package build process
- #3679: @josegonzalez Allow keeping the git directory during builds
- #3577: @josegonzalez Use new-style docker management commands
- #3678: @josegonzalez Add container-type to run and deploy containers
- #3671: @josegonzalez Allow overriding checks doc url
- #3662: @leshik Improve nginx ciphers compatibility
- #3668: @josegonzalez Release latest docker image on release
- #3659: @fzerorubigd Add support for grpc/grpcs port forwarding

### Documentation

- #3701: @limenet Docs / Getting Started: use HTTPS instead of SSH for clone
- #3699: @robhudson Add `dokku cleanup` to help output
- #3669: @josegonzalez Fix reference to CHECKS file location

### Tests

- #3670: @josegonzalez Upgrade all python test deps

### Other

- #3690: @
2019-10-14 05:50:49 -04:00
Jose Diaz-Gonzalez
92de37b23a Merge pull request #3687 from dokku/scheduler-post-run
Add scheduler-post-run trigger
2019-10-14 05:49:36 -04:00
Jose Diaz-Gonzalez
360c587086 feat: add scheduler-post-run trigger
After a `dokku run` container is created and started, this plugin trigger will allow developers to run auxiliary commands in response to that container.
2019-10-14 04:55:07 -04:00
Jose Diaz-Gonzalez
844b86840a Merge branch 'upcoming' of github.com:dokku/dokku into upcoming 2019-10-07 18:55:29 -05:00
Jose Diaz-Gonzalez
24c47e17f8 Merge pull request #3702 from dokku/better-output
Cleanup build and destroy logging output
2019-10-03 11:57:50 -04:00
Jose Diaz-Gonzalez
8c6e4c6483 Merge pull request #3701 from limenet/patch-1
Docs / Getting Started: use HTTPS instead of SSH for clone
2019-10-02 13:05:28 -04:00
Linus Metzler
34b5234e2f Use HTTPS instead of SSH for clone
If the user has not yet added their public key to GitHub, using SSH for clone results in an error message due to permission denied.
2019-10-02 11:03:41 +02:00
Jose Diaz-Gonzalez
b05a2b6da2 Merge pull request #3699 from robhudson/add-cleanup-help
Add `dokku cleanup` to help output
2019-09-28 20:59:33 -04:00
Rob Hudson
9ed22eafea Add dokku cleanup to help output
Fixes #3698
2019-09-27 12:50:16 -07:00
Jose Diaz-Gonzalez
498bdd0491 chore: cleanup build and destroy logging output 2019-09-20 12:31:19 -04:00
Jose Diaz-Gonzalez
92ac9cc729 Merge pull request #3693 from dokku/faster-calls
Remove ssh-keys user-auth trigger in favor of direct check in dokku binary
2019-09-20 12:28:51 -04:00
Jose Diaz-Gonzalez
9c68cd53fc refactor: remove ssh-keys user-auth trigger in favor of direct check in dokku binary 2019-09-20 01:25:42 -04:00
Jose Diaz-Gonzalez
3b3fc5d5c1 Merge pull request #3690 from dokku/3689-python-3
Add support for python3
2019-09-20 00:34:57 -04:00
Jose Diaz-Gonzalez
b4e95fe0d5 feat: add support for python3
- Use jq where possible
- Drop unused function (no usage across entire codebase nor in any github repository

Closes #3689
2019-09-19 23:33:43 -04:00
Jose Diaz-Gonzalez
7bd4d32cb3 Merge pull request #3691 from dokku/silence-trigger-logging
Silence trigger logging
2019-09-17 23:50:00 -04:00
Jose Diaz-Gonzalez
903d7ce614 chore: silence trigger logging
Logging that a trigger is about to be performed is a bit... extra. If folks want to know that a trigger is running, they can check the event logs.
2019-09-17 23:47:30 -04:00
Jose Diaz-Gonzalez
12f3c12070 Merge pull request #3688 from dokku/shfmt
Correct shfmt issues
2019-09-17 04:07:59 -04:00
Jose Diaz-Gonzalez
cb281e17e6 fix: correct shfmt issues 2019-09-17 02:22:41 -04:00
Jose Diaz-Gonzalez
06b565f3e5 Merge pull request #3685 from dokku/docker-run-labels
Allow passing labels to one-off dokku containers
2019-09-17 00:27:07 -04:00
Jose Diaz-Gonzalez
798725bb54 feat: allow passing labels to one-off dokku containers
This feature is allows users to add extra label metadata to one-off containers. As this can interfere with Dokku internals if they shadow labels used by plugins, care should be taken to avoid the `com.dokku` or `org.label-schema` namespace.

Also proper name run containers so they don't get random names from docker...
2019-09-16 23:10:14 -04:00
Jose Diaz-Gonzalez
a3ef91f2ae Merge pull request #3684 from dokku/no-betafish-push
Do not push betafish releases to docker hub
2019-09-16 21:48:57 -04:00
Jose Diaz-Gonzalez
cd28fe69a5 fix: do not push betafish releases to docker hub 2019-09-16 21:48:31 -04:00
Jose Diaz-Gonzalez
f1ead08549 Merge pull request #3681 from dokku/3675-openresty-support
Proper openresty support
2019-09-16 03:55:20 -04:00
Jose Diaz-Gonzalez
6e3fddb544 feat: add proper openresty support
This change allows supporting the openresty package as installed on Ubuntu 18.04 from the official openresty package repository, while also returning general nginx support.

Closes #3675
2019-09-16 03:05:35 -04:00
Jose Diaz-Gonzalez
dd2bbc7722 fix: allow test dhparam.pem to be copied into docker image 2019-09-16 03:04:42 -04:00
Jose Diaz-Gonzalez
a9ce738f68 feat: add openresty and runit support to packaging
Our docker image uses runit instead of init/systemd, hence the added sv support on Ubuntu operating systems.
2019-09-16 03:03:20 -04:00
Jose Diaz-Gonzalez
0e219b05e9 fest: handle both openresty and nginx in docker image builds 2019-09-16 03:02:01 -04:00
Jose Diaz-Gonzalez
ea9cf024d5 feat: always upgrade packages before further installation 2019-09-16 03:01:46 -04:00
Jose Diaz-Gonzalez
0d1952592e chore: standardize arguments to apt 2019-09-16 03:01:34 -04:00
Jose Diaz-Gonzalez
43e7ee06fb feat: rework layer to slightly speed up builds 2019-09-16 03:00:34 -04:00
Jose Diaz-Gonzalez
692bfa7cde feat: speed up docker image build by copying tmp dhparam file into place 2019-09-16 03:00:11 -04:00
Jose Diaz-Gonzalez
dbcfb7ee9f Merge pull request #3680 from dokku/updated-ssl-config
Follow updated intermediate recommendations from the Mozilla SSL Config Generator
2019-09-15 23:14:05 -04:00
Jose Diaz-Gonzalez
5f80cd3c20 feat: follow updated intermediate recommendations from the Mozilla SSL Config Generator 2019-09-15 22:24:37 -04:00
Jose Diaz-Gonzalez
eecee94e70 Merge pull request #3677 from dokku/package-improvements
Improve package build process
2019-09-15 21:10:28 -04:00
Jose Diaz-Gonzalez
f55dc640ec Merge pull request #3679 from dokku/keep-git-dir
Allow keeping the git directory during builds
2019-09-15 20:29:47 -04:00
Jose Diaz-Gonzalez
a4ac67a1e0 fix: drop unused import 2019-09-15 19:43:34 -04:00
Jose Diaz-Gonzalez
14838de344 feat: allow keeping the git directory during builds
It may be desirable to keep the contents of the git directory for the build process. Certain build tools can extract extra information from the .git directory, and some workflows may require that the shipped artifact has the entire source code available locally for later usage.
2019-09-15 19:15:35 -04:00
Jose Diaz-Gonzalez
6b6b1c2aa4 fix: drop pre-delete link 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
8662f4550f fix: Should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
78dba3be3c fix: correct comments on go functions 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
76911a7dc8 fix: drop executable perm on trace/plugin.toml 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
68de421630 fix: correct lintian overrides 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
ccbe0b0877 fix: correct bash-completion comment 2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
6a7d2e5252 refactor: decrease compile time for golang plugins
This change refactors the compiled golang plugins into 3 distinct binaries:

- commands: already existing
- subcommands/subcommands: entrypoint into all subcommands
- triggers: entrypoint into all triggers

It then further symlinks triggers and subcommands to the built binaries. This results in both a much faster build process as well as smaller package size.
2019-09-15 19:15:08 -04:00
Jose Diaz-Gonzalez
f83a03a3dc Merge pull request #3577 from dokku/management-commands
Use new-style docker management commands
2019-09-15 19:14:53 -04:00
Jose Diaz-Gonzalez
44fcea0ffa refactor: use new-style docker management commands
This PR uses the new syntax for commands introduced in Docker 1.13, making it a bit easier to understand just what a particular command is trying to do.

This also pushes the long-form syntax for docker command flags, which are also easier to understand at a glance.
2019-09-15 18:55:53 -04:00
Jose Diaz-Gonzalez
c02059c965 Merge pull request #3678 from dokku/running-containers
Add container-type to run and deploy containers
2019-09-15 18:53:02 -04:00
Jose Diaz-Gonzalez
92d2895d99 feat: add container-type to run and deploy containers 2019-09-15 17:17:56 -04:00
Jose Diaz-Gonzalez
2b93c76b1d Merge pull request #3671 from dokku/doc-url-override
Allow overriding checks doc url
2019-09-11 21:02:33 -04:00
Jose Diaz-Gonzalez
8cbaf1e004 feat: allow overriding checks doc url 2019-09-09 17:47:12 -04:00
Jose Diaz-Gonzalez
b4c4d5d70f Merge pull request #3662 from leshik/improve-nginx-ciphers-compatibility
Improve nginx ciphers compatibility
2019-09-06 23:53:36 -04:00
Jose Diaz-Gonzalez
a00d9de400 Merge pull request #3670 from dokku/update-python-test-reqs
Upgrade all python test deps
2019-09-06 22:25:35 -04:00
Jose Diaz-Gonzalez
a36ebd130d fix: upgrade all python test deps 2019-09-06 21:26:32 -04:00
Jose Diaz-Gonzalez
5b1763aa4a Merge pull request #3669 from dokku/3664-checks-workdir
Fix reference to CHECKS file location
2019-09-06 21:21:57 -04:00
Jose Diaz-Gonzalez
53c8f61ffc docs: fix reference to CHECKS file location
Closes #3664
2019-09-06 21:21:25 -04:00
Jose Diaz-Gonzalez
b806154e90 Merge pull request #3668 from dokku/release-latest-image
feat: release latest docker image on release
2019-09-06 21:07:15 -04:00
Jose Diaz-Gonzalez
1be6ace7b5 feat: release latest docker image on release
Also, always build a docker image for local testing.
2019-09-06 21:06:33 -04:00
Jose Diaz-Gonzalez
9d9530b01d Merge pull request #3659 from fzerorubigd/master
nginx-vhost: add support for grpc/grpcs port forward
2019-08-27 18:30:52 -04:00
fzerorubigd
c4838b4af9 add test for grpc on a port other than 80
fix docs a bout supporting only HTTP
remove extra spaces
2019-08-24 10:58:34 +02:00
Forud
5ca3ca5189 nginx-vhosts: add a note in the proxy management docs about grpc
[ci skip]
2019-08-23 15:34:34 +02:00
Forud
3457844687 nginx-vhost: add test for grpcs 2019-08-23 14:30:36 +02:00
fzerorubigd
346e8284c8 nginx-vhost: adding some test for the grpc 2019-08-23 10:00:12 +02:00
Alexey Zagarin
180a5e79c9 Improve nginx ciphers compatibility
Closes #3661.
2019-08-23 14:00:10 +07:00
fzerorubigd
377166d822 nginx-vhost: add support for grpc/grpcs port forward 2019-08-22 21:57:21 +02:00
226 changed files with 3739 additions and 2136 deletions

View File

@@ -7,6 +7,7 @@ build
docs
tests
!build/dokku.deb
!tests/dhparam.pem
!contrib/dokku-installer.py
!contrib/dokku-update
!contrib/bash-completion

View File

@@ -10,22 +10,25 @@ ARG DOKKU_SKIP_KEY_FILE=true
ARG DOKKU_VHOST_ENABLE=false
ARG DOKKU_WEB_CONFIG=false
COPY ./build/dokku.deb /tmp/dokku.deb
RUN addgroup --gid $DOKKU_GID dokku \
&& adduser --uid $DOKKU_UID --gid $DOKKU_GID --disabled-password --gecos "" "dokku"
COPY ./tests/dhparam.pem /tmp/dhparam.pem
COPY ./build/dokku.deb /tmp/dokku.deb
RUN echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | debconf-set-selections \
&& echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | debconf-set-selections \
&& echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | debconf-set-selections \
&& echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | debconf-set-selections \
&& curl -sSL https://packagecloud.io/dokku/dokku/gpgkey | apt-key add - \
&& echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ bionic main" | tee /etc/apt/sources.list.d/dokku.list \
&& mkdir -p /etc/nginx/ \
&& cp /tmp/dhparam.pem /etc/nginx/dhparam.pem \
&& apt-get update -qq \
&& apt-get install --no-install-recommends --only-upgrade -y -qq openssl openssh-server \
&& apt --no-install-recommends -qq -y install rsync /tmp/dokku.deb \
&& apt-get purge -y -q syslog-ng-core \
&& apt-get autoremove -y -q \
&& apt-get upgrade -qq -y \
&& apt-get install --no-install-recommends --only-upgrade -qq -y openssl openssh-server \
&& apt install --no-install-recommends -qq -y rsync /tmp/dokku.deb \
&& apt-get purge -qq -y syslog-ng-core \
&& apt-get autoremove -qq -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /tmp
@@ -47,6 +50,7 @@ RUN \
&& ln -sf /mnt/dokku/var/lib/dokku/config /var/lib/dokku/config \
&& ln -sf /mnt/dokku/var/lib/dokku/data /var/lib/dokku/data \
&& mv /etc/my_init.d/00_regen_ssh_host_keys.sh /etc/my_init.d/15_regen_ssh_host_keys \
&& rm /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
&& rm -f /etc/nginx/sites-enabled/default /usr/share/nginx/html/index.html /etc/my_init.d/10_syslog-ng.init \
&& rm -f /usr/local/openresty/nginx/conf/sites-enabled/default /usr/share/openresty/html/index.html \
&& sed -i '/imklog/d' /etc/rsyslog.conf \
&& rm /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/*
&& rm -f /var/log/btmp /var/log/wtmp /var/log/*log /var/log/apt/* /var/log/dokku/* /var/log/nginx/* /var/log/openresty/*

View File

@@ -1,5 +1,240 @@
# History
## 0.19.10
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh
sudo DOKKU_TAG=v0.19.10 bash bootstrap.sh
```
### Bug Fixes
- #3784: @josegonzalez Ensure checks attempts are tracked per-check instead of globally
### New Features
- #3793: @josegonzalez Omit DWARF symbol table and debug information from go binaries
- #3792: @josegonzalez Unify property function implementations
### Documentation
- #3712: @fruitl00p Added new plugin
### Other
- #3790: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/python-flask
- #3791: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.3 to 20.0.4 in /tests/apps/multi
- #3787: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/multi
- #3788: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.2 to 20.0.3 in /tests/apps/python-flask
- #3785: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/python-flask
- #3786: @dependabot-preview[bot] chore(deps): bump gunicorn from 20.0.0 to 20.0.2 in /tests/apps/multi
- #3748: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-dokku-scale
- #3749: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noappjson
- #3747: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/config
- #3746: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile
- #3741: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express
- #3783: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.23.v20191118 to 9.4.24.v20191120 in /tests/apps/java
- #3777: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 3.4.32 to 3.4.35 in /tests/apps/php
- #3774: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/python-flask
- #3779: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.25.1 to 1.25.2 in /tests/apps/php
- #3782: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.22.v20191022 to 9.4.23.v20191118 in /tests/apps/java
## 0.19.9
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.9/bootstrap.sh
sudo DOKKU_TAG=v0.19.9 bash bootstrap.sh
```
### Bug Fixes
- #3781: @michaelshobbs Respect DOKKU_APP_USER in is_image_herokuish_based
### Other
- #3773: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.25.0 to 1.25.1 in /tests/apps/gogrpc
- #3772: @dependabot-preview[bot] chore(deps): bump gunicorn from 19.9.0 to 20.0.0 in /tests/apps/multi
- #3778: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 3.4.32 to 3.4.35 in /tests/apps/php
- #3768: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.24.0 to 1.25.0 in /tests/apps/gogrpc
## 0.19.8
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.8/bootstrap.sh
sudo DOKKU_TAG=v0.19.8 bash bootstrap.sh
```
## 0.19.7
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.7/bootstrap.sh
sudo DOKKU_TAG=v0.19.7 bash bootstrap.sh
```
### Documentation
- #3765: @znz Fix typo in desc of is_tls13_available
### Other
- #3739: @safeforge dokku run do not supports interactive mode.
- #3762: @dependabot-preview[bot] chore(deps): bump handlebars from 4.4.5 to 4.5.1 in /tests/apps/.websocket.disabled
## 0.19.6
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.6/bootstrap.sh
sudo DOKKU_TAG=v0.19.6 bash bootstrap.sh
```
### Other
- #3761: @pithyless Fix type-errors in dokku-installer.py
- #3759: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 163 to 164 in /tests/apps/php
- #3758: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 9.4.21.v20190926 to 9.4.22.v20191022 in /tests/apps/java
## 0.19.5
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.5/bootstrap.sh
sudo DOKKU_TAG=v0.19.5 bash bootstrap.sh
```
### Bug Fixes
- #3756: @jayjun Redirect missing key_file warning to stderr
## 0.19.4
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.4/bootstrap.sh
sudo DOKKU_TAG=v0.19.4 bash bootstrap.sh
```
### Bug Fixes
- #3755: @dean1012 Warn if key_file is missing on install but do not exit
## 0.19.3
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.3/bootstrap.sh
sudo DOKKU_TAG=v0.19.3 bash bootstrap.sh
```
### Bug Fixes
- #3753: @josegonzalez Always use python3 for the installer
### Other
- #3743: @dependabot-preview[bot] chore(deps): [security] bump express from 3.1.2 to 4.17.1 in /tests/apps/.websocket.disabled
- #3744: @dependabot-preview[bot] chore(deps): [security] bump handlebars from 1.0.12 to 4.4.5 in /tests/apps/.websocket.disabled
- #3750: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/dockerfile-procfile-bad
- #3745: @dependabot-preview[bot] chore(deps): [security] bump express from 3.3.8 to 4.17.1 in /tests/apps/gitsubmodules
- #3742: @dependabot-preview[bot] chore(deps): [security] bump express from 2.5.11 to 4.17.1 in /tests/apps/nodejs-express-noprocfile
- #3729: @dependabot-preview[bot] chore(deps): bump monolog/monolog from 1.12.0 to 1.25.1 in /tests/apps/php
- #3732: @dependabot-preview[bot] chore(deps): bump silex/silex from 1.2.3 to 2.2.4 in /tests/apps/php
- #3728: @dependabot-preview[bot] chore(deps): bump jetty-servlet from 7.6.0.v20120127 to 9.4.21.v20190926 in /tests/apps/java
- #3730: @dependabot-preview[bot] chore(deps): bump werkzeug from 0.15.6 to 0.16.0 in /tests/apps/python-flask
- #3737: @dependabot-preview[bot] chore(deps): bump express3-handlebars from 0.2.3 to 0.5.2 in /tests/apps/.websocket.disabled
- #3734: @dependabot-preview[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 59 to 163 in /tests/apps/php
- #3735: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-kernel from 2.6.4 to 2.8.51 in /tests/apps/php
- #3723: @dependabot-preview[bot] chore(deps): bump sass-globbing from 1.1.1 to 1.1.5 in /tests/apps/multi
- #3731: @dependabot-preview[bot] chore(deps): bump jinja2 from 2.10.1 to 2.10.3 in /tests/apps/python-flask
- #3736: @dependabot-preview[bot] chore(deps): bump socket.io from 0.9.19 to 2.3.0 in /tests/apps/.websocket.disabled
- #3726: @dependabot-preview[bot] chore(deps): bump google.golang.org/grpc from 1.23.0 to 1.24.0 in /tests/apps/gogrpc
- #3727: @dependabot-preview[bot] chore(deps): bump maven-dependency-plugin from 2.4 to 3.1.1 in /tests/apps/java
- #3733: @dependabot-preview[bot] chore(deps): [security] bump symfony/http-foundation from 2.6.4 to 2.8.50 in /tests/apps/php
- #3720: @dependabot-preview[bot] chore(deps): bump compass from 1.0.1 to 1.0.3 in /tests/apps/multi
- #3721: @dependabot-preview[bot] chore(deps): bump sinatra from 1.4.4 to 1.4.8 in /tests/apps/ruby
- #3719: @dependabot-preview[bot] chore(deps): bump thin from 1.6.1 to 1.7.2 in /tests/apps/ruby
## 0.19.2
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.2/bootstrap.sh
sudo DOKKU_TAG=v0.19.2 bash bootstrap.sh
```
### Bug Fixes
- #3718: @josegonzalez Detect correct python binary to use
## 0.19.1
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.1/bootstrap.sh
sudo DOKKU_TAG=v0.19.1 bash bootstrap.sh
```
### Bug Fixes
- #3713: @josegonzalez Require nginx 1.13+ in order to enable tls1.3
## 0.19.0
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.0/bootstrap.sh
sudo DOKKU_TAG=v0.19.0 bash bootstrap.sh
```
### Bug Fixes
- #3688: @josegonzalez Correct shfmt issues
- #3684: @josegonzalez Do not push betafish releases to docker hub
- #3681: @josegonzalez Proper openresty support
### New Features
- #3687: @josegonzalez Add scheduler-post-run trigger
- #3702: @josegonzalez Cleanup build and destroy logging output
- #3693: @josegonzalez Remove ssh-keys user-auth trigger in favor of direct check in dokku binary
- #3691: @josegonzalez Silence trigger logging
- #3685: @josegonzalez Allow passing labels to one-off dokku containers
- #3680: @josegonzalez Follow updated intermediate recommendations from the Mozilla SSL Config Generator
- #3677: @josegonzalez Improve package build process
- #3679: @josegonzalez Allow keeping the git directory during builds
- #3577: @josegonzalez Use new-style docker management commands
- #3678: @josegonzalez Add container-type to run and deploy containers
- #3671: @josegonzalez Allow overriding checks doc url
- #3662: @leshik Improve nginx ciphers compatibility
- #3668: @josegonzalez Release latest docker image on release
- #3659: @fzerorubigd Add support for grpc/grpcs port forwarding
- #3690: @josegonzalez Add support for python3
### Documentation
- #3701: @limenet Docs / Getting Started: use HTTPS instead of SSH for clone
- #3699: @robhudson Add `dokku cleanup` to help output
- #3669: @josegonzalez Fix reference to CHECKS file location
### Tests
- #3670: @josegonzalez Upgrade all python test deps
## 0.18.5
Install/update via the bootstrap script:

View File

@@ -91,13 +91,16 @@ A fresh VM running any of the following operating systems:
- CentOS 7 x64 *(experimental)*
- Arch Linux x64 *(experimental)*
An SSH keypair that can be used for application deployment. If this exists before installation, it will be automatically imported into dokku.
Otherwise, you will need to import the keypair manually after installation using `dokku ssh-keys:add`.
## Installation
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.18.5/bootstrap.sh
sudo DOKKU_TAG=v0.18.5 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh
sudo DOKKU_TAG=v0.19.10 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,41 @@
GO_ARGS ?= -a
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.12
.PHONY: build-in-docker build clean src-clean
build: $(BUILD)
build-in-docker: clean
mkdir -p /tmp/dokku-go-build-cache
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
-v /tmp/dokku-go-build-cache:/root/.cache/go-build \
-e PLUGIN_NAME=$(PLUGIN_NAME) \
-w $(GO_REPO_ROOT)/plugins/$(PLUGIN_NAME) \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
clean:
rm -rf commands subcommands triggers
find . -xtype l -delete
commands: **/**/commands.go
go build -ldflags="-s -w" $(GO_ARGS) -o commands src/commands/commands.go
subcommands:
go build -ldflags="-s -w" $(GO_ARGS) -o subcommands/subcommands src/subcommands/subcommands.go
$(MAKE) $(SUBCOMMANDS)
subcommands/%:
ln -sf subcommands $@
src-clean:
rm -rf .gitignore src vendor Makefile *.go glide.*
triggers:
go build -ldflags="-s -w" $(GO_ARGS) -o triggers src/triggers/triggers.go
$(MAKE) $(TRIGGERS)
triggers/%:
ln -sf triggers $(shell echo $@ | cut -d '/' -f2)

View File

@@ -1,4 +1,4 @@
# bash completion for dd -*- shell-script -*-
# bash completion for dokku -*- shell-script -*-
_dokku_complete_verify() {
declare desc="shows bash completion"

View File

@@ -35,7 +35,6 @@ RUN PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
IS_RELEASE=${IS_RELEASE} \
SKIP_GO_CLEAN=true \
make version copyfiles \
&& rm -rf plugins/common/*.go plugins/common/glide* plugins/common/vendor/ \
&& make deb-dokku deb-sigil \
rpm-dokku rpm-sigil

View File

@@ -42,7 +42,7 @@ def main():
download_urls['downloads/' + version['filename']] = version['download_url']
for filename, download_url in download_urls.items():
print "downloading", filename
print("downloading {0}".format(filename))
download_file(filename, download_url)
upload_file(filename)

View File

@@ -1,23 +1,44 @@
#!/usr/bin/env python2.7
#!/usr/bin/env python3
import cgi
import json
import os
import re
import SimpleHTTPServer
import SocketServer
try:
import SimpleHTTPServer
import SocketServer
except ImportError:
import http.server as SimpleHTTPServer
import socketserver as SocketServer
import subprocess
import sys
import threading
VERSION = 'v0.18.5'
VERSION = 'v0.19.10'
def bytes_to_string(b):
if type(b) == bytes:
encoding = sys.stdout.encoding
if encoding is None:
encoding = 'utf-8'
b = b.decode(encoding)
b = b.strip()
return b
def string_to_bytes(s):
if type(s) == str:
encoding = sys.stdout.encoding
if encoding is None:
encoding = 'utf-8'
s = s.encode(encoding)
return s
hostname = ''
try:
command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'"
hostname = subprocess.check_output(command, shell=True)
if ':' in hostname:
hostname = ''
hostname = bytes_to_string(subprocess.check_output(command, shell=True))
except subprocess.CalledProcessError:
pass
@@ -33,26 +54,37 @@ admin_keys = []
if os.path.isfile(key_file):
try:
command = "cat {0}".format(key_file)
admin_keys = subprocess.check_output(command, shell=True).strip().split("\n")
admin_keys = bytes_to_string(subprocess.check_output(command, shell=True)).strip().split("\n")
except subprocess.CalledProcessError:
pass
ufw_display = 'block'
try:
command = "sudo ufw status"
ufw_output = subprocess.check_output(command, shell=True).strip()
ufw_output = bytes_to_string(subprocess.check_output(command, shell=True).strip())
if "inactive" in ufw_output:
ufw_display = 'none'
except subprocess.CalledProcessError:
ufw_display = 'none'
nginx_dir = '/etc/nginx'
nginx_init = '/etc/init.d/nginx'
try:
command = "test -x /usr/bin/openresty"
subprocess.check_output(command, shell=True)
nginx_dir = '/usr/local/openresty/nginx/conf'
nginx_init = '/etc/init.d/openresty'
except subprocess.CalledProcessError:
pass
def check_boot():
if 'onboot' not in sys.argv:
return
init_dir = os.getenv('INIT_DIR', '/etc/init')
systemd_dir = os.getenv('SYSTEMD_DIR', '/etc/systemd/system')
nginx_dir = os.getenv('NGINX_DIR', '/etc/nginx/conf.d')
nginx_conf_dir = os.getenv('NGINX_CONF_DIR', '{0}/conf.d'.format(nginx_dir))
if os.path.exists(init_dir):
with open('{0}/dokku-installer.conf'.format(init_dir), 'w') as f:
@@ -69,8 +101,8 @@ def check_boot():
f.write("[Install]\n")
f.write("WantedBy=multi-user.target\n")
f.write("WantedBy=graphical.target\n")
if os.path.exists(nginx_dir):
with open('{0}/dokku-installer.conf'.format(nginx_dir), 'w') as f:
if os.path.exists(nginx_conf_dir):
with open('{0}/dokku-installer.conf'.format(nginx_conf_dir), 'w') as f:
f.write("upstream dokku-installer { server 127.0.0.1:2000; }\n")
f.write("server {\n")
f.write(" listen 80;\n")
@@ -79,11 +111,18 @@ def check_boot():
f.write(" }\n")
f.write("}\n")
subprocess.call('rm -f /etc/nginx/sites-enabled/*', shell=True)
subprocess.call('rm -f {0}/sites-enabled/*'.format(nginx_dir), shell=True)
sys.exit(0)
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def write_content(self, content):
try:
self.wfile.write(content)
except TypeError:
self.wfile.write(string_to_bytes(content))
def do_GET(self):
content = PAGE.replace('{VERSION}', VERSION)
content = content.replace('{UFW_DISPLAY}', ufw_display)
@@ -92,7 +131,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
content = content.replace('{ADMIN_KEYS}', "\n".join(admin_keys))
self.send_response(200)
self.end_headers()
self.wfile.write(content)
self.write_content(content)
def do_POST(self):
if self.path not in ['/setup', '/setup/']:
@@ -133,7 +172,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
user = user + str(index)
command = ['sshcommand', 'acl-add', 'dokku', user]
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
proc.stdin.write(key)
try:
proc.stdin.write(key)
except TypeError:
proc.stdin.write(string_to_bytes(key))
proc.stdin.close()
proc.wait()
@@ -146,9 +188,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
if 'selfdestruct' in sys.argv:
DeleteInstallerThread()
content = json.dumps({'status': 'ok'})
self.send_response(200)
self.end_headers()
self.wfile.write(json.dumps({'status': 'ok'}))
self.write_content(content)
def web_admin_user_exists(self):
return self.user_exists('web-admin(\d+)')
@@ -163,11 +207,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
max_num = 0
exists = False
for line in proc.stdout:
m = pattern.search(line)
m = pattern.search(bytes_to_string(line))
if m:
# User of the form `user` or `user#` exists
exists = True
max_num = max(max_num, m.group(1))
max_num = max(max_num, int(m.group(1)))
if exists:
return max_num
else:
@@ -203,7 +247,7 @@ class DeleteInstallerThread(object):
thread.start()
def run(self):
command = "rm /etc/nginx/conf.d/dokku-installer.conf && /etc/init.d/nginx stop && /etc/init.d/nginx start"
command = "rm {0}/conf.d/dokku-installer.conf && {1} stop && {1} start".format(nginx_dir, nginx_init)
try:
subprocess.call(command, shell=True)
except:
@@ -221,7 +265,7 @@ def main():
port = int(os.getenv('PORT', 2000))
httpd = SocketServer.TCPServer(("", port), GetHandler)
print "Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port)
print("Listening on 0.0.0.0:{0}, CTRL+C to stop".format(port))
httpd.serve_forever()

View File

@@ -323,7 +323,6 @@ fn-build-docker-image() {
declare desc="Builds the dokku docker image and tags it with the given version"
declare VERSION="$1"
docker build -t "dokku/dokku:$VERSION" .
docker push "dokku/dokku:$VERSION"
}
main() {
@@ -365,10 +364,18 @@ main() {
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error extracting rpm package"
cp -f "build/dokku_${NEXT_VERSION}_amd64.deb" build/dokku.deb
if [[ "$RELEASE" != "build" ]]; then
if [[ "$RELEASE" == "build" ]]; then
fn-build-docker-image "latest" || log-fail "Error building docker image"
else
fn-publish-package "$IS_RELEASE" "deb" "build/dokku_${NEXT_VERSION}_amd64.deb" || log-fail "Error publishing deb package"
fn-publish-package "$IS_RELEASE" "rpm" "build/dokku-${NEXT_VERSION}-1.x86_64.rpm" || log-fail "Error publishing rpm package"
fn-build-docker-image "$NEXT_VERSION" || log-fail "Error building docker image"
if [[ "$IS_RELEASE" == "true" ]]; then
docker tag "dokku/dokku:$NEXT_VERSION" "dokku/dokku:latest"
docker push "dokku/dokku:$NEXT_VERSION"
docker push "dokku/dokku:latest"
fi
fn-repo-push-tags "$IS_RELEASE"
fi

6
debian/control vendored
View File

@@ -1,11 +1,11 @@
Package: dokku
Version: 0.18.5
Version: 0.19.10
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog, dos2unix
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.13.0) | docker-engine (>= 1.13.0) | docker-io (>= 1.13.0) | docker.io (>= 1.13.0) | docker-ce (>= 1.13.0) | docker-ee (>= 1.13.0), net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog, dos2unix, jq
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python3, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
Dokku is an extensible, open source Platform as a Service

View File

@@ -1,5 +1,5 @@
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
dokku: maintainer-script-calls-systemctl postinst:87
dokku: command-with-path-in-maintainer-script postinst:22 /usr/bin/sshcommand
dokku: maintainer-script-calls-systemctl postinst:98
dokku: changelog-file-missing-in-native-package
dokku: statically-linked-binary
dokku: unstripped-binary-or-object
@@ -10,3 +10,6 @@ dokku: hardening-no-relro
# Built golang binaries link to libc
dokku: missing-dependency-on-libc
# Temporary python dependency until #2247 is resolved
dokku: python-script-but-no-python-dep usr/share/dokku/contrib/dokku-installer.py

11
debian/postinst vendored
View File

@@ -89,7 +89,16 @@ setup-sshcommand() {
}
setup-dokku-installer() {
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
NGINX_ROOT="/etc/nginx"
[[ -x /usr/bin/openresty ]] && NGINX_ROOT="/usr/local/openresty/nginx/conf"
if command -v "python3" &>/dev/null; then
sed -i '1 s/^.*$/#!\/usr\/bin\/env python3/' /usr/share/dokku/contrib/dokku-installer.py
elif command -v "python2.7" &>/dev/null; then
sed -i '1 s/^.*$/#!\/usr\/bin\/env python2.7/' /usr/share/dokku/contrib/dokku-installer.py
fi
if [[ -f "$NGINX_ROOT/conf.d/dokku-installer.conf" ]]; then
echo "Setting up dokku-installer"
/usr/share/dokku/contrib/dokku-installer.py onboot

2
debian/postrm vendored
View File

@@ -28,6 +28,8 @@ main() {
fi
if [[ "$1" == "purge" ]]; then
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku.conf
rm -f /usr/local/openresty/nginx/conf/conf.d/dokku-installer.conf
rm -f /etc/nginx/conf.d/dokku.conf
rm -f /etc/nginx/conf.d/dokku-installer.conf
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls

79
debian/preinst vendored
View File

@@ -7,51 +7,62 @@ if [[ -e /usr/share/debconf/confmodule ]]; then
. /usr/share/debconf/confmodule
fi
setup_dokku_installer() {
NGINX_BASE_PATH="$1"
NGINX_INIT_NAME="$2"
NGINX_CONF="${NGINX_BASE_PATH}/conf.d/dokku-installer.conf"
rm -f $NGINX_CONF
touch $NGINX_CONF
{
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
echo 'server {'
echo ' listen 80;'
echo ' location / {'
echo ' proxy_pass http://dokku-installer;'
echo ' }'
echo '}'
} >>$NGINX_CONF
rm -f $NGINX_BASE_PATH/sites-enabled/*
DOKKU_DISTRO="$(
. /etc/os-release >/dev/null 2>&1 || true
echo "$ID"
)"
case "$DOKKU_DISTRO" in
debian)
/usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" reload || /usr/sbin/invoke-rc.d "$NGINX_INIT_NAME" start
;;
ubuntu)
if [[ -x /usr/bin/sv ]]; then
/usr/bin/sv reload "$NGINX_INIT_NAME" || /usr/bin/sv start "$NGINX_INIT_NAME"
else
"/etc/init.d/$NGINX_INIT_NAME" reload || "/etc/init.d/$NGINX_INIT_NAME" start
fi
;;
esac
}
case "$1" in
install)
db_get "dokku/web_config"
if [ "$RET" = "true" ]; then
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
rm -f $NGINX_CONF
touch $NGINX_CONF
{
echo 'upstream dokku-installer { server 127.0.0.1:2000; }'
echo 'server {'
echo ' listen 80;'
echo ' location / {'
echo ' proxy_pass http://dokku-installer;'
echo ' }'
echo '}'
} >>$NGINX_CONF
rm -f /etc/nginx/sites-enabled/*
DOKKU_DISTRO="$(
. /etc/os-release >/dev/null 2>&1 || true
echo "$ID"
)"
case "$DOKKU_DISTRO" in
debian)
NGINX_INIT="/usr/sbin/invoke-rc.d"
"$NGINX_INIT" nginx reload || "$NGINX_INIT" nginx start
;;
ubuntu)
NGINX_INIT="/etc/init.d/nginx"
"$NGINX_INIT" reload || "$NGINX_INIT" start
;;
esac
exit 0
if [[ -x /usr/bin/openresty ]]; then
setup_dokku_installer "/usr/local/openresty/nginx/conf" "openresty"
else
setup_dokku_installer "/etc/nginx" "nginx"
fi
fi
db_get "dokku/skip_key_file"
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
db_get "dokku/key_file"
if [ ! -f "$RET" ]; then
echo "Error: keyfile '$RET' not found."
echo " you can enter a new keyfile path when you restart the installation."
echo "Error: keyfile '$RET' not found." >&2
echo " To deploy, you will need to generate a keypair and add with 'dokku ssh-keys:add'." >&2
db_reset "dokku/key_file"
exit 1
fi
fi
;;

View File

@@ -13,6 +13,8 @@ log-fail() {
}
main() {
local NGINX_ROOT
if [[ ! -d /mnt/dokku ]]; then
log-info "Creating missing /mnt/dokku"
mkdir -p /mnt/dokku
@@ -49,14 +51,23 @@ main() {
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
fi
if [[ ! -f /mnt/dokku/etc/nginx/dhparam.pem ]]; then
mkdir -p /mnt/dokku/etc/nginx
openssl dhparam -out /mnt/dokku/etc/nginx/dhparam.pem 2048
NGINX_ROOT="/etc/nginx"
if [[ -x /usr/bin/openresty ]]; then
NGINX_ROOT="/usr/local/openresty/nginx/conf"
rm -rf /etc/runit/runsvdir/default/nginx
else
rm -rf /etc/runit/runsvdir/default/openresty
fi
cp -f /mnt/dokku/etc/nginx/dhparam.pem /etc/nginx/dhparam.pem
chown root:root /etc/nginx/dhparam.pem
chown root:root /etc/nginx/conf.d
if [[ ! -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" ]]; then
mkdir -p "/mnt/dokku${NGINX_ROOT}"
openssl dhparam -out "/mnt/dokku${NGINX_ROOT}/dhparam.pem" 2048
fi
mkdir -p "${NGINX_ROOT}/conf.d"
cp -f "/mnt/dokku${NGINX_ROOT}/dhparam.pem" "${NGINX_ROOT}/dhparam.pem"
chown root:root "${NGINX_ROOT}/dhparam.pem"
chown root:root "${NGINX_ROOT}/conf.d"
}
main "$@"

View File

@@ -0,0 +1,7 @@
#!/bin/bash
exec >>/var/log/services/openresty
exec 2>&1
echo "Running openresty"
exec /usr/bin/openresty -c /usr/local/openresty/nginx/conf/nginx.conf -g "daemon off;"

View File

@@ -0,0 +1,30 @@
user www-data;
worker_processes auto;
pid /run/openresty.pid;
include /usr/local/openresty/nginx/conf/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /usr/local/openresty/nginx/conf/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
access_log /var/log/openresty/access.log;
error_log /var/log/openresty/error.log;
gzip on;
include /usr/local/openresty/nginx/conf/conf.d/*.conf;
include /usr/local/openresty/nginx/conf/sites-enabled/*;
}

View File

@@ -32,35 +32,35 @@ dokku plugin:list
```
plugn: dev
00_dokku-standard 0.18.5 enabled dokku core standard plugin
20_events 0.18.5 enabled dokku core events logging plugin
app-json 0.18.5 enabled dokku core app-json plugin
apps 0.18.5 enabled dokku core apps plugin
build-env 0.18.5 enabled dokku core build-env plugin
buildpacks 0.18.5 enabled dokku core buildpacks plugin
certs 0.18.5 enabled dokku core certificate management plugin
checks 0.18.5 enabled dokku core checks plugin
common 0.18.5 enabled dokku core common plugin
config 0.18.5 enabled dokku core config plugin
docker-options 0.18.5 enabled dokku core docker-options plugin
domains 0.18.5 enabled dokku core domains plugin
enter 0.18.5 enabled dokku core enter plugin
git 0.18.5 enabled dokku core git plugin
logs 0.18.5 enabled dokku core logs plugin
network 0.18.5 enabled dokku core network plugin
nginx-vhosts 0.18.5 enabled dokku core nginx-vhosts plugin
plugin 0.18.5 enabled dokku core plugin plugin
proxy 0.18.5 enabled dokku core proxy plugin
ps 0.18.5 enabled dokku core ps plugin
repo 0.18.5 enabled dokku core repo plugin
resource 0.18.5 enabled dokku core resource plugin
scheduler-docker-local 0.18.5 enabled dokku core scheduler-docker-local plugin
shell 0.18.5 enabled dokku core shell plugin
ssh-keys 0.18.5 enabled dokku core ssh-keys plugin
storage 0.18.5 enabled dokku core storage plugin
tags 0.18.5 enabled dokku core tags plugin
tar 0.18.5 enabled dokku core tar plugin
trace 0.18.5 enabled dokku core trace plugin
00_dokku-standard 0.19.10 enabled dokku core standard plugin
20_events 0.19.10 enabled dokku core events logging plugin
app-json 0.19.10 enabled dokku core app-json plugin
apps 0.19.10 enabled dokku core apps plugin
build-env 0.19.10 enabled dokku core build-env plugin
buildpacks 0.19.10 enabled dokku core buildpacks plugin
certs 0.19.10 enabled dokku core certificate management plugin
checks 0.19.10 enabled dokku core checks plugin
common 0.19.10 enabled dokku core common plugin
config 0.19.10 enabled dokku core config plugin
docker-options 0.19.10 enabled dokku core docker-options plugin
domains 0.19.10 enabled dokku core domains plugin
enter 0.19.10 enabled dokku core enter plugin
git 0.19.10 enabled dokku core git plugin
logs 0.19.10 enabled dokku core logs plugin
network 0.19.10 enabled dokku core network plugin
nginx-vhosts 0.19.10 enabled dokku core nginx-vhosts plugin
plugin 0.19.10 enabled dokku core plugin plugin
proxy 0.19.10 enabled dokku core proxy plugin
ps 0.19.10 enabled dokku core ps plugin
repo 0.19.10 enabled dokku core repo plugin
resource 0.19.10 enabled dokku core resource plugin
scheduler-docker-local 0.19.10 enabled dokku core scheduler-docker-local plugin
shell 0.19.10 enabled dokku core shell plugin
ssh-keys 0.19.10 enabled dokku core ssh-keys plugin
storage 0.19.10 enabled dokku core storage plugin
tags 0.19.10 enabled dokku core tags plugin
tar 0.19.10 enabled dokku core tar plugin
trace 0.19.10 enabled dokku core trace 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.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.5\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.5\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.5\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.5\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.18.5\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.19.10\/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.18.5/docs/assets/dokku.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/gplaypattern.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}

View File

@@ -15,6 +15,7 @@
"0.15.5",
"0.16.4",
"0.17.9",
"0.18.5"
"0.18.5",
"0.19.10"
]
}

View File

@@ -242,6 +242,7 @@ The following plugins are available and provided by Dokku maintainers. Where not
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | 0.4.0+ |
| [Dokku Wordpress](https://github.com/dokku-community/dokku-wordpress) | [dokku-community][] | 0.4.0+ |
| [Access](https://github.com/mainto/dokku-access) | [mainto](https://github.com/mainto) | 0.4.0+ |
| [Dokku Nginx Trust Proxy](https://github.com/kingsquare/dokku-nginx-vhost-trustproxy) | [kingsquare](https://github.com/kingsquare) | 0.4.0+ |
### Deprecated Plugins

View File

@@ -90,6 +90,7 @@ The following list config variables have special meaning and can be set in a var
| `DOKKU_EVENTS_LOGFILE` | `$DOKKU_LOGS_DIR/events.log` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Where the events log file is written to. |
| `DOKKU_APP_NAME` | none | `--app APP` flag | Name of application to work on. Respected by core plugins. |
| `DOKKU_APPS_FORCE_DELETE` | none | `--force` flag | Whether to force delete an application. Also used by other plugins for destructive actions. |
| `DOKKU_CHECKS_URL` | `http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |

View File

@@ -9,7 +9,7 @@ Once you have configured Dokku with at least one user, you can deploy applicatio
```shell
# from your local machine
# SSH access to github must be enabled on this host
git clone git@github.com:heroku/ruby-getting-started.git
git clone https://github.com/heroku/ruby-getting-started
```
### Create the app

View File

@@ -76,3 +76,28 @@ This behavior can be disabled entirely on a per-app basis by setting the `rev-en
# override for a specific app
dokku git:set node-js-app rev-env-var ""
```
### Keeping the `.git` directory
By default, Dokku will remove the contents of the `.git` before triggering a build for a given app. This is generally a safe default as shipping the entire source code history of your app in the deployed image artifact is unnecessary as it increases bloat and potentially can leak information if there are any security issues with your app code.
To enable the `.git` directory, run the `git:set` command as follows:
```shell
# on the Dokku host
# keep the .git directory during builds
dokku git:set node-js-app keep-git-dir true
```
The default behavior is to delete this directory and it's contents. To revert to the default behavior, the `keep-git-dir` value can be set to either an empty string or `false`.
```shell
# on the Dokku host
# delete the .git directory during builds (default)
dokku git:set node-js-app keep-git-dir false
# delete the .git directory during builds (default)
dokku git:set node-js-app keep-git-dir ""
```

View File

@@ -92,7 +92,6 @@ dokku tags:deploy node-js-app v1
-----> Running post-deploy
-----> Configuring node-js-app.dokku.me...
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
-----> Shutting down old containers in 60 seconds
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137

View File

@@ -46,6 +46,12 @@ dokku --rm-container run node-js-app ls -lah
dokku --rm run node-js-app ls -lah
```
Containers may have specific labels attached. In order to avoid issues with dokku internals, do not use any labels beginning with either `com.dokku` or `org.label-schema`.
```shell
dokku --label=com.example.test-label=value run node-js-app ls -lah
```
Finally, you may wish to run a container in "detached" mode via the `--detach` Dokku flag. Running a process in detached mode will immediately return a `CONTAINER_ID`. It is up to the user to then further manage this container in whatever manner they see fit, as Dokku will *not* automatically terminate the container.
```shell

View File

@@ -123,7 +123,7 @@ To specify checks, add a `CHECKS` file to the root of your project directory. Th
- comments (lines starting with #)
- empty lines
> For Dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
> For Dockerfile and Docker Image based deploys, the file *must* be in the `WORKDIR` directory of the built image. `/app` is used by default as the root container directory for buildpack-based deploys.
### Check instructions
@@ -327,7 +327,6 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
-----> Running post-deploy
-----> Configuring myapp.dokku.me...
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
-----> Shutting down old container in 60 seconds
=====> Application deployed:

View File

@@ -159,7 +159,7 @@ Certain systems may require a wrapper function around the `docker` binary for pr
```shell
# good
"$DOCKER_BIN" run -d $IMAGE /bin/bash -e -c "$COMMAND"
"$DOCKER_BIN" container run -d $IMAGE /bin/bash -e -c "$COMMAND"
# bad
docker run -d $IMAGE /bin/bash -e -c "$COMMAND"
@@ -175,16 +175,16 @@ Note that where possible, a label `com.dokku.app-name=$APP` - where `$APP` is th
```shell
# `docker build` example
"$DOCKER_BIN" build "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_BUILD_ARGS ...
"$DOCKER_BIN" image build "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_BUILD_ARGS ...
# `docker commit` example
# Note that the arguments must be set as a local array
# as arrays cannot be exported in shell
local DOKKU_COMMIT_ARGS=("--change" "LABEL org.label-schema.schema-version=1.0" "--change" "LABEL org.label-schema.vendor=dokku" "--change" "LABEL $DOKKU_CONTAINER_LABEL=")
"$DOCKER_BIN" commit --change "LABEL com.dokku.app-name=$APP" "${DOKKU_COMMIT_ARGS[@]}" ...
"$DOCKER_BIN" container commit --change "LABEL com.dokku.app-name=$APP" "${DOKKU_COMMIT_ARGS[@]}" ...
# `docker run` example
"$DOCKER_BIN" run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
"$DOCKER_BIN" container run "--label=com.dokku.app-name=${APP}" $DOKKU_GLOBAL_RUN_ARGS ...
```
## Copy files from the built image using `copy_from_image`

View File

@@ -143,7 +143,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
APP="$1"; CONTAINERID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
APP="$1"; CONTAINER_ID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
eval "$(config_export app $APP)"
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
@@ -1512,6 +1512,25 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3";
# TODO
```
### `scheduler-post-run`
> Warning: The scheduler plugin trigger apis are under development and may change
> between minor releases until the 1.0 release.
- Description: Allows you to run scheduler commands after a `dokku run` invocation is called
- Invoked by: `dokku run`
- Arguments: `$DOKKU_SCHEDULER $APP $CONTAINER_ID`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
DOKKU_SCHEDULER="$1"; APP="$2"; CONTAINER_ID="$3";
# TODO
```
### `scheduler-retire`
> Warning: The scheduler plugin trigger apis are under development and may change

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.18.5-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.19.10-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

@@ -3,7 +3,7 @@
Pull the dokku/dokku image:
```shell
docker pull dokku/dokku:0.18.5
docker pull dokku/dokku:0.19.10
```
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.18.5
dokku/dokku:0.19.10
```
Dokku is run with the following options:

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.18.5/bootstrap.sh;
sudo DOKKU_TAG=v0.18.5 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh;
sudo DOKKU_TAG=v0.19.10 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.18.5/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.19.10/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.18.5 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.19.10 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

@@ -65,7 +65,6 @@ dokku proxy:ports-add node-js-app http:8080:5000
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
-----> Configuring node-js-app.dokku.me...(using built-in template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
```
@@ -100,7 +99,6 @@ dokku proxy:ports-set node-js-app http:8080:5000
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
-----> Configuring node-js-app.dokku.me...(using built-in template)
-----> Creating http nginx.conf
-----> Running nginx-pre-reload
Reloading nginx
```
@@ -126,7 +124,7 @@ For buildpack deployments, your application *must* respect the `PORT` environmen
> Changed as of 0.5.0
Dokku's default proxy implementation - nginx - only supports HTTP request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
Dokku's default proxy implementation - nginx - supports HTTP and GRPC request proxying. At this time, we do not support proxying plain TCP or UDP ports. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/docs/advanced-usage/proxy-management.md).
#### Applications using EXPOSE

View File

@@ -69,7 +69,8 @@ The proxy port scheme is as follows:
- `SCHEME:HOST_PORT:CONTAINER_PORT`
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports both the `http` and `https` schemes.
The scheme metadata can be used by proxy implementations in order to properly handle proxying of requests. For example, the built-in `nginx-vhosts` proxy implementation supports the `http`, `https`, `grpc` and `grpcs` schemes.
For the `grpc` and `grpcs` see [nginx blog post on grpc](https://www.nginx.com/blog/nginx-1-13-10-grpc/).
Developers of proxy implementations are encouraged to use whatever schemes make the most sense, and ignore configurations which they do not support. For instance, a `udp` proxy implementation can safely ignore `http` and `https` port mappings.

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.18.5/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.18.5/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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.18.5/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.19.10/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>

4
dokku
View File

@@ -87,13 +87,13 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
fi
! has_tty && DOKKU_QUIET_OUTPUT=1
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:add" ]]; then
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ $1 != "ssh-keys:add" ]] && [[ $1 != "ssh-keys:remove" ]]; then
export SSH_USER=$(id -un)
sudo -u dokku -E -H "$0" "$@"
exit $?
fi
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]]; then
if [[ $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $1 == "ssh-keys:add" ]] || [[ $1 == "ssh-keys:remove" ]]; then
if [[ $(id -un) != "root" ]]; then
dokku_log_fail "This command must be run as root"
else

View File

@@ -1,14 +1,15 @@
#!/usr/bin/env bash
[[ " help help:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
[[ " help help:help cleanup:help run:help trace:help url:help urls:help version:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | run:help | trace:help | url:help | urls:help | version:help)
help | cleanup:help | run:help | trace:help | url:help | urls:help | version:help)
[[ $(echo "$1" | sed '/.*:help/!d') ]] && help_topic="${1%\:help}"
help_content_func() {
declare desc="return standard plugin help content"
cat <<help_content
cleanup [<app>], Cleans up exited/dead Docker containers and removes dangling images
run [--env KEY=VALUE] <app> <cmd>, Run a command in a new container using the current application image
url <app>, Show the first URL for an application (compatibility)
urls <app>, Show all URLs for an application

View File

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

View File

@@ -14,10 +14,10 @@ dokku_report_cmd() {
dokku_log_info1 "docker version: "
"$DOCKER_BIN" version | sed "s/^/ /"
dokku_log_info1 "docker daemon info: "
"$DOCKER_BIN" -D info | sed "s/^/ /"
"$DOCKER_BIN" -D system info | sed "s/^/ /"
dokku_log_info1 "sigil version: $(sigil -v)"
dokku_log_info1 "herokuish version: "
"$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
"$DOCKER_BIN" container run $DOKKU_GLOBAL_RUN_ARGS --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
dokku_log_info1 "dokku version: $(dokku version)"
dokku_log_info1 "dokku plugins: "
dokku plugin:list | sed "s/^/ /"

View File

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

View File

@@ -17,7 +17,7 @@ get_phase_script() {
return 0
fi
get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" <"$APP_JSON_FILE"
get_json_value ".scripts.dokku.${PHASE_SCRIPT_KEY}" <"$APP_JSON_FILE"
}
get_release_cmd() {
@@ -86,7 +86,7 @@ execute_script() {
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<<"$DOCKER_ARGS")
local IMAGE_SOURCE_TYPE="dockerfile"
is_image_herokuish_based "$IMAGE" && IMAGE_SOURCE_TYPE="herokuish"
is_image_herokuish_based "$IMAGE" "$APP" && IMAGE_SOURCE_TYPE="herokuish"
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-deploy "$APP" "$IMAGE_TAG" "$IMAGE_SOURCE_TYPE")
# eval args as array to respect escapes
@@ -98,8 +98,8 @@ execute_script() {
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
id=$("$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
if test "$("$DOCKER_BIN" wait "$id")" -ne 0; then
id=$("$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --env DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
if test "$("$DOCKER_BIN" container wait "$id")" -ne 0; then
dokku_container_log_verbose_quiet "$id"
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
fi
@@ -109,7 +109,7 @@ execute_script() {
return
fi
if ! is_image_herokuish_based "$IMAGE"; then
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
local DOKKU_DOCKERFILE_ENTRYPOINT=$(config_get "$APP" DOKKU_DOCKERFILE_ENTRYPOINT)
local DOKKU_DOCKERFILE_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_CMD)
[[ -z "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && DOKKU_DOCKERFILE_ENTRYPOINT="$(get_entrypoint_from_image "$IMAGE")"
@@ -121,5 +121,5 @@ execute_script() {
local DOCKER_COMMIT_ARGS="$DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG $DOCKER_COMMIT_CMD_CHANGE_ARG"
fi
eval "$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "${DOCKER_COMMIT_ARGS[@]}" "$id" "$IMAGE" >/dev/null
eval "$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "${DOCKER_COMMIT_ARGS[@]}" "$id" "$IMAGE" >/dev/null
}

View File

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

View File

@@ -34,7 +34,7 @@ apps_destroy() {
fi
fi
echo "Destroying $APP (including all add-ons)"
dokku_log_info1 "Destroying $APP (including all add-ons)"
plugn trigger pre-delete "$APP" "$IMAGE_TAG"
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")

View File

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

View File

@@ -16,7 +16,7 @@ app_post_delete() {
fi
# shellcheck disable=SC2046
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
"$DOCKER_BIN" image rm $("$DOCKER_BIN" image list --quiet "$IMAGE_REPO" | xargs) &>/dev/null || true
}
app_post_delete "$@"

View File

@@ -46,7 +46,7 @@ apps_clone_cmd() {
plugn trigger post-app-clone-setup "$OLD_APP" "$NEW_APP"
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
"$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$NEW_CACHE_DIR"

View File

@@ -18,7 +18,7 @@ apps_rename_cmd() {
local DOCKER_RUN_LABEL_ARGS="--label=com.dokku.app-name=$OLD_APP"
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" >/dev/null 2>&1; then
"$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
"$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS --rm --volume "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$OLD_CACHE_DIR"
apps_create "$NEW_APP"

View File

@@ -37,7 +37,7 @@ trigger-builder-build-builder-dockerfile() {
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
"$DOCKER_BIN" build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
"$DOCKER_BIN" image build "${DOCKER_BUILD_LABEL_ARGS[@]}" $DOKKU_GLOBAL_BUILD_ARGS "${ARG_ARRAY[@]}" "${DOKKU_DOCKER_BUILD_OPTS[@]}" -t $IMAGE .
plugn trigger post-build-dockerfile "$APP"
}

View File

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

View File

@@ -28,13 +28,13 @@ trigger-builder-build-builder-herokuish() {
NEW_DOKKU_IMAGE=$(plugn trigger builder-dokku-image "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR" "$DOKKU_IMAGE")
[[ -n "$NEW_DOKKU_IMAGE" ]] && DOKKU_IMAGE="$NEW_DOKKU_IMAGE"
CID=$(tar -c . | "$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$(tar -c . | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure extracting app code"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
[[ -d $DOKKU_APP_CACHE_DIR ]] || mkdir -p "$DOKKU_APP_CACHE_DIR"
plugn trigger pre-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
@@ -45,14 +45,14 @@ trigger-builder-build-builder-herokuish() {
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
# shellcheck disable=SC2086
CID=$("$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
"$DOCKER_BIN" attach "$CID"
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$("$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
"$DOCKER_BIN" container attach "$CID"
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure during app build"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
plugn trigger post-build-buildpack "$APP" "$SOURCECODE_WORK_DIR"
}

View File

@@ -19,22 +19,22 @@ trigger-builder-release-builder-herokuish() {
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
if [[ -n $(config_export global) ]]; then
CID=$(config_export global | "$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$(config_export global | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure injecting global environment variables"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
fi
if [[ -n $(config_export app "$APP") ]]; then
CID=$(config_export app "$APP" | "$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$(config_export app "$APP" | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure injecting app environment variables"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
fi
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
}

View File

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

View File

@@ -22,22 +22,22 @@ trigger-pre-build-buildpack-builder-herokuish() {
dokku_log_info1 "Adding BUILD_ENV to build environment..."
# create build env files for use in buildpacks like this:
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
CID=$(config_bundle --merged "$APP" | "$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$(config_bundle --merged "$APP" | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure injecting BUILD_ENV into build environment"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
# create build env for 'old style' buildpacks and dokku plugins
CID=$(config_export app "$APP" --format envfile --merged | "$DOCKER_BIN" run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
if test "$("$DOCKER_BIN" wait "$CID")" -ne 0; then
CID=$(config_export app "$APP" --format envfile --merged | "$DOCKER_BIN" container run "${DOCKER_RUN_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
if test "$("$DOCKER_BIN" container wait "$CID")" -ne 0; then
dokku_log_warn "Failure injecting old-style BUILD_ENV"
return 1
fi
"$DOCKER_BIN" commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
"$DOCKER_BIN" container commit "${DOCKER_COMMIT_LABEL_ARGS[@]}" "$CID" "$IMAGE" >/dev/null
}
trigger-pre-build-buildpack-builder-herokuish "$@"

View File

@@ -1,6 +1,7 @@
/commands
/subcommands/*
/triggers/*
/triggers
/install
/post-delete
/post-extract

View File

@@ -1,37 +1,6 @@
include ../../common.mk
GO_ARGS ?= -a
SUBCOMMANDS = subcommands/add subcommands/clear subcommands/list subcommands/remove subcommands/report subcommands/set
TRIGGERS = triggers/install triggers/post-delete triggers/post-extract triggers/report
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
-w $(GO_REPO_ROOT)/plugins/buildpacks \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
BUILD = commands subcommands triggers
PLUGIN_NAME = buildpacks
build: commands subcommands triggers
$(MAKE) triggers-copy
commands: **/**/commands.go
go build $(GO_ARGS) -o commands src/commands/commands.go
subcommands: $(SUBCOMMANDS)
subcommands/%: src/subcommands/*/%.go
go build $(GO_ARGS) -o $@ $<
clean:
rm -rf commands subcommands triggers install post-delete post-extract report
src-clean:
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
triggers: $(TRIGGERS)
triggers/%: src/triggers/*/%.go
go build $(GO_ARGS) -o $@ $<
triggers-copy:
cp triggers/* .
include ../../common.mk

View File

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

View File

@@ -1,19 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
func main() {
args := flag.NewFlagSet("buildpacks:add", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err := buildpacks.CommandAdd(args.Args(), *index)
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -1,18 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
func main() {
args := flag.NewFlagSet("buildpacks:clear", flag.ExitOnError)
args.Parse(os.Args[2:])
err := buildpacks.CommandClear(args.Args())
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -1,14 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/buildpacks"
)
func main() {
args := flag.NewFlagSet("buildpacks:list", flag.ExitOnError)
args.Parse(os.Args[2:])
buildpacks.CommandList(args.Args())
}

View File

@@ -1,19 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
func main() {
args := flag.NewFlagSet("buildpacks:remove", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err := buildpacks.CommandRemove(args.Args(), *index)
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -1,34 +0,0 @@
package main
import (
"flag"
"strings"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
// displays a buildpacks report for one or more apps
func main() {
flag.Parse()
appName := flag.Arg(1)
infoFlag := flag.Arg(2)
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
return
}
for _, appName := range apps {
buildpacks.ReportSingleApp(appName, infoFlag)
}
return
}
buildpacks.ReportSingleApp(appName, infoFlag)
}

View File

@@ -1,19 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
func main() {
args := flag.NewFlagSet("buildpacks:set", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err := buildpacks.CommandSet(args.Args(), *index)
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -0,0 +1,55 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
// main entrypoint to all subcommands
func main() {
parts := strings.Split(os.Args[0], "/")
subcommand := parts[len(parts)-1]
var err error
switch subcommand {
case "add":
args := flag.NewFlagSet("buildpacks:add", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err = buildpacks.CommandAdd(args.Args(), *index)
case "clear":
args := flag.NewFlagSet("buildpacks:clear", flag.ExitOnError)
args.Parse(os.Args[2:])
err = buildpacks.CommandClear(args.Args())
case "list":
args := flag.NewFlagSet("buildpacks:list", flag.ExitOnError)
args.Parse(os.Args[2:])
buildpacks.CommandList(args.Args())
case "remove":
args := flag.NewFlagSet("buildpacks:remove", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err = buildpacks.CommandRemove(args.Args(), *index)
case "report":
flag.Parse()
appName := flag.Arg(1)
infoFlag := flag.Arg(2)
buildpacks.CommandReport(appName, infoFlag)
case "set":
args := flag.NewFlagSet("buildpacks:set", flag.ExitOnError)
index := args.Int("index", 0, "--index: the 1-based index of the URL in the list of URLs")
args.Parse(os.Args[2:])
err = buildpacks.CommandSet(args.Args(), *index)
default:
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
}
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -1,14 +0,0 @@
package main
import (
"fmt"
"github.com/dokku/dokku/plugins/common"
)
// runs the install step for the buildpacks plugin
func main() {
if err := common.PropertySetup("buildpacks"); err != nil {
common.LogFail(fmt.Sprintf("Unable to install the buildpacks plugin: %s", err.Error()))
}
}

View File

@@ -1,18 +0,0 @@
package main
import (
"flag"
"github.com/dokku/dokku/plugins/common"
)
// destroys the buildpacks property for a given app container
func main() {
flag.Parse()
appName := flag.Arg(0)
err := common.PropertyDestroy("buildpacks", appName)
if err != nil {
common.LogFail(err.Error())
}
}

View File

@@ -1,15 +0,0 @@
package main
import (
"flag"
"github.com/dokku/dokku/plugins/buildpacks"
)
// displays a buildpacks report for one or more apps
func main() {
flag.Parse()
appName := flag.Arg(0)
buildpacks.ReportSingleApp(appName, "")
}

View File

@@ -0,0 +1,35 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/buildpacks"
"github.com/dokku/dokku/plugins/common"
)
// main entrypoint to all triggers
func main() {
parts := strings.Split(os.Args[0], "/")
trigger := parts[len(parts)-1]
flag.Parse()
switch trigger {
case "install":
buildpacks.TriggerInstall()
case "post-delete":
appName := flag.Arg(0)
buildpacks.TriggerPostDelete(appName)
case "post-extract":
appName := flag.Arg(0)
sourceWorkDir := flag.Arg(1)
buildpacks.TriggerPostExtract(appName, sourceWorkDir)
case "report":
appName := flag.Arg(0)
buildpacks.ReportSingleApp(appName, "")
default:
common.LogFail(fmt.Sprintf("Invalid plugin trigger call: %s", trigger))
}
}

View File

@@ -3,6 +3,7 @@ package buildpacks
import (
"errors"
"fmt"
"strings"
"github.com/dokku/dokku/plugins/common"
)
@@ -115,6 +116,27 @@ func CommandRemove(args []string, index int) (err error) {
return
}
// CommandReport displays a buildpacks report for one or more apps
func CommandReport(appName string, infoFlag string) {
if strings.HasPrefix(appName, "--") {
infoFlag = appName
appName = ""
}
if len(appName) == 0 {
apps, err := common.DokkuApps()
if err != nil {
return
}
for _, appName := range apps {
ReportSingleApp(appName, infoFlag)
}
return
}
ReportSingleApp(appName, infoFlag)
}
// CommandSet implements buildpacks:set
func CommandSet(args []string, index int) (err error) {
var appName string

View File

@@ -1,8 +1,7 @@
package main
package buildpacks
import (
"bufio"
"flag"
"fmt"
"os"
"path"
@@ -10,12 +9,23 @@ import (
"github.com/dokku/dokku/plugins/common"
)
// writes a .buildpacks file into the app
func main() {
flag.Parse()
appName := flag.Arg(0)
tmpWorkDir := flag.Arg(1)
// TriggerInstall runs the install step for the buildpacks plugin
func TriggerInstall() {
if err := common.PropertySetup("buildpacks"); err != nil {
common.LogFail(fmt.Sprintf("Unable to install the buildpacks plugin: %s", err.Error()))
}
}
// TriggerPostDelete destroys the buildpacks property for a given app container
func TriggerPostDelete(appName string) {
err := common.PropertyDestroy("buildpacks", appName)
if err != nil {
common.LogFail(err.Error())
}
}
// TriggerPostExtract writes a .buildpacks file into the app
func TriggerPostExtract(appName string, sourceWorkDir string) {
buildpacks, err := common.PropertyListGet("buildpacks", appName, "buildpacks")
if err != nil {
return
@@ -25,7 +35,7 @@ func main() {
return
}
buildpacksPath := path.Join(tmpWorkDir, ".buildpacks")
buildpacksPath := path.Join(sourceWorkDir, ".buildpacks")
file, err := os.OpenFile(buildpacksPath, os.O_RDWR|os.O_TRUNC|os.O_CREATE, 0600)
if err != nil {
common.LogFail(fmt.Sprintf("Error writing .buildpacks file: %s", err.Error()))

View File

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

View File

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

View File

@@ -58,7 +58,7 @@ check_process() {
IS_HEROKUISH_CONTAINER=false
IMAGE=$(get_app_image_name "$APP")
is_image_herokuish_based "$IMAGE" && IS_HEROKUISH_CONTAINER=true
is_image_herokuish_based "$IMAGE" "$APP" && IS_HEROKUISH_CONTAINER=true
dokku_log_info1 "Running checks for app ($APP.$PROC_TYPE.$CONTAINER_INDEX)"
CONTAINER_ID=$(<"$DOKKU_CONTAINER_ID_FILE")

1
plugins/common/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/prop

10
plugins/common/Makefile Normal file
View File

@@ -0,0 +1,10 @@
BUILD = prop
PLUGIN_NAME = common
clean-prop:
rm -rf prop
prop: clean-prop **/**/prop.go
go build -ldflags="-s -w" $(GO_ARGS) -o prop src/prop/prop.go
include ../../common.mk

View File

@@ -245,7 +245,7 @@ func IsDeployed(appName string) bool {
}
// IsImageHerokuishBased returns true if app image is based on herokuish
func IsImageHerokuishBased(image string) bool {
func IsImageHerokuishBased(image string, appName string) bool {
output, err := DockerInspect(image, "{{range .Config.Env}}{{if eq . \"USER=herokuishuser\" }}{{println .}}{{end}}{{end}}")
if err != nil {
return false
@@ -262,6 +262,15 @@ func MustGetEnv(key string) (val string) {
return
}
// GetenvWithDefault returns env variable or defaultValue if it's not set
func GetenvWithDefault(key string, defaultValue string) (val string) {
val = os.Getenv(key)
if val == "" {
val = defaultValue
}
return
}
// ReadFirstLine gets the first line of a file that has contents and returns it
// if there are no contents, an empty string is returned
// will also return an empty string if the file does not exist
@@ -325,7 +334,7 @@ func VerifyAppName(appName string) (err error) {
// VerifyImage returns true if docker image exists in local repo
func VerifyImage(image string) bool {
imageCmd := NewShellCmd(strings.Join([]string{DockerBin(), "inspect", image}, " "))
imageCmd := NewShellCmd(strings.Join([]string{DockerBin(), "image", "inspect", image}, " "))
imageCmd.ShowOutput = false
return imageCmd.Execute()
}

View File

@@ -171,7 +171,7 @@ dokku_container_log_verbose_quiet() {
OIFS=$IFS
IFS=$'\n'
local line
for line in $("$DOCKER_BIN" logs "$CID" 2>&1); do
for line in $("$DOCKER_BIN" container logs "$CID" 2>&1); do
dokku_log_verbose_quiet "$line"
done
IFS=$OIFS
@@ -203,7 +203,7 @@ verify_app_name() {
verify_image() {
declare desc="verify image existence"
local IMAGE="$1"
if "$DOCKER_BIN" inspect "$IMAGE" &>/dev/null; then
if "$DOCKER_BIN" image inspect "$IMAGE" &>/dev/null; then
return 0
else
return 1
@@ -286,27 +286,33 @@ get_running_image_tag() {
verify_app_name "$APP"
local CIDS=($(get_app_container_ids "$APP"))
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" inspect -f '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" container inspect --format '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
echo "$RUNNING_IMAGE_TAG"
}
is_image_herokuish_based() {
declare desc="returns true if app image is based on herokuish"
declare IMAGE="$1"
declare APP="$2"
local DOKKU_APP_USER
if [[ -n "$APP" ]]; then
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
fi
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
local USER_VALUE
if [[ -z "$IMAGE" ]]; then
return 1
fi
# due to how the build process works, all herokuish images have the Environment variable USER=herokuishuser
USER_VALUE="$("$DOCKER_BIN" inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
# due to how the build process works, all herokuish images have the Environment variable USER=$DOKKU_APP_USER
USER_VALUE="$("$DOCKER_BIN" image inspect --format '{{range .Config.Env}}{{if eq . "USER='"$DOKKU_APP_USER"'"}}{{println .}}{{end}}{{end}}' "$IMAGE")"
[[ "$USER_VALUE" == "" ]] && return 1
return 0
}
get_docker_version() {
CLIENT_VERSION_STRING="$("$DOCKER_BIN" version -f="{{ .Client.Version }}")"
CLIENT_VERSION_STRING="$("$DOCKER_BIN" version --format "{{ .Client.Version }}")"
echo "$CLIENT_VERSION_STRING"
}
@@ -336,6 +342,8 @@ parse_args() {
local next_index=1
local skip=false
local args=("$@")
local flags
for arg in "$@"; do
if [[ "$skip" == "true" ]]; then
next_index=$((next_index + 1))
@@ -364,8 +372,22 @@ parse_args() {
skip=true
;;
esac
if [[ "$skip" == "true" ]]; then
flags="${flags} ${arg}"
elif [[ "$arg" == "--app" ]]; then
flags="${flags} ${arg}=${args[$next_index]}"
elif [[ "$arg" =~ ^--.* ]]; then
flags="${flags} ${arg}"
fi
next_index=$((next_index + 1))
done
if [[ -z "$DOKKU_GLOBAL_FLAGS" ]]; then
export DOKKU_GLOBAL_FLAGS="$(echo -e "${flags}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
fi
return 0
}
@@ -379,10 +401,10 @@ copy_from_image() {
if verify_image "$IMAGE"; then
if ! is_abs_path "$SRC_FILE"; then
if is_image_herokuish_based "$IMAGE"; then
if is_image_herokuish_based "$IMAGE" "$APP"; then
WORKDIR="/app"
else
WORKDIR="$("$DOCKER_BIN" inspect -f '{{.Config.WorkingDir}}' "$IMAGE")"
WORKDIR="$("$DOCKER_BIN" image inspect --format '{{.Config.WorkingDir}}' "$IMAGE")"
fi
if [[ -n "$WORKDIR" ]]; then
@@ -393,9 +415,9 @@ copy_from_image() {
TMP_FILE_COMMAND_OUTPUT=$(mktemp "/tmp/dokku-${DOKKU_PID}-${FUNCNAME[0]}.XXXXXX")
trap "rm -rf '$TMP_FILE_COMMAND_OUTPUT' >/dev/null 2>&1 || true" RETURN
local CID=$("$DOCKER_BIN" create "${DOCKER_CREATE_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS "$IMAGE")
"$DOCKER_BIN" cp "$CID:$SRC_FILE" "$TMP_FILE_COMMAND_OUTPUT" 2>/dev/null || true
"$DOCKER_BIN" rm -f "$CID" &>/dev/null
local CID=$("$DOCKER_BIN" container create "${DOCKER_CREATE_LABEL_ARGS[@]}" $DOKKU_GLOBAL_RUN_ARGS "$IMAGE")
"$DOCKER_BIN" container cp "$CID:$SRC_FILE" "$TMP_FILE_COMMAND_OUTPUT" 2>/dev/null || true
"$DOCKER_BIN" container rm --force "$CID" &>/dev/null
# docker cp exits with status 1 when run as non-root user when it tries to chown the file
# after successfully copying the file. Thus, we suppress stderr.
@@ -492,7 +514,7 @@ is_container_running() {
local CONTAINER_STATUS
dokku_log_warn "Deprecated: common#is_container_status"
CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Running}}' "$CID" || true)
CONTAINER_STATUS=$("$DOCKER_BIN" container inspect --format '{{.State.Running}}' "$CID" || true)
if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
@@ -505,7 +527,7 @@ is_container_status() {
declare desc="return 0 if given docker container id is in given state"
local CID=$1
local TEMPLATE="{{.State.$2}}"
local CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f "$TEMPLATE" "$CID" 2>/dev/null || true)
local CONTAINER_STATUS=$("$DOCKER_BIN" container inspect --format "$TEMPLATE" "$CID" 2>/dev/null || true)
if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
@@ -522,7 +544,7 @@ is_app_running() {
dokku_log_warn "Deprecated: ps#fn-is-app-running"
verify_app_name "$APP"
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP")
local APP_RUNNING_CONTAINER_IDS=$(get_app_running_container_ids "$APP" 2>/dev/null)
if [[ -n "$APP_RUNNING_CONTAINER_IDS" ]]; then
return 0
@@ -567,7 +589,7 @@ release_and_deploy() {
verify_app_name "$APP"
if verify_image "$IMAGE"; then
if is_image_herokuish_based "$IMAGE"; then
if is_image_herokuish_based "$IMAGE" "$APP"; then
local IMAGE_SOURCE_TYPE="herokuish"
else
local IMAGE_SOURCE_TYPE="dockerfile"
@@ -641,30 +663,30 @@ docker_cleanup() {
if [[ -n "$APP" ]]; then
# delete all non-running containers
# shellcheck disable=SC2046
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -f "label=com.dokku.app-name=$APP" -q) &>/dev/null || true
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container list --all --filter "status=exited" --filter "label=$DOKKU_CONTAINER_LABEL" --filter "label=com.dokku.app-name=$APP" --quiet) &>/dev/null || true
# delete all dead containers
# shellcheck disable=SC2046
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -f "label=com.dokku.app-name=$APP" -q) &>/dev/null || true
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container list --all --filter "status=dead" --filter "label=$DOKKU_CONTAINER_LABEL" --filter "label=com.dokku.app-name=$APP" --quiet) &>/dev/null || true
# delete danging images
# shellcheck disable=SC2046
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -f "label=com.dokku.app-name=$APP" -q) &>/dev/null || true
"$DOCKER_BIN" image rm $("$DOCKER_BIN" image list --filter 'dangling=true' --filter "label=com.dokku.app-name=$APP" --quiet) &>/dev/null || true
# delete unused images
"$DOCKER_BIN" image prune --all --filter "label=com.dokku.app-name=$APP" --force &>/dev/null || true
else
# delete all non-running containers
# shellcheck disable=SC2046
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container list --all --filter "status=exited" --filter "label=$DOKKU_CONTAINER_LABEL" --quiet) &>/dev/null || true
# delete all dead containers
# shellcheck disable=SC2046
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container list --all --filter "status=dead" --filter "label=$DOKKU_CONTAINER_LABEL" --quiet) &>/dev/null || true
# delete danging images
# shellcheck disable=SC2046
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null || true
"$DOCKER_BIN" image rm $("$DOCKER_BIN" image list --filter 'dangling=true' --quiet) &>/dev/null || true
fi
}
@@ -747,7 +769,7 @@ get_exposed_ports_from_image() {
local IMAGE="$1"
verify_image "$IMAGE"
# shellcheck disable=SC2016
local DOCKER_IMAGE_EXPOSED_PORTS="$("$DOCKER_BIN" inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_EXPOSED_PORTS="$("$DOCKER_BIN" image inspect --format '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
}
@@ -755,7 +777,7 @@ get_entrypoint_from_image() {
declare desc="return .Config.Entrypoint from passed image name"
local IMAGE="$1"
verify_image "$IMAGE"
local DOCKER_IMAGE_ENTRYPOINT="$("$DOCKER_BIN" inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_ENTRYPOINT="$("$DOCKER_BIN" image inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
echo "ENTRYPOINT $DOCKER_IMAGE_ENTRYPOINT"
}
@@ -763,7 +785,7 @@ get_cmd_from_image() {
declare desc="return .Config.Cmd from passed image name"
local IMAGE="$1"
verify_image "$IMAGE"
local DOCKER_IMAGE_CMD="$("$DOCKER_BIN" inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_CMD="$("$DOCKER_BIN" image inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
DOCKER_IMAGE_CMD="${DOCKER_IMAGE_CMD/\/bin\/sh -c/}"
echo "CMD $DOCKER_IMAGE_CMD"
}
@@ -801,7 +823,7 @@ get_container_ports() {
local cid
for cid in $APP_CIDS; do
local container_ports="$("$DOCKER_BIN" port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
local container_ports="$("$DOCKER_BIN" container port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
done
echo "$container_ports"
@@ -907,24 +929,10 @@ internal_get_app_urls() {
get_json_value() {
declare desc="return value of provided json key from a json stream on stdin"
# JSON_NODE should be expresses as either a top-level object that has no children
# or in the format of json.node.path
# or in the format of .json.node.path
local JSON_NODE="$1"
local JSON_NODE=${JSON_NODE//\./\"][\"}
local JSON_NODE="[\"${JSON_NODE}\"]"
cat | python2.7 -c 'import json,sys;obj=json.load(sys.stdin);print json.dumps(obj'"${JSON_NODE}"').strip("\"")'
}
get_json_keys() {
declare desc="return space-separated list of json keys from json provided on stdin"
# JSON_NODE should be expressed as json.node.path and is expected to have children
local JSON_NODE="$1"
local JSON_NODE=${JSON_NODE//\./\"][\"}
local JSON_NODE="[\"${JSON_NODE}\"]"
if [[ "$JSON_NODE" == "[\"\"]" ]]; then
cat | python2.7 -c 'import json,sys;obj=json.load(sys.stdin);print " ".join(obj.keys())'
else
cat | python2.7 -c 'import json,sys;obj=json.load(sys.stdin);print " ".join(obj'"${JSON_NODE}"'.keys())'
fi
cat | jq -r "${JSON_NODE} | select (.!=null)" 2>/dev/null
}
strip_inline_comments() {

View File

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

View File

@@ -115,7 +115,7 @@ func PropertyGetDefault(pluginName, appName, property, defaultValue string) (val
// PropertyListAdd adds a property to a list at an optionally specified index
func PropertyListAdd(pluginName string, appName string, property string, value string, index int) error {
if err := PropertyTouch(pluginName, appName, property); err != nil {
if err := propertyTouch(pluginName, appName, property); err != nil {
return err
}
@@ -182,6 +182,33 @@ func PropertyListGet(pluginName string, appName string, property string) (lines
return lines, nil
}
// PropertyListLength returns the length of a property list
func PropertyListLength(pluginName string, appName string, property string) (length int, err error) {
if !PropertyExists(pluginName, appName, property) {
return length, nil
}
propertyPath := getPropertyPath(pluginName, appName, property)
file, err := os.Open(propertyPath)
if err != nil {
return length, err
}
defer file.Close()
var lines []string
scanner := bufio.NewScanner(file)
for scanner.Scan() {
lines = append(lines, scanner.Text())
}
if err = scanner.Err(); err != nil {
return length, fmt.Errorf("Unable to read %s config value for %s.%s: %s", pluginName, appName, property, err.Error())
}
length = len(lines)
return length, nil
}
// PropertyListGetByIndex returns an entry within property list by index
func PropertyListGetByIndex(pluginName string, appName string, property string, index int) (propertyValue string, err error) {
lines, err := PropertyListGet(pluginName, appName, property)
@@ -262,9 +289,45 @@ func PropertyListRemove(pluginName string, appName string, property string, valu
return nil
}
// PropertyListRemoveByPrefix removes a value by prefix from a property list
func PropertyListRemoveByPrefix(pluginName string, appName string, property string, prefix string) error {
lines, err := PropertyListGet(pluginName, appName, property)
if err != nil {
return err
}
propertyPath := getPropertyPath(pluginName, appName, property)
file, err := os.OpenFile(propertyPath, os.O_RDWR|os.O_TRUNC, 0600)
if err != nil {
return err
}
found := false
w := bufio.NewWriter(file)
for _, line := range lines {
if strings.HasPrefix(line, prefix) {
found = true
continue
}
fmt.Fprintln(w, line)
}
if err = w.Flush(); err != nil {
return fmt.Errorf("Unable to write %s config value %s.%s: %s", pluginName, appName, property, err.Error())
}
file.Chmod(0600)
setPermissions(propertyPath, 0600)
if !found {
return errors.New("Property not found, nothing was removed")
}
return nil
}
// PropertyListSet sets a value within a property list at a specified index
func PropertyListSet(pluginName string, appName string, property string, value string, index int) error {
if err := PropertyTouch(pluginName, appName, property); err != nil {
if err := propertyTouch(pluginName, appName, property); err != nil {
return err
}
@@ -310,8 +373,8 @@ func PropertyListSet(pluginName string, appName string, property string, value s
return nil
}
// PropertyTouch ensures a given application property file exists
func PropertyTouch(pluginName string, appName string, property string) error {
// propertyTouch ensures a given application property file exists
func propertyTouch(pluginName string, appName string, property string) error {
if err := makePluginAppPropertyPath(pluginName, appName); err != nil {
return fmt.Errorf("Unable to create %s config directory for %s: %s", pluginName, appName, err.Error())
}
@@ -332,7 +395,7 @@ func PropertyTouch(pluginName string, appName string, property string) error {
// PropertyWrite writes a value for a given application property
func PropertyWrite(pluginName string, appName string, property string, value string) error {
if err := PropertyTouch(pluginName, appName, property); err != nil {
if err := propertyTouch(pluginName, appName, property); err != nil {
return err
}
@@ -350,10 +413,13 @@ func PropertyWrite(pluginName string, appName string, property string, value str
}
// PropertySetup creates the plugin config root
func PropertySetup(pluginName string) (err error) {
func PropertySetup(pluginName string) error {
pluginConfigRoot := getPluginConfigPath(pluginName)
if err = os.MkdirAll(pluginConfigRoot, 0755); err != nil {
return
if err := os.MkdirAll(pluginConfigRoot, 0755); err != nil {
return err
}
if err := setPermissions(path.Join(MustGetEnv("DOKKU_LIB_ROOT"), "config"), 0755); err != nil {
return err
}
return setPermissions(pluginConfigRoot, 0755)
}
@@ -374,46 +440,40 @@ func getPluginConfigPath(pluginName string) string {
}
// makePluginAppPropertyPath ensures that a property path exists
func makePluginAppPropertyPath(pluginName string, appName string) (err error) {
func makePluginAppPropertyPath(pluginName string, appName string) error {
pluginAppConfigRoot := getPluginAppPropertyPath(pluginName, appName)
if err = os.MkdirAll(pluginAppConfigRoot, 0755); err != nil {
return
if err := os.MkdirAll(pluginAppConfigRoot, 0755); err != nil {
return err
}
return setPermissions(pluginAppConfigRoot, 0755)
}
// setPermissions sets the proper owner and filemode for a given file
func setPermissions(path string, fileMode os.FileMode) (err error) {
if err = os.Chmod(path, fileMode); err != nil {
func setPermissions(path string, fileMode os.FileMode) error {
if err := os.Chmod(path, fileMode); err != nil {
return err
}
systemGroup := os.Getenv("DOKKU_SYSTEM_GROUP")
systemUser := os.Getenv("DOKKU_SYSTEM_USER")
if systemGroup == "" {
systemGroup = "dokku"
}
if systemUser == "" {
systemUser = "dokku"
}
systemGroup := GetenvWithDefault("DOKKU_SYSTEM_GROUP", "dokku")
systemUser := GetenvWithDefault("DOKKU_SYSTEM_USER", "dokku")
group, err := user.LookupGroup(systemGroup)
if err != nil {
return
return err
}
user, err := user.Lookup(systemUser)
if err != nil {
return
return err
}
uid, err := strconv.Atoi(user.Uid)
if err != nil {
return
return err
}
gid, err := strconv.Atoi(group.Gid)
if err != nil {
return
return err
}
return os.Chown(path, uid, gid)
}

View File

@@ -2,102 +2,99 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
fn-plugin-property-delete() {
declare desc="delete a key from the property store for an app"
declare PLUGIN="$1" APP="$2" KEY="$3"
fn-plugin-property-get() {
declare desc="returns the value for a given property"
declare PLUGIN="$1" APP="$2" KEY="$3" DEFAULT="$4"
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
return 1
fi
rm -f "${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}/${KEY}"
fn-plugin-property-get-default "$PLUGIN" "$APP" "$KEY" "$DEFAULT"
}
fn-plugin-property-destroy() {
declare desc="destroy the properties for an app"
declare PLUGIN="$1" APP="$2"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "destroy" "$PLUGIN" "$APP" "$KEY"
}
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]]; then
return 1
fi
if [[ "$APP" == "_all_" ]]; then
rm -rf "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
else
rm -rf "${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}"
fi
fn-plugin-property-delete() {
declare desc="delete a key from the property store for an app"
declare PLUGIN="$1" APP="$2" KEY="$3"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "del" "$PLUGIN" "$APP" "$KEY"
}
fn-plugin-property-exists() {
declare desc="returns whether the property store has a value for an app"
declare PLUGIN="$1" APP="$2" KEY="$3" DEFAULT="$4"
local CONFIG_VALUE
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
return 1
fi
if [[ ! -f "${DOKKU_LIB_ROOT:?}/config/${PLUGIN}/${APP}/${KEY}" ]]; then
return 1
fi
}
fn-plugin-property-get() {
declare desc="returns the property store value for an app"
declare PLUGIN="$1" APP="$2" KEY="$3" DEFAULT="$4"
local CONFIG_VALUE
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
return 1
fi
CONFIG_VALUE="$(fn-plugin-property-read "$PLUGIN" "$APP" "$KEY" || true)"
if [[ -z "$CONFIG_VALUE" ]]; then
CONFIG_VALUE="$DEFAULT"
fi
echo "$CONFIG_VALUE"
}
fn-plugin-property-setup() {
declare desc="creates the plugin config root"
declare PLUGIN="$1"
if [[ -z "$PLUGIN" ]]; then
return 1
fi
mkdir -p "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
chmod 0755 "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
local dokku_system_group=${DOKKU_SYSTEM_GROUP:="dokku"}
local dokku_system_user=${DOKKU_SYSTEM_USER:="dokku"}
chown "${dokku_system_user}:${dokku_system_group}" "${DOKKU_LIB_ROOT}/config/${PLUGIN}"
}
fn-plugin-property-read() {
declare desc="read a key from the property store for an app"
declare PLUGIN="$1" APP="$2" KEY="$3"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "exists" "$PLUGIN" "$APP" "$KEY"
}
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
return 1
fi
fn-plugin-property-get-all() {
declare desc="returns a map of all properties for a given app"
declare PLUGIN="$1" APP="$2"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "get-all" "$PLUGIN" "$APP"
}
if [[ ! -f "${DOKKU_LIB_ROOT:?}/config/${PLUGIN}/${APP}/${KEY}" ]]; then
return 1
fi
fn-plugin-property-get-default() {
declare desc="returns the value for a given property with a specified default value"
declare PLUGIN="$1" APP="$2" KEY="$3" DEFAULT="$4"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "get-with-default" "$PLUGIN" "$APP" "$KEY" "$DEFAULT"
}
cat "${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}/${KEY}"
fn-plugin-property-list-add() {
declare desc="adds a property to a list at an optionally specified index"
declare PLUGIN="$1" APP="$2" KEY="$3" VALUE="$4" INDEX="$5"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "rpush" "$PLUGIN" "$APP" "$KEY" "$VALUE" "$INDEX"
}
fn-plugin-property-list-get() {
declare desc="returns a property list"
declare PLUGIN="$1" APP="$2" KEY="$3"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lrange" "$PLUGIN" "$APP" "$KEY"
}
fn-plugin-property-list-get-by-index() {
declare desc="returns an entry within property list by index"
declare PLUGIN="$1" APP="$2" KEY="$3" INDEX="$4"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lindex" "$PLUGIN" "$APP" "$KEY" "$INDEX"
}
fn-plugin-property-list-get-by-value() {
declare desc="returns an entry within property list by value"
declare PLUGIN="$1" APP="$2" KEY="$3" VALUE="$4"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lismember" "$PLUGIN" "$APP" "$KEY" "$VALUE"
}
fn-plugin-property-list-length() {
declare desc="returns a property list"
declare PLUGIN="$1" APP="$2" KEY="$3"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "llen" "$PLUGIN" "$APP" "$KEY"
}
fn-plugin-property-list-remove() {
declare desc="removes a value from a property list"
declare PLUGIN="$1" APP="$2" KEY="$3" VALUE="$4"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lrem" "$PLUGIN" "$APP" "$KEY" "$VALUE"
}
fn-plugin-property-list-remove-by-prefix() {
declare desc="removes a value from a property list"
declare PLUGIN="$1" APP="$2" KEY="$3" PREFIX="$4"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lrem-by-prefix" "$PLUGIN" "$APP" "$KEY" "$PREFIX"
}
fn-plugin-property-list-set() {
declare desc="sets a value within a property list at a specified index"
declare PLUGIN="$1" APP="$2" KEY="$3" VALUE="$4" INDEX="$5"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "lset" "$PLUGIN" "$APP" "$KEY" "$VALUE" "$INDEX"
}
fn-plugin-property-write() {
declare desc="read a key from the property store for an app"
declare PLUGIN="$1" APP="$2" KEY="$3" VALUE="$4"
if [[ -z "$PLUGIN" ]] || [[ -z "$APP" ]] || [[ -z "$KEY" ]]; then
return 1
fi
mkdir -p "${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}"
echo "$VALUE" >"${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}/${KEY}"
chmod 600 "${DOKKU_LIB_ROOT}/config/${PLUGIN}/${APP}/${KEY}"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "set" "$PLUGIN" "$APP" "$KEY" "$VALUE"
}
fn-plugin-property-setup() {
declare desc="creates the plugin config root"
declare PLUGIN="$1"
"$PLUGIN_CORE_AVAILABLE_PATH/common/prop" "setup" "$PLUGIN"
}

View File

@@ -0,0 +1,181 @@
package main
import (
"flag"
"fmt"
"os"
"strconv"
"strings"
"github.com/dokku/dokku/plugins/common"
)
func strToInt(s string, defaultValue int, allowEmpty bool) int {
if s == "" {
if !allowEmpty {
os.Exit(1)
}
return defaultValue
}
index, err := strconv.Atoi(s)
if err != nil {
os.Exit(1)
}
return index
}
func main() {
flag.Parse()
cmd := flag.Arg(0)
pluginName := flag.Arg(1)
switch cmd {
case "rpush":
appName := flag.Arg(2)
property := flag.Arg(3)
value := flag.Arg(4)
index := strToInt(flag.Arg(5), 0, true)
err := common.PropertyListAdd(pluginName, appName, property, value, index)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "llen":
appName := flag.Arg(2)
property := flag.Arg(3)
length, err := common.PropertyListLength(pluginName, appName, property)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
fmt.Printf("%v\n", length)
case "lrange":
appName := flag.Arg(2)
property := flag.Arg(3)
lines, err := common.PropertyListGet(pluginName, appName, property)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
for _, line := range lines {
fmt.Printf("%v\n", line)
}
case "lindex":
appName := flag.Arg(2)
property := flag.Arg(3)
index := strToInt(flag.Arg(4), 0, false)
propertyValue, err := common.PropertyListGetByIndex(pluginName, appName, property, index)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
fmt.Printf("%v\n", propertyValue)
case "lismember":
appName := flag.Arg(2)
property := flag.Arg(3)
value := flag.Arg(4)
_, err := common.PropertyListGetByValue(pluginName, appName, property, value)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "lrem":
appName := flag.Arg(2)
property := flag.Arg(3)
value := flag.Arg(4)
err := common.PropertyListRemove(pluginName, appName, property, value)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "lrem-by-prefix":
appName := flag.Arg(2)
property := flag.Arg(3)
prefix := flag.Arg(4)
err := common.PropertyListRemoveByPrefix(pluginName, appName, property, prefix)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "lset":
appName := flag.Arg(2)
property := flag.Arg(3)
value := flag.Arg(4)
index := strToInt(flag.Arg(5), 0, false)
err := common.PropertyListSet(pluginName, appName, property, value, index)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "set":
appName := flag.Arg(2)
property := flag.Arg(3)
value := flag.Arg(4)
err := common.PropertyWrite(pluginName, appName, property, value)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "get":
appName := flag.Arg(2)
property := flag.Arg(3)
value := common.PropertyGet(pluginName, appName, property)
if value != "" {
fmt.Printf("%v\n", value)
}
case "get-with-default":
appName := flag.Arg(2)
property := flag.Arg(3)
defaultValue := flag.Arg(4)
value := common.PropertyGetDefault(pluginName, appName, property, defaultValue)
if value != "" {
fmt.Printf("%v\n", value)
}
case "get-all":
appName := flag.Arg(2)
values, err := common.PropertyGetAll(pluginName, appName)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
for key, value := range values {
fmt.Fprintln(os.Stdout, key, strings.TrimSuffix(value, "\n"))
}
case "exists":
appName := flag.Arg(2)
property := flag.Arg(3)
exists := common.PropertyExists(pluginName, appName, property)
if !exists {
os.Exit(1)
}
case "del":
appName := flag.Arg(2)
property := flag.Arg(3)
err := common.PropertyDelete(pluginName, appName, property)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "setup":
err := common.PropertySetup(pluginName)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
case "destroy":
appName := flag.Arg(2)
err := common.PropertyDestroy(pluginName, appName)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}
}

View File

@@ -1,2 +1,4 @@
/commands
/subcommands/*
/triggers/*
/triggers

View File

@@ -1,28 +1,5 @@
include ../../common.mk
GO_ARGS ?= -a
SUBCOMMANDS = subcommands/export subcommands/get subcommands/set subcommands/unset subcommands/keys subcommands/bundle
BUILD = commands subcommands
PLUGIN_NAME = config
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
-w $(GO_REPO_ROOT)/plugins/config \
$(BUILD_IMAGE) \
bash -c "GO_ARGS='$(GO_ARGS)' make -j4 build" || exit $$?
build: commands subcommands
commands: **/**/commands.go
go build $(GO_ARGS) -o commands src/commands/commands.go
subcommands: $(SUBCOMMANDS)
subcommands/%: src/subcommands/*/%.go
go build $(GO_ARGS) -o $@ $<
clean:
rm -rf commands subcommands
src-clean:
rm -rf .gitignore src triggers vendor Makefile *.go glide.*
include ../../common.mk

View File

@@ -14,7 +14,7 @@ config_docker_args() {
trigger="$0 config_docker_args"
verify_app_name "$APP"
if ! is_image_herokuish_based "$IMAGE"; then
if ! is_image_herokuish_based "$IMAGE" "$APP"; then
ENV_ARGS="$(config_export app "$APP" --format docker-args --merged)"
echo -n "$STDIN $ENV_ARGS"
else

View File

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

View File

@@ -1,16 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
func main() {
args := flag.NewFlagSet("config:bundle", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
args.Parse(os.Args[2:])
config.CommandBundle(args.Args(), *global, *merged)
}

View File

@@ -1,17 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
//clear all entries from the given environment
func main() {
args := flag.NewFlagSet("config:clear", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandClear(args.Args(), *global, *noRestart)
}

View File

@@ -1,20 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
// print the environment to stdout
func main() {
const defaultPrefix = "export "
const defaultSeparator = "\n"
args := flag.NewFlagSet("config:export", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
format := args.String("format", "exports", "--format: [ exports | envfile | docker-args | shell | pretty | json | json-list ] which format to export as)")
args.Parse(os.Args[2:])
config.CommandExport(args.Args(), *global, *merged, *format)
}

View File

@@ -1,17 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
// get the given entries from the specified environment
func main() {
args := flag.NewFlagSet("config:get", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
quoted := args.Bool("quoted", false, "--quoted: get the value quoted")
args.Parse(os.Args[2:])
config.CommandGet(args.Args(), *global, *quoted)
}

View File

@@ -1,16 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
func main() {
args := flag.NewFlagSet("config:keys", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
args.Parse(os.Args[2:])
config.CommandKeys(args.Args(), *global, *merged)
}

View File

@@ -1,18 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
// set the given entries to the specified environment
func main() {
args := flag.NewFlagSet("config:set", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
encoded := args.Bool("encoded", false, "--encoded: interpret VALUEs as base64")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandSet(args.Args(), *global, *noRestart, *encoded)
}

View File

@@ -0,0 +1,67 @@
package main
import (
"flag"
"fmt"
"os"
"strings"
"github.com/dokku/dokku/plugins/common"
"github.com/dokku/dokku/plugins/config"
)
// main entrypoint to all subcommands
func main() {
parts := strings.Split(os.Args[0], "/")
subcommand := parts[len(parts)-1]
switch subcommand {
case "bundle":
args := flag.NewFlagSet("config:bundle", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
args.Parse(os.Args[2:])
config.CommandBundle(args.Args(), *global, *merged)
case "clear":
args := flag.NewFlagSet("config:clear", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandClear(args.Args(), *global, *noRestart)
case "export":
args := flag.NewFlagSet("config:export", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
format := args.String("format", "exports", "--format: [ exports | envfile | docker-args | shell | pretty | json | json-list ] which format to export as)")
args.Parse(os.Args[2:])
config.CommandExport(args.Args(), *global, *merged, *format)
case "get":
args := flag.NewFlagSet("config:get", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
quoted := args.Bool("quoted", false, "--quoted: get the value quoted")
args.Parse(os.Args[2:])
config.CommandGet(args.Args(), *global, *quoted)
case "keys":
args := flag.NewFlagSet("config:keys", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
merged := args.Bool("merged", false, "--merged: merge app environment and global environment")
args.Parse(os.Args[2:])
config.CommandKeys(args.Args(), *global, *merged)
case "set":
args := flag.NewFlagSet("config:set", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
encoded := args.Bool("encoded", false, "--encoded: interpret VALUEs as base64")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandSet(args.Args(), *global, *noRestart, *encoded)
case "unset":
args := flag.NewFlagSet("config:unset", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandUnset(args.Args(), *global, *noRestart)
default:
common.LogFail(fmt.Sprintf("Invalid plugin subcommand call: %s", subcommand))
}
}

View File

@@ -1,17 +0,0 @@
package main
import (
"flag"
"os"
"github.com/dokku/dokku/plugins/config"
)
//unset the given entries from the given environment
func main() {
args := flag.NewFlagSet("config:unset", flag.ExitOnError)
global := args.Bool("global", false, "--global: use the global environment")
noRestart := args.Bool("no-restart", false, "--no-restart: no restart")
args.Parse(os.Args[2:])
config.CommandUnset(args.Args(), *global, *noRestart)
}

View File

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

View File

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

View File

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

View File

@@ -58,9 +58,9 @@ enter_default_cmd() {
local EXEC_CMD=""
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
is_image_herokuish_based "$IMAGE" "$APP" && local EXEC_CMD="/exec"
# shellcheck disable=SC2086
"$DOCKER_BIN" exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
"$DOCKER_BIN" container exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
}
enter_default_cmd "$@"

Some files were not shown because too many files have changed in this diff Show More