Compare commits

...

515 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
a4b8e59c3f Release 0.9.0
# History

## 0.9.0

### Bug Fixes

- #2691: @josegonzalez Fix package building when golang binaries are available
- #2671: @znz Fix variable name
- #2672: @callahad Fix logrotate on Debian
- #2666: @josegonzalez Use correct flag for build arguments when installing herokuish
- #2664: @pvalentim Fix remote name when using --remote option with apps:create

### New Features

- #2689: @mbreit Add dokku-monit to community plugin list
- #2683: @josegonzalez Ensure we have an example for adding keys as another user
- #2682: @josegonzalez Clarify supported stanzas in app.json
- #2679: @callahad Remove unnecessary Linode-specific instructions
- #2670: @znz Remove duplicated `(i.e. `

### Documentation

- #2685: @josegonzalez Pass shellcheck on os x
- #2677: @callahad Prefer HTTP2 to SPDY in nginx-vhosts
- #2673: @michaelshobbs Update to herokuish 0.3.27
- #2674: @michaelshobbs Update sshcommand to 0.7.0
- #2654: @ebeigarts Enable nginx and docker on system startup when using bootstrap.sh on CentOS
- #2546: @michaelshobbs Convert repo plugin to golang
2017-03-31 18:33:39 -06:00
Jose Diaz-Gonzalez
3a5d0716d4 Merge pull request #2691 from dokku/packaging
Fix package building when golang binaries are available
2017-03-31 18:12:44 -06:00
Jose Diaz-Gonzalez
b54a5b3f67 feat: add more lintian overrides for golang-based builds 2017-03-31 17:50:54 -06:00
Jose Diaz-Gonzalez
5b33bd5eda fix: clean up src files in tmp build dir 2017-03-31 17:50:34 -06:00
Jose Diaz-Gonzalez
6d55dd8884 fix: allow skipping go-clean 2017-03-31 17:50:16 -06:00
Jose Diaz-Gonzalez
0fae350256 fix: do not clean src files between builds
This breaks packaging for multiple systems, and should only be done in the tmp build dir.
2017-03-31 17:48:26 -06:00
Jose Diaz-Gonzalez
90015ab594 fix: ensure the Makefile is also removed when calling make src-clean 2017-03-31 17:27:08 -06:00
Jose Diaz-Gonzalez
28281ae4d4 fix: properly detect release builds 2017-03-31 17:08:03 -06:00
Jose Diaz-Gonzalez
4723b27f2c Merge pull request #2690 from znz/fix-contrib/release
Fix some bugs in contrib/release
2017-03-31 16:29:21 -06:00
Kazuhiro NISHIYAMA
de338f4da5 Fix a typo 2017-03-30 21:32:07 +09:00
Kazuhiro NISHIYAMA
d52eac7b35 Fix a typo 2017-03-30 21:31:15 +09:00
Kazuhiro NISHIYAMA
4d01e677ee Add missing $ 2017-03-30 21:30:33 +09:00
Kazuhiro NISHIYAMA
33daa88197 Add missing local 2017-03-30 21:29:59 +09:00
Kazuhiro NISHIYAMA
607a3d88ae CURRENT_VERSION used in fn-repo-update-history-and-commit 2017-03-30 21:27:35 +09:00
Kazuhiro NISHIYAMA
be082e2fe0 Escaping CURRENT_VERSION to avoid too replaced
like change fixed in 5173145653
2017-03-30 21:24:40 +09:00
Kazuhiro NISHIYAMA
27bd578405 $IS_RELEASE is true or false
`[[ "$IS_RELEASE" == "release" ]]` does never match,
because `fn-is-release` outputs `true` or `false` only.
2017-03-30 21:23:15 +09:00
Jose Diaz-Gonzalez
0962ebeadb Merge pull request #2689 from mbreit/dokku-monit-plugin
Add dokku-monit to community plugin list
2017-03-29 09:19:03 -06:00
Moritz Breit
95d9ca8945 Add dokku-monit to community plugin list 2017-03-29 10:00:43 +02:00
Jose Diaz-Gonzalez
e71cd7a939 Merge pull request #2684 from dokku/automated-release
feat: Allow triggering a release via the `contrib/release` script
2017-03-27 23:24:53 -06:00
Jose Diaz-Gonzalez
4bf301c913 chore: group single-line directives that are the same
[ci skip]
2017-03-27 09:32:48 -06:00
Jose Diaz-Gonzalez
0ea9e398bb Merge pull request #2685 from dokku/dockerfile-packaging
Pass shellcheck on os x
2017-03-26 16:23:33 -06:00
Jose Diaz-Gonzalez
2a6ea5d979 Merge pull request #2677 from callahad/prefer-http2
Prefer HTTP2 to SPDY in nginx-vhosts
2017-03-26 13:15:47 -06:00
Jose Diaz-Gonzalez
b8cde503c2 SC2178: Variable was used as an array but is now assigned a string 2017-03-26 05:03:16 -06:00
Jose Diaz-Gonzalez
89c8e1c6a5 SC2086: Double quote to prevent globbing and word splitting 2017-03-26 05:02:03 -06:00
Jose Diaz-Gonzalez
6c66e9850c SC2145: Argument mixes string and array. Use * or separate argument. 2017-03-26 05:00:43 -06:00
Jose Diaz-Gonzalez
fbcc8d8d6c SC2154: disable 2017-03-26 04:59:54 -06:00
Jose Diaz-Gonzalez
e2bbdc968d SC2162: read without -r mangle backslashes 2017-03-26 04:59:10 -06:00
Jose Diaz-Gonzalez
ed7d5623ad fix: attempt to pass shellcheck on os x 2017-03-26 04:38:35 -06:00
Jose Diaz-Gonzalez
217e491e59 feat: Allow triggering a release via the contrib/release script
- Requires docker, git, and package_cloud gems
- Requires the PACKAGECLOUD_API_TOKEN environment variable
- Builds both a deb and rpm, pushing both to packagecloud
- Upgrades the golang build environment to 1.7.5
- Combines both build Dockerfiles into a single, generic env
- Fixes issue where internal-functions file for tar plugin was not executable
- Ensures that built plugins have a callback to clean up their source files before packaging
- Adds support for “betafish” releases, which are untested versions of Dokku that are available via a separate packagecloud repository.
2017-03-25 17:56:42 -06:00
Jose Diaz-Gonzalez
101414dcd3 Merge pull request #2683 from dokku/josegonzalez-patch-1
docs: ensure we have an example for adding keys as another user
2017-03-24 17:35:20 -06:00
Jose Diaz-Gonzalez
edda1e6567 docs: ensure we have an example for adding keys as another user
Closes #2680

[ci skip]
2017-03-24 17:35:05 -06:00
Jose Diaz-Gonzalez
dd7439095a Merge pull request #2682 from dokku/josegonzalez-patch-1
docs: Clarify supported stanzas in app.json
2017-03-24 16:08:31 -06:00
Jose Diaz-Gonzalez
9e3ae9c37c docs: Clarify supported stanzas in app.json
Closes #2681

[ci skip]
2017-03-24 16:08:17 -06:00
Jose Diaz-Gonzalez
b1bd2c17a0 Merge pull request #2679 from callahad/remove-linode-docs
Remove unnecessary Linode-specific instructions
2017-03-23 14:58:48 -06:00
Dan Callahan
a939296981 Prefer HTTP2 to SPDY in nginx-vhosts
1.  SPDY has been deprecated and removed from modern browsers:
    http://caniuse.com/#feat=spdy

2.  HTTP/2 is present in all modern browsers:
    http://caniuse.com/#feat=http2

3.  SPDY and HTTP/2 are mutually exclusive in port-based `listen` directives:
    http://nginx.org/en/docs/http/ngx_http_core_module.html#listen

Caniuse suggests that 74% of global users have a browser that supports
HTTP/2, while only 27% have a browser that supports SPDY. Only IE11 and
Safari support both.

Therefore, when both are available, Dokku should choose HTTP/2 to
maximize the benefit to users.
2017-03-23 15:23:57 -05:00
Dan Callahan
23cfccf424 Remove unnecessary Linode-specific instructions
Modern versions of Docker work just fine on Linode's default kernel
thanks to the `overlay2` storage driver.

Closes #2675
2017-03-23 15:18:10 -05:00
Jose Diaz-Gonzalez
eae2876187 Merge pull request #2673 from dokku/mh/chore/bump-herokuish
update to herokuish 0.3.27
2017-03-23 13:43:24 -06:00
Jose Diaz-Gonzalez
8730bbf0a9 Merge pull request #2674 from dokku/mh/chore/bump-sshcommand
update sshcommand to 0.7.0
2017-03-23 13:43:04 -06:00
Jose Diaz-Gonzalez
1f5e5e5c14 Merge pull request #2654 from ebeigarts/rpm-enable-docker-nginx
Enable nginx and docker on system startup when using bootstrap.sh on CentOS
2017-03-23 13:42:45 -06:00
Michael Hobbs
e8b6e33934 update sshcommand to 0.7.0 2017-03-22 09:33:53 -07:00
Jose Diaz-Gonzalez
9ee6c7aab6 Merge pull request #2671 from znz/fix-var-name
Fix variable name
2017-03-22 10:31:48 -06:00
Jose Diaz-Gonzalez
22a8b914d2 Merge pull request #2670 from znz/fix-typo
Remove duplicated `(i.e. `
2017-03-22 09:59:03 -06:00
Jose Diaz-Gonzalez
dfab96c72e Merge pull request #2672 from callahad/fix-logrotate-debian
Fix logrotate on Debian
2017-03-22 09:58:01 -06:00
Michael Hobbs
7c8fba8fc1 update to herokuish 0.3.27 2017-03-22 08:52:50 -07:00
Dan Callahan
85f4023965 Fix logrotate on Debian
Since we're creating logs as `root:dokku`, the logrotate configuration
needs an `su root dokku` line, just like `su syslog dokku` on ubuntu.
2017-03-22 08:39:46 -05:00
Kazuhiro NISHIYAMA
e9ee47a7c7 Fix variable name
`key` may not be `DOKKU_ROOT`.
2017-03-22 21:31:27 +09:00
Kazuhiro NISHIYAMA
a7c6127f2b Remove duplicated (i.e.
[ci skip]
2017-03-22 21:29:21 +09:00
Jose Diaz-Gonzalez
4e6a699140 Merge pull request #2666 from dokku/josegonzalez-patch-1
Use correct flag for build arguments when installing herokuish
2017-03-21 08:15:29 -06:00
Jose Diaz-Gonzalez
f71644faf6 Use correct flag for build arguments when installing herokuish
Closes #2665

[ci skip]
2017-03-21 08:15:07 -06:00
Michael Hobbs
9a6306c53b Merge pull request #2546 from dokku/mh-repo-golang
convert repo plugin to golang
2017-03-20 11:08:19 -07:00
Michael Hobbs
83d98fb6fb cleanup from master rebase 2017-03-20 09:18:54 -07:00
Michael Hobbs
c501574753 fix overlooked rename of struct method receiver var 2017-03-20 09:16:49 -07:00
Michael Hobbs
f0efdd2ed4 rename DokkuCmd to ShellCmd and use strings.Join instead of fmt.Sprintf 2017-03-20 09:16:49 -07:00
Michael Hobbs
177b45c49b use common.mk for common make variables. use -e when calling make. use golang:1.7.4 image. 2017-03-20 09:16:49 -07:00
Michael Hobbs
fc31b28ab6 restructure to build individual binaries 2017-03-20 09:16:49 -07:00
Michael Hobbs
e61475c7ea add plugin docs regarding compiled languages and command API 2017-03-20 09:15:43 -07:00
Michael Hobbs
c92c0fce37 remove non-existent targets from .PHONY 2017-03-20 09:15:43 -07:00
Michael Hobbs
1a0c308b65 better error msg language 2017-03-20 09:15:43 -07:00
Michael Hobbs
dffbad49b4 refactor out variadic form of GetDeployingAppImageName 2017-03-20 09:15:43 -07:00
Michael Hobbs
b6dffaabee convert repo plugin to golang 2017-03-20 09:15:43 -07:00
Jose Diaz-Gonzalez
8d83803763 Merge pull request #2664 from pvalentim/fix-remote-option
Fix remote name when using --remote option with apps:create
2017-03-20 09:43:37 -06:00
Pedro Valentim
85e5bd7c86 Fix remote name when using --remote option with apps:create 2017-03-20 13:11:14 +00:00
Jose Diaz-Gonzalez
6e4f023a7b Release 0.8.2 2017-03-19 16:20:39 -06:00
Jose Diaz-Gonzalez
8fb817f93c Merge pull request #2660 from dokku/plugin-tarball-support
feat: allow installation of plugins via tarball
2017-03-19 16:17:29 -06:00
Jose Diaz-Gonzalez
49abdb1b5c Merge pull request #2661 from dokku/non-quiet-package-builds
feat: do not run builds in quiet mode
2017-03-19 16:17:24 -06:00
Jose Diaz-Gonzalez
bba368a32d feat: allow installation of plugins via tarball 2017-03-19 16:16:45 -06:00
Jose Diaz-Gonzalez
eaccd8087c feat: do not run builds in quiet mode 2017-03-19 16:15:28 -06:00
Jose Diaz-Gonzalez
3c1fc4a7df Release 0.8.1 2017-03-19 14:06:32 -06:00
Jose Diaz-Gonzalez
c0027e5107 Merge pull request #2659 from jfw/master
Minor clarifications
2017-03-17 17:35:03 -06:00
Jeff Fein-Worton
ed6a4426c7 Minor clarifications 2017-03-17 16:32:33 -07:00
Jose Diaz-Gonzalez
e5a6cf48f7 Merge pull request #2657 from dokku/post-extract-trigger
Add post-extract plugin trigger
2017-03-16 05:51:04 -06:00
Jose Diaz-Gonzalez
dace6873df Add post-extract plugin trigger
This trigger allows you to modify the contents of an application *after* it has been extracted from git/tarball but *before* the image source type is detected. For example, you may wish to autogenerate a Dockerfile based on some other application contents before detecting what type of build process - herokuish or docker file - to use.
2017-03-16 04:25:18 -06:00
Jose Diaz-Gonzalez
d01460f19a Merge pull request #2656 from dokku/2628-fix-global-report-flags
fix: ensure we can call the report subcommand without an app while specifying flags
2017-03-16 03:39:42 -06:00
Jose Diaz-Gonzalez
97e35e796c fix: ensure we can call the report subcommand without an app while specifying flags
Closes #2628
2017-03-16 02:33:51 -06:00
Jose Diaz-Gonzalez
4de0e693ca Merge pull request #2618 from dokku/2356-storage-report
Implement docker-options:report and storage:report
2017-03-15 10:38:09 -06:00
Jose Diaz-Gonzalez
01b30e083f fix: redirect stderr to /dev/null in tests 2017-03-15 09:29:47 -06:00
Edgars Beigarts
7ba063c6bb Enable nginx and docker on system startup when using bootstrap.sh on CentOS 2017-03-15 14:52:29 +02:00
Jose Diaz-Gonzalez
0215e3ec91 fix: redirect domains:default stderr to /dev/null in tests 2017-03-15 03:17:31 -06:00
Jose Diaz-Gonzalez
91aa5255ec fix: ensure we redirect stderr to stdout for test 2017-03-15 02:55:09 -06:00
Jose Diaz-Gonzalez
0d1c8deb57 fix: redirect error output to /dev/null
The checks command is deprecated, so the warning was being captured.
2017-03-15 02:44:38 -06:00
Jose Diaz-Gonzalez
06d2ffaa14 feat: redirect warnings to stderr
Having warnings on stdout doesn’t convey to a user that it is a warning.
2017-03-15 02:44:38 -06:00
Jose Diaz-Gonzalez
6ae948523b fix: redirect error output to /dev/null
The docker-options command is deprecated, so the warning was being captured.
2017-03-15 02:44:38 -06:00
Jose Diaz-Gonzalez
9aaf289fb8 fix: use correct variable 2017-03-15 02:44:38 -06:00
Jose Diaz-Gonzalez
367f6bd5e8 fix: add missing source calls 2017-03-15 02:44:38 -06:00
Jose Diaz-Gonzalez
d9ff7c218d Add deprecation notice 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
f5cce3c3a3 fix: pass shellcheck 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
f1897c7a86 feat: implement docker-options:report command
Refs #2356
2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
25e44b5492 docs: use node-js-app as the app name, not node-js-sample 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
b7dca68375 fix: use correct source path 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
9bad0795e2 fix: add missing functions 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
b7da215ab5 feat: implement storage:report command
Refs #2356
2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
35acce84ea chore: use correct path for sourcing 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
a7f32197f3 refactor: move command to internal-functions 2017-03-15 02:42:10 -06:00
Jose Diaz-Gonzalez
ac8aff1f00 refactor: storage:default is now an alias for storage:help 2017-03-15 02:39:53 -06:00
Jose Diaz-Gonzalez
e99e0b02d4 refactor: move storage:help to internal-functions 2017-03-15 02:38:38 -06:00
Jose Diaz-Gonzalez
621b31839e Merge pull request #2650 from dokku/2627-bare-help-output
Fix help output for nginx and ssh-keys
2017-03-13 10:36:25 -06:00
Jose Diaz-Gonzalez
3c5335056c feat: allow plugin:help and plugin:list subcommands to be run without root 2017-03-12 21:46:58 -06:00
Jose Diaz-Gonzalez
30bf228dc9 docs: swap in plugin:list command 2017-03-12 21:29:25 -06:00
Jose Diaz-Gonzalez
e78a05d6fe feat: mark ps:default command as deprecated 2017-03-12 21:29:12 -06:00
Jose Diaz-Gonzalez
4930003008 feat: create repo:default alias for repo:help 2017-03-12 21:29:01 -06:00
Jose Diaz-Gonzalez
0153bc49bc feat: create tar:default alias for tar:help 2017-03-12 21:28:45 -06:00
Jose Diaz-Gonzalez
48503e9f40 fix: add missing import 2017-03-12 21:28:29 -06:00
Jose Diaz-Gonzalez
ef9b453aa8 refactor: mark storage:list as deprecated 2017-03-12 21:27:36 -06:00
Jose Diaz-Gonzalez
f5552da8ac chore: formatting 2017-03-12 21:26:54 -06:00
Jose Diaz-Gonzalez
6124f2693b feat: make plugin:default an alias of plugin:list 2017-03-12 21:26:46 -06:00
Jose Diaz-Gonzalez
2bcad2014b chore: unify error output when an app is not declared 2017-03-12 21:26:19 -06:00
Jose Diaz-Gonzalez
7bbad9f074 fix: ensure the help output for nginx/ssh-keys renders correctly
Closes #2627

[ci skip]
2017-03-12 21:24:43 -06:00
Jose Diaz-Gonzalez
a5ac4bb08b Merge pull request #2648 from dokku/josegonzalez-patch-1
docs: Note that the remote username is important
2017-03-10 19:47:38 -07:00
Jose Diaz-Gonzalez
3b2bb2ebc6 docs: Note that the remote username is important
[ci skip]
2017-03-10 19:47:26 -07:00
Jose Diaz-Gonzalez
40e4df7e78 Merge pull request #2647 from dokku/jg-2646
fix: properly escape post-install variables
2017-03-09 01:56:44 -07:00
Jose Diaz-Gonzalez
41d3b258bb fix: properly escape post-install variables
Closes #2646

[ci skip]
2017-03-09 01:56:27 -07:00
Jose Diaz-Gonzalez
df6f7803d0 Merge pull request #2639 from joshco/docs/alt-unix-users
Add documentation for how to grant other Unix accounts Dokku access
2017-03-06 06:34:26 -07:00
Josh Cohen
e870f844c6 Add documentation for how to grant other Unix accounts Dokku access
without giving them full sudo privileges.
2017-03-06 08:06:24 -05:00
Jose Diaz-Gonzalez
68192dcdbf Merge pull request #2638 from econya/speaking-documentation-link
Improve README with more speaking link to doc.
2017-03-06 02:55:20 -07:00
Felix Wolfsteller
926cb51906 Improve README with more speaking link to doc.
Also, add a full stop somewhere.
2017-03-06 10:23:08 +01:00
Jose Diaz-Gonzalez
e518571f83 Merge pull request #2622 from raphaklaus/master
Allow file names with multiple dots in certs:add command
2017-03-04 16:18:27 -07:00
Jose Diaz-Gonzalez
7586575cf8 Merge pull request #2637 from dokku/fix-ps-report-docs
docs: Add documentation surrounding flags that ps:report accepts
2017-03-04 16:18:03 -07:00
Jose Diaz-Gonzalez
31c9775ef4 docs: Add documentation surrounding flags that ps:report accepts
Closes #2631

[ci skip]
2017-03-04 16:17:27 -07:00
Raphael D. Pinheiro
30de268da7 Merge branch 'master' into master 2017-03-03 15:22:55 -03:00
Jose Diaz-Gonzalez
1e387b3b42 fix: support new docker packages
Refs #2636
2017-03-03 09:04:49 -07:00
raphaklaus
94af35b3b9 Merge branch 'master' of https://github.com/raphaklaus/dokku 2017-03-02 16:39:08 -03:00
raphaklaus
a3989aafaa add grep to find crt and key files 2017-03-02 16:38:25 -03:00
Michael Hobbs
87feed08f5 Merge pull request #2634 from dokku/mh/chore/upgrade-herokuish
update herokuish to 0.3.26
2017-03-02 10:23:57 -07:00
Raphael D. Pinheiro
86eca5af3a Merge branch 'master' into master 2017-03-02 12:01:17 -03:00
Michael Hobbs
246e54a293 update herokuish to 0.3.26 2017-02-28 17:02:33 -07:00
Jose Diaz-Gonzalez
16ff22b457 Merge pull request #2633 from drpoggi/patch-1
update ssl.md
2017-02-28 12:08:10 -07:00
David Poggi
f7a25eb480 update ssl.md
Make sure we're respecting the respectively ;)
2017-02-28 13:20:47 -05:00
Raphael D. Pinheiro
51f5dbcf26 Merge branch 'master' into master 2017-02-28 12:37:52 -03:00
Jose Diaz-Gonzalez
d79a79084e fix: bail early when checking ps output for an undeployed app
Closes #2630
2017-02-27 07:30:21 -07:00
Jose Diaz-Gonzalez
fe54718073 Merge pull request #2629 from znz/fix-certs-help
Fix `certs:help`
2017-02-27 07:13:20 -07:00
Kazuhiro NISHIYAMA
c1cef4f99e Fix certs:help
`certs` requires `app` argument like `certs:info`.
2017-02-27 23:04:54 +09:00
Jose Diaz-Gonzalez
d36f874d0e Merge pull request #2626 from znz/update-command-in-example
Update command in example
2017-02-27 06:49:22 -07:00
Kazuhiro NISHIYAMA
b0c577ddd7 Update command in example 2017-02-27 22:41:42 +09:00
raphaklaus
56b018b4c5 Merge branch 'master' of https://github.com/raphaklaus/dokku 2017-02-24 12:54:40 -03:00
Raphael D. Pinheiro
8bc7cdaaeb Merge branch 'master' into master 2017-02-24 12:42:42 -03:00
raphaklaus
adf0a9ee74 add domain_ssl tar for testing 2017-02-24 12:41:12 -03:00
Jose Diaz-Gonzalez
ba7f9b8f87 Merge pull request #2616 from dokku/2356-apps-report-cleanup
Replace apps subcommand with apps:list
2017-02-23 19:38:40 -07:00
Jose Diaz-Gonzalez
a3ff9b53a8 Merge pull request #2615 from dokku/2356-certs-report
Implement certs:report
2017-02-23 19:38:25 -07:00
Jose Diaz-Gonzalez
0b897df462 Merge pull request #2619 from dokku/2356-ssh-keys-report
Refactor ssh-keys:default
2017-02-23 19:38:11 -07:00
Jose Diaz-Gonzalez
b4899cdb21 Merge pull request #2620 from dokku/2356-proxy-report
Implement domains:report and proxy:report
2017-02-23 19:37:58 -07:00
Jose Diaz-Gonzalez
2fbe5a418f Merge pull request #2617 from dokku/2356-checks-report
Implement checks:report
2017-02-23 19:37:43 -07:00
Raphael D. Pinheiro
8a6bce3745 add multiple dots tar for testing 2017-02-23 16:33:36 -03:00
Raphael D. Pinheiro
b0777a44cb add test to certs:add with multiple dots
Add test to certs:add command to allow multiple dots in file name
2017-02-23 13:44:28 -03:00
Raphael D. Pinheiro
0c98a34094 enhance regex to allow multiple dots in file names
removed remaining *
2017-02-23 13:27:50 -03:00
Raphael D. Pinheiro
088b7f360e enhance regex to allow multiple dots in file names
things like mydomain.com.crt and mydomain.com.key will be better interpreted
2017-02-23 13:25:33 -03:00
Jose Diaz-Gonzalez
54429a095c feat: implement domains:report command
Also deprecate `domains:default` in favor of `domains:report`

Refs #2356
2017-02-20 23:17:35 -07:00
Jose Diaz-Gonzalez
282979eef4 refactor: move domains:help to internal-functions 2017-02-20 22:50:07 -07:00
Jose Diaz-Gonzalez
48653e5663 chore: properly name functions 2017-02-20 22:44:51 -07:00
Jose Diaz-Gonzalez
ec2e2bc4cc refactor: alias nginx:default to nginx:help 2017-02-20 22:39:53 -07:00
Jose Diaz-Gonzalez
885aa47b18 refactor: move nginx:help to internal-functions 2017-02-20 22:35:52 -07:00
Jose Diaz-Gonzalez
225840b79d refactor: move proxy:help to internal-functions 2017-02-20 21:52:05 -07:00
Jose Diaz-Gonzalez
0e899cdd13 feat: implement proxy:report command
Also deprecate `proxy:default` in favor of `proxy:report`

Refs #2356
2017-02-20 21:52:02 -07:00
Jose Diaz-Gonzalez
6906ead6ae Merge pull request #2592 from dokku/2535-dockerfile-ssl-port
fix: always set a default ssl port for apps with ssl enabled
2017-02-20 21:20:44 -07:00
Jose Diaz-Gonzalez
e441594981 chore: use correct source path 2017-02-20 20:11:53 -07:00
Jose Diaz-Gonzalez
448b6e9ac1 refactor: alias ssh-keys:default to ssh-keys:help 2017-02-20 20:09:09 -07:00
Jose Diaz-Gonzalez
a09560542b refactor: move ssh-keys:help to internal-functions 2017-02-20 20:08:38 -07:00
Jose Diaz-Gonzalez
adc3b24ed7 docs: use node-js-app as sample app name
[ci skip]
2017-02-20 20:04:07 -07:00
Jose Diaz-Gonzalez
4026291572 SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'. 2017-02-20 19:22:18 -07:00
Jose Diaz-Gonzalez
59f6ad9479 Correct docs for checks:report
[ci skip]
2017-02-20 19:07:10 -07:00
Jose Diaz-Gonzalez
dd4960f1ce refactor: move checks:help to internal-functions 2017-02-20 18:19:37 -07:00
Jose Diaz-Gonzalez
3b3eefcb73 refactor: deprecate the checks command in favor of checks:report 2017-02-20 18:19:37 -07:00
Jose Diaz-Gonzalez
cbcb720228 feat: implement checks:report command
Refs #2356
2017-02-20 18:19:31 -07:00
Jose Diaz-Gonzalez
d73c07de68 cleanup: move from apps to apps:list subcommand for tests and docs 2017-02-20 17:24:09 -07:00
Jose Diaz-Gonzalez
cd3e637387 refactor: move apps:help to internal-functions 2017-02-20 17:22:41 -07:00
Jose Diaz-Gonzalez
9614f7dca2 feat: implement apps:list
Also deprecate the `apps` command in favor of `apps:list`
2017-02-20 17:18:29 -07:00
Jose Diaz-Gonzalez
84fab30c09 refactor: move certs:help into internal-functions 2017-02-20 17:11:53 -07:00
Jose Diaz-Gonzalez
cb71d8a0be fix: clean up certs help output 2017-02-20 16:51:46 -07:00
Jose Diaz-Gonzalez
507ae1de33 fix: ensure certs:info doesn’t output error information when ssl files are missing 2017-02-20 16:50:38 -07:00
Jose Diaz-Gonzalez
dcb88226b5 refactor: ensure that certs:default and certs:info are deprecated in favor of certs:report
Refs #2356
2017-02-20 16:47:14 -07:00
Jose Diaz-Gonzalez
51217521e3 feat: add certs:report
Refs #2356
2017-02-20 16:39:43 -07:00
Jose Diaz-Gonzalez
05bf33805f Merge pull request #2504 from mbtamuli/apps_report_subcommand
Adds the `report` subcommand for all plugin
2017-02-20 13:56:45 -07:00
Jose Diaz-Gonzalez
3506c100c7 Merge branch 'master' into apps_report_subcommand 2017-02-20 13:55:37 -07:00
Jose Diaz-Gonzalez
8639d1768c Merge pull request #2586 from bevand10/patch-1
Behind-proxy support for herokuish install
2017-02-20 13:50:04 -07:00
Jose Diaz-Gonzalez
779d281c57 Merge pull request #2612 from dokku/2609-ensure-vhost-file-existence
Ensure VHOST files exist before executing commands against them
2017-02-20 13:49:03 -07:00
Jose Diaz-Gonzalez
815630ffe1 Merge pull request #2613 from emveeoh/patch-2
Update linode.md to reflect latest Linode.com process
2017-02-19 20:04:38 -05:00
Michael van Olden
189366097e Update linode.md to reflect latest Linode.com process
[ci skip]
Linode now supports KVM virtualization on all VMs by default. So, this verbiage was completely removed.
GRUB 2 is now one of the default options in the Kernel Menu. The additional Ubuntu packages are no longer required. Wording changed to reflect updated instructions.
2017-02-19 20:01:57 -05:00
Jose Diaz-Gonzalez
7c30babdec fix: Ensure VHOST files exist before executing commands against them
Closes #2609
2017-02-19 19:57:09 -05:00
Jose Diaz-Gonzalez
618395df5e Merge pull request #2605 from andyjeffries/master
Added information on SSL_CERT_FILE build failure
2017-02-15 11:52:08 -05:00
Jose Diaz-Gonzalez
ef7d913cd7 Merge branch 'master' into master 2017-02-15 11:52:00 -05:00
Andy Jeffries
daa8faa3aa Added information on SSL_CERT_FILE build failure 2017-02-15 16:08:02 +00:00
Jose Diaz-Gonzalez
336ffc9b09 Update functions 2017-02-05 13:39:49 -05:00
Michael Hobbs
44b48a55a5 Merge pull request #2594 from dokku/mh/chore/upgrade-herokuish
upgrade to herokuish v0.3.25
2017-02-01 16:45:06 -08:00
Michael Hobbs
0de2c28c92 upgrade to herokuish v0.3.25 2017-02-01 11:52:19 -08:00
Dave Bevan
4f8bea8f35 Merge branch 'master' into patch-1 2017-01-30 10:01:10 +00:00
Jose Diaz-Gonzalez
aae7401888 fix: always set a default ssl port for apps with ssl enabled
Closes #2535
2017-01-30 03:04:02 -05:00
Dave Bevan
96a0c2531d Update deb.mk
Updates as requested
2017-01-27 12:02:55 +00:00
Jose Diaz-Gonzalez
99378af668 Merge pull request #2587 from dokku/2494-custom-deploy-branch
Allow specifying the deploy branch via DOKKU_DEPLOY_BRANCH
2017-01-26 11:23:36 -07:00
Dave Bevan
9f9b3374bd Make docker build --build-args optional
Change the proxy-sensing --build-args such that they only added if defined.
2017-01-26 10:34:02 +00:00
Jose Diaz-Gonzalez
2efcbcc9bb Merge pull request #2588 from dokku/2466-vagrant-ssh-config
Clarify when the `~/.ssh/config` settings need to match `vagrant ssh-config output`
2017-01-26 00:46:57 -07:00
Jose Diaz-Gonzalez
7cac755c98 Clarify when the ~/.ssh/config settings need to match vagrant ssh-config output
Closes #2466

[ci skip]
2017-01-26 00:46:35 -07:00
Jose Diaz-Gonzalez
0aeee7ea28 Allow specifying the deploy branch via DOKKU_DEPLOY_BRANCH
Closes #2494
2017-01-26 00:32:23 -07:00
Dave Bevan
f393fa0442 Behind-proxy support for herokuish install
Inject http proxy envvars to docker build command to allow package installation behind corporate proxies.

These envvars (http_proxy and https_proxy) are standard, and usually configured via system-wide /etc/profile.d files.

In cases where these envvars are not configured, the additions appear to be mute and non-destructive.
2017-01-25 17:37:26 +00:00
Jose Diaz-Gonzalez
f24e777921 Merge pull request #2583 from dokku/jg-apps-clone
feat: implement application cloning
2017-01-24 11:37:38 -07:00
Jose Diaz-Gonzalez
c82c9562b6 fix: use correct check for skipping a rebuild 2017-01-24 02:54:26 -07:00
Jose Diaz-Gonzalez
d473c1635f docs: add a note about errors that can occur for non-generic config
[ci skip]
2017-01-23 12:03:16 -07:00
Jose Diaz-Gonzalez
33a7619eac Update commands
[ci skip]
2017-01-22 22:55:40 -07:00
Jose Diaz-Gonzalez
dd517a3dd1 Update application-management.md
[ci skip]
2017-01-22 22:55:28 -07:00
Jose Diaz-Gonzalez
143b4802c3 fix: use correct verb
[ci skip]
2017-01-22 22:55:09 -07:00
Jose Diaz-Gonzalez
a564eae9f1 feat: implement application cloning
Application cloning can be used to setup review applications based on an existing application. This is useful in CI/CD pipelines where a developer may wish to verify code in a custom environment without overwriting a shared staging environment.
2017-01-22 21:39:30 -07:00
Jose Diaz-Gonzalez
83bf99c8d0 Merge pull request #2580 from znz/fix-font-url
Fix font URL
2017-01-20 09:11:45 -07:00
Kazuhiro NISHIYAMA
5173145653 Fix font URL
It is broken since
a00a9219da (diff-d93d3d701f4e262a6177c91d4e0b9a36R10)
2017-01-20 23:47:07 +09:00
Jose Diaz-Gonzalez
1f0173ad7b Merge pull request #2578 from dokku/josegonzalez-patch-1
Require specific versions for dokku-maintained packages
2017-01-19 17:34:26 -07:00
Jose Diaz-Gonzalez
bdb38ceaa8 Require specific versions for dokku-maintained packages
Closes #2450

[ci skip]
2017-01-19 17:34:09 -07:00
Jose Diaz-Gonzalez
bb0c587fff Merge pull request #2576 from znz/remove-unused
Remove unused variable
2017-01-19 17:22:46 -07:00
Kazuhiro NISHIYAMA
fec2f8e38e Remove unused variable 2017-01-20 00:26:51 +09:00
Jose Diaz-Gonzalez
b0afcee389 Merge pull request #2573 from ebeigarts/parallel-recomends
Recommend parallel package for faster ps:restore
2017-01-18 02:44:56 -07:00
Edgars Beigarts
33c9bc9908 Recommend parallel package for faster ps:restore 2017-01-18 09:25:08 +02:00
Jose Diaz-Gonzalez
e233e916aa docs: move sponsors and backers section up 2017-01-16 15:43:12 -07:00
Jose Diaz-Gonzalez
eb5d4d0708 docs: move badges to newline
[ci skip]
2017-01-16 15:42:25 -07:00
Jose Diaz-Gonzalez
3a8e80c530 fix: use correct markup for link
[ci skip]
2017-01-16 15:38:35 -07:00
Jose Diaz-Gonzalez
c72d7e0686 Merge pull request #2475 from pranavgoel25/update-docs
Minor readme and sponsor changes
2017-01-16 15:37:53 -07:00
Jose Diaz-Gonzalez
5b92085c29 Merge branch 'master' into update-docs 2017-01-16 15:37:36 -07:00
Jose Diaz-Gonzalez
4e7b1c77e3 Merge pull request #2557 from dokku/dokku-cli-improvements
Dokku cli improvements
2017-01-16 15:32:11 -07:00
Jose Diaz-Gonzalez
e83f3e0011 Merge pull request #2570 from OmgImAlexis/master
add dokku report command for 0.4.10+
2017-01-16 00:56:31 -07:00
Alexis Tyler
b874692d06 add dokku report command for 0.4.10+ 2017-01-16 18:25:20 +10:30
Jose Diaz-Gonzalez
b7511829ad Merge pull request #2569 from OmgImAlexis/patch-1
Reload nginx after adding default vhost file
2017-01-16 00:49:55 -07:00
Alexis Tyler
f5f2a5f171 Reload nginx after creating default vhost file 2017-01-16 18:12:11 +10:30
Jose Diaz-Gonzalez
12500d7d3c Merge pull request #2566 from dokku/josegonzalez-patch-1
Move "new as of" note to correct section
2017-01-15 01:36:37 -07:00
Jose Diaz-Gonzalez
927d569db5 Move "new as of" note to correct section
Also move note up.

[ci skip]
2017-01-15 01:07:12 -07:00
Jose Diaz-Gonzalez
eec41bf4e7 Merge pull request #2565 from dokku/josegonzalez-patch-1
Update persistent storage to reference the sample app as normal
2017-01-15 01:05:21 -07:00
Jose Diaz-Gonzalez
f0ecac5998 Update persistent storage to reference the sample app as normal
[ci skip]
2017-01-15 01:05:08 -07:00
Jose Diaz-Gonzalez
feaaf4f4b0 Merge pull request #2564 from ka7/spelling
Spelling
2017-01-14 14:42:27 -07:00
klemens
e09d093239 spelling fixes 2017-01-14 22:38:27 +01:00
klemens
fc4b7ce0ee spelling fixes 2017-01-14 22:35:24 +01:00
Jose Diaz-Gonzalez
dbf0de9e65 Merge pull request #2500 from dokku/2479-jg-suppress-output-on-submodule-success
Suppress output unless the `git submodule update` call fails
2017-01-14 14:13:48 -07:00
Jose Diaz-Gonzalez
8497bd6d70 chore: remove extra newline
[ci skip]
2017-01-14 14:08:22 -07:00
Jose Diaz-Gonzalez
67f05b8eed fix: show error message when there is no DOKKU_REMOTE_HOST available 2017-01-14 14:02:14 -07:00
Jose Diaz-Gonzalez
0f5dec1797 refactor: rename variable usage to DOKKU_REMOTE_HOST
This allows us to make it a local variable
2017-01-14 14:00:21 -07:00
Jose Diaz-Gonzalez
24c4f25dd0 fix: set DOKKU_GIT_REMOTE to a default of dokku 2017-01-14 13:58:45 -07:00
Jose Diaz-Gonzalez
ab93fefd5b Merge pull request #2508 from OmarShehata/master
Add default functions for all commands
2017-01-13 22:37:29 -07:00
Jose Diaz-Gonzalez
e726bb1df8 Merge pull request #2519 from tkalus/tk-2474-dup_nginx_server_name
Fix for #2474
2017-01-13 22:34:17 -07:00
Jose Diaz-Gonzalez
a8abd40abe Merge pull request #2555 from dokku/2463-enhanced-restore
Skip failing applications when running ps:restore on boot
2017-01-13 17:30:01 -07:00
Jose Diaz-Gonzalez
06fa58ff47 chore: remove extra space
[ci skip]
2017-01-13 17:29:51 -07:00
Jose Diaz-Gonzalez
0de746da4e fix shellcheck issues 2017-01-13 16:20:13 -07:00
Jose Diaz-Gonzalez
24552f2b9b Merge pull request #2560 from ebeigarts/rpm-doc
Improve install documentation on CentOS
2017-01-12 09:51:59 -07:00
Edgars Beigarts
90510378c8 Improve install documentation on CentOS 2017-01-12 13:28:39 +02:00
Jose Diaz-Gonzalez
a22f6596dc Merge pull request #2554 from dokku/2480-add-ssl-ports
Add ssl ports when generating a self-signed certificate
2017-01-10 14:00:04 -07:00
Jose Diaz-Gonzalez
c216b3be7f feat: add support for --global flag when calling dokku domains 2017-01-09 02:34:48 -07:00
Jose Diaz-Gonzalez
6e00064cb3 fix: Properly parse flags in the dokku client
- Respect the --app flag
- Respect the --trace flag
- Skip the second argument after both --app and --remote flags
- The `--global` flag should be set as is when specified after a “valid” command
- Fix issues when checking if the --app flag should be passed via ssh
- Use APP as the variable name for the current app
2017-01-09 02:33:45 -07:00
Jose Diaz-Gonzalez
594b41cc70 fix: properly handle argument parsing when skip is set to true
Previously, using the --app flag would mean that we would stop properly parsing all proceeding flags, so the --app flag would only work when set last.
2017-01-09 02:13:52 -07:00
Jose Diaz-Gonzalez
9272e40178 fix: skip following argument when current argument is --app 2017-01-09 02:12:18 -07:00
Jose Diaz-Gonzalez
e107c19dbf chore: remove extra local declarations 2017-01-09 01:31:10 -07:00
Justin Clark
13c78e8e9a Add exceptions back to dokku_client.sh for plugins that should not be passed an app name implicitly 2017-01-09 01:30:49 -07:00
Jose Diaz-Gonzalez
5ddcf06ce9 feat: add the ability to specify a remote via the --remote flag
Closes #2523
2017-01-09 01:15:22 -07:00
Jose Diaz-Gonzalez
70f3e3407f chore: prefix functions with fn- 2017-01-09 00:44:13 -07:00
Jose Diaz-Gonzalez
332c429e31 refactor: make variables local and move them into correct functions 2017-01-09 00:37:54 -07:00
Jose Diaz-Gonzalez
b23c602079 chore: remove extra whitespace in client
[ci skip]
2017-01-09 00:36:35 -07:00
Jose Diaz-Gonzalez
13ef76127d Suppress output unless the git submodule update call fails
This will give a bit more warning to developers as to what might be going on, allowing them to respond appropriately.

Closes #2479
2017-01-08 22:04:14 -07:00
Jose Diaz-Gonzalez
0e0012cca1 fix: remove extra closing tag 2017-01-08 21:43:37 -07:00
Jose Diaz-Gonzalez
37a2edc558 Merge pull request #2556 from dokku/cleanup-fonts
docs: use slightly better font style for docs
2017-01-08 21:38:05 -07:00
Jose Diaz-Gonzalez
2629be5651 docs: use slightly better font style for docs
- switch to native fonts
- use smaller sidebar text
- set proper line-height

[ci skip]
2017-01-08 21:37:44 -07:00
Jose Diaz-Gonzalez
815c612261 feat: add support for using parallel to restore apps
By using parallel, we take advantage of the fact that a server may have multiple cores, thus enabling restores to complete faster.

Refs #2463
2017-01-08 20:49:14 -07:00
Jose Diaz-Gonzalez
831fdeb030 fix: allow ps_start to fail during a ps:restore
Instead of blocking the start of each app based on whether the previous app started, we simply log and continue.

Closes #2463
2017-01-08 20:17:23 -07:00
Jose Diaz-Gonzalez
bcfa60ae98 feat: save the ssl certificate to the APP_SSL_PATH
This allows later retrieval of the csr in cases where the developer forgot to save it locally.
2017-01-08 19:36:17 -07:00
Jose Diaz-Gonzalez
82c11a2b2c fix: call post-certs-update on the application before updating domains
This ensures that we set the proper ssl ports.

Closes #2480
Closes #2528
2017-01-08 19:35:49 -07:00
Jose Diaz-Gonzalez
a967990be7 chore: remove unnecessary cd in certs:add
This was used before we started using `plugn` for triggering subshell calls to dokku.
2017-01-08 19:35:04 -07:00
Jose Diaz-Gonzalez
87573b81bb Release 0.8.0 2017-01-08 17:22:30 -07:00
Jose Diaz-Gonzalez
66ef66644f Merge pull request #2553 from dokku/release
Release code
2017-01-08 16:55:14 -07:00
Jose Diaz-Gonzalez
e46b0952e2 feat: add release-related Dockerfiles
These two docker files are used to create deb and rpm packages which are later extracted and pushed to packagecloud.

[ci skip]
2017-01-08 16:49:41 -07:00
Jose Diaz-Gonzalez
6ab9e04ba6 fix: allow overriding both DOKKU_VERSION and GIT_REV via environment variables 2017-01-08 16:41:05 -07:00
Jose Diaz-Gonzalez
4740ee1edc Merge pull request #2552 from dokku/build-on-osx
Build on osx
2017-01-08 05:25:45 -07:00
Jose Diaz-Gonzalez
f3113296ee fix: ensure man-db is installed when generating man pages
[ci skip]
2017-01-08 05:25:30 -07:00
Jose Diaz-Gonzalez
6c8c4de398 feat: skip checking for /etc/os-release
On OSX, this file does not exist

[ci skip]
2017-01-08 05:25:30 -07:00
Michael Hobbs
6d5d919a06 Merge pull request #2544 from dokku/mh-update-herokuish
update herokuish to 0.3.29
2017-01-03 10:52:50 -08:00
Michael Hobbs
7af00ef744 update herokuish to 0.3.29 2017-01-03 09:36:37 -08:00
Jose Diaz-Gonzalez
5f86962c06 Merge pull request #2539 from ebeigarts/dokku-rm
Fix dokku-installer.service removal
2016-12-28 14:07:04 -07:00
Edgars Beigarts
171e9625f6 Fix dokku-installer.service removal 2016-12-28 07:32:19 +02:00
Jose Diaz-Gonzalez
1f91b33f46 Merge pull request #2518 from dokku/josegonzalez-patch-1
Use same check for dockerfile apps during a tar build
2016-12-23 02:25:28 -07:00
Jose Diaz-Gonzalez
e6bd877b48 Merge pull request #2533 from facundomedica/patch-1
Solution to problem related to firewall
2016-12-16 13:53:26 -05:00
facundomedica
127dd7334f Update troubleshooting.md 2016-12-16 15:52:19 -03:00
facundomedica
3f219a3f8e Solution to problem related to firewall
Resume: Ubuntu 16.04 seems to have the firewall enabled by default, which prohibits the access to apps.
Original issue: https://github.com/dokku/dokku/issues/2532
2016-12-16 15:17:36 -03:00
Jose Diaz-Gonzalez
fb5cc76585 Merge pull request #2531 from slava-vishnyakov/patch-1
Document rebuilding app after mounting storage
2016-12-15 10:50:07 -05:00
Slava Vishnyakov
c5117cb42f Update application-deployment.md 2016-12-15 18:48:22 +03:00
Slava Vishnyakov
4c86f88816 Update application-deployment.md 2016-12-15 18:47:58 +03:00
Slava Vishnyakov
f100a3ee4c Update application-deployment.md 2016-12-15 18:46:52 +03:00
Slava Vishnyakov
a53c61b4d8 Update persistent-storage.md 2016-12-15 18:46:16 +03:00
Slava Vishnyakov
88f37028a2 Update application-deployment.md 2016-12-15 17:15:38 +03:00
Slava Vishnyakov
42b1666fbe Update persistent-storage.md 2016-12-15 17:15:00 +03:00
Slava Vishnyakov
de9f495e2c storage needs deploy too 2016-12-15 14:22:52 +03:00
Slava Vishnyakov
cda2e3d048 Re-deploying/restarting 2016-12-15 14:19:41 +03:00
Mriyam Tamuli
49b01143a0 Correct apps:report to not exit if one app is not deployed 2016-12-11 13:26:07 +05:30
Jose Diaz-Gonzalez
991bb4d7f0 Merge pull request #2526 from dokku/mh-deploy-tasks-bug
actually fail deploy when app.json script fails
2016-12-09 17:45:15 -07:00
Michael Hobbs
c9a1a94cc1 actually fail deploy when app.json script fails 2016-12-09 15:10:07 -08:00
Jose Diaz-Gonzalez
819608b940 Merge pull request #2525 from OmarShehata/patch-1
Plugin-triggers typo: dokkku -> dokku
2016-12-09 02:47:44 -07:00
Omar Shehata
dda58a82f9 Plugin-triggers typo: dokkku -> dokku 2016-12-09 03:46:25 -06:00
Turtle Kalus
eae3d463df Fix for dokku/dokku#2474
`SSL_SERVER_NAME` should contain items found in the ssl certs
(E.G. CommonName and AltNames), but not already in the `NOSSL_SERVER_NAME`
list. That will avoid the dups in the `nginx.conf` and kill the warning
initially cited in dokku/dokku#2474
2016-12-07 23:43:30 +00:00
Jose Diaz-Gonzalez
8f816c3433 Merge pull request #2522 from stackforgehq/fix/2521
Docs: Fix #2521
2016-12-07 11:19:46 -07:00
Josh Manders
88f2dc7f60 Docs: Fix #2521 2016-12-06 21:04:37 -06:00
Jose Diaz-Gonzalez
da44c240d7 Use same check for dockerfile apps during a tar build 2016-12-04 15:20:09 -07:00
Jose Diaz-Gonzalez
cd2ae7ea92 Merge pull request #2517 from dokku/josegonzalez-patch-1
Update docs regarding if the ssh-keys plugin should be in use
2016-12-03 20:23:26 -07:00
Jose Diaz-Gonzalez
23c71c8d69 Update docs regarding if the ssh-keys plugin should be in use
[ci skip]
2016-12-03 20:23:19 -07:00
Omar Shehata
58d774a316 Added default for storage plugin to list 2016-12-03 19:38:48 +00:00
Omar Shehata
f2a4f61920 Added ssh-keys plugin default to list 2016-12-03 19:36:11 +00:00
Omar Shehata
1f47803324 Added certs plugin default to info 2016-12-03 19:27:49 +00:00
Omar Shehata
0062227c57 Revert "Added certs default help function"
This reverts commit d001fcc896.
2016-12-03 19:08:25 +00:00
Omar Shehata
010c89e810 Revert "Added ssh-keys default help function"
This reverts commit 74db5b9d3b.
2016-12-03 19:08:02 +00:00
Omar Shehata
0fed122a99 Revert "Added storage default help function"
This reverts commit 4294793452.
2016-12-03 19:07:34 +00:00
Jose Diaz-Gonzalez
21feb6874a Merge pull request #2511 from IlyaSemenov/default_site_docs
Clarify instructions for arranging default nginx site
2016-12-02 18:31:04 -07:00
Jose Diaz-Gonzalez
ec1b0b530f Merge pull request #2515 from sgloutnikov/dreamhost_doc_update
Update DreamHost Cloud install instructions.
2016-12-02 18:30:03 -07:00
Stefan Gloutnikov
71ee7e73a7 Update DreamHost Cloud install instructions. 2016-12-02 12:53:39 +02:00
Mriyam Tamuli
a574a6db1c Quotes unquoted variable 2016-12-02 00:00:10 +05:30
Ilya Semenov
d4b85999af Clarify instructions for arranging default nginx site 2016-12-01 13:21:57 +07:00
Mriyam Tamuli
45f8b8ccc8 Adds the report subcommand to the ps plugin 2016-12-01 11:39:18 +05:30
Jose Diaz-Gonzalez
f7479250c3 Merge pull request #2510 from IlyaSemenov/domains_set
Add domains:set and domains:set-global commands
2016-11-28 18:18:51 -07:00
Jose Diaz-Gonzalez
0f448748e8 Merge pull request #2495 from dokku/jg-2469-create-authorized-keys
Create the user's `authorized_keys` file if it does not exist
2016-11-28 13:53:49 -07:00
Jose Diaz-Gonzalez
d5a013a973 Merge pull request #2496 from dokku/jg-2435-nginx-http2-detection
Detect nginx versions that support HTTP/2 well
2016-11-28 13:12:49 -07:00
Ilya Semenov
6a9b3f6df2 Add domains:set and domains:set-global commands 2016-11-28 22:44:06 +07:00
Jose Diaz-Gonzalez
8398ff7a76 Merge pull request #2509 from kjschulz/master
Map dokku-community user in plugins.md
2016-11-27 21:36:05 -07:00
John Schulz
4070779d41 Merge branch 'master' into kjschulz-master 2016-11-27 23:34:36 -05:00
John Schulz
cce2a41db6 Forgot to map dokku-community github user.
[ci skip]
2016-11-27 23:34:08 -05:00
Jose Diaz-Gonzalez
15ee3b2e62 Merge pull request #2506 from simonkotwicz/minor-doc-fixes
fix some typos in deployment docs
2016-11-27 21:30:11 -07:00
Simon Kotwicz
86b5b71f28 fix some typos in deployment docs 2016-11-27 22:22:21 -05:00
Mriyam Tamuli
d04b0f7cca Use dokku helpers to output to stderr 2016-11-28 08:46:30 +05:30
Omar Shehata
4294793452 Added storage default help function 2016-11-28 03:06:30 +00:00
Jose Diaz-Gonzalez
8058252426 Merge pull request #2505 from kjschulz/master
Add Dokku Wordpress plugin to docs
2016-11-27 20:05:08 -07:00
Omar Shehata
810ba72879 Added nginx default help function 2016-11-28 03:03:30 +00:00
Omar Shehata
74db5b9d3b Added ssh-keys default help function 2016-11-28 02:59:32 +00:00
Omar Shehata
80e0bcc743 Merge branch 'master' of https://github.com/dokku/dokku 2016-11-28 02:56:37 +00:00
Jose Diaz-Gonzalez
6f91a34f74 Merge pull request #2507 from dokku/josegonzalez-patch-1
Update upgrade docs to point out sshcommand and plugn upgrading as well
2016-11-27 19:55:23 -07:00
Jose Diaz-Gonzalez
a1d3477345 docs: upgrade sshcommand and plugn as well
[ci skip]
2016-11-27 19:55:02 -07:00
Omar Shehata
d001fcc896 Added certs default help function 2016-11-28 02:53:46 +00:00
Mriyam Tamuli
8d60d071df Docs and help text for apps:report subcommand 2016-11-27 19:24:57 +05:30
John Schulz
f71611f5a1 Updated author name to dokku-community 2016-11-26 18:24:52 -05:00
John Schulz
0d54423618 Removing outdated dokku-wordpress-template plugin 2016-11-26 15:19:02 -05:00
John Schulz
fcba766a75 Add Dokku Wordpress plugin to docs. 2016-11-26 14:53:43 -05:00
Mriyam Tamuli
608cdcf3c1 Adds the report subcommand to the apps plugin 2016-11-26 22:37:54 +05:30
Jose Diaz-Gonzalez
b6f57b32b0 Merge pull request #2503 from mlebkowski/patch-2
update the dokku-acl link
2016-11-25 12:18:57 -07:00
Maciej Łebkowski
e4fee97d9b update the dokku-acl link 2016-11-25 16:03:44 +01:00
Jose Diaz-Gonzalez
0dfe92100f Update plugins.md
[ci skip]
2016-11-24 09:37:03 -07:00
Jose Diaz-Gonzalez
7a2c1ba3ec Merge pull request #2497 from stackforgehq/docs/change-features-heading
make features heading more clear [skip ci]
2016-11-24 09:36:27 -07:00
Josh Manders
72aa611d2a make features heading more clear [skip ci] 2016-11-22 18:35:26 -06:00
Jose Diaz-Gonzalez
7cfbdf34ec Merge pull request #2485 from znz/fix-domains-add-global
Fix bug when VHOST without newline
2016-11-21 22:10:10 -07:00
Jose Diaz-Gonzalez
334eabafb5 Merge pull request #2489 from stackforgehq/feature/plugin-uninstall-trigger
add plugin uninstall trigger
2016-11-21 22:09:36 -07:00
Jose Diaz-Gonzalez
50b1c9d5c6 Detect nginx versions that support HTTP/2 well
Certain versions of nginx have bugs that prevent HTTP/2 from properly responding to all clients, thus causing applications to be unavailable.

Closes #2435
2016-11-21 19:33:50 -07:00
Jose Diaz-Gonzalez
4e25639de4 Create the user's authorized_keys file if it does not exist
Closes #2469
2016-11-21 19:08:33 -07:00
Josh Manders
63817fc6f3 add warning 2016-11-20 17:49:02 -06:00
Jose Diaz-Gonzalez
970647b4ae Merge pull request #2378 from knjcode/skip_finish_process_when_checks_disabled
Skip container finish processing when zero downtime is disabled
2016-11-20 16:46:14 -07:00
Jose Diaz-Gonzalez
ef113a475c Merge pull request #2484 from nahtnam/patch-1
Update troubleshooting.md
2016-11-20 16:19:43 -07:00
Jose Diaz-Gonzalez
9abe7e2b75 Merge pull request #2492 from dokku/jg-2481-proxy-command
Fix iteration on all apps for `dokku proxy` command
2016-11-20 16:19:10 -07:00
Jose Diaz-Gonzalez
f5ea960de3 Merge pull request #2493 from dokku/minor-doc-fixes
Clarify checks documentation
2016-11-20 16:15:33 -07:00
Jose Diaz-Gonzalez
8d6f32e1e3 docs: reword zero downtime docs to make them flow better
[ci skip]
2016-11-20 16:12:26 -07:00
Jose Diaz-Gonzalez
d7bc6976ed docs: Mention that ports are ignored in CHECKS doc
Closes #2487

[ci skip]
2016-11-20 16:07:05 -07:00
Jose Diaz-Gonzalez
f6c072fa2b docs: remove extra output 2016-11-20 15:38:01 -07:00
Jose Diaz-Gonzalez
95239a5731 docs: remove unnecessary example 2016-11-20 15:37:21 -07:00
Jose Diaz-Gonzalez
9951a16ccc docs: standardize on node-js-app as the app name
We’ll probably want to update this to whatever the hip language of the day is, but for now, having the same reference everywhere works.
2016-11-20 15:37:05 -07:00
Jose Diaz-Gonzalez
7ac47d2e61 Fix iteration on all apps for dokku proxy command
Closes #2481
2016-11-20 15:15:40 -07:00
Josh Manders
d4475e582d pass plugin to uninstall 2016-11-17 16:06:57 -06:00
Josh Manders
c4c7886037 add plugin uninstall trigger 2016-11-17 12:55:08 -06:00
Jose Diaz-Gonzalez
c98ab6684f Merge pull request #2488 from stackforgehq/docs/bump-font-size
Docs: Bump font size
2016-11-15 12:33:48 -05:00
Josh Manders
434672a8dd bump font size 2016-11-15 11:17:12 -06:00
Jose Diaz-Gonzalez
f6a0c3d5f8 Merge pull request #2486 from OmarShehata/patch-1
Fixing typo & broken link in docs
2016-11-15 08:24:04 -07:00
Omar Shehata
729677c41a Fixing broken link
The old link seems to not exist anymore. Not sure if this is what's intended to be linked to, but seems like the closest thing.
2016-11-15 09:12:38 -06:00
Omar Shehata
6c10fd4c39 Fixing typo
Changed from "Move information" to  "More information"
2016-11-15 09:09:11 -06:00
Kazuhiro NISHIYAMA
ccc44b0c16 Fix bug when VHOST without newline 2016-11-14 22:21:41 +09:00
nahtnam
faaf81d6e9 Update troubleshooting.md
Add `killed` symptom to troubleshooting guide.
2016-11-12 22:05:05 -08:00
Jose Diaz-Gonzalez
d7c8e47e78 Merge pull request #2464 from sseemayer/master
Remove duplicate SSL hostnames
2016-11-08 10:53:35 -07:00
Jose Diaz-Gonzalez
39ced08b12 Merge pull request #2452 from mbtamuli/resolve_duplicate_ssh_key
Solves SSH Key problem when admin user already exists
2016-11-06 14:48:00 -07:00
Jose Diaz-Gonzalez
e62f35f207 Merge pull request #2477 from ebeigarts/dokku-redeploy
Fix dokku-redeploy systemd script to start only after docker
2016-10-31 01:53:56 -06:00
Edgars Beigarts
14833e22cb Fix dokku-redeploy systemd script to start only after docker
According to https://docs.docker.com/engine/admin/host_integration/#/systemd
it should use After=docker.service and it works at least on CentOS 7.
2016-10-31 09:49:49 +02:00
Jose Diaz-Gonzalez
9c5783215f Merge pull request #2406 from dokku/2252-trigger-post-create
Use apps_create method when renaming an application. Closes #2252
2016-10-29 21:16:55 -06:00
Jose Diaz-Gonzalez
180582df2e Merge pull request #2407 from dokku/2367-core-post-deploy
Move core post-deploy triggers to core-post-deploy
2016-10-29 21:16:45 -06:00
Jose Diaz-Gonzalez
255a533708 Merge pull request #2470 from fteychene/patch-1
Add new community plugin : Build hook
2016-10-29 21:16:28 -06:00
Jose Diaz-Gonzalez
2d70a10a14 Merge pull request #2465 from polettix/2446-add-ssh-keys
Patch GH #2446 "Adding a file with two ssh-key..."
2016-10-29 21:16:02 -06:00
Jose Diaz-Gonzalez
58e2391cdb Merge pull request #2454 from onbjerg/patch-1
Return exit 1 in config:get if no ENV file exists (#2447)
2016-10-29 21:14:33 -06:00
Jose Diaz-Gonzalez
ab51c3b4b4 Merge pull request #2419 from ebeigarts/centos
Support for CentOS 7
2016-10-29 21:14:14 -06:00
Pranav Goel
2e1d8def40 Update SPONSORS.md 2016-10-29 14:30:42 +05:30
Pranav Goel
efa88d0087 Update README.md 2016-10-29 14:29:28 +05:30
Jose Diaz-Gonzalez
a7e4b7e3c6 Merge pull request #2472 from mainto/patch-1
Update plugins.md
2016-10-27 08:12:20 -06:00
Deokhyun Ko
25e5db5a5b Update plugins.md
Added "Access" plugin
2016-10-27 05:39:43 -06:00
Francois Teychene
aca8d0c682 Add new community plugin
Add new community plugin build hook.
This plugin provide a way for application to define scripts in their codebase to be executed before the project build (Dockerfile or Herokuish).

Use case :
A Java application with only an ADD of the generated fat jar in the Dockerfile.
The plugin allow the user to define a script to run the compilation before the docker build execution.
2016-10-20 15:04:16 +02:00
Edgars Beigarts
65c2cffc6a Fix sshcommand on CentOS with sudo
CentOS 7 resets path with $ sudo by default

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin
2016-10-19 17:25:54 +03:00
Flavio Poletti
a2bacd8096 Patch GH #2446 "Adding a file with two ssh-key..."
This is a proposed change for addressing GH #2446 "Adding a file with
two ssh-keys can result in an error" (see
https://github.com/dokku/dokku/issues/2446).

The following checks are performed:

- validity of key contents when read from a file
- key contents only contains one single line/key
- authorized_keys file is ultimately valid

The last test is an extension over the previous implementation in that
all lines in the file are checked.

The commit also includes extensions to the relevant test file to
excercise the new checks. It also takes care to save and then restore
the authorized_keys file.
2016-10-16 16:32:16 +02:00
Stefan Seemayer
030405b93d Remove duplicate SSL hostnames
Ref dokku/dokku-letsencrypt#76

Certificates provided by Let's Encrypt can have the domain provided in
the Subject Name field listed again in the Subject Alt Name fields,
leading to the same domain getting listed twice by get_ssl_hostnames()
that in turn leads to a duplicate server_name field in the nginx
configuration.

This patch adds a sort -u to ensure that every SSL hostname will only be
listed once.
2016-10-16 15:58:08 +02:00
Mriyam Tamuli
10bb4900c0 Correct indentation 2016-10-13 19:13:29 +05:30
Mriyam Tamuli
48b3dffecb Proper usernames 2016-10-13 15:55:59 +05:30
Mriyam Tamuli
056ff73c28 Proper usernames 2016-10-13 05:18:45 +05:30
Jose Diaz-Gonzalez
3200c169f4 Expand the digitalocean documentation a bit
[ci skip]
2016-10-09 16:36:57 -06:00
Jose Diaz-Gonzalez
4f7e9d4d58 Clarify installation documentation.
[ci skip]
2016-10-09 16:34:24 -06:00
Oliver
d6443d7560 Return exit 1 in config:get if no ENV file exists 2016-10-08 19:15:39 +02:00
Mriyam Tamuli
35f1161453 Solves SSH Key problem when admin user already exists 2016-10-08 14:53:53 +05:30
Jose Diaz-Gonzalez
95dc3ca20e Merge pull request #2451 from mbtamuli/document_logs_plugin
Document the logs plugin
2016-10-07 18:42:05 -04:00
Mriyam Tamuli
28c29da166 Document the logs plugin 2016-10-08 04:05:51 +05:30
Jose Diaz-Gonzalez
c0d3b8c9a9 Merge pull request #2437 from vishnubhagwan/patch-1
Update installation.md
2016-09-29 10:29:23 -07:00
Michael Hobbs
1834ec8087 Merge pull request #2442 from znz/fix-is_tag_force_available
Fix `is_tag_force_available` bug when docker major version up
2016-09-29 07:55:50 -07:00
Kazuhiro NISHIYAMA
22c9441ddb Fix is_tag_force_available bug when docker major version up 2016-09-29 21:27:47 +09:00
vishnubhagwan
9018fee0e2 Update installation.md 2016-09-29 14:53:20 +05:30
vishnubhagwan
5ec1dea555 Update installation.md
Yep .... done as you said..
2016-09-29 14:31:21 +05:30
vishnubhagwan
6d002425bc Update installation.md
Removed bold sentence and blockquote remains
2016-09-29 00:52:16 +05:30
vishnubhagwan
93b47cb85f Update installation.md
Added blockquotes..
2016-09-29 00:33:29 +05:30
vishnubhagwan
b4cbaae757 Update installation.md 2016-09-28 23:53:57 +05:30
Jose Diaz-Gonzalez
11a945c86e Merge pull request #2433 from alexgleason/patch-2
Add robots.txt plugin to community docs
2016-09-27 12:59:31 -06:00
Alex Gleason
90f16945f1 Update plugins.md 2016-09-27 14:43:43 -04:00
Alex Gleason
f40e010ab0 Add robots.txt plugin to community docs 2016-09-26 17:18:50 -04:00
Edgars Beigarts
b771f0f809 Note the version when rpm will be added 2016-09-26 01:55:21 +03:00
Edgars Beigarts
f6488147bd Mention CentOS 7 in rpm docs 2016-09-26 01:55:21 +03:00
Edgars Beigarts
542f4dd430 Add RPM installation docs 2016-09-26 01:55:20 +03:00
Edgars Beigarts
288d72327d Add package_cloud instructions to release-process.md 2016-09-26 01:55:20 +03:00
Edgars Beigarts
7bf22df7c3 Use /etc/os-release that is more standartized 2016-09-26 01:55:20 +03:00
Edgars Beigarts
537906c504 Support CentOS in bootstrap.sh 2016-09-26 01:55:20 +03:00
Edgars Beigarts
dc879e2c4a Improve posinstall scripts with spellcheck 2016-09-26 01:55:20 +03:00
Edgars Beigarts
58f28c1aea Fix make lint 2016-09-26 01:55:20 +03:00
Edgars Beigarts
4e1a93224e No need to migrate old plugins on centos 2016-09-26 01:55:20 +03:00
Edgars Beigarts
0004dd53e1 Initial support for CentOS 7 2016-09-26 01:55:20 +03:00
Jose Diaz-Gonzalez
cf901c9bcc Merge pull request #2432 from dokku/josegonzalez-patch-1
Clarify DOKKU_SCALE docs
2016-09-25 12:27:55 -06:00
Jose Diaz-Gonzalez
b5cf371a55 Clarify DOKKU_SCALE docs
[ci skip]
2016-09-25 12:27:47 -06:00
Jose Diaz-Gonzalez
c4622a8255 Release 0.7.2 2016-09-25 02:15:30 -06:00
Jose Diaz-Gonzalez
c31133687c Fix plugin link
[ci skip]
2016-09-25 01:59:39 -06:00
Jose Diaz-Gonzalez
9be1f21e5f Update gitignore 2016-09-25 01:57:33 -06:00
Jose Diaz-Gonzalez
1b3b7175cc Merge pull request #2426 from dokku/2425_mh-tag-force-option
add force option on docker tag when available. closes #2425
2016-09-25 01:55:43 -06:00
Jose Diaz-Gonzalez
e739138ab5 Merge pull request #2431 from dokku/josegonzalez-patch-1
Add missing redirect for deployment/deployment-tasks
2016-09-25 01:39:54 -06:00
Jose Diaz-Gonzalez
f00930224e Add missing redirect for deployment/deployment-tasks
Closes #2430

[ci skip]
2016-09-25 01:39:36 -06:00
Jose Diaz-Gonzalez
16372845a8 Merge pull request #2429 from enisozgen/patch-1
Patch 1
2016-09-24 03:25:09 -06:00
Enis Özgen
02cde31efb Deleted duplicate line
line 101
2016-09-24 12:06:10 +03:00
Enis Özgen
d6205bff14 fix typo initialised to initialized 2016-09-24 11:56:46 +03:00
Jose Diaz-Gonzalez
aacfcbcb3e Merge pull request #2410 from IlyaSemenov/domains-help-tests
Clarify domains help, improve domains unit tests
2016-09-22 12:41:16 -06:00
Jose Diaz-Gonzalez
990431be3d Merge pull request #2416 from njaxx/patch-1
Adds a mention of manually adding nginx entry
2016-09-22 12:40:44 -06:00
Michael Hobbs
ef2bbc60df add force option on docker tag when available. closes #2425 2016-09-22 09:33:20 -07:00
Jose Diaz-Gonzalez
e5eb99276f Merge pull request #2423 from dokku/mh-update-herokuish
update to herokuish 0.3.19
2016-09-20 21:41:07 -06:00
Michael Hobbs
11f618d30c [ci skip] update to herokuish 0.3.19 2016-09-20 10:23:29 -07:00
Jose Diaz-Gonzalez
5b4b608a5d Merge pull request #2420 from c990802/patch-1
Documentation: Update command example  for consistency
2016-09-19 09:36:48 -06:00
Isaac Mayolas
1106212f18 Update command for consistency
Throughout the docs the app named `node-js-app` is used. An alternative app name, named `api` was used in this example. I propose an update for consistency.
2016-09-19 14:29:51 +02:00
Michael Hobbs
eb8afc4f34 Merge pull request #2418 from dokku/mh-plugn-0.2.2
use plugn 0.2.2
2016-09-16 11:00:08 -07:00
Michael Hobbs
9fdfb07c9b use plugn 0.2.2 2016-09-16 10:51:45 -07:00
Jose Diaz-Gonzalez
5d4a9f9d6d Merge pull request #2409 from dokku/2374-document-ps-rebuild-caveats
Document caveats around ps:rebuild and tags/tar deployed applications…
2016-09-16 09:07:09 -06:00
Jose Diaz-Gonzalez
6f68943c94 Merge pull request #2417 from PWAckerman/DYNO_environment_variable
Fixed double quotations in 'plugins/common/functions' dokku_deploy_cm…
2016-09-16 09:06:53 -06:00
PWAckerman
da2d00cf46 Fixed double quotations in 'plugins/common/functions' dokku_deploy_cmdwhere DYNO environment variable is set 2016-09-15 17:11:20 -04:00
njaxx
d26f8941bb Adds a mention of manually adding nginx entry
I was working on a Dockerfile deploy that was setup to listen on port 8844.  I wanted to add ssl and couldn't figure out why adding the ssl cert didn't making things 'just work'.  Since the `proxy:ports-add` step I discuss in this commit is run both `under the hood` and `sometimes`, I thought it might be worth issuing a PR for.
2016-09-14 15:18:54 -05:00
Ilya Semenov
9265bd8e37 Unified help texts and descriptions for domains add and remove commands 2016-09-08 13:21:30 +07:00
Jose Diaz-Gonzalez
d654c75a6b Add missing space
[ci skip]
2016-09-07 10:29:23 -04:00
Ilya Semenov
45f05615c4 Clarify domains help, improve domains unit tests 2016-09-07 20:28:32 +07:00
Jose Diaz-Gonzalez
7ccfdabc48 Document caveats around ps:rebuild and tags/tar deployed applications. Closes #2374
The tags and tar plugins do not necessarily build from source, and running `ps:rebuild` can have some unexpected output in certain cases. Rather than try to handle that complexity - it's a lot - documenting the edge cases is the most appropriate way forward.
2016-09-06 20:26:53 -04:00
Jose Diaz-Gonzalez
c3f39fe512 Merge pull request #2408 from jcscottiii/patch-1
Use $DOKKU_VHOST_ENABLE instead of $VHOST_ENABLE
2016-09-05 17:08:30 -04:00
James C Scott III
07786f5a15 Use $DOKKU_VHOST_ENABLE instead of $VHOST_ENABLE
Given a user wants to manually override the `vhost_enable` debian config, a user has to specify both $DOKKU_VHOST_ENABLE and $VHOST_ENABLE. This patch makes it rely on $DOKKU_VHOST_ENABLE like the others which use the `$DOKKU_` prefix
2016-09-05 14:54:52 -04:00
Jose Diaz-Gonzalez
d433614f17 Move deployment tasks to post-deploy hook
As deployment tasks can fail due to non-dokku related issues, moving them to post-deploy will ensure that dokku does not accidentally orphan applications.

Closes #2367
2016-09-05 00:15:39 -04:00
Jose Diaz-Gonzalez
2fc3a09b41 Move post-deploy trigger to core-post-deploy. Refs #2367
This avoids issues where community plugins may break core commands because of issues in the command output.
2016-09-05 00:04:06 -04:00
Jose Diaz-Gonzalez
67705afe3c Use apps_create method when renaming an application. Closes #2252
Since they are separate resources, triggering the normal app creation flow makes the most sense.

We still remove the cache directory because we want the correct cache permissions for the new application.
2016-09-04 19:26:00 -04:00
Jose Diaz-Gonzalez
0841888b67 Merge pull request #2405 from dokku/doc-cleanup
Doc cleanup
2016-09-03 15:53:14 -04:00
Jose Diaz-Gonzalez
344162da5e Clarify that the key_file is a path
[ci skip]
2016-09-03 15:51:47 -04:00
Jose Diaz-Gonzalez
e6b9283a6a Update attribution for plugins
[ci skip]
2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
5002f46bb8 Change ownership of plugins from heichblatt to josegonzalez
[ci skip]
2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
f7c00d06ca Add newsletter link to template. Closes #2373
[ci skip]
2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
7ac284bdb6 Document all commands under the ps plugin 2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
54708637cd Expand ssh-keys documentation to further explain command usage 2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
e3df81f020 Fix section headers
[ci skip]
2016-09-03 15:51:35 -04:00
Jose Diaz-Gonzalez
f26b3f1966 Use correct casing for Dokku name
lowercase should only be used to refer to the binary, not the project
2016-09-03 15:51:14 -04:00
Jose Diaz-Gonzalez
7cfeb090ed Merge pull request #2404 from bascht/patch-1
Fix docker build syntax
2016-09-03 13:04:20 -04:00
Bascht
6171cc881b Fix docker build syntax
Docker build expects both tag name and build directory as arguments.
2016-09-03 17:52:05 +02:00
Michael Hobbs
befb5a0dd9 [ci skip] docs: update arguments for check-deploy 2016-08-31 14:21:28 -07:00
knjcode
8200348f3c Skip container finish processing when zero downtime is disabled 2016-08-29 20:26:49 +09:00
Jose Diaz-Gonzalez
c731480360 Mark graphite plugin as beta
[ci skip]
2016-08-27 18:38:43 -04:00
Jose Diaz-Gonzalez
be8853e01f Merge pull request #2398 from dokku/josegonzalez-patch-1
Update compatibility of "other plugins"
2016-08-27 18:14:42 -04:00
Jose Diaz-Gonzalez
1243e50c6d Update compatibility of "other plugins"
Also deprecate/mark some as unmaintained

[ci skip]
2016-08-27 18:14:33 -04:00
Jose Diaz-Gonzalez
3acf446f2b Merge pull request #2397 from dokku/josegonzalez-patch-1
Update compatibility of dokku feature plugin
2016-08-27 18:02:17 -04:00
Jose Diaz-Gonzalez
d498177cdc Update compatibility of dokku feature plugin
Also move other plugins to deprecated/unmaintained sections

[ci skip]
2016-08-27 18:01:17 -04:00
Jose Diaz-Gonzalez
e642a4eb85 Move note down
[ci skip]
2016-08-27 17:53:25 -04:00
Jose Diaz-Gonzalez
d60a58ffdd Merge pull request #2396 from dokku/josegonzalez-patch-1
Deprecate multi-buildpack plugin
2016-08-27 17:52:14 -04:00
Jose Diaz-Gonzalez
3bbb3f22a8 Deprecate multi-buildpack plugin
This is handled by the core via herokuish.

[ci skip]
2016-08-27 17:52:04 -04:00
Jose Diaz-Gonzalez
3a1335dd2d Merge pull request #2395 from dokku/josegonzalez-patch-1
Deprecate sekjun9878/redis
2016-08-27 17:47:58 -04:00
Jose Diaz-Gonzalez
4bdbb54573 Deprecate sekjun9878/redis
[ci skip]
2016-08-27 17:47:50 -04:00
Jose Diaz-Gonzalez
45d9d7f951 Merge pull request #2394 from dokku/josegonzalez-patch-1
Deprecate old graphite plugin and add official graphite plugin
2016-08-27 17:38:26 -04:00
Jose Diaz-Gonzalez
9d3f9f55f7 Deprecate old graphite plugin and add official graphite plugin
[ci skip]
2016-08-27 17:38:16 -04:00
Jose Diaz-Gonzalez
e8fc4dc2e3 Update plugins.md 2016-08-27 17:34:41 -04:00
Jose Diaz-Gonzalez
5fe1b5b34b Merge pull request #2393 from dokku/jg-deprecate-process-managers
Deprecate all process manager plugins
2016-08-27 17:31:44 -04:00
Jose Diaz-Gonzalez
03c2218b88 Deprecate all process manager plugins
All process manager functionality has been merged into the Dokku core:

- v0.3.14: `ps` plugin to manage process scaling
- v0.7.0: restart-policy handling by the ps plugin

Users are encouraged to stop installing old process managers and use the core functionality.

[ci skip]
2016-08-27 17:31:31 -04:00
Jose Diaz-Gonzalez
35dca5570f Merge pull request #2392 from swg/patch-1
Use python2 in functions/get_json_*
2016-08-27 00:00:35 -04:00
swg
8f9c003a9f Use python2 in functions/get_json_*
On hosts where python3 is the system default python env, Dokku will silently fail to return the values of json keys.
2016-08-26 22:54:04 -04:00
Jose Diaz-Gonzalez
a00a9219da Release 0.7.1 2016-08-26 21:24:43 -04:00
Jose Diaz-Gonzalez
87d1af753a Merge pull request #2391 from dokku/2343-upgrade-sshcommand
Upgrade sshcommand to improve ssh-keys:list output
2016-08-26 21:04:57 -04:00
Jose Diaz-Gonzalez
3ef5c993af Upgrade sshcommand to improve ssh-keys:list output
Closes #2343
2016-08-26 19:45:13 -04:00
Jose Diaz-Gonzalez
14aad665b3 Merge pull request #2390 from dokku/stop-dokku-installer
Actually stop the dokku-installer service
2016-08-26 18:48:38 -04:00
Jose Diaz-Gonzalez
8b90a2c453 Actually stop the dokku-installer service
[ci skip]
2016-08-26 18:48:12 -04:00
Jose Diaz-Gonzalez
c57207447e Merge pull request #2387 from dokku/2379-find-workaround
Use pushd/popd to handle find warnings
2016-08-26 17:50:33 -04:00
Jose Diaz-Gonzalez
992301e9eb Merge pull request #2389 from dokku/2355-plugin-docs
Add plugin management documentation
2016-08-26 17:07:22 -04:00
Jose Diaz-Gonzalez
a506fd5b20 Add plugin management documentation
Closes #2355

[ci skip]
2016-08-26 17:06:17 -04:00
Michael Hobbs
a9358eaed7 hide stderr when using find 2016-08-26 13:46:05 -07:00
Jose Diaz-Gonzalez
eb4e3485fe Merge pull request #2388 from dokku/2384-proxy-scheme-docs
Add documentation for proxy ports scheme handling
2016-08-26 15:29:50 -04:00
Jose Diaz-Gonzalez
ab8063e88a Add documentation for proxy ports scheme handling
Closes #2384

[ci skip]
2016-08-26 15:29:17 -04:00
Michael Hobbs
c3f90add8c Merge pull request #2385 from dokku/mh-app-user
actually merge dokku-app-user into core
2016-08-26 12:20:39 -07:00
Jose Diaz-Gonzalez
600d872b76 Merge pull request #2358 from dokku/2339-jg-ssl-protocols
Guard against poodle vulnerability by default
2016-08-26 14:25:00 -04:00
Jose Diaz-Gonzalez
5a084d899c Fix link
[ci skip]
2016-08-26 14:19:55 -04:00
Jose Diaz-Gonzalez
e0e9c3f72c Merge pull request #2360 from xadh00m/fix_domain_validation
Allow hyphen in TLD
2016-08-26 14:17:17 -04:00
Jose Diaz-Gonzalez
a27cd84905 Merge pull request #2386 from dokku/0-7-migration-guide
Add a migration guide for 0.7.0
2016-08-26 14:16:51 -04:00
Michael Hobbs
b644e04038 default to herokuishuser and guard on DOKKU_APP_TYPE in app user pre-deploy trigger 2016-08-26 11:14:11 -07:00
Michael Hobbs
0e779e98c0 add docs for app user and persistent storage 2016-08-26 11:13:21 -07:00
Jose Diaz-Gonzalez
f46650d289 Add a migration guide for 0.7.0
[ci skip]
2016-08-26 14:11:56 -04:00
Michael Hobbs
204031306f actually merge dokku-app-user into core 2016-08-26 10:50:01 -07:00
Michael Hobbs
6e4ad6311b Merge pull request #2382 from alexgleason/patch-1
Fix typo "exampple" to "example"
2016-08-25 17:57:07 -07:00
Alex Gleason
36ed8e1fa8 Fix typo "exampple" to "example" 2016-08-25 18:25:36 -04:00
Michael Hobbs
b861f98868 Merge pull request #2381 from dokku/mh-fastfail-tests
fail rest of bats file on first test failure
2016-08-25 10:34:40 -07:00
Michael Hobbs
e23e491967 fail rest of bats file on first test failure 2016-08-25 09:27:06 -07:00
Jose Diaz-Gonzalez
4e4c8cebc4 Merge pull request #2377 from ebeigarts/fix-checks-with-proxy
Do not use http_proxy env variables for CHECKS
2016-08-19 10:53:52 -04:00
Edgars Beigarts
5fe9e19865 Do not use http_proxy env variables for CHECKS 2016-08-19 15:07:31 +03:00
Michael Hobbs
9923199760 Merge pull request #2371 from dokku/mh-update-plugin-repos
moved some repos to michaelshobbs
2016-08-15 12:43:30 -07:00
Michael Hobbs
776f1e4e58 [ci skip] moved some repos to michaelshobbs 2016-08-15 12:41:01 -07:00
Michael Hobbs
8dc5617104 [ci skip] for melvin at dokku.net
Thanks Melvin!
2016-08-15 10:13:50 -07:00
Justin Clark
c42cde0fb1 Merge pull request #2369 from dokku/u2mejc-issue2366
Fix ssh-keys:add permission error
2016-08-12 20:23:23 -07:00
Justin Clark
98ec2979ea Fix ssh-keys:add permission error 2016-08-12 16:01:05 -07:00
Mirko Geissler
36ee71cb0a Put hyphen at the end of group expression 2016-08-12 09:43:15 +02:00
Mirko Geissler
6f9662af50 Allow multiple hyphens in domain names 2016-08-11 13:08:20 +02:00
Mirko Geissler
83a8cd2f53 Allow hyphen in last host path part 2016-08-09 10:50:35 +02:00
Jose Diaz-Gonzalez
e3463613d4 Guard against poodle vulnerability by default
Closes #2339
2016-08-07 21:11:13 -04:00
Jose Diaz-Gonzalez
3651e56ca5 Merge pull request #2354 from dokku/josegonzalez-patch-2
Dockerfile deploys do not support mounted volumes
2016-08-06 15:44:25 -04:00
Jose Diaz-Gonzalez
434951028d Dockerfile deploys do not support mounted volumes
[ci skip]
2016-08-06 15:44:18 -04:00
Jose Diaz-Gonzalez
45e1a20d01 Merge pull request #2345 from johnfraney/patch-1
Update README.md
2016-08-04 21:08:21 -04:00
Jose Diaz-Gonzalez
59f9b50112 Merge pull request #2353 from miguelcobain/patch-2
Update plugin-creation.md
2016-08-04 12:28:22 -04:00
Jose Diaz-Gonzalez
a1e166065f Merge pull request #2352 from miguelcobain/patch-1
Update plugin-triggers.md
2016-08-04 12:28:10 -04:00
Miguel Andrade
89d1997d63 Update plugin-creation.md
Add a reminder to set the correct permissions for executable files.
2016-08-04 16:19:20 +01:00
Miguel Andrade
f3edf7dcd5 Update plugin-triggers.md
Fix typos
2016-08-04 16:17:28 +01:00
Jose Diaz-Gonzalez
03fb58b961 Merge pull request #2348 from dokku/josegonzalez-patch-2
Correct the version in use for ssh-keys
2016-08-02 14:02:36 -04:00
Jose Diaz-Gonzalez
97a55cd063 Correct the version in use for ssh-keys
[ci skip]
2016-08-02 13:50:03 -04:00
John Franey
65b9c2103f Update README.md
Add other officially supported distros (from https://github.com/dokku/dokku/issues/2263#issuecomment-231794588)
2016-08-02 11:05:11 -03:00
Jose Diaz-Gonzalez
3dfe6f67eb Merge pull request #2337 from dokku/josegonzalez-patch-1
Update deprecated plugins list
2016-07-31 15:49:09 -04:00
Jose Diaz-Gonzalez
9454971b1d Update deprecated plugins list
[ci skip]
2016-07-31 15:48:58 -04:00
Jose Diaz-Gonzalez
8e3710f69c Update description
[ci skip]
2016-07-31 15:11:03 -04:00
Jose Diaz-Gonzalez
fc0ab27332 Update package description to match what we promote
[ci skip]
2016-07-31 15:09:45 -04:00
275 changed files with 7457 additions and 1401 deletions

8
.dockerignore Normal file
View File

@@ -0,0 +1,8 @@
*Dockerfile
.dockerignore
.git
.vagrant
contrib
docs
tests
!contrib/dokku-installer.py

View File

@@ -14,3 +14,8 @@ indent_size = 4
insert_final_newline = true
indent_style = tab
indent_size = 4
[*.go]
insert_final_newline = true
indent_style = space
indent_size = 4

8
.gitignore vendored
View File

@@ -1,6 +1,8 @@
.vagrant
*.deb
*.rpm
.DS_Store
.ruby-version
.vagrant
data/
stack.tgz
tmp
*.deb
.ruby-version

View File

@@ -1,6 +1,6 @@
# How to contribute
The Dokku project would love to welcome your contributions. There are
The Dokku project would love to welcome your contributions. There are
several ways to help out:
* Create an [issue](https://github.com/dokku/dokku/issues) on GitHub, if you
@@ -11,7 +11,7 @@ several ways to help out:
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
* Blog about different ways you are using dokku
* [Sponsor](https://opencollective.com/dokku#support) the Dokku project financially
* [Sponsor](https://opencollective.com/dokku#support) the Dokku project financially
There are a few guidelines that we need contributors to follow so that we have
a chance of keeping on top of things.
@@ -44,10 +44,10 @@ A great way to contribute to the project is to send a detailed report when you
encounter an issue. We always appreciate a well-written, thorough bug report,
and will thank you for it!
Sometimes dokku is missing a feature you need. In some cases, those features can
Sometimes Dokku is missing a feature you need. In some cases, those features can
be found in pre-existing [plugins](http://dokku.viewdocs.io/dokku/plugins/),
and we encourage our users to create and contribute such packages. From time to
time, we will also pull plugins into the dokku core when the task they solve is
time, we will also pull plugins into the Dokku core when the task they solve is
a common one for our users.
Check that [our issue database](https://github.com/dokku/dokku/issues)
@@ -55,7 +55,7 @@ doesn't already include that problem or suggestion before submitting an issue.
If you find a match, add a quick "+1" or "I have this problem too." Doing this
helps prioritize the most common problems and requests.
When reporting issues, please include your host OS (Ubuntu 14.04, Fedora 19,
When reporting issues, please include your host OS (Ubuntu 14.04, CentOS 7,
etc). Please include:
* The output of `uname -a`.
@@ -74,7 +74,7 @@ Our Issue Report Template is available [here](https://github.com/dokku/dokku/blo
## Contributing
Before you contribute to the dokku project, there are a few things that you'll
Before you contribute to the Dokku project, there are a few things that you'll
need to do
* Make sure you have a [GitHub account](https://github.com/signup/free).
@@ -122,7 +122,7 @@ All changes should be be based on the latest master commit.
### When will my change be merged?
Be patient! The dokku maintainers will review all pull requests and comment as
Be patient! The Dokku maintainers will review all pull requests and comment as
quickly as possible. There may be some back and forth while the details of your
pull request are discussed.

View File

@@ -1,5 +1,227 @@
# History
## 0.9.0
### Bug Fixes
- #2691: @josegonzalez Fix package building when golang binaries are available
- #2671: @znz Fix variable name
- #2672: @callahad Fix logrotate on Debian
- #2666: @josegonzalez Use correct flag for build arguments when installing herokuish
- #2664: @pvalentim Fix remote name when using --remote option with apps:create
### New Features
- #2689: @mbreit Add dokku-monit to community plugin list
- #2683: @josegonzalez Ensure we have an example for adding keys as another user
- #2682: @josegonzalez Clarify supported stanzas in app.json
- #2679: @callahad Remove unnecessary Linode-specific instructions
- #2670: @znz Remove duplicated `(i.e. `
### Documentation
- #2685: @josegonzalez Pass shellcheck on os x
- #2677: @callahad Prefer HTTP2 to SPDY in nginx-vhosts
- #2673: @michaelshobbs Update to herokuish 0.3.27
- #2674: @michaelshobbs Update sshcommand to 0.7.0
- #2654: @ebeigarts Enable nginx and docker on system startup when using bootstrap.sh on CentOS
- #2546: @michaelshobbs Convert repo plugin to golang
## 0.8.2
### New Features
- #2660: @josegonzalez allow installation of plugins via tarball
- #2661: @josegonzalez Do not run builds in quiet mode
## 0.8.1
### Bug Fixes
- #2519: @tkalus Further guard against duplicate ssl server names
- #2554: @josegonzalez Add ssl ports when generating a self-signed certificate
- #2555: @josegonzalez Skip failing applications when running ps:restore on boot
- #2576: @znz Remove unused variable
- #2592: @josegonzalez always set a default ssl port for apps with ssl enabled
- #2612: @josegonzalez Ensure VHOST files exist before executing commands against them
- #2647: @josegonzalez Properly escape post-install variables
- #2650: @josegonzalez Fix help output for nginx and ssh-keys
- #2656: @josegonzalez ensure we can call the report subcommand without an app while specifying flags
- d79a79: @josegonzalez bail early when checking ps output for an undeployed app
### New Features
- #2500: @josegonzalez Suppress output unless the `git submodule update` call fails
- #2504: @mbtamuli Implement apps:report and storage:report
- #2508: @OmarShehata Add default functions for all commands
- #2557: @josegonzalez Dokku cli improvements
- #2573: @ebeigarts Recommend parallel package for faster ps:restore
- #2578: @josegonzalez Require specific versions for dokku-maintained packages
- #2583: @josegonzalez Implement apps:clone subcommand
- #2586: @bevand10 Add http-proxy support for deb-herokuish installs
- #2587: @josegonzalez Allow specifying the deploy branch via DOKKU_DEPLOY_BRANCH
- #2594: @michaelshobbs Upgrade to herokuish v0.3.25
- #2615: @josegonzalez Implement certs:report
- #2616: @josegonzalez Replace apps:default subcommand with apps:list
- #2617: @josegonzalez Implement checks:report
- #2618: @josegonzalez Implement docker-options:report and storage:report
- #2619: @josegonzalez Call ssh-keys:help from ssh-keys:default
- #2620: @josegonzalez Implement domains:report and proxy:report
- #2622: @raphaklaus Allow file names with multiple dots in certs:add command
- #2634: @michaelshobbs Update herokuish to 0.3.26
- #2657: @josegonzalez Add post-extract plugin trigger
### Documentation
- #2475: @pranavgoel25 Minor readme and sponsor changes
- #2556: @josegonzalez Use slightly better font style for docs
- #2560: @ebeigarts Improve install documentation on CentOS
- #2564: @ka7 Fix spelling mistakes
- #2565: @josegonzalez Update persistent storage to reference the sample app as normal
- #2566: @josegonzalez Move "new as of" note in storage docs to correct section
- #2569: @OmgImAlexis Reload nginx after adding default vhost file
- #2570: @OmgImAlexis Update ISSUE_TEMPLATE.md to reference `dokku report` command
- #2580: @znz Fix font URL
- #2588: @josegonzalez Clarify when the `~/.ssh/config` settings need to match `vagrant ssh-config output`
- #2605: @andyjeffries Documented build failures when using SSL_CERT_FILE environment variable
- #2613: @emveeoh Update Linode installation instructions for new GRUB 2 Linode boot option
- #2626: @znz Update apps:help example command
- #2629: @znz Update certs:help output for certs:default subcommand
- #2633: @drpoggi Reference the x-forwarded headers in correct order
- #2637: @josegonzalez Add documentation surrounding flags that ps:report accepts
- #2638: @fwolfst Improve README links
- #2639: @joshco Add documentation for how to grant other Unix accounts Dokku access
- #2648: @josegonzalez Note that the remote username is important
- #2659: @jfw Minor clarifications to application deployment tutorial
## 0.8.0
The big kahuna. Lots of documentation changes, and a few bug fixes to make Dokku development a bit easier.
CentOS 7 users will be happy to see that we now have experimental support for your operating system. Huge thanks to @ebeigarts for working on that feature :)
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2407: @josegonzalez Move core post-deploy triggers to core-post-deploy
- #2442: @znz Fix `is_tag_force_available` bug when docker major version up
- #2452: @mbtamuli Solves SSH Key problem when admin user already exists
- #2454: @onbjerg Return exit 1 in config:get if no ENV file exists
- #2464: @sseemayer Remove duplicate SSL hostnames
- #2465: @polettix Fix issue when importing ssh-keys
- #2477: @ebeigarts Fix dokku-redeploy systemd script to start only after docker
- #2485: @znz Fix bug when VHOST file is missing newline
- #2492: @josegonzalez Fix iteration on all apps for `dokku proxy` command
- #2495: @josegonzalez Create the user's `authorized_keys` file if it does not exist
- #2496: @josegonzalez Detect nginx versions that support HTTP/2 well
- #2518: @josegonzalez Use same check for dockerfile apps during a tar build
- #2526: @michaelshobbs Actually fail deploy when app.json script fails
- #2539: @ebeigarts Fix dokku-installer.service removal
### New Features
- #2378: @knjcode Skip container finish processing when zero downtime is disabled
- #2406: @josegonzalez Use apps_create method when renaming an application
- #2419: @ebeigarts Support for CentOS 7
- #2489: @joshmanders Add plugin uninstall trigger
- #2510: @IlyaSemenov Add domains:set and domains:set-global commands
- #2544: @michaelshobbs Update herokuish to 0.3.24
- #2552: @josegonzalez Allow package building on OSX
- #2553: @josegonzalez Add release-related Dockerfiles
### Documentation
- #2432: @josegonzalez Clarify DOKKU_SCALE docs
- #2433: @alexgleason Add robots.txt plugin to community docs
- #2437: @vishnubhagwan Fix warning in installation docs
- #2451: @mbtamuli Document the logs plugin
- #2470: @fteychene Add build-hook to plugins doc
- #2472: @mainto Add dokku-access to plugins doc
- #2484: @nahtnam Document build issues when a `Killed` message is displayed
- #2486: @OmarShehata Fixing typo & broken link in docs
- #2488: @joshmanders Bump font size in documentation
- #2493: @josegonzalez Clarify checks documentation
- #2497: @joshmanders Make features heading more clear
- #2503: @mlebkowski Update dokku-acl plugin link
- #2505: @kjschulz Add Dokku Wordpress plugin to docs
- #2506: @simonkotwicz Fix typos in deployment docs
- #2507: @josegonzalez Update upgrade docs to point out sshcommand and plugn upgrading as well
- #2509: @kjschulz Map dokku-community user in plugins
- #2511: @IlyaSemenov Clarify instructions for arranging default nginx site
- #2515: @sgloutnikov Update DreamHost Cloud install instructions
- #2517: @josegonzalez Update docs regarding if the ssh-keys plugin should be in use
- #2522: @joshmanders Ensure install documentation can be run via copy-paste
- #2525: @OmarShehata Plugin-triggers typo: dokkku -> dokku
- #2531: @slava-vishnyakov Document rebuilding app after mounting storage
- #2533: @facundomedica Document potential firewall problem on Ubuntu 16.04
## 0.7.2
This minor release contains mostly documentation changes, and should be fully backwards compatible with previous 0.7.x releases.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2392: @swg Specify python2 for get_json functions
- #2408: @jcscottiii Use $DOKKU_VHOST_ENABLE instead of $VHOST_ENABLE in bootstrap.sh
- #2417: @PWAckerman Remove extra quotes from DYNO environment variable
- #2426: @michaelshobbs add force option on docker tag when available
### New Features
- #2418: @michaelshobbs Update to plugn 0.2.2
- #2423: @michaelshobbs Update to herokuish 0.3.19
### Documentation
- #2393: @josegonzalez Deprecate all process manager plugins
- #2394: @josegonzalez Deprecate old graphite plugin and add official graphite plugin
- #2395: @josegonzalez Deprecate sekjun9878/redis
- #2396: @josegonzalez Deprecate multi-buildpack plugin
- #2397: @josegonzalez Update compatibility of dokku feature plugin
- #2398: @josegonzalez Update compatibility of "other plugins"
- #2404: @bascht Fix docker build syntax in image tags documentation
- #2405: @josegonzalez Fully document the ps plugin
- #2409: @josegonzalez Document caveats around ps:rebuild and tags/tar deployed applications
- #2416: @njaxx Adds a mention of manually adding nginx entry
- #2420: @c990802 Update command example for consistency
- #2410: @IlyaSemenov Clarify domains help, improve domains unit tests
- #2429: @enisozgen Minor documentation fixes
- #2431: @josegonzalez Add missing redirect for deployment/deployment-tasks
## 0.7.1
### Bug Fixes
- #2348: @josegonzalez Correct the version in use for ssh-keys
- #2369: @u2mejc Fix ssh-keys:add permission error
- #2377: @ebeigarts Do not use http_proxy env variables for CHECKS
- #2360: @xadh00m Allow hyphen in TLD
- #2387: @michaelshobbs Silence find warnings under Ubuntu 16.04
- #2390: @josegonzalez Actually stop the dokku-installer service
### New Features
- #2358: @josegonzalez Guard against poodle vulnerability by default
- #2385: @michaelshobbs Actually merge dokku-app-user into core
### Documentation
- #2337: @josegonzalez Update deprecated plugins list
- #2352: @miguelcobain Fix typos in plugin-triggers docs
- #2353: @miguelcobain Add a note about making plugins executable
- #2345: @johnfraney Update list of officially supported distributions
- #2354: @josegonzalez Dockerfile deploys do not support mounted volumes
- #2371: @michaelshobbs Moved some plugin repos to michaelshobbs
- #2381: @michaelshobbs Fail rest of bats file on first test failure
- #2382: @alexgleason Fix typo "exampple" to "example"
- #2386: @josegonzalez Add a migration guide for 0.7.0
- #2388: @josegonzalez Add documentation for proxy ports scheme handling
- #2389: @josegonzalez Add plugin management documentation
## 0.7.0
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
@@ -896,7 +1118,7 @@ Thanks to the *many* contributors for making this release our best release so fa
- #1473: @josegonzalez Handle crashing containers by using restart=on-failure policy
- #1476: @michaelshobbs Support static nginx port when deploying without an application VHOST
- #1476: nginx proxy without VHOST
- #1477: @arthurschreiber Support removing config variables that contain `\n`.
- #1477: @arthurschreiber Support removing config variables containing newlines.
### Documentation
@@ -1042,7 +1264,7 @@ This release pegs Dokku to Docker 1.6.2. Docker 1.7.0 introduced changes in `doc
### New Features
- #1245: @arthurschreiber Support config variables containing `\n`
- #1245: @arthurschreiber Support config variables containing newlines
- #1257: @josegonzalez Split nginx ssl logs by $APP
### Bug Fixes

View File

@@ -3,6 +3,8 @@ Description of problem:
Output of the following commands
<!-- If you're running 0.4.10+ just use dokku report-->
- `uname -a`:
- `free -m`:
- `docker version`:
@@ -21,12 +23,12 @@ Output of the following commands
- If using buildpacks, which custom buildpacks are in use
- If using a `Dockerfile`, the contents of that file
- If it exists, the contents of your `Procfile`.
- Output of failing dokku commands after running `dokku trace on`
- Output of failing Dokku commands after running `dokku trace on`
(BEWARE: `trace on` will print environment variables for some commands, be sure you're not exposing any sensitive information when posting issues. You may replace these values with XXXXXXX):
Environment details (AWS, VirtualBox, physical, etc.):
How was dokku installed?:
How was Dokku installed?:
How reproducible:

View File

@@ -1,13 +1,14 @@
DOKKU_VERSION = master
DOKKU_VERSION ?= master
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.5.0/sshcommand
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.6.0/sshcommand
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_linux_x86_64.tgz
SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz
STACK_URL ?= https://github.com/gliderlabs/herokuish.git
PREBUILT_STACK_URL ?= gliderlabs/herokuish:latest
DOKKU_LIB_ROOT ?= /var/lib/dokku
PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/plugins
CORE_PLUGINS_PATH ?= ${DOKKU_LIB_ROOT}/core-plugins
PLUGIN_MAKE_TARGET ?= build-in-docker
# If the first argument is "vagrant-dokku"...
ifeq (vagrant-dokku,$(firstword $(MAKECMDGOALS)))
@@ -23,10 +24,13 @@ else
BUILD_STACK_TARGETS = build-in-docker
endif
.PHONY: all apt-update install version copyfiles man-db plugins dependencies sshcommand plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku
include common.mk
.PHONY: all apt-update install version copyfiles man-db plugins dependencies sshcommand plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build
include tests.mk
include deb.mk
include rpm.mk
include arch.mk
all:
@@ -34,18 +38,39 @@ all:
install: dependencies version copyfiles plugin-dependencies plugins
release: deb-all package_cloud packer
release: deb-all rpm-all package_cloud packer
package_cloud:
package_cloud push dokku/dokku/ubuntu/trusty herokuish*.deb
package_cloud push dokku/dokku/ubuntu/trusty sshcommand*.deb
package_cloud push dokku/dokku/ubuntu/trusty plugn*.deb
package_cloud push dokku/dokku/ubuntu/trusty dokku*.deb
package_cloud push dokku/dokku/el/7 herokuish*.rpm
package_cloud push dokku/dokku/el/7 sshcommand*.rpm
package_cloud push dokku/dokku/el/7 plugn*.rpm
package_cloud push dokku/dokku/el/7 dokku*.rpm
packer:
packer build contrib/packer.json
go-build:
basedir=$(PWD); \
for dir in plugins/*; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -e -C $$dir $(PLUGIN_MAKE_TARGET) || exit $$? ;\
fi ;\
done
go-clean:
basedir=$(PWD); \
for dir in plugins/*; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -e -C $$dir clean ;\
fi ;\
done
copyfiles:
$(MAKE) go-build || exit 1
cp dokku /usr/local/bin/dokku
mkdir -p ${CORE_PLUGINS_PATH} ${PLUGINS_PATH}
rm -rf ${CORE_PLUGINS_PATH}/*
@@ -57,21 +82,29 @@ copyfiles:
rm -rf ${CORE_PLUGINS_PATH}/$$plugin && \
rm -rf ${PLUGINS_PATH}/$$plugin && \
cp -R plugins/$$plugin ${CORE_PLUGINS_PATH}/available && \
rm -rf ${CORE_PLUGINS_PATH}/available/$$plugin/src && \
ln -s ${CORE_PLUGINS_PATH}/available/$$plugin ${PLUGINS_PATH}/available; \
find /var/lib/dokku/ -xtype l -delete;\
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
done
done
ifndef SKIP_GO_CLEAN
$(MAKE) go-clean
endif
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true
$(MAKE) addman
addman: help2man
addman: help2man man-db
mkdir -p /usr/local/share/man/man1
help2man -Nh help -v version -n "configure and get information from your dokku installation" -o /usr/local/share/man/man1/dokku.1 dokku
mandb
version:
ifeq ($(DOKKU_VERSION),master)
git describe --tags > ~dokku/VERSION 2> /dev/null || echo '~${DOKKU_VERSION} ($(shell date -uIminutes))' > ~dokku/VERSION
else
echo $(DOKKU_VERSION) > ~dokku/VERSION
endif
plugin-dependencies: plugn
sudo -E dokku plugin:install-dependencies --core

View File

@@ -1,39 +1,16 @@
# Dokku [![Build Status](https://img.shields.io/circleci/project/dokku/dokku/master.svg?style=flat-square "Build Status")](https://circleci.com/gh/dokku/dokku/tree/master) [![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku) [![Arch Package](https://img.shields.io/badge/package-arch-brightgreen.svg?style=flat-square "Arch Package")](https://aur.archlinux.org/packages/dokku/) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg?style=flat-square "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) [![Slack Group](https://img.shields.io/badge/irc-slack-blue.svg?style=flat-square "Slack Group")](https://glider-slackin.herokuapp.com/) [![Documentation](https://img.shields.io/badge/docs-viewdocs-blue.svg?style=flat-square "Viewdocs")](http://dokku.viewdocs.io/dokku/)
# Dokku
[![Build Status](https://img.shields.io/circleci/project/dokku/dokku/master.svg?style=flat-square "Build Status")](https://circleci.com/gh/dokku/dokku/tree/master)
[![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku)
[![Arch Package](https://img.shields.io/badge/package-arch-brightgreen.svg?style=flat-square "Arch Package")](https://aur.archlinux.org/packages/dokku/)
[![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg?style=flat-square "IRC Freenode")](https://webchat.freenode.net/?channels=dokku)
[![Slack Group](https://img.shields.io/badge/irc-slack-blue.svg?style=flat-square "Slack Group")](https://glider-slackin.herokuapp.com/)
[![Documentation](https://img.shields.io/badge/docs-viewdocs-blue.svg?style=flat-square "Viewdocs")](http://dokku.viewdocs.io/dokku/)
[![OpenCollective](https://opencollective.com/dokku/sponsors/badge.svg?style=flat-square)](#sponsors)
[![OpenCollective](https://opencollective.com/dokku/backers/badge.svg?style=flat-square)](#backers)
[![Gratipay](https://img.shields.io/gratipay/dokku.svg?style=flat-square)](https://gratipay.com/dokku/)
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
## Requirements
- A fresh VM running Ubuntu `14.04 x64`
## Installing
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh
sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh
### Upgrading
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku.
## Documentation
Full documentation - including advanced installation docs - are available online at [docs](http://dokku.viewdocs.io/dokku/)
## Support
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
## Contribution
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
While we may not merge your PR as is, they serve to start conversations and improve the general dokku experience for all users.
## Sponsors
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS.md) file.
@@ -107,6 +84,47 @@ Support us with a monthly donation and help us continue our activities. [[Become
<a href="https://opencollective.com/dokku/backer/28/website" target="_blank"><img src="https://opencollective.com/dokku/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/29/website" target="_blank"><img src="https://opencollective.com/dokku/backer/29/avatar.svg"></a>
## Requirements
A fresh VM running any of the following operating systems:
- Ubuntu 16.04 x64
- Ubuntu 14.04 x64
- Debian 8.2 x64
- CentOS 7 x64 *(experimental)*
- Arch Linux x64 *(experimental)*
## 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.9.0/bootstrap.sh
sudo DOKKU_TAG=v0.9.0 bash bootstrap.sh
```
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs.
### Upgrade
[View the docs](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) for upgrading from an older version of Dokku.
## Documentation
Full documentation - including advanced installation docs - are available online at [http://dokku.viewdocs.io/dokku/](http://dokku.viewdocs.io/dokku/).
## Support
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku).
## Contribution
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
While we may not merge your PR as is, they serve to start conversations and improve the general Dokku experience for all users.
## License
[MIT License](https://github.com/dokku/dokku/blob/master/LICENSE) © Jeff Lindsay

View File

@@ -1,3 +1,7 @@
#Sponsors
[Deis](http://deis.io)
[DigitalOcean](https://www.digitalocean.com/)
[Melvin Lammerts](http://dokku.net)

11
Vagrantfile vendored
View File

@@ -76,13 +76,22 @@ Vagrant::configure("2") do |config|
vm.vm.provision :shell, :inline => "cd /root/dokku && make install-from-deb"
end
config.vm.define "dokku-rpm", autostart: false do |vm|
vm.vm.box = "centos/7"
vm.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
vm.vm.hostname = "#{DOKKU_DOMAIN}"
vm.vm.network :private_network, ip: DOKKU_IP
vm.vm.provision :shell, :inline => "cd /root/dokku && bash bootstrap.sh"
end
config.vm.define "build", autostart: false do |vm|
vm.vm.synced_folder File.dirname(__FILE__), "/root/dokku"
vm.vm.network :forwarded_port, guest: 80, host: FORWARDED_PORT
vm.vm.hostname = "#{DOKKU_DOMAIN}"
vm.vm.network :private_network, ip: DOKKU_IP
vm.vm.provision :shell, :inline => "export DEBIAN_FRONTEND=noninteractive && apt-get update > /dev/null && apt-get -qq -y install git > /dev/null && cd /root/dokku && #{make_cmd}"
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all"
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all rpm-all"
end
config.vm.define "build-arch", autostart: false do |vm|

View File

@@ -22,7 +22,11 @@ arch-setup:
arch-dokku: arch-setup
echo "-> Update package sums, create metadata file and test the build of the package"
ifeq ($(DOKKU_VERSION),master)
git describe --tags > /tmp/VERSION
else
echo $(DOKKU_VERSION) > /tmp/VERSION
endif
cat /tmp/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/STABLE_VERSION
sed -i -e "s/pkgver=.*/pkgver=`cat /tmp/STABLE_VERSION`/" /dokku-arch/PKGBUILD
cd /dokku-arch; updpkgsums; mksrcinfo; makepkg -fd

View File

@@ -14,10 +14,6 @@ set -eo pipefail; [[ $TRACE ]] && set -x
ensure-environment() {
local FREE_MEMORY
echo "Preparing to install $DOKKU_TAG from $DOKKU_REPO..."
if ! command -v apt-get &>/dev/null; then
echo "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
exit 1
fi
hostname -f > /dev/null 2>&1 || {
echo "This installation script requires that you have a hostname set for the instance. Please set a hostname for 127.0.0.1 in your /etc/hosts"
@@ -33,10 +29,15 @@ ensure-environment() {
install-requirements() {
echo "--> Ensuring we have the proper dependencies"
apt-get update -qq > /dev/null
if [[ $(lsb_release -sr) == "12.04" ]]; then
apt-get -qq -y install python-software-properties
fi
case "$DOKKU_DISTRO" in
debian|ubuntu)
apt-get update -qq > /dev/null
if [[ "$DOKKU_DISTRO_VERSION" == "12.04" ]]; then
apt-get -qq -y install python-software-properties
fi
;;
esac
}
install-dokku() {
@@ -68,9 +69,14 @@ install-dokku() {
fi
}
install-dokku-from-source() {
local DOKKU_CHECKOUT="$1"
if ! command -v apt-get &>/dev/null; then
echo "This installation script requires apt-get. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
exit 1
fi
apt-get -qq -y install git make software-properties-common
cd /root
if [[ ! -d /root/dokku ]]; then
@@ -84,6 +90,21 @@ install-dokku-from-source() {
}
install-dokku-from-package() {
case "$DOKKU_DISTRO" in
debian|ubuntu)
install-dokku-from-deb-package "$@"
;;
centos)
install-dokku-from-rpm-package "$@"
;;
*)
echo "Unsupported Linux distribution. For manual installation instructions, consult http://dokku.viewdocs.io/dokku/advanced-installation/"
exit 1
;;
esac
}
install-dokku-from-deb-package() {
local DOKKU_CHECKOUT="$1"
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
@@ -96,12 +117,6 @@ install-dokku-from-package() {
apt-get -qq -y install apt-transport-https
echo "--> Installing docker"
if uname -r | grep -q linode; then
echo "--> NOTE: Using Linode? Docker might complain about missing AUFS support."
echo " See http://dokku.viewdocs.io/dokku/getting-started/install/linode/"
echo " Installation will continue in 10 seconds."
sleep 10
fi
wget -nv -O - https://get.docker.com/ | sh
echo "--> Installing dokku"
@@ -109,7 +124,7 @@ install-dokku-from-package() {
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | tee /etc/apt/sources.list.d/dokku.list
apt-get update -qq > /dev/null
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $VHOST_ENABLE" | sudo debconf-set-selections
[[ -n $DOKKU_VHOST_ENABLE ]] && echo "dokku dokku/vhost_enable boolean $DOKKU_VHOST_ENABLE" | sudo debconf-set-selections
[[ -n $DOKKU_WEB_CONFIG ]] && echo "dokku dokku/web_config boolean $DOKKU_WEB_CONFIG" | sudo debconf-set-selections
[[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections
[[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections
@@ -124,7 +139,43 @@ install-dokku-from-package() {
fi
}
install-dokku-from-rpm-package() {
local DOKKU_CHECKOUT="$1"
if [[ "$DOKKU_DISTRO_VERSION" != "7" ]]; then
echo "Only CentOS version 7 is supported."
exit 1
fi
echo "--> Installing docker"
curl -fsSL https://get.docker.com/ | sh
echo "--> Installing epel for nginx packages to be available"
yum install -y epel-release
echo "--> Installing herokuish and dokku"
curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.rpm.sh | bash
if [[ -n $DOKKU_CHECKOUT ]]; then
yum -y install herokuish "dokku-$DOKKU_CHECKOUT"
else
yum -y install herokuish dokku
fi
echo "--> Enabling docker and nginx on system startup"
systemctl enable docker
systemctl enable nginx
echo "--> Starting nginx"
systemctl start nginx
}
main() {
export DOKKU_DISTRO DOKKU_DISTRO_VERSION
# shellcheck disable=SC1091
DOKKU_DISTRO=$(. /etc/os-release && echo "$ID")
# shellcheck disable=SC1091
DOKKU_DISTRO_VERSION=$(. /etc/os-release && echo "$VERSION_ID")
export DEBIAN_FRONTEND=noninteractive
export DOKKU_REPO=${DOKKU_REPO:-"https://github.com/dokku/dokku.git"}

4
common.mk Normal file
View File

@@ -0,0 +1,4 @@
GO_REPO_ROOT := /go/src/github.com/dokku/dokku
BUILD_IMAGE := golang:1.7.5
.PHONY: build-in-docker build clean src-clean

44
contrib/build.Dockerfile Normal file
View File

@@ -0,0 +1,44 @@
FROM ubuntu:14.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get -y install gcc git build-essential wget ruby-dev ruby1.9.1 lintian rpm help2man man-db
RUN command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
ARG GOLANG_VERSION
RUN wget -qO /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& tar -C /usr/local -xzf /tmp/go${GOLANG_VERSION}.linux-amd64.tar.gz
ARG WORKDIR=/go/src/github.com/dokku/dokku
WORKDIR ${WORKDIR}
COPY Makefile ${WORKDIR}/
COPY *.mk ${WORKDIR}/
RUN make deb-setup rpm-setup sshcommand plugn
COPY . ${WORKDIR}
ARG PLUGIN_MAKE_TARGET
ARG DOKKU_VERSION=master
ARG DOKKU_GIT_REV
ARG IS_RELEASE=false
RUN PATH=$PATH:/usr/local/go/bin GOPATH=/go \
PLUGIN_MAKE_TARGET=${PLUGIN_MAKE_TARGET} \
DOKKU_VERSION=${DOKKU_VERSION} \
DOKKU_GIT_REV=${DOKKU_GIT_REV} \
IS_RELEASE=${IS_RELEASE} \
SKIP_GO_CLEAN=true \
make version copyfiles \
&& rm -rf plugins/common/*.go plugins/common/glide* plugins/common/vendor/ \
&& make deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil \
rpm-herokuish rpm-dokku rpm-plugn rpm-sshcommand rpm-sigil
RUN mkdir -p /data \
&& cp /tmp/*.deb /data \
&& cp /tmp/*.rpm /data \
&& ls -lha /data/

View File

@@ -3,13 +3,14 @@
import cgi
import json
import os
import re
import SimpleHTTPServer
import SocketServer
import subprocess
import sys
import threading
VERSION = 'v0.7.0'
VERSION = 'v0.9.0'
hostname = ''
try:
@@ -100,8 +101,20 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
f.write(params['hostname'].value)
command = ['sshcommand', 'acl-add', 'dokku', 'admin']
for key in params['keys'].value.split("\n"):
for (index, key) in enumerate(params['keys'].value.splitlines(), 1):
user = 'admin'
if self.admin_user_exists() is not None:
user = 'web-admin'
if self.web_admin_user_exists() is not None:
index = int(self.web_admin_user_exists()) + 1
elif self.web_admin_user_exists() is None:
index = 1
elif self.admin_user_exists() is None:
pass
else:
index = int(self.admin_user_exists()) + 1
user = user + str(index)
command = ['sshcommand', 'acl-add', 'dokku', user]
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
proc.stdin.write(key)
proc.stdin.close()
@@ -119,6 +132,29 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.end_headers()
self.wfile.write(json.dumps({'status': 'ok'}))
def web_admin_user_exists(self):
return self.user_exists('web-admin(\d+)')
def admin_user_exists(self):
return self.user_exists('admin(\d+)')
def user_exists(self, name):
command = 'dokku ssh-keys:list'
pattern = re.compile(r'NAME="' + name + '"')
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
max_num = 0
exists = False
for line in proc.stdout:
m = pattern.search(line)
if m:
# User of the form `user` or `user#` exists
exists = True
max_num = max(max_num, m.group(1))
if exists:
return max_num
else:
return None
def set_debconf_selection(debconf_type, key, value):
found = False
@@ -155,7 +191,7 @@ class DeleteInstallerThread(object):
except:
pass
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && stop dokku-installer"
command = "rm -f /etc/init/dokku-installer.conf /etc/systemd/system/dokku-installer.service && (stop dokku-installer || systemctl stop dokku-installer.service)"
try:
subprocess.call(command, shell=True)
except:

View File

@@ -1,10 +1,9 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export DOKKU_PORT=${DOKKU_PORT:=22}
export DOKKU_HOST=${DOKKU_HOST:=}
MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA)
NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG)
random_number() {
fn-random-number() {
[[ -n "$1" ]] && RANGE="$1"
if [[ -n "$RANGE" ]]; then
number=$RANDOM
@@ -15,94 +14,141 @@ random_number() {
echo $number
}
random_name() {
NUM1=$(random_number ${#MOVES[@]})
NUM2=$(random_number ${#MOVES[@]})
NUM3=$(random_number ${#NAMES[@]})
fn-random-name() {
local NUM1 NUM2 NUM3 UPPER_APPNAME lower_appname
local MOVES=(ABLE ABNORMA AGAIN AIREXPL ANG ANGER ASAIL ATTACK AURORA AWL BAN BAND BARE BEAT BEATED BELLY BIND BITE BLOC BLOOD BODY BOOK BREATH BUMP CAST CHAM CLAMP CLAP CLAW CLEAR CLI CLIP CLOUD CONTRO CONVY COOLHIT CRASH CRY CUT DESCRI D-FIGHT DIG DITCH DIV DOZ DRE DUL DU-PIN DYE EARTH EDU EG-BOMB EGG ELEGY ELE-HIT EMBODY EMPLI ENGL ERUPT EVENS EXPLOR EYES FALL FAST F-CAR F-DANCE FEARS F-FIGHT FIGHT FIR FIRE FIREHIT FLAME FLAP FLASH FLEW FORCE FRA FREEZE FROG G-BIRD GENKISS GIFT G-KISS G-MOUSE GRADE GROW HAMMER HARD HAT HATE H-BOMB HELL-R HEMP HINT HIT HU HUNT HYPNOSI INHA IRO IRONBAR IR-WING J-GUN KEE KICK KNIF KNIFE KNOCK LEVEL LIGH LIGHHIT LIGHT LIVE L-WALL MAD MAJUS MEL MELO MESS MILK MIMI MISS MIXING MOVE MUD NI-BED NOISY NOONLI NULL N-WAVE PAT PEACE PIN PLAN PLANE POIS POL POWDE POWE POWER PRIZE PROTECT PROUD RAGE RECOR REFLAC REFREC REGR RELIV RENEW R-FIGHT RING RKICK ROCK ROUND RUS RUSH SAND SAW SCISSOR SCRA SCRIPT SEEN SERVER SHADOW SHELL SHINE SHO SIGHT SIN SMALL SMELT SMOK SNAKE SNO SNOW SOU SO-WAVE SPAR SPEC SPID S-PIN SPRA STAM STARE STEA STONE STORM STRU STRUG STUDEN SUBS SUCID SUN-LIG SUNRIS SUPLY S-WAVE TAILS TANGL TASTE TELLI THANK TONKICK TOOTH TORL TRAIN TRIKICK TUNGE VOLT WA-GUN WATCH WAVE W-BOMB WFALL WFING WHIP WHIRL WIND WOLF WOOD WOR YUJA)
local NAMES=(SEED GRASS FLOWE SHAD CABR SNAKE GOLD COW GUIKI PEDAL DELAN B-FLY BIDE KEYU FORK LAP PIGE PIJIA CAML LAT BIRD BABOO VIV ABOKE PIKAQ RYE SAN BREAD LIDEL LIDE PIP PIKEX ROK JUGEN PUD BUDE ZHIB GELU GRAS FLOW LAFUL ATH BALA CORN MOLUF DESP DAKED MIMI BOLUX KODA GELUD MONK SUMOY GEDI WENDI NILEM NILE NILEC KEZI YONGL HUDE WANLI GELI GUAIL MADAQ WUCI WUCI MUJEF JELLY SICIB GELU NELUO BOLI JIALE YED YEDE CLO SCARE AOCO DEDE DEDEI BAWU JIUG BADEB BADEB HOLE BALUX GES FANT QUAR YIHE SWAB SLIPP CLU DEPOS BILIY YUANO SOME NO YELA EMPT ZECUN XIAHE BOLEL DEJI MACID XIHON XITO LUCK MENJI GELU DECI XIDE DASAJ DONGN RICUL MINXI BALIY ZENDA LUZEL HELE5 0FENB KAIL JIAND CARP JINDE LAPU MUDE YIFU LINLI SANDI HUSI JINC OUMU OUMUX CAP KUIZA PUD TIAO FRMAN CLAU SPARK DRAGO BOLIU GUAIL MIYOU MIY QIAOK BEIL MUKEI RIDED MADAM BAGEP CROC ALIGE OUDAL OUD DADA HEHE YEDEA NUXI NUXIN ROUY ALIAD STICK QIANG LAAND PIQI PI PUPI DEKE DEKEJ NADI NADIO MALI PEA ELECT FLOWE MAL MALI HUSHU NILEE YUZI POPOZ DUZI HEBA XIAN SHAN YEYEA WUY LUO KEFE HULA CROW YADEH MOW ANNAN SUONI KYLI HULU HUDEL YEHE GULAE YEHE BLU GELAN BOAT NIP POIT HELAK XINL BEAR LINB MAGEH MAGEJ WULI YIDE RIVE FISH AOGU DELIE MANTE KONMU DELU HELU HUAN HUMA DONGF JINCA HEDE DEFU LIBY JIAPA MEJI HELE BUHU MILK HABI THUN GARD DON YANGQ SANAQ BANQ LUJ PHIX SIEI EGG)
UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}"
NUM1=$(fn-random-number ${#MOVES[@]})
NUM2=$(fn-random-number ${#MOVES[@]})
NUM3=$(fn-random-number ${#NAMES[@]})
[[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,}
[[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]')
echo "$lower_appname"
UPPER_APPNAME="${MOVES[${NUM1}]}-${MOVES[${NUM2}]}-${NAMES[${NUM3}]}"
[[ "$BASH_VERSION" =~ 4.* ]] && lower_appname=${UPPER_APPNAME,,}
[[ -z "$lower_appname" ]] && lower_appname=$(echo "$UPPER_APPNAME" | tr '[:upper:]' '[:lower:]')
echo "$lower_appname"
}
client_help_msg() {
echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku"
echo "--> i.e. git remote add dokku dokku@<dokku-host>:<app-name>"
fn-client-help-msg() {
echo "==> Configure the DOKKU_HOST environment variable or run $0 from a repository with a git remote named dokku" 1>&2
echo "--> i.e. git remote add dokku dokku@<dokku-host>:<app-name>" 1>&2
exit 20 # exit with specific status. only used in units tests for now
}
is_git_repo() {
git rev-parse &>/dev/null
fn-is-git-repo() {
git rev-parse &>/dev/null
}
has_dokku_remote() {
git remote show | grep dokku
fn-has-dokku-remote() {
git remote show | grep -E "^${DOKKU_GIT_REMOTE}\s"
}
if [[ -z $DOKKU_HOST ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^dokku" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
else
client_help_msg
fn-dokku-host() {
declare DOKKU_GIT_REMOTE="$1" DOKKU_HOST="$2"
if [[ -z "$DOKKU_HOST" ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
DOKKU_HOST=$(git remote -v 2>/dev/null | grep -Ei "^${DOKKU_GIT_REMOTE}\s" | head -n 1 | cut -f1 -d' ' | cut -f2 -d '@' | cut -f1 -d':' 2>/dev/null || true)
fi
fi
fi
export DOKKU_PORT=${DOKKU_PORT:=22}
if [[ -z "$DOKKU_HOST" ]]; then
fn-client-help-msg
fi
if [[ ! -z $DOKKU_HOST ]]; then
_dokku() {
appname=""
echo "$DOKKU_HOST"
}
main() {
declare CMD="$1" APP_ARG="$2"
local APP="" DOKKU_GIT_REMOTE="dokku" DOKKU_REMOTE_HOST=""
local cmd_set=false next_index=1 skip=false args=("$@")
for arg in "$@"; do
if [[ "$skip" == "true" ]]; then
next_index=$(( next_index + 1 ))
skip=false
continue
fi
if [[ "$arg" == "--app" ]]; then
APP=${args[$next_index]}
skip=true
shift 2
elif [[ "$arg" == "--remote" ]]; then
DOKKU_GIT_REMOTE=${args[$next_index]}
skip=true
shift 2
elif [[ "$arg" =~ ^--.* ]]; then
[[ "$cmd_set" == "true" ]] && APP_ARG="$arg" && break
[[ "$arg" == "--trace" ]] && export DOKKU_TRACE=1 && set -x
else
if [[ "$cmd_set" == "true" ]]; then
APP_ARG="$arg"
break
else
CMD="$arg"
cmd_set=true
fi
fi
next_index=$(( next_index + 1 ))
done
DOKKU_REMOTE_HOST="$(fn-dokku-host "$DOKKU_GIT_REMOTE" "$DOKKU_HOST")"
if [[ -z "$APP" ]]; then
if [[ -d .git ]] || git rev-parse --git-dir > /dev/null 2>&1; then
set +e
appname=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
APP=$(git remote -v 2>/dev/null | grep -Ei "dokku@$DOKKU_REMOTE_HOST" | head -n 1 | cut -f2 -d'@' | cut -f1 -d' ' | cut -f2 -d':' 2>/dev/null)
set -e
else
echo "This is not a git repository"
fi
case "$1" in
apps:create)
if [[ -z "$2" ]]; then
appname=$(random_name)
counter=0
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps 2>/dev/null| grep -q "$appname"; do
if [[ $counter -ge 100 ]]; then
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_HOST" apps
exit 1
else
appname=$(random_name)
counter=$((counter+1))
fi
done
else
appname="$2"
fi
if git remote add dokku "dokku@$DOKKU_HOST:$appname"; then
echo "-----> Dokku remote added at $DOKKU_HOST"
echo "-----> Application name is $appname"
else
echo "! Dokku remote not added! Do you already have a dokku remote?"
return
fi
;;
apps:destroy)
is_git_repo && has_dokku_remote && git remote remove dokku
;;
esac
[[ -n "$@" ]] && [[ -n "$appname" ]] && app_arg="--app $appname"
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@"
# shellcheck disable=SC2068,SC2086
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_HOST -- $app_arg $@
}
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
_dokku "$@"
exit $?
fi
else
client_help_msg
case "$CMD" in
apps:create)
if [[ -z "$APP_ARG" ]]; then
APP=$(fn-random-name)
counter=0
while ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps 2>/dev/null| grep -q "$APP"; do
if [[ $counter -ge 100 ]]; then
echo "Error: could not reasonably generate a new app name. try cleaning up some apps..."
ssh -p "$DOKKU_PORT" "dokku@$DOKKU_REMOTE_HOST" apps
exit 1
else
APP=$(random_name)
counter=$((counter+1))
fi
done
else
APP="$APP_ARG"
fi
if git remote add "$DOKKU_GIT_REMOTE" "dokku@$DOKKU_REMOTE_HOST:$APP"; then
echo "-----> Dokku remote added at ${DOKKU_REMOTE_HOST} called ${DOKKU_GIT_REMOTE}"
echo "-----> Application name is ${APP}"
else
echo "! Dokku remote not added! Do you already have a dokku remote?"
return
fi
;;
apps:destroy)
fn-is-git-repo && fn-has-dokku-remote && git remote remove "$DOKKU_GIT_REMOTE"
;;
esac
[[ " apps certs help ls nginx shell storage trace version " == *" $CMD "* ]] && unset APP
[[ " certs:chain domains:add-global domains:remove-global domains:set-global ps:rebuildall ps:restartall ps:restore " == *" $CMD "* ]] && unset APP
[[ "$CMD" =~ events*|plugin*|ssh-keys* ]] && unset APP
[[ -n "$APP_ARG" ]] && [[ "$APP_ARG" == "--global" ]] && unset APP
[[ -n "$@" ]] && [[ -n "$APP" ]] && app_arg="--app $APP"
# echo "ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@"
# shellcheck disable=SC2068,SC2086
ssh -o LogLevel=QUIET -p $DOKKU_PORT -t dokku@$DOKKU_REMOTE_HOST -- $app_arg $@
}
if [[ "$0" == "dokku" ]] || [[ "$0" == *dokku_client.sh ]] || [[ "$0" == $(which dokku) ]]; then
main "$@"
exit $?
fi

313
contrib/release Executable file
View File

@@ -0,0 +1,313 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
readonly ROOT_DIR="$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)"
readonly TMP_WORK_DIR="$(mktemp -d "/tmp/dokku-release.XXXX")"
readonly DOKKU_GIT_REV="$(git rev-parse HEAD)"
trap 'rm -rf "$TMP_WORK_DIR" > /dev/null' RETURN INT TERM EXIT
log-info() {
# shellcheck disable=SC2034
declare desc="Log info formatter"
echo "$*"
}
log-error() {
# shellcheck disable=SC2034
declare desc="Log error formatter"
echo "! $*" 1>&2
}
log-fail() {
# shellcheck disable=SC2034
declare desc="Log fail formatter"
log-error "$*"
exit -1
}
fn-build-dokku() {
declare desc="Builds dokku packages within a docker container"
declare IS_RELEASE="$1" DOKKU_VERSION="$2"
local NAME GOLANG_VERSION
if [[ -z "$DOKKU_VERSION" ]]; then
log-error "Invalid deb file specified"
return 1
fi
NAME="dokku:build"
[[ "$IS_RELEASE" == "true" ]] && NAME="dokku:build-release"
[[ -n "$DOKKU_VERSION" ]] || DOKKU_VERSION="master"
pushd "$ROOT_DIR" >/dev/null
GOLANG_VERSION="$(grep BUILD_IMAGE common.mk | cut -d' ' -f3 | cut -d':' -f2)"
docker build \
--build-arg DOKKU_VERSION="$DOKKU_VERSION" \
--build-arg DOKKU_GIT_REV="$DOKKU_GIT_REV" \
--build-arg IS_RELEASE="$IS_RELEASE" \
--build-arg PLUGIN_MAKE_TARGET="build" \
--build-arg GOLANG_VERSION="$GOLANG_VERSION" \
-f "contrib/build.Dockerfile" \
-t "$NAME" .
}
fn-extract-package() {
declare desc="Extract packages from a docker container to the root directory"
declare IS_RELEASE="$1" PACKAGE_NAME="$2"
local NAME
if [[ -z "$PACKAGE_NAME" ]]; then
log-error "Invalid deb file specified"
return 1
fi
NAME="dokku:build"
[[ "$IS_RELEASE" == "true" ]] && NAME="dokku:build-release"
log-info "(extract-package) writing ${PACKAGE_NAME} to correct path"
docker run --rm --entrypoint cat "$NAME" "/data/${PACKAGE_NAME}" > "${ROOT_DIR}/${PACKAGE_NAME}"
}
fn-in-array() {
declare desc="return true if value ($1) is in list (all other arguments)"
local e
for e in "${@:2}"; do
[[ "$e" == "$1" ]] && return 0
done
return 1
}
fn-is-release() {
declare desc="Checks if a given run is a release run"
declare RELEASE="$1"
local IS_RELEASE=false
if [[ "$RELEASE" == "major" ]] || [[ "$RELEASE" == "minor" ]] || [[ "$RELEASE" == "patch" ]]; then
IS_RELEASE=true
fi
echo "$IS_RELEASE"
}
fn-version-current() {
declare desc="Retrieves the current version of dokku"
pushd "$ROOT_DIR" >/dev/null
grep Version debian/control | cut -d' ' -f2
}
fn-version-next() {
declare desc="Calculates the next version name of dokku"
declare CURRENT_VERSION="$1" RELEASE="$2"
local major minor patch short_object
major=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[1]}')
minor=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[2]}')
patch=$(echo "$CURRENT_VERSION" | awk '{split($0,a,"."); print a[3]}')
if [[ "$RELEASE" == "major" ]]; then
major=$((major + 1))
minor="0"
patch="0"
elif [[ "$RELEASE" == "minor" ]]; then
minor=$((minor + 1))
patch="0"
elif [[ "$RELEASE" == "patch" ]]; then
patch=$((patch + 1))
else
short_object=$(git log --oneline | tail -n 1 | cut -d' ' -f1)
echo "${CURRENT_VERSION}build+$(echo "$DOKKU_GIT_REV" | cut -c1-${#short_object})"
return 0
fi
echo "${major}.${minor}.${patch}"
}
fn-publish-package() {
declare desc="Publishes a package to packagecloud"
declare IS_RELEASE="$1" RELEASE_TYPE="$2" PACKAGE_NAME="$3"
local REPOSITORY=dokku/dokku-betafish DIST=ubuntu/trusty
[[ "$IS_RELEASE" == "true" ]] && REPOSITORY=dokku/dokku
[[ "$RELEASE_TYPE" == "rpm" ]] && DIST=el/7
log-info "(release-dokku) pushing ${RELEASE_TYPE} to packagecloud.com/${REPOSITORY}/${DIST}"
package_cloud push "${REPOSITORY}/${DIST}" "$PACKAGE_NAME"
}
fn-replace-version() {
declare desc="Replaces the version within a file"
local CURRENT_VERSION="$1"
local NEXT_VERSION="$2"
local FILENAME="$3"
sed -i.bak "s/${CURRENT_VERSION//./\.}/$NEXT_VERSION/g" "$FILENAME" && rm "$FILENAME.bak"
git add "$FILENAME"
}
fn-repo-merged-requests() {
declare desc="Retrieves all pull request ids since a given release of dokku"
declare TAG="$1"
git log "v${TAG}..HEAD" --oneline | grep "Merge pull request" | cut -d' ' -f 5 | cut -d '#' -f2
}
fn-repo-push-tags() {
declare desc="Pushes tags and the repository to github"
declare IS_RELEASE="$1"
if [[ "$IS_RELEASE" == "false" ]]; then
return
fi
pushd "$ROOT_DIR" >/dev/null
git push --tags origin master
}
fn-repo-update() {
declare desc="Updates files within the repository for a given release"
declare IS_RELEASE="$1" CURRENT_VERSION="$2" NEXT_VERSION="$3"
log-info "(release-dokku) Replacing ${CURRENT_VERSION} with ${NEXT_VERSION}"
for f in plugins/*/plugin.toml; do
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" "$f"
done
if [[ "$IS_RELEASE" == "false" ]]; then
return
fi
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" contrib/dokku-installer.py
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" debian/control
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/advanced-usage/plugin-management.md
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/browserconfig.xml
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/favicons/manifest.json
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/style.css
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/development/release-process.md
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/home.html
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/getting-started/installation.md
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/template.html
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" README.md
if [[ "$RELEASE" == 'patch' ]]; then
fn-replace-version "$CURRENT_VERSION" "$NEXT_VERSION" docs/assets/versions.json
else
versions=$(python -c 'import json,sys;d=json.load(sys.stdin);d["max-versions"].append("'"${NEXT_VERSION}"'"); print json.dumps(d, indent=2, sort_keys=True)' <docs/assets/versions.json)
echo "$versions" >docs/assets/versions.json
git add docs/assets/versions.json
fi
if [[ "$IS_RELEASE" == "false" ]]; then
return
fi
log-info "(release-dokku) Adding HISTORY.md, committing and tagging"
fn-repo-update-history-and-commit "$CURRENT_VERSION" "$NEXT_VERSION"
git tag "v${NEXT_VERSION}"
}
fn-repo-update-history-and-commit() {
declare desc="Updates the history file and commits the changes"
declare CURRENT_VERSION="$1" NEXT_VERSION="$2"
local PULL_REQUEST_ID TITLE AUTHOR TYPE CHANGELOG_TEXT
local COMMIT_MESSAGE HISTORY HISTORY_CONTENTS HISTORY_DOCUMENTATION HISTORY_ENHANCEMENT HISTORY_BUG ISSUE_FILE
pushd "$ROOT_DIR" >/dev/null
mkdir -p /tmp/github-data
for PULL_REQUEST_ID in $(fn-repo-merged-requests "$CURRENT_VERSION"); do
ISSUE_FILE="/tmp/github-data/${PULL_REQUEST_ID}.json"
if [[ ! -f "$ISSUE_FILE" ]]; then
curl -sS "https://api.github.com/repos/dokku/dokku/issues/${PULL_REQUEST_ID}" >"$ISSUE_FILE"
fi
TITLE="$(jq -r '.title' "$ISSUE_FILE")"
AUTHOR="$(jq -r '.user.login' "$ISSUE_FILE")"
TYPE="$(jq -r '.labels[] | select( .name | contains("type") ) | .name' "$ISSUE_FILE" | cut -d' ' -f2)"
CHANGELOG_TEXT="- #${PULL_REQUEST_ID}: @${AUTHOR} ${TITLE}"
if [[ "$TYPE" == "bug" ]]; then
HISTORY_BUG="${HISTORY_BUG}"$'\n'"$CHANGELOG_TEXT"
elif [[ "$TYPE" == "documentation" ]]; then
HISTORY_DOCUMENTATION="${HISTORY_DOCUMENTATION}"$'\n'"$CHANGELOG_TEXT"
elif [[ "$TYPE" == "enhancement" ]]; then
HISTORY_ENHANCEMENT="${HISTORY_ENHANCEMENT}"$'\n'"$CHANGELOG_TEXT"
fi
done
HISTORY="# History"
HISTORY="${HISTORY}"$'\n\n'"## ${NEXT_VERSION}"
if [[ "$HISTORY_BUG" ]]; then
HISTORY="${HISTORY}"$'\n\n'"### Bug Fixes"
HISTORY="${HISTORY}"$'\n'"$HISTORY_BUG"
fi
if [[ "$HISTORY_DOCUMENTATION" ]]; then
HISTORY="${HISTORY}"$'\n\n'"### New Features"
HISTORY="${HISTORY}"$'\n'"$HISTORY_DOCUMENTATION"
fi
if [[ "$HISTORY_ENHANCEMENT" ]]; then
HISTORY="${HISTORY}"$'\n\n'"### Documentation"
HISTORY="${HISTORY}"$'\n'"$HISTORY_ENHANCEMENT"
fi
sed -i.bak '1d' HISTORY.md && rm HISTORY.md.bak
HISTORY_CONTENTS="$(cat HISTORY.md)"
echo -e "$HISTORY\n$HISTORY_CONTENTS" >HISTORY.md
git add HISTORY.md
COMMIT_MESSAGE="Release ${NEXT_VERSION}"$'\n\n'"${HISTORY}"
git commit -m "${COMMIT_MESSAGE}"
}
fn-require-bin() {
declare desc="Checks that a binary exists"
declare BINARY="$1"
if ! command -v "$BINARY" &>/dev/null; then
log-fail "Missing ${BINARY}, please install it"
fi
}
main() {
declare RELEASE="$1"
local CURRENT_VERSION NEXT_VERSION IS_RELEASE major minor patch versions
local VALID_RELEASE_LEVELS=("major" "minor" "patch" "betafish")
if [[ "$RELEASE" == '--trace' ]]; then
shift 1
RELEASE="$1"
TRACE=1 && set -x
fi
if [[ -z "$RELEASE" ]]; then
log-fail "Argument 1 must be one of [major, minor, patch, betafish], none given"
fi
if ! fn-in-array "$RELEASE" "${VALID_RELEASE_LEVELS[@]}"; then
log-fail "Argument 1 must be one of [major, minor, patch, betafish], '${RELEASE}' given"
fi
fn-require-bin "docker"
fn-require-bin "git"
fn-require-bin "package_cloud"
[[ -n "$PACKAGECLOUD_API_TOKEN" ]] || log-fail "Missing PACKAGECLOUD_API_TOKEN environment variable"
CURRENT_VERSION="$(fn-version-current)"
NEXT_VERSION="$(fn-version-next "$CURRENT_VERSION" "$RELEASE")"
IS_RELEASE="$(fn-is-release "$RELEASE")"
fn-repo-update "$IS_RELEASE" "$CURRENT_VERSION" "$NEXT_VERSION"
fn-build-dokku "$IS_RELEASE" "$NEXT_VERSION"
fn-extract-package "$IS_RELEASE" "dokku_${NEXT_VERSION}_amd64.deb"
fn-extract-package "$IS_RELEASE" "dokku-${NEXT_VERSION}-1.x86_64.rpm"
fn-publish-package "$IS_RELEASE" "deb" "dokku_${NEXT_VERSION}_amd64.deb"
fn-publish-package "$IS_RELEASE" "rpm" "dokku-${NEXT_VERSION}-1.x86_64.rpm"
fn-repo-push-tags "$IS_RELEASE"
}
main "$@"

35
deb.mk
View File

@@ -1,10 +1,10 @@
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
HEROKUISH_VERSION ?= 0.3.18
HEROKUISH_VERSION ?= 0.3.27
HEROKUISH_ARCHITECTURE = amd64
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash'
DOKKU_DESCRIPTION = 'Docker powered PaaS that helps you build and manage the lifecycle of applications'
DOKKU_REPO_NAME ?= dokku/dokku
DOKKU_ARCHITECTURE = amd64
@@ -15,7 +15,7 @@ You can use any language you want, so long as the script is
executable and has the proper language requirements installed
endef
PLUGN_REPO_NAME ?= dokku/plugn
PLUGN_VERSION ?= 0.2.1
PLUGN_VERSION ?= 0.3.0
PLUGN_ARCHITECTURE = amd64
PLUGN_PACKAGE_NAME = plugn_$(PLUGN_VERSION)_$(PLUGN_ARCHITECTURE).deb
PLUGN_URL = https://github.com/dokku/plugn/releases/download/v$(PLUGN_VERSION)/plugn_$(PLUGN_VERSION)_linux_x86_64.tgz
@@ -26,7 +26,7 @@ Simplifies running a single command over SSH, and
manages authorized keys (ACL) and users in order to do so.
endef
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
SSHCOMMAND_VERSION ?= 0.5.0
SSHCOMMAND_VERSION ?= 0.7.0
SSHCOMMAND_ARCHITECTURE = amd64
SSHCOMMAND_PACKAGE_NAME = sshcommand_$(SSHCOMMAND_VERSION)_$(SSHCOMMAND_ARCHITECTURE).deb
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v$(SSHCOMMAND_VERSION)/sshcommand
@@ -92,7 +92,10 @@ deb-herokuish:
@echo " sudo docker rmi gliderlabs/herokuish" >> /tmp/tmp/post-install
@echo "fi" >> /tmp/tmp/post-install
@echo "echo 'Importing herokuish into docker (around 5 minutes)'" >> /tmp/tmp/post-install
@echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${http_proxy+x} ]]; then BUILDARGS="--build-arg http_proxy=$$http_proxy"; fi' >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${https_proxy+x} ]]; then BUILDARGS="$$BUILDARGS --build-arg https_proxy=$$https_proxy"; fi' >> /tmp/tmp/post-install
@echo 'if [[ ! -z $${BUILDARGS+x} ]]; then echo Adding proxy settings to docker build: $$BUILDARGS; fi' >> /tmp/tmp/post-install
@echo 'sudo docker build $$BUILDARGS -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null' >> /tmp/tmp/post-install
@echo "-> Cloning repository"
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" --branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null
@@ -121,24 +124,36 @@ deb-dokku:
cp dokku /tmp/build/usr/bin
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
find . -name ".DS_Store" -depth -exec rm {} \;
$(MAKE) go-build
cp common.mk /tmp/build/var/lib/dokku/core-plugins/common.mk
cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do cd /tmp/build/var/lib/dokku/core-plugins/available/$$plugin && if [ -e Makefile ]; then $(MAKE) src-clean; fi; done
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
rm /tmp/build/var/lib/dokku/core-plugins/common.mk
$(MAKE) help2man
$(MAKE) addman
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1
gzip -9 /tmp/build/usr/share/man/man1/dokku.1
cp contrib/dokku-installer.py /tmp/build/usr/share/dokku/contrib
ifeq ($(DOKKU_VERSION),master)
git describe --tags > /tmp/build/var/lib/dokku/VERSION
else
echo $(DOKKU_VERSION) > /tmp/build/var/lib/dokku/VERSION
endif
cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION
ifneq (,$(findstring false,$(IS_RELEASE)))
sed -i.bak -e "s/^/`date +%s`:/" /tmp/build/var/lib/dokku/STABLE_VERSION && rm /tmp/build/var/lib/dokku/STABLE_VERSION.bak
endif
rm /tmp/build/DEBIAN/lintian-overrides
mv debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
rm -f /tmp/build/DEBIAN/lintian-overrides
cp debian/lintian-overrides /tmp/build/usr/share/lintian/overrides/dokku
ifdef DOKKU_GIT_REV
echo "$(DOKKU_GIT_REV)" > /tmp/build/var/lib/dokku/GIT_REV
else
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
sed -i "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
endif
sed -i.bak "s/^Version: .*/Version: `cat /tmp/build/var/lib/dokku/STABLE_VERSION`/g" /tmp/build/DEBIAN/control && rm /tmp/build/DEBIAN/control.bak
dpkg-deb --build /tmp/build "/tmp/dokku_`cat /tmp/build/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
lintian "/tmp/dokku_`cat /tmp/build/var/lib/dokku/VERSION`_$(DOKKU_ARCHITECTURE).deb"
deb-plugn:
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)

8
debian/control vendored
View File

@@ -1,11 +1,11 @@
Package: dokku
Version: 0.7.0
Version: 0.9.0
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, make, curl, gcc, man-db, sshcommand, gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
Recommends: herokuish
Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
Depends: locales, git, make, curl, gcc, man-db, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1) | docker-ce | docker-ee, software-properties-common, python-software-properties
Recommends: herokuish (>= 0.3.4), parallel
Pre-Depends: nginx, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, 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,3 +1,5 @@
dokku: command-with-path-in-maintainer-script postinst:16 /usr/bin/sshcommand
dokku: maintainer-script-calls-systemctl postinst:87
dokku: changelog-file-missing-in-native-package
dokku: statically-linked-binary
dokku: unstripped-binary-or-object

4
debian/postrm vendored
View File

@@ -11,13 +11,13 @@ readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}"
main() {
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
if [[ -f /etc/systemd/system/dokku-installer.service ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
service dokku-installer stop || true
fi
rm -f /etc/init/dokku-installer.conf
rm -f /etc/init/dokku-redeploy.conf
rm -f /etc/systemd/system/dokku-installer.conf
rm -f /etc/systemd/system/dokku-installer.service
rm -f /etc/systemd/system/dokku-redeploy.service
rm -f /etc/update-motd.d/99-dokku

View File

@@ -4,7 +4,7 @@
## Backup and Migration Tutorial
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the dokku remote in you local app's repo.
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the `dokku` remote in you local app's repo.
```shell
git remote rm dokku
@@ -24,14 +24,14 @@ dokku postgres:import [db_name] < [db_name].dump
## Volumes and Static Assets
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The Dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
## Disaster Recovery
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote dokku server (assuming you still have the ssh key).
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote Dokku server (assuming you still have the ssh key).
```shell
mkdir [app-name] ; cd !$

View File

@@ -5,20 +5,23 @@
Sometimes you need to run a command on at deployment time, but before an app is completely deployed.
Common use cases include:
* Checking a database is initialised
* Checking a database is initialized
* Running database migrations
* Any commands required to set up the server (e.g. something like a Django `collectstatic`)
## `app.json` and `scripts.dokku`
Dokku accomplishes this by using an `app.json` file. The format in use is similar to format of Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
However, dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
However, Dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
For buildpack apps, simply place an `app.json` file in the root of your repository.
For dockerfile apps, place `app.json` in the configured `WORKDIR` directory; otherwise dokku defaults to the buildpack app behavior of looking in `/app`.
>NOTE: postdeploy changes are *NOT* committed to the app image.
For dockerfile apps, place `app.json` in the configured `WORKDIR` directory; otherwise Dokku defaults to the buildpack app behavior of looking in `/app`.
> NOTE: postdeploy changes are *NOT* committed to the app image.
### Example app.json
> NOTE: Only the `scripts.dokku.predeploy` and `scripts.dokku.postdeploy` tasks are supported by Dokku at this time.
```json
{
"name": "barebones nodejs",

View File

@@ -5,15 +5,15 @@
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
```
docker-options <app> [phase(s)] # Display app's Docker options for all phases (or comma separated phase list)
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
docker-options:remove <app> <phase(s)> OPTION # Remove Docker option from app for phase (comma-separated phase list)
docker-options:report [<app>] [<flag>] # Displays a docker options report for one or more apps
```
> When specifying multiple phases, they **must** be comma-separated _without_ spaces in between each phase, like so:
>
> ```shell
> dokku docker-options:add myapp deploy,run "-v /home/dokku/logs/myapp:/app/logs"
> dokku docker-options:add node-js-app deploy,run "-v /var/log/node-js-app:/app/logs"
> ```
## About Dokku phases
@@ -22,7 +22,7 @@ Dokku deploys your application in multiple "phases" and the `docker-options` plu
- `build`: the container that executes the appropriate buildpack
- `deploy`: the container that executes your running/deployed application
- `run`: the container that executes any arbitrary command via `dokku run myapp`
- `run`: the container that executes any arbitrary command via `dokku run`
## Examples
@@ -32,31 +32,63 @@ Add some options for the deployed/running app and when executing [`dokku run`](/
```shell
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
dokku docker-options:add myapp deploy "-v /home/dokku/logs/myapp:/app/logs"
dokku docker-options:add myapp run "-v /home/dokku/logs/myapp:/app/logs"
dokku docker-options:add node-js-app deploy "-v /var/log/node-js-app:/app/logs"
dokku docker-options:add node-js-app run "-v /var/log/node-js-app:/app/logs"
```
> Note: When [mounting a host directory](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) in a Dokku app you should first create that directory as user `dokku` and then mount the directory under `/app` in the container using `docker-options` as above. Otherwise the app will lack write permission in the directory.
### Output Docker options
```shell
dokku docker-options myapp
```
```
Deploy options:
-v /home/dokku/logs/myapp:/app/logs
Run options:
-v /home/dokku/logs/myapp:/app/logs
```
### Remove a Docker option
```shell
dokku docker-options:remove myapp run "-v /home/dokku/logs/myapp:/app/logs"
dokku docker-options:remove node-js-app run "-v /var/log/node-js-app:/app/logs"
```
### Displaying docker-options reports about an app
> New as of 0.8.1
You can get a report about the app's docker-options status using the `docker-options:report` command:
```shell
dokku docker-options:report
```
```
=====> node-js-app docker options information
Docker options build:
Docker options deploy: -v /var/log/node-js-app:/app/logs
Docker options run: -v /var/log/node-js-app:/app/logs
=====> python-sample docker options information
Docker options build:
Docker options deploy:
Docker options run:
=====> ruby-sample docker options information
Docker options build:
Docker options deploy:
Docker options run:
```
You can run the command for a specific app also.
```shell
dokku docker-options:report node-js-app
```
```
=====> node-js-app docker options information
Storage build mounts:
Storage deploy mounts: -v /var/log/node-js-app:/app/logs
Storage run mounts: -v /var/log/node-js-app:/app/logs
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku docker-options:report node-js-app --docker-options-build
```
## Advanced usage
In your applications folder `/home/dokku/app_name` create a file called `DOCKER_OPTIONS_RUN` (or `DOCKER_OPTIONS_BUILD` or `DOCKER_OPTIONS_DEPLOY`).
@@ -77,4 +109,4 @@ The above example will result in the following options being passed to Docker du
You may also include comments (lines beginning with a #) and blank lines in the DOCKER_OPTIONS file.
Move information on Docker options can be found here: http://docs.docker.io/en/latest/reference/run/ .
More information on Docker options can be found here: https://docs.docker.com/engine/reference/commandline/run/.

View File

@@ -2,47 +2,102 @@
> New as of 0.5.0
The preferred method to mount external containers to a dokku managed container, is to use the dokku storage plugin.
The preferred method to mount external containers to a Dokku managed container, is to use the Dokku storage plugin.
```
storage:list <app> # List bind mounts for app's container(s) (host:container)
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
storage:report [<app>] [<flag>] # Displays a checks report for one or more apps
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
```
> The storage plugin is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy/run phase.
## Ideology and Background
The storage plugin requires explicit paths on the host side. This is intentional to ensure that new users avoid running into unexpected results with implicit paths that may not exist (a feature deprecate in [Docker 1.9.0](https://github.com/docker/docker/releases/tag/v1.9.0])). The container directory is created for the mount point in the container. Any existing directory contents are not accessible after a mount is added to the container. Dokku creates a new directory `/var/lib/dokku/data/storage` during installation, it's the general consensus that new users should use this directory. Mounts are only available at run and deploy times, you must redeploy (restart) an app to mount or unmount to an existing app's container.
## Usage
This example demonstrates how to mount the recommended directory to `/storage` inside the container:
This example demonstrates how to mount the recommended directory to `/storage` inside an application called `node-js-app`:
```shell
dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
# we use a subdirectory inside of the host directory to scope it to just the app
dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage
```
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
Once you have mounted persistent storage, you will also need to restart the application. See the
[process scaling documentation](/dokku/deployment/process-management) for more information.
```shell
dokku ps:rebuild app-name
```
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
```shell
# creating storage for the app 'ruby-rails-sample'
mkdir -p /var/lib/dokku/data/storage/ruby-rails-sample
# creating storage for the app 'node-js-app'
mkdir -p /var/lib/dokku/data/storage/node-js-app
# ensure the proper user has access to this directory
chown -R dokku:dokku /var/lib/dokku/data/storage/ruby-rails-sample
chown -R dokku:dokku /var/lib/dokku/data/storage/node-js-app
# as of 0.7.x, you should chown using the `32767` user and group id
chown -R 32767:32767 /var/lib/dokku/data/storage/ruby-rails-sample
chown -R 32767:32767 /var/lib/dokku/data/storage/node-js-app
# mount the directory into your container's /app/storage directory, relative to root
dokku storage:mount app-name /var/lib/dokku/data/storage/app-name:/app/storage
dokku storage:mount app-name /var/lib/dokku/data/storage/node-js-app:/app/storage
```
You can mount one or more directories as desired by following the above pattern.
### Displaying storage reports about an app
> New as of 0.8.1
You can get a report about the app's storage status using the `storage:report` command:
```shell
dokku storage:report
```
```
=====> node-js-app storage information
Storage build mounts:
Storage deploy mounts: -v /var/lib/dokku/data/storage/node-js-app:/app/storage
Storage run mounts: -v /var/lib/dokku/data/storage/node-js-app:/app/storage
=====> python-sample storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
=====> ruby-sample storage information
Storage build mounts:
Storage deploy mounts:
Storage run mounts:
```
You can run the command for a specific app also.
```shell
dokku storage:report node-js-app
```
```
=====> node-js-app storage information
Storage build mounts:
Storage deploy mounts: -v /var/lib/dokku/data/storage/node-js-app:/app/storage
Storage run mounts: -v /var/lib/dokku/data/storage/node-js-app:/app/storage
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku storage:report node-js-app --storage-deploy-mounts
```
## Use Cases
### Persistent storage
@@ -63,14 +118,22 @@ Your app may have services that are running in memory and need to be backed up l
### Build phase
By default, dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
By default, Dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
```shell
dokku docker-options:add <app> "-v /tmp/python-test:/opt/test"
dokku docker-options:add <app> build "-v /tmp/python-test:/opt/test"
```
NOTE: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase.
You cannot use mounted volumes during the build phase of a Dockerfile deploy. This is because Docker does not support volumes when executing `docker build`.
## Docker-Options Note
> Note: **This can cause data loss** if you bind a mount under `/app` in buildpack apps as herokuish will attempt to remove the original app path during the build phase.
The storage plugins is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase.
## Application User and Persistent Storage file ownership (buildpack apps only)
> New as of 0.7.1
By default, Dokku will execute your buildpack application processes as the `herokuishuser` user. You may override this by setting the `DOKKU_APP_USER` config variable.
> NOTE: this user must exist in your herokuish image.
Additionally, Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`.

View File

@@ -0,0 +1,113 @@
# Plugin Management
> New as of 0.4.0
```
plugin:disable <name> # Disable an installed plugin (third-party only)
plugin:enable <name> # Enable a previously disabled plugin
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]] # Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
plugin:list # Print active plugins
plugin:uninstall <name> # Uninstall a plugin (third-party only)
plugin:update [name [committish]] # Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
```
```shell
# for 0.3.x
cd /var/lib/dokku/plugins
git clone <git url>
dokku plugins-install
```
> These commands require `root` permissions as the `install` and `install-dependencies` plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please inspect those plugins before running the following command as `root` user.
## Usage
You can list all installed plugins using the `plugin` command:
```shell
dokku plugin
```
```
plugn: dev
00_dokku-standard 0.9.0 enabled dokku core standard plugin
20_events 0.9.0 enabled dokku core events logging plugin
apps 0.9.0 enabled dokku core apps plugin
build-env 0.9.0 enabled dokku core build-env plugin
certs 0.9.0 enabled dokku core certificate management plugin
checks 0.9.0 enabled dokku core checks plugin
common 0.9.0 enabled dokku core common plugin
config 0.9.0 enabled dokku core config plugin
docker-options 0.9.0 enabled dokku core docker-options plugin
domains 0.9.0 enabled dokku core domains plugin
enter 0.9.0 enabled dokku core enter plugin
git 0.9.0 enabled dokku core git plugin
logs 0.9.0 enabled dokku core logs plugin
named-containers 0.9.0 enabled dokku core named containers plugin
nginx-vhosts 0.9.0 enabled dokku core nginx-vhosts plugin
plugin 0.9.0 enabled dokku core plugin plugin
proxy 0.9.0 enabled dokku core proxy plugin
ps 0.9.0 enabled dokku core ps plugin
repo 0.9.0 enabled dokku core repo plugin
shell 0.9.0 enabled dokku core shell plugin
ssh-keys 0.9.0 enabled dokku core ssh-keys plugin
storage 0.9.0 enabled dokku core storage plugin
tags 0.9.0 enabled dokku core tags plugin
tar 0.9.0 enabled dokku core tar 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.
```shell
dokku plugin:install https://github.com/dokku/dokku-postgres.git
```
```
-----> Cloning plugin repo https://github.com/dokku/dokku-postgres.git to /var/lib/dokku/plugins/available/postgres
Cloning into 'postgres'...
remote: Counting objects: 646, done.
remote: Total 646 (delta 0), reused 0 (delta 0), pack-reused 646
Receiving objects: 100% (646/646), 134.24 KiB | 0 bytes/s, done.
Resolving deltas: 100% (406/406), done.
Checking connectivity... done.
-----> Plugin postgres enabled
```
You can also uninstall a third-party plugin using the `plugin:uninstall` command:
```shell
dokku plugin:uninstall postgres
```
```
-----> Plugin postgres uninstalled
```
Enabling or disabling a plugin can also be useful in cases where you are debugging whether a third-party plugin is causing issues in your Dokku installation:
```shell
dokku plugin:disable postgres
```
```
-----> Plugin postgres disabled
```
```shell
dokku plugin:enable postgres
```
```
-----> Plugin postgres enabled
```
Finally, you can update an installed third-party plugin. This should be done after any upgrades of Dokku as there may be changes in the internal api that require an update of how the plugin interfaces with Dokku.
```shell
dokku plugin:update postgres
```
```
Plugin (postgres) updated
```

View File

@@ -3,25 +3,27 @@
> New as of 0.5.0, Enhanced in 0.6.0
```
proxy <app> # Show proxy settings for app
proxy:disable <app> # Disable proxy for app
proxy:enable <app> # Enable proxy for app
proxy:ports <app> # List proxy port mappings for app
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
proxy:ports-clear <app> # Clear all proxy port mappings for app
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
proxy:report [<app>] [<flag>] # Displays a proxy report for one or more apps
proxy:set <app> <proxy-type> # Set proxy type for app
```
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
## Container network interface binding
## Usage
### Container network interface binding
> New as of 0.5.0
By default, the deployed docker container running your app's web process will bind to the internal docker network interface (i.e. `docker inspect --format '{{ .NetworkSettings.IPAddress }}' $CONTAINER_ID`). This behavior can be modified per app by disabling the proxy (i.e. `dokku proxy:disable <app>`). In this case, the container will bind to an external interface (i.e. `0.0.0.0`) and your app container will be directly accessible by other hosts on your network.
> If a proxy is disabled, dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
> If a proxy is disabled, Dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
By way of example, in the default case, each container is bound to the docker interface:
@@ -58,7 +60,51 @@ CONTAINER ID IMAGE COMMAND CREATED
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1
```
## Proxy port mapping
### Displaying proxy reports about an app
> New as of 0.8.1
You can get a report about the app's proxy status using the `proxy:report` command:
```shell
dokku proxy:report
```
```
=====> node-js-app proxy information
Proxy enabled: true
Proxy type: nginx
Proxy port map: http:80:5000 https:443:5000
=====> python-sample proxy information
Proxy enabled: true
Proxy type: nginx
Proxy port map: http:80:5000
=====> ruby-sample proxy information
Proxy enabled: true
Proxy type: nginx
Proxy port map: http:80:5000
```
You can run the command for a specific app also.
```shell
dokku proxy:report node-js-app
```
```
=====> node-js-app proxy information
Proxy enabled: true
Proxy type: nginx
Proxy port map: http:80:5000 https:443:5000
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku proxy:report node-js-app --proxy-type
```
### Proxy port mapping
> New as of 0.6.0
@@ -139,4 +185,22 @@ dokku proxy:ports-remove node-js-app http:80:5000
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
> NOTE: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
> Note: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
#### Proxy Port Scheme
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.
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.
To change the proxy implementation in use for an application, use the `proxy:set` command:
```shell
# no validation will be performed against
# the specified proxy implementation
dokku proxy:set node-js-app nginx
```

View File

@@ -3,15 +3,17 @@
> New as of 0.6.0
```
repo:gc <app> # Runs 'git gc --agressive' against the application's repo
repo:gc <app> # Runs 'git gc --aggressive' against the application's repo
repo:purge-cache <app> # Deletes the contents of the build cache stored in the repository
```
The repository plugin is meant to allow users to perform management commands against a repository.
## Git Garbage Collection
## Usage
This will run a git gc --agressive against the applications repo. This is performed on the Dokku host, and not within an application container.
### Git Garbage Collection
This will run a git gc --aggressive against the applications repo. This is performed on the Dokku host, and not within an application container.
```shell
dokku repo:gc node-js-app
@@ -25,7 +27,7 @@ Writing objects: 100% (396/396), done.
Total 396 (delta 79), reused 315 (delta 0)
```
## Clearing Application cache
### Clearing Application cache
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:

View File

@@ -1,6 +1,6 @@
# 0.5.0 Migration Guide
## nginx-vhosts
## `nginx-vhosts` plugin
- The nginx-vhosts template language is now [sigil](https://github.com/gliderlabs/sigil)
- No need to escape literal `$` characters (or other "bash-isms")
@@ -8,7 +8,7 @@
- A detailed list of template variables can be found [here](/dokku/configuration/nginx/#available-template-variables)
- A custom nginx-vhosts template must be named `nginx.conf.sigil`
- The default path for this custom template is the root of your repo (i.e. `/app` in the container or `WORKDIR` if defined in a dockerfile app)
- Dokku no longer looks for this file in `/home/dokku/myapp` on the dokku server
- Dokku no longer looks for this file in `/home/dokku/myapp` on the Dokku server
- Check out an example template [here](/dokku/configuration/nginx/)
- Support for server-wide SSL certs have been dropped in favor of using the `certs` plugin
- `dokku certs:add myapp < certs.tar`

View File

@@ -1,6 +1,6 @@
# 0.6.0 Migration Guide
## zero-downtime deployment
## Zero-downtime deployment
- You can now **actually** disable zero-downtime deployments per-app and per-process-type
- Some config variables have been moved around
@@ -9,7 +9,7 @@
- The values for the above can be a comma-separated list of process-types or the literal string `_all_`
- See the [updated `checks`](/dokku/deployment/zero-downtime-deploys/) docs for more info
## proxy port mapping
## Proxy port mapping
- You can now configure host -> container proxy port mappings
- The UI is handled by the [proxy](/dokku/advanced-usage/proxy-management/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
@@ -20,9 +20,9 @@
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
## calling the dokku binary
## Calling the `dokku` binary
- Plugins should *not* call the dokku binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call dokku internal functions. As a result, the following dokku commands are no longer publicly exposed:
- Plugins should *not* call the `dokku` binary directly. Clients using the `--app` argument are potentially broken, amongst others, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions. As a result, the following Dokku commands are no longer publicly exposed:
- `dokku build`
- `dokku receive`
- `dokku release`

View File

@@ -0,0 +1,13 @@
# 0.7.0 Migration Guide
## Persistent Storage
We should now properly handle file ownership for mounted directories. This was enhanced in 0.7.1. See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
## Restart Policies
If you previously managed container restart policies via docker-options, these can now be managed natively via the built-in `ps` plugin. There is no migration necessary. See the [restart policy documentation](/dokku/deployment/process-management/#restart-policies) for more details.
## SSH Keys
Dokku now has an `ssh-keys` plugin that can be used to manage ssh keys for the `dokku` user on the host operating system. See the [user management documentation](/dokku/deployment/user-management/) for more details.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku",
"icons": [
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.9.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

@@ -1,7 +1,6 @@
body {
font-family: 'Open Sans', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-weight: 400;
font-size: 12px;
padding-bottom: 40px;
color: #5a5a5a;
-webkit-font-smoothing: antialiased;
@@ -21,7 +20,7 @@ h1 {
.header .heading {
color: #fff;
font-size: 23px;
margin: 0;
margin: 7px 0 0 0;
padding: 0 0 0 1em;
}
.header a {
@@ -36,13 +35,13 @@ h1 {
background-repeat: no-repeat;
}
.header .navbar-brand a {
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/dokku.png);
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/gplaypattern.png);
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}
@@ -67,7 +66,6 @@ h1 {
color: #444;
display: block;
font-weight: 400;
font-size: 14px;
margin: 0 20px;
padding: 3px 0;
text-align: center;
@@ -211,6 +209,7 @@ h1 {
.list-group-item {
border: none;
font-size: 14px;
font-weight: normal;
padding: .2rem .5rem;
color: #157577;
@@ -246,10 +245,9 @@ a.list-group-item {
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
color: rgb(71, 74, 84);
font-size: 14px;
font-weight: normal;
height: 20px;
line-height: 20px;
line-height: 1.5;
text-align: left;
}
.markdown-body h1 {

View File

@@ -1 +1,11 @@
{ "max-versions": [ "0.3.26", "0.4.14", "0.5.8", "0.6.5", "0.7.0" ] }
{
"max-versions": [
"0.3.26",
"0.4.14",
"0.5.8",
"0.6.5",
"0.7.2",
"0.8.2",
"0.9.0"
]
}

View File

@@ -1,19 +1,19 @@
# Clients
Given the constraints, running dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
Given the constraints, running Dokku commands remotely via SSH is fine. For certain configurations, the extra complication of manually invoking ssh can be a burden.
While dokku does not yet have an official client, there are a multitude of ways in which you can interact with your dokku installation. The easiest is to use the **bash** client, though you may wish to use another.
While Dokku does not yet have an official client, there are a multitude of ways in which you can interact with your Dokku installation. The easiest is to use the **bash** client, though you may wish to use another.
## (bash, zsh, etc.) `dokku_client.sh`
Of all methods, this is the *most* official method of interacting with your dokku installation. It is a bash script that interacts with a remote dokku installation via ssh. It is available in `contrib/dokku_client.sh` in the root of the dokku repository.
Of all methods, this is the *most* official method of interacting with your Dokku installation. It is a bash script that interacts with a remote Dokku installation via ssh. It is available in `contrib/dokku_client.sh` in the root of the Dokku repository.
To install, simply clone the dokku repository down and add the `dokku` alias pointing at the script:
To install, simply clone the Dokku repository down and add the `dokku` alias pointing at the script:
```shell
git clone git@github.com:dokku/dokku.git ~/.dokku
# optional: make sure that the dokku_client.sh version matches your dokku version
# optional: make sure that the dokku_client.sh version matches your Dokku version
cd ~/.dokku
git checkout <tag/branch>
@@ -35,13 +35,13 @@ alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
alias dokku 'bash $HOME/.dokku/contrib/dokku_client.sh'
```
Configure the `DOKKU_HOST` environment variable or run `dokku` from a repository with a git remote named dokku pointed at your dokku host in order to use the script as normal.
Configure the `DOKKU_HOST` environment variable or run `dokku` from a repository with a git remote named `dokku` pointed at your Dokku host in order to use the script as normal.
You can also configure a `DOKKU_PORT` environment variable if you are running ssh on a non-standard port. This defaults to `22`.
## (nodejs) dokku-toolbelt
Dokku-toolbelt is a node-based cli wrapper that proxies requests to the dokku command running on remote hosts. You can install it via the following shell command (assuming you have nodejs and npm installed):
Dokku-toolbelt is a node-based cli wrapper that proxies requests to the Dokku command running on remote hosts. You can install it via the following shell command (assuming you have nodejs and npm installed):
```shell
npm install -g dokku-toolbelt
@@ -51,7 +51,7 @@ See [documentation here](https://www.npmjs.com/package/dokku-toolbelt) for more
## (python) dokku-client
dokku-client is an extensible python-based cli wrapper for remote dokku hosts. You can install it via the following shell command (assuming you have python and pip installed):
dokku-client is an extensible python-based cli wrapper for remote Dokku hosts. You can install it via the following shell command (assuming you have python and pip installed):
```shell
pip install dokku-client
@@ -61,7 +61,7 @@ See [documentation here](https://github.com/adamcharnock/dokku-client) for more
## (ruby) Dokku CLI
Dokku CLI is a rubygem that acts as a client for your dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
Dokku CLI is a rubygem that acts as a client for your Dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokku-cli
@@ -71,7 +71,7 @@ See [documentation here](https://github.com/SebastianSzturo/dokku-cli) for more
## (ruby) DokkuClient
DokkuClient is another rubygem that acts as a client for your dokku installation with built-in support for certain external plugins. You can install it via the following shell command (assuming you have ruby and rubygems installed):
DokkuClient is another rubygem that acts as a client for your Dokku installation with built-in support for certain external plugins. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokku_client
@@ -81,7 +81,7 @@ See [documentation here](https://github.com/netguru/dokku_client) for more infor
## (ruby) Dokkufy
Dokkufy is a rubygem that handles automation of certain tasks, such as dokku setup, plugin installation, etc. You can install it via the following shell command (assuming you have ruby and rubygems installed):
Dokkufy is a rubygem that handles automation of certain tasks, such as Dokku setup, plugin installation, etc. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dokkufy
@@ -91,7 +91,7 @@ See [documentation here](https://github.com/cbetta/dokkufy) for more information
## (ruby) Dockland
Dockland is a rubygem that acts as a client for your dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
Dockland is a rubygem that acts as a client for your Dokku installation. You can install it via the following shell command (assuming you have ruby and rubygems installed):
```shell
gem install dockland

View File

@@ -2,27 +2,17 @@
Dokku itself is built out of plugins and uses [plugn](https://github.com/dokku/plugn) for its plugin system. In essence a plugin is a collection of scripts that will be run based on naming convention.
Let's take a quick look at the current dokku nginx plugin that's shipped with dokku by default.
Let's take a quick look at the current Dokku nginx plugin that's shipped with Dokku by default.
nginx-vhosts/
├── plugin.toml # plugin metadata
├── commands # contains additional commands
├── install # runs on dokku installation
├── install # runs on Dokku installation
└── post-deploy # runs after an app is deployed
## Installing a plugin
```shell
# This command requires `root` permissions as the `install` and `install-dependencies`
# plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please
# inspect those plugins before running the following command as `root` user.
sudo dokku plugin:install <git_url> [--committish tag/branch/commit|--name custom-plugin-name]
# previous versions (0.3.x and below) of dokku require a manual process to install plugins
cd /var/lib/dokku/plugins
git clone <git url>
dokku plugins-install
```
[See the plugin management documentation](/dokku/advanced-usage/plugin-management/).
## Creating your own plugin
@@ -30,12 +20,13 @@ dokku plugins-install
## Official Plugins (Beta)
The following plugins are available and provided by dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
The following plugins are available and provided by Dokku maintainers. Where noted, these plugins should be considered beta software and may not have been used as thoroughly as community plugins. Please file issues against their respective issue trackers.
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [CouchDB (beta)](https://github.com/dokku/dokku-couchdb) | [dokku][] | 0.4.0+ |
| [Elasticsearch (beta)](https://github.com/dokku/dokku-elasticsearch-plugin) | [dokku][] | 0.4.0+ |
| [Grafana/Graphite/Statsd (beta)](https://github.com/dokku/dokku-graphite-grafana) | [dokku][] | 0.4.0+ |
| [MariaDB (beta)](https://github.com/dokku/dokku-mariadb-plugin) | [dokku][] | 0.4.0+ |
| [Memcached (beta)](https://github.com/dokku/dokku-memcached-plugin) | [dokku][] | 0.4.0+ |
| [Mongo (beta)](https://github.com/dokku/dokku-mongo-plugin) | [dokku][] | 0.4.0+ |
@@ -53,7 +44,7 @@ The following plugins are available and provided by dokku maintainers. Where not
## Community plugins
Note: The following plugins have been supplied by our community and may not have been tested by dokku maintainers.
Note: The following plugins have been supplied by our community and may not have been tested by Dokku maintainers.
[256dpi]: https://github.com/256dpi
[abossard]: https://github.com/dudagroup
@@ -66,23 +57,25 @@ Note: The following plugins have been supplied by our community and may not have
[Aluxian]: https://github.com/Aluxian
[Aomitayo]: https://github.com/Aomitayo
[apmorton]: https://github.com/apmorton
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[basgys]: https://github.com/basgys
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
[blag]: https://github.com/blag
[cameron-martin]: https://github.com/cameron-martin
[candlewaster]: https://notabug.org/candlewaster
[cedricziel]: https://github.com/cedricziel
[cef]: https://github.com/cef
[cjblomqvist]: https://github.com/cjblomqvist
[crisward]: https://github.com/crisward
[cu12]: https://github.com/cu12
[darkpixel]: https://github.com/darkpixel
[dokku]: https://github.com/dokku
[dokku-community]: https://github.com/dokku-community
[dyson]: https://github.com/dyson
[F4-Group]: https://github.com/F4-Group
[fermuch]: https://github.com/fermuch
[fgrehm]: https://github.com/fgrehm
[Flink]: https://github.com/Flink
[gdi2290]: https://github.com/gdi2290
[heichblatt]: https://github.com/heichblatt
[hughfletcher]: https://github.com/hughfletcher
[iamale]: https://github.com/iamale
[ignlg]: https://github.com/ignlg
@@ -92,11 +85,13 @@ Note: The following plugins have been supplied by our community and may not have
[jagandecapri]: https://github.com/jagandecapri
[jeffutter]: https://github.com/jeffutter
[jlachowski]: https://github.com/jlachowski
[josegonzalez]: https://github.com/josegonzalez
[Kloadut]: https://github.com/Kloadut
[krisrang]: https://github.com/krisrang
[luxifer]: https://github.com/luxifer
[Maciej Łebkowski]: https://github.com/mlebkowski
[matto1990]: https://github.com/matto1990
[mbreit]: https://github.com/mbreit
[mbriskar]: https://github.com/mbriskar
[michaelshobbs]: https://github.com/michaelshobbs
[mikecsh]: https://github.com/mikecsh
@@ -106,6 +101,7 @@ Note: The following plugins have been supplied by our community and may not have
[motin]: https://github.com/motin
[musicglue]: https://github.com/musicglue
[neam]: https://github.com/neam
[nickcharlton]: https://github.com/nickcharlton
[nickstenning]: https://github.com/nickstenning
[nornagon]: https://github.com/nornagon
[ohardy]: https://github.com/ohardy
@@ -125,6 +121,7 @@ Note: The following plugins have been supplied by our community and may not have
[thrashr888]: https://github.com/thrashr888
[wmluke]: https://github.com/wmluke
[Zenedith]: https://github.com/Zenedith
[fteychene]: https://github.com/fteychene
### Datastores
@@ -132,20 +129,19 @@ Note: The following plugins have been supplied by our community and may not have
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
| [MariaDB](https://github.com/Kloadut/dokku-md-plugin) | [Kloadut][] | 0.3.x |
| [MariaDB (single container)](https://github.com/ohardy/dokku-mariadb) | [ohardy][] | 0.3.x |
| [MariaDB (single container)](https://github.com/krisrang/dokku-mariadb) | [krisrang][] | 0.3.26+ |
| [PostgreSQL](https://github.com/jlachowski/dokku-pg-plugin) | [jlachowski][] | 0.3.x |
| [PostgreSQL (single container)](https://github.com/ohardy/dokku-psql) | [ohardy][] | 0.3.x |
| [PostgreSQL (single container)](https://github.com/Flink/dokku-psql-single-container) | [Flink][] | 0.3.26+ |
#### Caching
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Nginx Cache](https://github.com/Aluxian/dokku-nginx-cache) | [Aluxian][] | 0.5.0+ |
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
| [Redis (single container)](https://github.com/ohardy/dokku-redis) | [ohardy][] | 0.3.x |
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
#### Queuing
@@ -166,48 +162,33 @@ Note: The following plugins have been supplied by our community and may not have
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
### Process Managers
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | |
| [Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | Compatible with 0.2.x |
| [Forego](https://github.com/Flink/dokku-forego) | [Flink][] | 0.4.0+ |
| [Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | 0.4.0+ |
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
| [Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | 0.3.x |
| [Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | 0.3.x |
[c77cbf1]: https://github.com/dokku/dokku/commit/c77cbf1d3ae07f0eafb85082ed7edcae9e836147
[28de3ec]: https://github.com/dokku/dokku/commit/28de3ecaa3231a223f83fd8d03f373308673bc40
### Dokku Features
### Plugins Implementing New Dokku Functionality
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
| [App User](https://github.com/expa/dokku-app-user) | [michaelshobbs][] | 0.4.0+ |
| [Docker Direct](https://github.com/josegonzalez/dokku-docker-direct) | [josegonzalez][] | 0.4.0+ |
| [Dokku Clone](https://github.com/crisward/dokku-clone) | [crisward][] | 0.4.0+ |
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
| [Dokku Copy App Config Files](https://github.com/heichblatt/dokku-supply-config) | [heichblatt][] | |
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
| [Dokku Copy App Config Files](https://github.com/josegonzalez/dokku-supply-config) | [josegonzalez][] | 0.4.0+ |
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
| [Dokku Require](https://github.com/crisward/dokku-require)<sup>2</sup> | [crisward][] | 0.4.0+ |
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
| [Global Certificates](https://github.com/josegonzalez/dokku-global-cert) | [josegonzalez][] | 0.5.0+ |
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.4.0+ |
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
| [Nuke Containers](https://github.com/heichblatt/dokku-nuke) | [heichblatt][] | |
| [Open App Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | 0.4.0+ |
| [Proctype Filter](https://github.com/expa/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.3.x |
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
| [Monit (Health Checks)](https://github.com/mbreit/dokku-monit) | [mbreit][] | 0.8.0+ |
| [Nuke Containers](https://github.com/josegonzalez/dokku-nuke) | [josegonzalez][] | 0.4.0+ |
| [Open App Ports](https://github.com/josegonzalez/dokku-ports) | [josegonzalez][] | 0.3.x |
| [Proctype Filter](https://github.com/michaelshobbs/dokku-proctype-filter) | [michaelshobbs][] | 0.4.0+ |
| [robots.txt](https://notabug.org/candlewaster/dokku-robots.txt) | [candlewaster][] | 0.4.x |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>3</sup> | [cedricziel][] | 0.4.0+ |
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>4</sup> | [cedricziel][] | 0.3.x |
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | 0.3.x |
| [Application build hook](https://github.com/fteychene/dokku-build-hook) | [fteychene][] | 0.4.0+ |
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
@@ -224,57 +205,65 @@ Note: The following plugins have been supplied by our community and may not have
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Airbrake deploy](https://github.com/Flink/dokku-airbrake-deploy) | [Flink][] | 0.4.0+ |
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.2.0+ (tag 0.2.0), 0.3.0+ (tag 0.3.0), 0.4.0+ |
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | |
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | |
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | |
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | |
| [APT](https://github.com/F4-Group/dokku-apt) | [F4-Group][] | 0.4.0+ |
| [Bower install](https://github.com/alexanderbeletsky/dokku-bower-install) | [alexanderbeletsky][] | 0.3.x |
| [Bower/Grunt](https://github.com/thrashr888/dokku-bower-grunt-build-plugin) | [thrashr888][] | 0.3.x |
| [Bower/Gulp](https://github.com/gdi2290/dokku-bower-gulp-build-plugin) | [gdi2290][] | 0.3.x |
| [Bower/Gulp](https://github.com/jagandecapri/dokku-bower-gulp-build-plugin) | [jagandecapri][] | 0.3.x |
| [Builders: bower, compass, gulp, grunt](https://github.com/ignlg/dokku-builders-plugin) | [ignlg][] | 0.4.0+ |
| [Chef cookbook](https://github.com/nickcharlton/dokku-cookbook) | [nickcharlton][] | |
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski] | <0.4.0 |
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-grafana) | [jlachowski] | 0.4.0+, graphite & statsd plugin with grafana dashboard frontend |
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.3.26+ |
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | |
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | |
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | 0.3.15+, Dockerfile support |
| [Node](https://github.com/ademuk/dokku-nodejs) | [ademuk][] | 0.3.x |
| [Node](https://github.com/pnegahdar/dokku-node) | [pnegahdar][] | 0.3.x |
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
| [Tor](https://github.com/michaelshobbs/dokku-tor) | [michaelshobbs][] | 0.4.0+ |
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
| [Rollbar](https://github.com/iloveitaly/dokku-rollbar) | [iloveitaly][] | 0.5.0+ |
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
| [User ACL](https://github.com/dokku-community/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | 0.3.x |
| [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+ |
### Deprecated Plugins
The following plugins have been removed as their functionality is now in Dokku Core.
| Plugin | Author | In Dokku Since |
| ------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------- |
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
| [Events Logger](https://github.com/alessio/dokku-events) | [alessio][] | v0.3.21 (events plugin) |
| [Host Port binding](https://github.com/stuartpb/dokku-bind-port) | [stuartpb][] | v0.3.17 (docker-options plugin) |
| [List Containers](https://github.com/heichblatt/dokku-list) | [heichblatt][] | v0.3.14 (ps plugin |
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
| Plugin | Author | In Dokku Since |
| ------------------------------------------------------------------------------------------------- | --------------------- | ----------------------------------------- |
| [App User](https://github.com/michaelshobbs/dokku-app-user) | [michaelshobbs][] | v0.7.1 (herokuish 0.3.18) |
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
| [Debug](https://github.com/josegonzalez/dokku-debug) | [josegonzalez][] | v0.3.9 (trace command) |
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | v0.4.2 (named containers plugin) |
| [Events Logger](https://github.com/alessio/dokku-events) | [alessio][] | v0.3.21 (events plugin) |
| [Host Port binding](https://github.com/stuartpb/dokku-bind-port) | [stuartpb][] | v0.3.17 (docker-options plugin) |
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
| [List Containers](https://github.com/josegonzalez/dokku-list) | [josegonzalez][] | v0.3.14 (ps plugin) |
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | v0.4.0 (herokuish) |
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
| [Pre-Deploy Tasks](https://github.com/michaelshobbs/dokku-app-predeploy-tasks) | [michaelshobbs][] | v0.5.0 (deployment tasks) |
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
| [Process Manager: Circus](https://github.com/apmorton/dokku-circus) | [apmorton][] | v0.3.14/0.7.0 (ps/restart policy plugin) |
| [Process Manager: Forego](https://github.com/Flink/dokku-forego) | [Flink][] | v0.3.14/0.7.0 (ps plugin) |
| [Process Manager: Forego](https://github.com/iskandar/dokku-forego) | [iskandar][] | v0.3.14/0.7.0 (ps plugin) |
| [Process Manager: Logging Supervisord](https://github.com/sehrope/dokku-logging-supervisord) | [sehrope][] | v0.3.14/0.7.0 (ps plugin) |
| [Process Manager: Shoreman ](https://github.com/statianzo/dokku-shoreman) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
| [Process Manager: Supervisord](https://github.com/statianzo/dokku-supervisord) | [statianzo][] | v0.3.14/0.7.0 (ps plugin) |
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
| [Reset mtime](https://github.com/mixxorz/dokku-docker-reset-mtime) | [mixxorz][] | Docker 1.8+ |
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
| [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration) | [motin][] | v0.3.10 (domains plugin) |
| [Volume (persistent storage)](https://github.com/ohardy/dokku-volume) | [ohardy][] | v0.5.0 (storage plugin) |
<sup>1</sup> Conflicts with [VHOSTS Custom Configuration](https://github.com/neam/dokku-nginx-vhosts-custom-configuration)
<sup>2</sup> Similar to the heroku-labs feature (see https://devcenter.heroku.com/articles/labs-user-env-compile)
@@ -289,10 +278,14 @@ The following plugins are no longer maintained by their developers.
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
| [Chef cookbooks](https://github.com/fgrehm/chef-dokku) | [fgrehm][] | |
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
| [Graphite/statsd](https://github.com/jlachowski/dokku-graphite-plugin) | [jlachowski][] | < 0.4.0 |
| [HipChat Notifications](https://github.com/cef/dokku-hipchat) | [cef][] | |
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
@@ -301,3 +294,6 @@ The following plugins are no longer maintained by their developers.
| [PostgreSQL (single container)](https://github.com/jeffutter/dokku-postgresql-plugin) | [jeffutter][] | This plugin creates a single postgresql container that all your apps can use. Thus only one instance of postgresql running (good for servers without a ton of memory). |
| [RiakCS (single container)](https://github.com/jeffutter/dokku-riakcs-plugin) | [jeffutter][] | Incompatible with 0.2.0 (checked at [dccee02][]) |
| [Redis](https://github.com/luxifer/dokku-redis-plugin) | [luxifer][] | |
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.

View File

@@ -14,7 +14,7 @@ Because there are so many different DNS server packages out there as well as a t
* We assume you have a passing familiarity with DNS. If not, you can read an [in-depth article](http://www.diaryofaninja.com/blog/2012/03/03/devops-dns-for-developers-ndash-now-therersquos-no-excuse-not-to-know) on DNS. But basically you need to know that DNS changes names (like example.tld) into addresses (like 127.0.0.1)
* We assume you already have a domain name registered and pointed to your favorite Managed DNS Provider or have your own BIND DNS server running.
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md) to get dokku installed. Don't do the install just yet though.
* You have a server on the internet and are about to follow the instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md) to get Dokku installed. Don't do the install just yet though.
## Caching
@@ -29,13 +29,13 @@ Don't be afraid to ask if you need help. Create a [new issue](https://github.co
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
Dokku uses DNS to differentiate between apps on your dokku-powered server. If you are using the domain `example.tld`, and you have two apps `myapp1` and `myapp2`, dokku will make them available at `myapp1.example.tld` and `myapp2.example.tld`.
Dokku uses DNS to differentiate between apps on your dokku-powered server. If you are using the domain `example.tld`, and you have two apps `myapp1` and `myapp2`, Dokku will make them available at `myapp1.example.tld` and `myapp2.example.tld`.
To get started, you need to know the IP address of your dokku server. Connect to it and run `ifconfig` or `ip addr` to see the IP address.
To get started, you need to know the IP address of your Dokku server. Connect to it and run `ifconfig` or `ip addr` to see the IP address.
Now you have to make a decision about your domain. Do you want everything and anything at `example.tld` to go to your dokku server, or would you rather use a 'sub domain' for your dokku server?
Now you have to make a decision about your domain. Do you want everything and anything at `example.tld` to go to your Dokku server, or would you rather use a 'sub domain' for your Dokku server?
In other words, do you want your applications on your dokku server accessible via `myapp.example.tld` or via `myapp.myserver.example.tld`?
In other words, do you want your applications on your Dokku server accessible via `myapp.example.tld` or via `myapp.myserver.example.tld`?
#### Using a sub-domain (myapp.myserver.example.tld)

View File

@@ -3,14 +3,16 @@
> New as of 0.3.10
```
domains:add <app> DOMAIN # Add a domain to app
domains:add-global <domain> # Add global domain name
domains [<app>] # List domains
domains:clear <app> # Clear all domains for app
domains:disable <app> # Disable VHOST support
domains:enable <app> # Enable VHOST support
domains:remove <app> DOMAIN # Remove a domain from app
domains:remove-global <domain> # Remove global domain name
domains:add <app> <domain> [<domain> ...] # Add domains to app
domains:add-global <domain> [<domain> ...] # Add global domain names
domains:clear <app> # Clear all domains for app
domains:disable <app> # Disable VHOST support
domains:enable <app> # Enable VHOST support
domains:remove <app> <domain> [<domain> ...] # Remove domains from app
domains:remove-global <domain> [<domain> ...] # Remove global domain names
domains:report [<app>] [<flag>] # Displays a domains report for one or more apps
domains:set <app> <domain> [<domain> ...] # Set domains for app
domains:set-global <domain> [<domain> ...] # Set global domain names
```
> Adding a domain before deploying an application will result in port mappings being set. This may cause issues for applications that use non-standard ports, as those will not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
@@ -39,7 +41,7 @@ NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
If the `nginx-hostname` plugin has no output, the normal hostname algorithm will be executed.
## Disabling VHOSTS
@@ -68,11 +70,64 @@ dokku domains:clear myapp
# remove a custom domain from app
dokku domains:remove myapp example.com
# set all custom domains for app
dokku domains:set myapp example.com example.org
```
## Displaying domains reports about an app
> New as of 0.8.1
You can get a report about the app's domains status using the `domains:report` command:
```shell
dokku domains:report
```
```
=====> node-js-app domains information
Domains app enabled: true
Domains app vhosts: ruby-sample.example.org
Domains global enabled: true
Domains global vhosts: example.org
=====> python-sample domains information
Domains app enabled: true
Domains app vhosts: ruby-sample.example.org
Domains global enabled: true
Domains global vhosts: example.org
=====> ruby-sample domains information
Domains app enabled: true
Domains app vhosts: ruby-sample.example.org
Domains global enabled: true
Domains global vhosts: example.org
```
You can run the command for a specific app also.
```shell
dokku domains:report node-js-app
```
```
=====> node-js-app domains information
Domains app enabled: true
Domains app vhosts: node-js-app.example.org
Domains global enabled: true
Domains global vhosts: example.org
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku domains:report node-js-app --domains-app-enabled
```
## Default site
By default, dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration.
Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`:
```nginx
server {
@@ -85,17 +140,10 @@ server {
}
```
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
Make sure to reload nginx after creating this file by running `service nginx reload`.
```nginx
# Swap both conf.d include line and the sites-enabled include line. From:
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
This will catch all unknown HOST header values and return a `410 Gone` response. You can replace the `return 410;` with `return 444;` which will cause nginx to not respond to requests that do not match known domains (connection refused).
# to the following
The configuration file must be loaded before `/etc/nginx/conf.d/dokku.conf`, so it can not be arranged as a vhost in `/etc/nginx/sites-enabled` that is only processed afterwards.
include /etc/nginx/sites-enabled/*;
include /etc/nginx/conf.d/*.conf;
```
Alternatively, you may push an app to your dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.
Alternatively, you may push an app to your Dokku host with a name like "00-default". As long as it lists first in `ls /home/dokku/*/nginx.conf | head`, it will be used as the default nginx vhost.

View File

@@ -69,7 +69,7 @@ upstream {{ .APP }} {
```
{{ .APP }} Application name
{{ .APP_SSL_PATH }} Path to SSL certificate and key
{{ .DOKKU_ROOT }} Global dokku root directory (ex: app dir would be `{{ .DOKKU_ROOT }}/{{ .APP }}`)
{{ .DOKKU_ROOT }} Global Dokku root directory (ex: app dir would be `{{ .DOKKU_ROOT }}/{{ .APP }}`)
{{ .DOKKU_APP_LISTENERS }} List of IP:PORT pairs of app containers
{{ .NGINX_PORT }} Non-SSL nginx listener port (same as `DOKKU_NGINX_PORT` config var)
{{ .NGINX_SSL_PORT }} SSL nginx listener port (same as `DOKKU_NGINX_SSL_PORT` config var)
@@ -81,7 +81,7 @@ upstream {{ .APP }} {
{{ .SSL_SERVER_NAME }} List of SSL VHOSTS
```
> NOTE: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
> Note: Application config variables are available for use in custom templates. To do so, use the form of `{{ var "FOO" }}` to access a variable named `FOO`.
### Example HTTP to HTTPS Custom Template
@@ -198,7 +198,7 @@ chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
service nginx reload
```
The example above uses additional configuration files directly on the dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
The example above uses additional configuration files directly on the Dokku host. Unlike the `nginx.conf.sigil` file, these additional files will not be copied over from your application repo, and thus need to be placed in the `/home/dokku/myapp/nginx.conf.d/` directory manually.
## Domains plugin

View File

@@ -7,8 +7,8 @@ Dokku supports SSL/TLS certificate inspection and CSR/Self-signed certificate ge
```
certs:add <app> CRT KEY # Add an ssl endpoint to an app. Can also import from a tarball on stdin.
certs:generate <app> DOMAIN # Generate a key and certificate signing request (and self-signed certificate)
certs:info <app> # Show certificate information for an ssl endpoint.
certs:remove <app> # Remove an SSL Endpoint from an app.
certs:report [<app>] [<flag>] # Displays an ssl report for one or more apps
certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can also import from a tarball on stdin
```
@@ -29,8 +29,7 @@ The `certs:add` command can be used to push a `tar` containing a certificate `.c
```shell
tar cvf cert-key.tar server.crt server.key
# replace APP with the name of your application
dokku certs:add <app> < cert-key.tar
dokku certs:add node-js-app < cert-key.tar
```
> Note: If your `.crt` file came alongside a `.ca-bundle`, you'll want to concatenate those into a single `.crt` file before adding it to the `.tar`.
@@ -51,42 +50,76 @@ Note that with the default nginx template, requests will be redirected to the `h
The `certs:generate` command will walk you through the correct `openssl` commands to create a key, csr and a self-signed cert for a given app/domain. We automatically put the self-signed cert in place as well as add the specified domain to the application configuration.
If you decide to obtain a CA signed certficate, you can import that certificate using the aformentioned `dokku certs:add` command.
### Certificate information
The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists.
```shell
dokku certs:info node-js-app
```
```
-----> Fetching SSL Endpoint info for node-js-app...
-----> Certificate details:
=====> Common Name(s):
=====> test.dokku.me
=====> Expires At: Aug 24 23:32:59 2016 GMT
=====> Issuer: C=US, ST=California, L=San Francisco, O=dokku.me, CN=test.dokku.me
=====> Starts At: Aug 25 23:32:59 2015 GMT
=====> Subject: C=US; ST=California; L=San Francisco; O=dokku.me; CN=test.dokku.me
=====> SSL certificate is self signed.
```
If you decide to obtain a CA signed certificate, you can import that certificate using the aforementioned `dokku certs:add` command.
### Certificate removal
The `certs:remove` command only works on app-specific certificates. It will `rm` the app-specific tls directory, rebuild the nginx configuration, and reload nginx.
### Displaying certificate reports about an app
> New as of 0.8.1
You can get a report about the apps ssl status using the `certs:report` command:
```shell
dokku certs:report
```
```
=====> node-js-sample
Ssl dir: /home/dokku/node-js-sample/tls
Ssl enabled: true
Ssl hostnames: *.node-js-sample.org node-js-sample.org
Ssl expires at: Oct 5 23:59:59 2019 GMT
Ssl issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA
Ssl starts at: Oct 5 00:00:00 2016 GMT
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.node-js-sample.org
Ssl verified: self signed.
=====> python-sample
Ssl dir: /home/dokku/python-sample/tls
Ssl enabled: false
Ssl hostnames:
Ssl expires at:
Ssl issuer:
Ssl starts at:
Ssl subject:
Ssl verified:
```
You can run the command for a specific app also.
```shell
dokku certs:report node-js-sample
```
```
=====> node-js-sample ssl information
Ssl dir: /home/dokku/node-js-sample/tls
Ssl enabled: true
Ssl hostnames: *.example.org example.org
Ssl expires at: Oct 5 23:59:59 2019 GMT
Ssl issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA
Ssl starts at: Oct 5 00:00:00 2016 GMT
Ssl subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.example.org
Ssl verified: self signed.
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku certs:report node-js-sample --ssl-enabled
```
## HSTS Header
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
The [HSTS header](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security) is an HTTP header that can inform browsers that all requests to a given site should be made via HTTPS. Dokku does not, by default, enable this header. It is thus left up to you, the user, to enable it for your site.
Beware that if you enable the header and a subsequent deploy of your application results in an HTTP deploy (for whatever reason), the way the header works means that a browser will not attempt to request the HTTP version of your site if the HTTPS version fails.
## Running behind a load balancer
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-For` and `X-Forwarded-Port`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-Port` and `X-Forwarded-For`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/configuration/nginx/#customizing-the-nginx-configuration)
@@ -126,3 +159,7 @@ Only use this option if:
If it's possible to make HTTP/S requests directly to Nginx, bypassing the load balancer, or if the load balancer is not configured to set these headers, then it becomes possible for a client to set these headers to arbitrary values.
This could result in security issue, for example, if your application looks at the value of the `X-Forwarded-Proto` to determine if the request was made over HTTPS.
### SSL Port Exposure
When your app is served from port `80` then the `/home/dokku/APP/nginx.conf` file will automatically be updated to instruct nginx to respond to ssl on port 443 as a new cert is added. If your app uses a non-standard port (perhaps you have a dockerfile deploy exposing port `99999`) you may need to manually expose an ssl port via `dokku proxy:ports-add <APP> https:443:99999`.

View File

@@ -6,6 +6,7 @@ Once Dokku has been configured with at least one user, applications can be deplo
```shell
# from your local machine
# SSH access to github must be enabled on this host
git clone git@github.com:heroku/ruby-rails-sample.git
```
@@ -14,7 +15,7 @@ git clone git@github.com:heroku/ruby-rails-sample.git
Create the application on the Dokku host. You will need to ssh onto the host to run this command.
```shell
# on your dokku host
# on your Dokku host
dokku apps:create ruby-rails-sample
```
@@ -23,7 +24,7 @@ dokku apps:create ruby-rails-sample
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/community/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
```shell
# on your dokku host
# on your Dokku host
# install the postgres plugin
# plugin installation requires root, hence the user change
sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git
@@ -39,7 +40,7 @@ dokku postgres:create rails-database
Once the service creation is complete, set the `POSTGRES_URL` environment variable by linking the service.
```shell
# on your dokku host
# on your Dokku host
# each official datastore offers a `link` method to link a service to any application
dokku postgres:link rails-database ruby-rails-sample
```
@@ -52,6 +53,8 @@ Now you can deploy the `ruby-rails-sample` app to your Dokku server. All you hav
```shell
# from your local machine
# the remote username *must* be dokku or pushes will fail
cd ruby-rails-sample
git remote add dokku dokku@dokku.me:ruby-rails-sample
git push dokku master
```
@@ -90,6 +93,18 @@ Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku <local branch>:master```
An alternative is to use the `DOKKU_DEPLOY_BRANCH` application config value to specify a branch that should be deployed. The implicit default is master, and this can be modified both at the app and global level:
```shell
# on your Dokku host
# set it globally
dokku config:set --global DOKKU_DEPLOY_BRANCH=some-branch
# override for a specific app
dokku config:set ruby-rails-sample DOKKU_DEPLOY_BRANCH=some-branch
```
You can also support pushing multiple branches using the [receive-branch](/dokku/development/plugin-triggers/#receive-branch) plugin trigger in a custom plugin.
### Skipping deployment
@@ -97,16 +112,27 @@ You can also support pushing multiple branches using the [receive-branch](/dokku
If you only want to rebuild and tag a container, you can skip the deployment phase by setting `$DOKKU_SKIP_DEPLOY` to `true` by running:
``` shell
# on your dokku host
# on your Dokku host
dokku config:set ruby-rails-sample DOKKU_SKIP_DEPLOY=true
```
### Re-Deploying / restarting
If you need to re-deploy (or restart) your app:
```shell
# on your Dokku host
dokku ps:rebuild ruby-rails-sample
```
See the [process scaling documentation](/dokku/deployment/process-management) for more information.
### Deploying with private git submodules
Dokku uses git locally (i.e. not a docker image) to build its own copy of your app repo, including submodules. This is done as the `dokku` user. Therefore, in order to deploy private git submodules, you'll need to drop your deploy key in `/home/dokku/.ssh/` and potentially add github.com (or your VCS host key) into `/home/dokku/.ssh/known_hosts`. The following test should help confirm you've done it correctly.
```shell
# on your dokku host
# on your Dokku host
su - dokku
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh -T git@github.com
@@ -119,6 +145,8 @@ Note that if the buildpack or dockerfile build process require ssh key access fo
The name of remote repository is used as the name of application to be deployed, as for example above:
```shell
# from your local machine
# the remote username *must* be dokku or pushes will fail
git remote add dokku dokku@dokku.me:ruby-rails-sample
git push dokku master
```
@@ -131,6 +159,8 @@ remote: http://ruby-rails-sample.dokku.me
You can also specify fully qualified names, say `app.dokku.me`, as
```shell
# from your local machine
# the remote username *must* be dokku or pushes will fail
git remote add dokku dokku@dokku.me:app.dokku.me
git push dokku master
```
@@ -143,6 +173,8 @@ remote: http://app.dokku.me
This is in particular useful, then you want to deploy to root domain, as
```shell
# from your local machine
# the remote username *must* be dokku or pushes will fail
git remote add dokku dokku@dokku.me:dokku.me
git push dokku master
```

View File

@@ -3,16 +3,24 @@
> New as of 0.3.1
```
apps # List your apps
apps:clone <old-app> <new-app> # Clones an app
apps:create <app> # Create a new app
apps:destroy <app> # Permanently destroy an app
apps:list # List your apps
apps:rename <old-app> <new-app> # Rename an app
apps:report [<app>] [<flag>] # Display report about an app
```
You can easily list all available applications using the `apps` command:
## Usage
### Listing Applications
> New as of 0.8.1. Use the `apps` command for older versions.
You can easily list all available applications using the `apps:list` command:
```shell
dokku apps
dokku apps:list
```
```
@@ -21,10 +29,10 @@ node-js-app
python-app
```
Note that you can easily hide extra output from dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
Note that you can easily hide extra output from Dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
```shell
dokku --quiet apps
dokku --quiet apps:list
```
```
@@ -32,7 +40,7 @@ node-js-app
python-app
```
## Manually creating an application
### Manually creating an application
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the `apps:create` command:
@@ -50,7 +58,7 @@ Once created, you can configure the application as normal, and deploy the applic
- create and link datastores
- set environment variables
## Removing a deployed app
### Removing a deployed app
In some cases, you may need to destroy an application, whether it is because the application is temporary or because it was misconfigured. In these cases, you can use the `apps:destroy` command. Performing any destructive actions in Dokku requires confirmation, and this command will ask for the name of the application being deleted before doing so.
@@ -80,7 +88,7 @@ Destroying node-js-app (including all add-ons)
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
## Renaming a deployed app
### Renaming a deployed app
> New as of 0.4.7
@@ -108,3 +116,72 @@ Renaming node-js-app to io-js-app... done
```
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
### Cloning an existing app
> New as of 0.8.1
You can clone an existing app using the `apps:clone` command. Note that the application *must* have been deployed at least once, or the rename will not complete successfully:
```shell
dokku apps:clone node-js-app io-js-app
```
```
Cloning node-js-app to io-js-app... done
```
This will copy all of your app's contents into a new app directory with the name of your choice and then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
> Warning: If you have exposed specific ports via docker-options, added generic domains, or performed anything that cannot be done against multiple applications, `apps:clone` may result in errors.
By default, Dokku will deploy this new application, though you can skip the deploy by using the `--skip-deploy` flag:
```shell
dokku apps:clone --skip-deploy node-js-app io-js-app
```
### Displaying reports about an app
> New as of 0.8.1
You can get a report about the deployed apps using the `apps:report` command:
```shell
dokku apps:report
```
```
=====> node-js-app
App dir: /home/dokku/node-js-app
Git sha: dbddc3f
App cid: 7b18489c98be
Status: running
=====> python-sample
not deployed
=====> ruby-sample
App dir: /home/dokku/ruby-sample
Git sha: a2d477c
App cid: 78a44d71012a
Status: running
```
You can run the command for a specific app also.
```shell
dokku apps:report node-js-app
```
```
=====> node-js-app
App dir: /home/dokku/node-js-app
Git sha: dbddc3f
App cid: 7b18489c98be
Status: running
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku apps:report node-js-app --git-sha
```

33
docs/deployment/logs.md Normal file
View File

@@ -0,0 +1,33 @@
# Log Management
```
logs <app> # display recent log output
```
## Usage
### Application Logs
You can easily get logs of an application using the `logs` command:
```shell
dokku logs node-js-app
```
## Behavioral modifiers
Dokku also supports certain command-line arguments that augment the `log` command's behavior.
```
-n, --num NUM # the number of lines to display
-p, --ps PS # only display logs from the given process
-t, --tail # continually stream logs
-q, --quiet # display raw logs without colors, time and names
```
You can use these modifiers as follows:
```shell
dokku logs node-js-app -t -p web
```
will show logs continually from the web process.

View File

@@ -9,17 +9,16 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
## Specifying a custom buildpack
In certain cases you may want to specify a custom buildpack. While dokku uses herokuish to support all the [official heroku buildpacks](https://github.com/gliderlabs/herokuish#buildpacks), it is possible that the buildpack detection does not work well for your application. As well, you may wish to use a custom buildpack to handle specific application logic.
In certain cases you may want to specify a custom buildpack. While Dokku uses herokuish to support all the [official heroku buildpacks](https://github.com/gliderlabs/herokuish#buildpacks), it is possible that the buildpack detection does not work well for your application. As well, you may wish to use a custom buildpack to handle specific application logic.
To use a specific buildpack, you can run the following dokku command:
To use a specific buildpack, you can run the following Dokku command:
```shell
# replace APP with the name of your application
# replace REPOSITORY_URL with your buildpack's url
dokku config:set APP BUILDPACK_URL=REPOSITORY_URL
dokku config:set node-js-app BUILDPACK_URL=REPOSITORY_URL
# example: using a specific ruby buildpack version
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v142
dokku config:set node-js-app BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v142
```
Please check the documentation for your particular buildpack as you may need to include configuration files (such as a Procfile) in your project root.
@@ -45,16 +44,14 @@ As Dokku pins all buildpacks via herokuish releases, there may be occasions wher
```shell
# using the latest nodejs buildpack
# replace APP with the name of your application
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs
dokku config:set node-js-app BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs
```
You may also wish to use a **specific** version of a buildpack, which is also simple
```shell
# using v87 of the nodejs buildpack
# replace APP with the name of your application
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
dokku config:set node-js-app BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
```
## Specifying commands via Procfile

View File

@@ -17,9 +17,9 @@ To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of
Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port per line) and setup nginx to proxy the same port numbers to listen publicly. If you would like to change the exposed port, you should do so within your `Dockerfile` and app.
> NOTE: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
> Note: Nginx does not support proxying UDP. UDP ports can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
If you do not explicitly `EXPOSE` a port in your `Dockerfile`, Dokku will configure the nginx proxy to listen on port 80 (and 443 for TLS) and forward traffic to your app listening on port 5000 inside the container. Just like buildpack apps, you can also use the `$PORT` environment variable in your app to maintain portability.
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/dokku/advanced-usage/proxy-management/).
@@ -34,7 +34,7 @@ ENTRYPOINT ["node"]
You can do:
```shell
dokku config:set APP DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
dokku config:set node-js-app DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
```
To tell docker what to run.

View File

@@ -2,8 +2,6 @@
> New as of 0.4.0
The dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
```
tags <app> # List all app image tags
tags:create <app> <tag> # Add tag to latest running app image
@@ -11,7 +9,20 @@ tags:deploy <app> <tag> # Deploy tagged app image
tags:destroy <app> <tag> # Remove app image tag
```
For exampple, you can list all tags for a given application:
The Dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tags` plugin, the following may occur:
>
> - Applications previously deployed via another method (`git`/`tar`): The application may revert to a state before the latest custom image tag was deployed.
> - Applications that were only ever deployed via the `tags` plugin: No action will be taken against your application.
>
> Please use the `tags:deploy` command when redeploying an application deployed via docker image.
## Usage
### Listing tags for an application
For example, you can list all tags for a given application:
```shell
dokku tags node-js-app
@@ -23,6 +34,8 @@ REPOSITORY TAG IMAGE ID CREATED
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
```
### Creating a tag
You can also create new tags for that app using the `tags:create` function. Tags should conform to the docker tagging specification for your docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
```shell
@@ -46,6 +59,8 @@ dokku/node-js-app latest 936a42f25901 About a minute ago
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
```
### Deploying an image tag
Finally, you can also deploy a local image using the `tags:deploy` command.
```shell
@@ -79,11 +94,13 @@ dokku tags:deploy node-js-app v1
http://node-js-app.dokku.me
```
## Deploying from a Docker Registry
## Image Workflows
### Deploying from a Docker Registry
You can alternatively add image pulled from a docker Registry and deploy app from it by using tagging feature. In this example, we are deploying from Docker Hub.
1. Create dokku app as usual
1. Create Dokku app as usual
```shell
dokku apps:create test-app
@@ -110,11 +127,11 @@ You can alternatively add image pulled from a docker Registry and deploy app fro
> Note: When deploying an image, we will use `docker inspect` to extract the `ExposedPorts` configuration and if defined, use that to populate `DOKKU_DOCKERFILE_PORTS`. If this behavior is not desired, you can override that configuration variable with the `config:set` command.
> Example: `dokku config:set test-app DOKKU_DOCKERFILE_PORTS="5984/tcp 80/tcp"`
## Deploying an image from CI
### Deploying an image from CI
To ensure your builds are always reproducible, it's considered bad practice to store build
artifacts in your repository. For some projects however, building artifacts during deployment
to dokku may affect the performance of running applications.
to Dokku may affect the performance of running applications.
One solution is to build a finished Docker image on a CI service (or even locally) and deploy
it directly to the host running dokku.
@@ -122,11 +139,11 @@ it directly to the host running dokku.
1. Build image on CI (or locally)
```shell
docker build -t dokku/test-app:v12
docker build -t dokku/test-app:v12 .
# Note: The image must be tagged `dokku/<app-name>:<version>`
```
2. Deploy image to dokku host
2. Deploy image to Dokku host
```shell
docker save dokku/test-app:v12 | ssh my.dokku.host "docker load | dokku tags:deploy test-app v12"
@@ -139,7 +156,7 @@ Here's a more complete example using the above method:
```shell
# build the image
docker build -t dokku/test-app:v12
docker build -t dokku/test-app:v12 .
# copy the image to the dokku host
docker save dokku/test-app:v12 | bzip2 | ssh my.dokku.host "bunzip2 | docker load"
# tag and deploy the image

View File

@@ -1,4 +1,4 @@
# Tarfile Deployment
# Tarball Deployment
> New as of 0.4.0
@@ -7,9 +7,18 @@ tar:from <app> <url> # Loads an app tarball from url
tar:in <app> # Reads an tarball containing the app from stdin
```
## Deploying from a tarball
> When triggering `dokku ps:rebuild APP` on an application deployed via the `tar` plugin, the following may occur:
>
> - Applications previously deployed via another method (`git`): The application may revert to a state before the latest custom image tag was deployed.
> - Applications that were only ever deployed via the `tar` plugin: The application will be properly rebuilt.
>
> Please use the appropriate `tar` command when redeploying an application deployed via tarball.
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing dokku infrastructure.
## Usage
### Deploying from a tarball
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing Dokku infrastructure.
You can place the tarball on an external webserver and deploy via the `tar:from` command.
@@ -17,6 +26,8 @@ You can place the tarball on an external webserver and deploy via the `tar:from`
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
```
### Deploying via stdin
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
```shell

View File

@@ -29,21 +29,21 @@ dokku run my-app console
If you want to remove the container after a command has started, you can run the following command:
```shell
# keep `run` containers around
# don't keep `run` containers around
dokku config:set --global DOKKU_RM_CONTAINER=1
# revert the above setting and keep containers around
dokku config:unset --global DOKKU_RM_CONTAINER
```
You may also use the `--rm-container` or `--rm` dokku flags to remove the containers automatically:
You may also use the `--rm-container` or `--rm` Dokku flags to remove the containers automatically:
```shell
dokku --rm-container run node-js-app ls -lah
dokku --rm 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.
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
dokku --detach run node-js-app ls -lah
@@ -108,7 +108,7 @@ dokku ps:scale node-js-app cron=1
You can now run all your commands in that container:
```shell
dokku enter api cron some-command
dokku enter node-js-app cron some-command
```
Note that you can also run multiple commands at the same time to reduce memory usage, though that may result in polluting the container environment.
@@ -119,8 +119,8 @@ For tasks that will properly resume, you **should** use the above method, as run
Regularly scheduled tasks can be a bit of a pain with dokku. The following are general recommendations to follow to help ensure successful task runs.
- Use the dokku user's crontab
- If you do not, dokku will attempt to execute with sudo dokku, and your cron run with fail with `sudo: no tty present and no askpass program specified`
- Use the `dokku` user's crontab
- If you do not, the `dokku` binary will attempt to execute with `sudo` dokku, and your cron run with fail with `sudo: no tty present and no askpass program specified`
- Add a `MAILTO` environment variable to ship cron emails to yourself.
- Add a `PATH` environment variable or specify the full path to binaries on the host.
- Add a `SHELL` environment variable to specify bash when running commands.

View File

@@ -4,32 +4,182 @@
```
ps <app> # List processes running in app container(s)
ps:rebuildall # Rebuild all apps
ps:rebuild <app> # Rebuild an app
ps:restartall # Restart all deployed app containers
ps:rebuild <app> # Rebuild an app from source
ps:rebuildall # Rebuild all apps from source
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
ps:restart <app> # Restart app container(s)
ps:scale <app> <proc>=<count> [<proc>=<count>] # Set how many processes of a given process to run
ps:restart-policy <app> # Shows the restart-policy for an app
ps:restartall # Restart all deployed app containers
ps:scale <app> <proc>=<count> [<proc>=<count>] # Get/Set how many instances of a given process to run
ps:set-restart-policy <app> <policy> # Sets app restart-policy
ps:start <app> # Start app container(s)
ps:stop <app> # Stop app container(s)
ps:restart-policy <app> # Shows the restart-policy for an app
ps:set-restart-policy <app> <policy> # Sets app restart-policy
```
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or via a custom `DOKKU_SCALE` file.
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or [via a custom `DOKKU_SCALE` file](/dokku/deployment/process-management/#manually-managing-process-scaling).
> The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
## Usage
### Listing processes running in an app container
To find out if your application's containers are running the commands you expect, simply run the `ps` command against that application.
```shell
dokku ps node-js-app
```
### Rebuilding applications
There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run multiple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild`
```shell
dokku ps:rebuild node-js-app
```
You may also rebuild all applications at once, which is useful when enabling/disabling a plugin that modifies all applications:
```shell
dokku ps:rebuildall
```
> The `ps:rebuild` and `ps:rebuildall` commands only work for applications for which there is a source, and thus
> will only always work deterministically for git-deployed application. Please see
> the [images documentation](/dokku/deployment/methods/images/) and [tar documentation](/dokku/deployment/methods/tar/)
> in for more information concerning rebuilding those applications.
### Restarting applications
Applications can be restarted, which is functionally identical to calling the `release_and_deploy` function on an application. Please not that any linked containers *must* be started before the application in order to have a successful boot.
```shell
dokku ps:restart node-js-app
```
You may also trigger a restart on all applications at one time:
```shell
dokku ps:restartall
```
### `ps:scale` command
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
```shell
dokku ps:scale APP web=1 worker=2
dokku ps:scale node-js-app web=1
```
### DOKKU_SCALE file
Multiple process types can be scaled at once:
You can optionally create a `DOKKU_SCALE` file in the root of your repository. Dokku expects this file to contain one line for every process defined in your Procfile.
```shell
dokku ps:scale node-js-app web=1 worker=1
```
Issuing the `ps:scale` command with no process type argument will output the current scaling settings for an application:
```shell
dokku ps:scale node-js-app
```
```
-----> Scaling for node-js-app
-----> proctype qty
-----> -------- ---
-----> web 1
-----> worker 1
```
### Stopping applications
Deployed applications can be stopped using the `ps:stop` command. This turns all running containers for an application, and will result in a `502 Bad Gateway` response for the default nginx proxy implementation.
```shell
dokku ps:stop node-js-app
```
### Starting applications
All stopped containers can be started using the `ps:start` command. This is similar to running `ps:restart`, except no action will be taken if the application containers are running.
```shell
dokku ps:start node-js-app
```
## Restart Policies
> New as of 0.7.0
By default, Dokku will automatically restart containers that exit with a non-zero status up to 10 times via the [on-failure Docker restart policy](https://docs.docker.com/engine/reference/run/#restart-policies-restart).
### Showing the current restart policy
THe `ps:restart-policy` command will show the currently configured restart policy for an application. The default policy is `on-failure:10`
```shell
dokku ps:restart-policy node-js-app
```
```
=====> node-js-app restart-policy:
on-failure:10
```
### Setting the restart policy
You can configure this via the `ps:set-restart-policy` command:
```shell
# always restart an exited container
dokku ps:set-restart-policy node-js-app always
```
```
-----> Setting restart policy: always
```
```shell
# never restart an exited container
dokku ps:set-restart-policy node-js-app no
```
```
-----> Setting restart policy: no
```
```shell
# only restart it on Docker restart if it was not manually stopped
dokku ps:set-restart-policy node-js-app unless-stopped
```
```
-----> Setting restart policy: unless-stopped
```
```shell
# restart only on non-zero exit status
dokku ps:set-restart-policy node-js-app on-failure
```
```
-----> Setting restart policy: on-failure
```
```shell
# restart only on non-zero exit status up to 20 times
dokku ps:set-restart-policy node-js-app on-failure:20
```
```
-----> Setting restart policy: on-failure:20
```
Restart policies have no bearing on server reboot, and Dokku will always attempt to restart your applications at that point unless they were manually stopped.
## Manually managing process scaling
You can optionally _commit_ a `DOKKU_SCALE` file to the root of your repository - *not* to the /home/dokku/APP directory. Dokku expects this file to contain one line for every process defined in your Procfile.
Example:
@@ -38,29 +188,6 @@ web=1
worker=2
```
If it is not committed to the repository, the `DOKKU_SCALE` file will otherwise be automatically generated based on your `ps:scale` settings.
> *NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
## Restart Policies
> New as of 0.7.0
By default, Dokku will automatically restart containers that exit with a non-zero status up to 10 times via the [on-failure Docker restart policy](https://docs.docker.com/engine/reference/run/#restart-policies-restart). You can configure this via the relevant `ps` commands:
```shell
# always restart an exited container
dokku ps:set-restart-policy node-js-app always
# never restart an exited container
dokku ps:set-restart-policy node-js-app no
# only restart it on Docker restart if it was not manually stopped
dokku ps:set-restart-policy node-js-app unless-stopped
# restart only on non-zero exit status
dokku ps:set-restart-policy node-js-app on-failure
# restart only on non-zero exit status up to 20 times
dokku ps:set-restart-policy node-js-app on-failure:20
```
Restart policies have no bearing on server reboot, and Dokku will always attempt to restart your applications at that point unless they were manually stopped.

View File

@@ -12,7 +12,7 @@ Host dokku.me
## Behavioral modifiers
Dokku also supports certain command-line arguments that augment it's behavior. If using these over ssh, you must use the form `ssh -t dokku@dokku.me -- <command>`
in order to avoid ssh interpretting dokku arguments for itself.
in order to avoid ssh interpretting Dokku arguments for itself.
```
--quiet suppress output headers
@@ -23,6 +23,6 @@ in order to avoid ssh interpretting dokku arguments for itself.
## Clients
You may optionally use a client to connect to your dokku server. Most clients use the configured `git remote` to locate the dokku server, though some allow for overriding this via an environment variable or flag.
You may optionally use a client to connect to your Dokku server. Most clients use the configured `git remote` to locate the Dokku server, though some allow for overriding this via an environment variable or flag.
Please refer to the [clients](/dokku/community/clients/) list for more details.

View File

@@ -5,35 +5,50 @@
```
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
ssh-keys:list # List of all authorized Dokku public ssh keys
ssh-keys # Manage public ssh keys that are allowed to connect to Dokku
ssh-keys:remove <name> # Remove SSH public key by name
```
When pushing to Dokku, ssh key based authorization is the preferred authentication method, for ease of use and increased security.
Users in Dokku are managed via the `~/dokku/.ssh/authorized_keys` file. It is **highly** recommended that you follow the steps below to manage users on a Dokku server.
Users in Dokku are managed via the `~/dokku/.ssh/authorized_keys` file. It is **highly** recommended that you follow the steps below to manage users on a Dokku server.
> Users of older versions of Dokku should use the `sshcommand` binary to manage keys. Please refer to the Dokku documentation for your version for more details.
> Users of older versions of Dokku may use the `sshcommand` binary to manage keys instead of the `ssh-keys` plugin. Please refer to the Dokku documentation for your version for more details.
## Adding deploy users
## Usage
You can add your public key to Dokku with the following command:
### Listing SSH Keys
You can use the `ssh-keys:list` command to show all configured ssh keys. Any key added via the `dokku-installer` will be associated with the `admin` key name.
```shell
dokku ssh-keys:list
```
```
61:21:1f:88:7f:86:d4:3a:68:9f:18:aa:41:4f:bc:3d NAME="admin" SSHCOMMAND_ALLOWED_KEYS="no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding"
```
The output contains the following information:
- SSH Key Fingerprint.
- The `KEY_NAME`.
- A comma separated list of ssh options under the `SSHCOMMAND_ALLOWED_KEYS` name.
### Adding SSH Keys
You can add your public key to Dokku with the `ssh-keys:add` command. The output will be the fingerprint of the ssh key:
```shell
dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
```
```
b7:76:27:4f:30:90:21:ae:d4:1e:70:20:35:3f:06:d6
```
`KEY_NAME` is the username prefer to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
Key names are unique, and attempting to re-use a name will result in an error.
> The unique `KEY_NAME` is for ease of identifying the keys. The ssh (git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all it's actions.
As key names are unique, they can be used to remove a public ssh key:
```SHELL
dokku ssh-keys:remove KEY_NAME
```
> `KEY_NAME` is a unique name which is used to identify public keys. Attempting to re-use a key name will result in an error. The ssh (git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all it's actions.
Admin users and root can also add keys remotely:
@@ -41,12 +56,40 @@ Admin users and root can also add keys remotely:
cat ~/.ssh/id_rsa.pub | ssh dokku@dokku.me ssh-keys:add KEY_NAME
```
If you are using an ssh user other than `dokku`, then you'll also need to specify the `dokku` bin:
```shell
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me dokku ssh-keys:add KEY_NAME
```
Finally, if you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to Dokku (it will use your host username as the `USER`):
```shell
cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
```
### Removing SSH Keys
As key names are unique, they can be used to remove a public ssh key.
```SHELL
dokku ssh-keys:remove KEY_NAME
```
## Scoping commands to specific users
Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
## Granting other Unix user accounts Dokku access
Any Unix user account which belongs to the 'sudo' Unix group can run Dokku. However, you may want to give them Dokku access but not full sudo privileges.
To allow other Unix user accounts to be able to run Dokku commands, without giving them full sudo access, modify your sudoers configuration.
Use `visudo /etc/sudoers.d/dokku-users`, or `visudo /etc/sudoers` to add the following line:
```
%dokku ALL=(ALL:ALL) NOPASSWD:SETENV: /usr/bin/dokku
```

View File

@@ -6,22 +6,37 @@
checks <app> Show zero-downtime status
checks:disable <app> [process-type(s)] Disable zero-downtime deployment for all processes (or comma-separated process-type list) ***WARNING: this will cause downtime during deployments***
checks:enable <app> [process-type(s)] Enable zero-downtime deployment for all processes (or comma-separated process-type list)
checks:report [<app>] [<flag>] Displays a checks report for one or more apps
checks:run <app> [process-type(s)] Runs zero-downtime checks for all processes (or comma-separated process-type list)
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
```
Following a deploy, dokku will wait `10` seconds before routing traffic to the new container to give your application time to boot up. If the application is not running after this time, then the deploy is failed and your old container will continue serving traffic. You can modify this value globally or on a per-application basis:
```shell
dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
dokku config:set node-js-app DOKKU_DEFAULT_CHECKS_WAIT=30
```
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis
> Note that `checks:disable` will now (as of 0.6.0) cause downtime for that process-type during deployments.
By default, Dokku will wait `10` seconds after starting each container before assuming it is up and proceeding with the deploy. Once this has occurred for all containers started by for an application, traffic will be switched to point to your new containers. Dokku will also wait a further `60` seconds _after_ the deploy is complete before terminating old containers in order to give time for long running connections to terminate. In either case, you may have more than one container running for a given application.
You may both create user-defined checks for web processes using a `CHECKS` file, as well as customize any and all parts of this experience using the checks plugin.
## Configuring Check Settings using the `config` plugin
There are certain settings that can be configured via environment variables:
- `DOKKU_DEFAULT_CHECKS_WAIT`: (default: `10`) If no user-defined checks are specified - or if the process being checked is not a `web` process - this is the period of time Dokku will wait before checking that a container is still running.
- `DOKKU_DOCKER_STOP_TIMEOUT`: (default: `10`) Configurable grace period given to the `docker stop` command. If a container has not stopped by this time, a `kill -9` signal or equivalent is sent in order to force-terminate the container. Both the `ps:stop` and `apps:destroy` commands _also_ respect this value. If not specified, the docker defaults for the [docker stop command](https://docs.docker.com/engine/reference/commandline/stop/) will be used.
- `DOKKU_WAIT_TO_RETIRE`: (default: `60`) After a successful deploy, the grace period given to old containers before they are stopped/terminated. This is useful for ensuring completion of long-running http connections.
The following settings may also be specified in the `CHECKS` file, though are available as environment variables in order to ease application reuse.
- `DOKKU_CHECKS_WAIT`: (default: `5`) Wait this many seconds for the container to start before running checks.
- `DOKKU_CHECKS_TIMEOUT`: (default: `30`) Wait this many seconds for each response before marking it as a failure.
- `DOKKU_CHECKS_ATTEMPTS`: (default: `5`) Number of retries for to run for a specific check before marking it as a failure
## Skipping and Disabling Checks
> Note that `checks:disable` will now (as of 0.6.0) cause downtime for that process-type during deployments. Previously, it acted as `checks:skip` currently does.
You can choose to skip checks completely on a per-application/per-process basis. Skipping checks will avoid the default 10 second waiting period entirely, as well as any other user-defined checks.
```shell
# process type specification is optional
dokku checks:skip node-js-app worker,web
```
@@ -33,8 +48,7 @@ dokku checks:skip node-js-app worker,web
DOKKU_CHECKS_SKIPPED: worker,web
```
Additionally, any given process can only be configured to disable zero-downtime. example:
Zero-downtime checks can also be disabled completely. This will stop old containers **before** new ones start, which may result in broken connections and downtime if your application fails to boot properly.
```shell
dokku checks:disable node-js-app worker
@@ -48,14 +62,107 @@ dokku checks:disable node-js-app worker
DOKKU_CHECKS_SKIPPED: web
```
Dokku will wait `60` seconds before stopping the old container so that existing connections are given a chance to complete. You can modify this value globally or on a per-application basis:
### Displaying checks reports about an app
> New as of 0.8.1
You can get a report about the app's checks status using the `checks:report` command:
```shell
dokku config:set --global DOKKU_WAIT_TO_RETIRE=120
dokku config:set <app> DOKKU_WAIT_TO_RETIRE=120
dokku checks:report
```
> Note that during this time, multiple containers may be running on your server, which can be an issue for memory-hungry applications on memory-constrained servers.
```
=====> search checks information
Checks disabled list: none
Checks skipped list: none
=====> python-sample checks information
Checks disabled list: none
Checks skipped list: none
=====> ruby-sample checks information
Checks disabled list: _all_
Checks skipped list: none
```
You can run the command for a specific app also.
```shell
dokku checks:report node-js-sample
```
```
=====> node-js-sample checks information
Checks disabled list: none
Checks skipped list: none
```
You can pass flags which will output only the value of the specific information you want. For example:
```shell
dokku checks:report node-js-sample --checks-disabled-list
```
## Customizing Checks
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, Dokku will fallback to the aforementioned process uptime check.
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
- Check instructions
- Settings (NAME=VALUE)
- 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.
### Check Instructions
The format of a check instruction is a path or relative URL, optionally followed by the expected content:
```
/about Our Amazing Team
```
The `CHECKS` file can contain multiple checks:
```
/ My Amazing App
/stylesheets/index.css .body
/scripts/index.js $(function()
/images/logo.png
```
To check an application that supports multiple hostnames, use relative URLs that include the hostname:
```
//admin.example.com Admin Dashboard
//static.example.com/logo.png
```
You can also specify the protocol to explicitly check HTTPS requests:
```
https://admin.example.com Admin Dashboard
https://static.example.com/logo.png
```
While a full url may be used in order to invoke checks, if you are using relative urls, the port *must* be omitted.
### Check Settings
The default behavior is to wait for `5` seconds before running the checks, to timeout the checks after `30` seconds, and to attempt the checks `5` times. If the checks fail `5` times, the deployment is considered failed and the old container will continue serving traffic.
You can change the default behavior by setting `WAIT`, `TIMEOUT`, and `ATTEMPTS` to different values in the `CHECKS` file:
```
WAIT=30 # Wait 1/2 minute
TIMEOUT=60 # Timeout after a minute
ATTEMPTS=10 # Attempt checks 10 times
/ My Amazing App
```
## Manually Invoking Checks
@@ -92,7 +199,7 @@ dokku checks:run APP
Checks can be scoped to a particular process type:
```shell
dokku checks:run APP worker
dokku checks:run node-js-app worker
```
```
@@ -108,7 +215,7 @@ dokku checks:run APP worker
An app process id may also be specified:
```shell
dokku checks:run APP web.2
dokku checks:run node-js-app web.2
```
```
@@ -124,7 +231,7 @@ dokku checks:run APP web.2
Non-existent process types will result in an error:
```shell
dokku checks:run APP non-existent
dokku checks:run node-js-app non-existent
```
```
@@ -135,7 +242,7 @@ Invalid process type specified (APP.non-existent)
Non-existent process ids will *also* result in an error
```shell
dokku checks:run APP web.3
dokku checks:run node-js-app web.3
```
```
@@ -143,88 +250,6 @@ dokku checks:run APP web.3
Invalid container id specified (APP.web.3)
```
## Customizing Checks
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
Checks are run against the detected `web` process from your application's `Procfile`. For non-web processes, dokku will fallback to the aforementioned process uptime check.
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
* Check instructions
* Settings (NAME=VALUE)
* 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.
### Check Instructions
The format of a check instruction is a path or relative URL, optionally followed by the expected content:
```
/about Our Amazing Team
```
The `CHECKS` file can contain multiple checks:
```
/ My Amazing App
/stylesheets/index.css .body
/scripts/index.js $(function()
/images/logo.png
```
To check an application that supports multiple hostnames, use relative URLs that include the hostname:
```
//admin.example.com Admin Dashboard
//static.example.com/logo.png
```
You can also specify the protocol to explicitly check HTTPS requests:
```
https://admin.example.com Admin Dashboard
https://static.example.com/logo.png
```
### Check Settings
The default behavior is to wait for `5` seconds before running the checks, to timeout the checks after `30` seconds, and to attempt the checks `5` times. If the checks fail `5` times, the deployment is considered failed and the old container will continue serving traffic.
You can change the default behavior by setting `WAIT`, `TIMEOUT`, and `ATTEMPTS` to different values in the `CHECKS` file:
```
WAIT=30 # Wait 1/2 minute
TIMEOUT=60 # Timeout after a minute
ATTEMPTS=10 # Attempt checks 10 times
/ My Amazing App
```
You can also override the default `WAIT`, `TIMEOUT`, and `ATTEMPTS` variables for the global dokku installation:
```shell
dokku config:set --global DOKKU_CHECKS_WAIT=30
dokku config:set --global DOKKU_CHECKS_TIMEOUT=60
dokku config:set --global DOKKU_CHECKS_ATTEMPTS=10
```
If your application runs multiple processes (a background worker configured in your `Procfile`, for example) and you have checks to ensure that your web application has booted up, you may want to disable the default check wait time for that application to avoid the `10` second wait per non-web process:
```shell
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=0
```
### Configuring docker stop timeout
[By default](https://docs.docker.com/engine/reference/commandline/stop/), docker will wait 10 seconds from the time the `stop` command is passed to a container before it attempts to kill said container. This timeout can be configured on a per-app basis in dokku by setting the `DOKKU_DOCKER_STOP_TIMEOUT` configuration variable. This timeout applies to normal zero-downtime deployments as well as the `ps:stop` and `apps:destroy` commands.
```shell
dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
```
## Example: Successful Rails Deployment
In this example, a Rails application is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful. `WAIT` is set to `10` because our application takes a while to boot up. `ATTEMPTS` is set to `6`, but the third attempt succeeds.

View File

@@ -1,14 +1,33 @@
# Plugin Creation
Plugins can simply be implementations of [triggers](/dokku/development/plugin-triggers) or they may implement a command structure of their own. Dokku has no restrictions on the language in which a plugin is implemented, it only cares that the plugin implements the appropriate [commands](/dokku/development/plugin-creation#command-api) or [triggers](/dokku/development/plugin-triggers) API. NOTE: all files that implement the triggers or commands API must be executable.
If you create your own plugin:
1. Take a look at the plugins shipped with dokku and hack away!
1. Take a look at the plugins shipped with Dokku and hack away!
2. Check out the [list of triggers](/dokku/development/plugin-triggers) your plugin can implement.
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
4. Edit [this page](/dokku/community/plugins/) and add a link to it.
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
### Compilable Plugins (i.e. golang, java(?), c, etc.)
The plugin developer is required to implement the `install` trigger such that it will output your built executable(s) in the correct directory structure to implement the plugin's desired command and/or trigger API. See [smoke-test-plugin](https://github.com/dokku/smoke-test-plugin) for an example.
### Command API
There are 3 main implementation points: `commands`, `subcommands/default`, and `subcommands/<command-name>`
#### commands
Primarily used to supply the plugin's usage/help output. (i.e. [plugin help](https://github.com/dokku/dokku/tree/master/plugins/plugin/commands))
#### subcommands/default
Implements the plugin's default command behavior. (i.e. [`dokku plugin`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/default))
#### subcommands/<command-name>
Implements the additional command interface and will translate to `dokku plugin:cmd` on the command line. (i.e. [`dokku plugin:install`](https://github.com/dokku/dokku/tree/master/plugins/plugin/subcommands/install))
### Sample plugin
The below plugin is a dummy `dokku hello` plugin.
@@ -30,7 +49,7 @@ hello_main_cmd() {
set -- $cmd $@
##
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$2"
local APP="$2";
@@ -58,7 +77,7 @@ hello_world_cmd() {
set -- $cmd $@
##
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$2"
local APP="$2";
@@ -119,11 +138,12 @@ version = "0.1.0"
A few notes:
- Don't forget to `chmod +x` your executable files.
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
- If your command requires that an application exists, ensure you check for it's existence in the manner prescribed above.
- A `help` command is required, though it is allowed to be empty. Also, the command syntax will need to separated by `, ` in order to maintain columnar output alignment.
- Commands *should* be namespaced.
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows dokku to output a `command not found` message.
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows Dokku to output a `command not found` message.
- Be sure you want the "set -eo pipefail" option. Look at the following example :
```shell
@@ -133,7 +153,7 @@ A few notes:
fi
```
In the case where the "user/repo" is not installed, dokku exits just before the awk command,
In the case where the "user/repo" is not installed, Dokku exits just before the awk command,
you will never see the message printed with echo. You just want "set -e" in this case.
Here is the documentation of the 'set -eo pipefail' option:
@@ -149,10 +169,10 @@ A few notes:
- As some plugins require access to set app config settings and do not want/require the default Heroku-style behavior of a restart, we have the following "internal" commands that provide this functionality :
```shell
dokku config:set --no-restart APP KEY1=VALUE1 [KEY2=VALUE2 ...]
dokku config:unset --no-restart APP KEY1 [KEY2 ...]
dokku config:set --no-restart node-js-app KEY1=VALUE1 [KEY2=VALUE2 ...]
dokku config:unset --no-restart node-js-app KEY1 [KEY2 ...]
```
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](/dokku/development/plugin-triggers) doc for examples.
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
- As of 0.6.0, we advise you to *not* call the dokku binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call dokku internal functions
- As of 0.6.0, we advise you to *not* call the `dokku` binary directly from within plugins. Clients using the `--app` argument are potentially broken, amongst other issues, when doing so. Instead, please source the `functions` file for a given plugin when attempting to call Dokku internal functions

View File

@@ -1,6 +1,6 @@
# Plugin triggers
[Plugin triggers](https://github.com/dokku/plugn) (formerly [pluginhooks](https://github.com/progrium/pluginhook)) are a good way to jack into existing dokku infrastructure. You can use them to modify the output of various dokku commands or override internal configuration.
[Plugin triggers](https://github.com/dokku/plugn) (formerly [pluginhooks](https://github.com/progrium/pluginhook)) are a good way to jack into existing Dokku infrastructure. You can use them to modify the output of various Dokku commands or override internal configuration.
Plugin triggers are simply scripts that are executed by the system. You can use any language you want, so long as the script:
@@ -9,7 +9,7 @@ Plugin triggers are simply scripts that are executed by the system. You can use
For instance, if you wanted to write a plugin trigger in PHP, you would need to have `php` installed and available on the CLI prior to plugin trigger invocation.
The following is an example for the `nginx-hostname` plugin trigger. It reverses the hostname that is provided to nginx during deploys. If you created an executable file named `nginx-hostname` with the following code in your plugin trigger, it would be invoked by dokku during the normal app deployment process:
The following is an example for the `nginx-hostname` plugin trigger. It reverses the hostname that is provided to nginx during deploys. If you created an executable file named `nginx-hostname` with the following code in your plugin trigger, it would be invoked by Dokku during the normal app deployment process:
```shell
#!/usr/bin/env bash
@@ -23,11 +23,11 @@ echo "$NEW_SUBDOMAIN.$VHOST"
## Available plugin triggers
There are a number of plugin-related triggers. These can be optionally implemented by plugins and allow integration into the standard dokku setup/teardown process.
There are a number of plugin-related triggers. These can be optionally implemented by plugins and allow integration into the standard Dokku setup/teardown process.
The following plugin triggers describe those available to a dokku installation. As well, there is an example for each trigger that you can use as templates for your own plugin development.
The following plugin triggers describe those available to a Dokku installation. As well, there is an example for each trigger that you can use as templates for your own plugin development.
> The example plugin trigger code is not guaranteed to be implemented as in within dokkku, and are merely simplified examples. Please look at the dokku source for larger, more in-depth examples.
> The example plugin trigger code is not guaranteed to be implemented as in within dokku, and are merely simplified examples. Please look at the Dokku source for larger, more in-depth examples.
### `post-config-update`
@@ -63,9 +63,9 @@ echo false
### `check-deploy`
- Description: Allows you to run checks on a deploy before dokku allows the container to handle requests.
- Description: Allows you to run checks on a deploy before Dokku allows the container to handle requests.
- Invoked by: `dokku deploy`
- Arguments: `$CONTAINER_ID $APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS`
- Arguments: `$APP $CONTAINER_ID $PROC_TYPE $PORT $IP`
- Example:
```shell
@@ -76,7 +76,7 @@ echo false
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
APP="$1"; CONTAINERID="$2"; PROC_TYPE="$3"; PORT="$4" ; IP="$5"
eval "$(config_export app $APP)"
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
@@ -134,6 +134,24 @@ help_content
esac
```
### `core-post-deploy`
> To avoid issues with community plugins, this plugin trigger should be used *only* for core plugins. Please avoid using this trigger in your own plugins.
- Description: Allows running of commands after an application's processes have been scaled up, but before old containers are torn down. Dokku core currently uses this to switch traffic on nginx.
- Invoked by: `dokku deploy`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Notify an external service that a successful deploy has occurred.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
curl "http://httpstat.us/200"
```
### `dependencies`
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
@@ -312,7 +330,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
```shell
#!/usr/bin/env bash
# Sets the hostname of the dokku server
# Sets the hostname of the Dokku server
# based on the output of `hostname -f`
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
@@ -430,7 +448,9 @@ dokku postgres:destroy $APP
### `post-deploy`
- Description: Allows running of commands after an application's processes have been scaled up, but before old containers are torn down. Dokku core currently uses this to switch traffic on nginx.
> Please see [core-post-deploy](#core-post-deploy) if contributing a core plugin with the `post-deploy` hook.
- Description: Allows running of commands after an application's processes have been scaled up, but before old containers are torn down. Dokku calls this _after_ `core-post-deploy`. Deployment Tasks are also invoked by this plugin trigger.
- Invoked by: `dokku deploy`
- Arguments: `$APP $INTERNAL_PORT $INTERNAL_IP_ADDRESS $IMAGE_TAG`
- Example:
@@ -447,7 +467,7 @@ curl "http://httpstat.us/200"
### `post-domains-update`
- Description: Allows you to run commands once the domain for an application has been updated. It also sends in the command that has been used. This can be "add", "clear" or "remove". The third argument will be the optional list of domains
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`
- Invoked by: `dokku domains:add`, `dokku domains:clear`, `dokku domains:remove`, `dokku domains:set`
- Arguments: `$APP` `action name` `domains`
- Example:
@@ -461,6 +481,28 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sudo service haproxy reload
```
### `post-extract`
- Description: Allows you to modify the contents of an application *after* it has been extracted from git/tarball but *before* the image source type is detected.
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
- Example:
```shell
#!/usr/bin/env bash
# Adds a clock process to an app's Procfile
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
TMP_WORK_DIR="$2"
REV="$3" # optional, may not be sent for tar-based builds
pushd "$TMP_WORK_DIR" > /dev/null
touch Procfile
echo "clock: some-command" >> Procfile
```
### `post-proxy-ports-update`
- Description: Allows you to run commands once the proxy port mappings for an application have been updated. It also sends the invoking command. This can be "add", "clear" or "remove".
@@ -497,7 +539,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
dokku_log_info1 "Installing $CONTAINER_PACKAGE..."
CMD="cat > gm && \
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
@@ -654,7 +696,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing GraphicsMagick..."
dokku_log_info1 "Installing GraphicsMagick..."
CMD="cat > gm && \
dpkg -s graphicsmagick > /dev/null 2>&1 || \
@@ -778,7 +820,7 @@ dokku hg-build $APP $REV
```shell
#!/bin/bash
# Gives dokku the ability to support multiple branches for a given service
# Gives Dokku the ability to support multiple branches for a given service
# Allowing you to have multiple staging environments on a per-branch basis
reference_app=$1
@@ -846,6 +888,26 @@ APP="$1"; IMAGE_TAG="$2"
some code to remove a docker hub tag because it's not implemented in the CLI....
```
### `uninstall`
- Description: Used to cleanup after itself.
- Invoked by: `dokku plugin:uninstall`
- Arguments: `$PLUGIN`
- Example:
```shell
#!/usr/bin/env bash
# Cleanup up extra containers created
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
PLUGIN="$1"
[[ "$PLUGIN" = "my-plugin" ]] && docker rmi -f "${PLUGIN_IMAGE_DEPENDENCY}"
```
> To avoid uninstalling other plugins make sure to check the plugin name like shown in the example.
### `update`
- Description: Can be used to run plugin updates on a regular interval. You can schedule the invoker in a cron-task to ensure your system gets regular updates.
@@ -865,7 +927,7 @@ sudo BUILD_STACK=true make install
### `user-auth`
This is a special plugin trigger that is executed on *every* command run. As dokku sometimes internally invokes the `dokku` command, special care should be taken to properly handle internal command redirects.
This is a special plugin trigger that is executed on *every* command run. As Dokku sometimes internally invokes the `dokku` command, special care should be taken to properly handle internal command redirects.
Note that the trigger should exit as follows:
@@ -882,7 +944,7 @@ sshcommand acl-add dokku NAME < $PATH_TO_SSH_KEY
Note that the `NAME` value is set at the first ssh key match. If an ssh key is set in the `/home/dokku/.ssh/authorized_keys` multiple times, the first match will decide the value.
- Description: Allows you to deny access to a dokku command by either ssh user or associated ssh-command NAME user.
- Description: Allows you to deny access to a Dokku command by either ssh user or associated ssh-command NAME user.
- Invoked by `dokku`
- Arguments: `$SSH_USER $SSH_NAME $DOKKU_COMMAND`
- Example:

View File

@@ -20,7 +20,7 @@ To propose a release, the following tasks need to be performed:
- The versioned links should be updated or added to the `docs/assets/versions.json` file.
- A list of changes must be made in the `HISTORY.md`.
- A tag must be created locally with your release version
- Debian packages *must* be created via `vagrant up build`
- Debian and RPM packages *must* be created via `vagrant up build`
- The packages should be uploaded to packagecloud.io
- All changes are pushed to master and the tag should be turned into a release which will contain the changelog.
- ArchLinux package description *must* be updated via `vagrant up build-arch` (needs to be done after the tag is pushed to GitHub, because it is based on that)
@@ -37,11 +37,11 @@ git tag v0.9.9
At the moment, tags need not be signed, though that may change in the future.
## Debian Packages
## Debian and RPM packages
The `build` target in the dokku `Vagrantfile` creates debian packages for dokku at a point in time. The version will be based upon the latest local tag - you may create your own, internal tags/releases if that is so desired.
The `build` target in the Dokku `Vagrantfile` creates debian and rpm packages for Dokku at a point in time. The version will be based upon the latest local tag - you may create your own, internal tags/releases if that is so desired.
Debian package information is held in the `debian` directory of the dokku project.
Debian package information is held in the `debian` directory of the Dokku project.
For the public project, releases should be pushed to packagecloud.io *after* a tag is created but *before* said tag is pushed to github. The following may be the release workflow:
@@ -51,6 +51,7 @@ git tag v0.9.9
vagrant up build
export PACKAGECLOUD_TOKEN=SOME_TOKEN
package_cloud push dokku/dokku/ubuntu/trusty dokku_0.9.9_amd64.deb
package_cloud push dokku/dokku/el/7 dokku-0.9.9-1.x86_64.rpm
```
If new versions of other packages were created, these should also be pushed at this time.
@@ -66,7 +67,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.7.0-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.9.0-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

@@ -17,7 +17,7 @@ While we do provide official packages for a variety of platforms, as our test su
## Local Test Execution
- Setup dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
- Setup Dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
- Run the following to setup tests and execute them:
```shell
@@ -29,7 +29,7 @@ While we do provide official packages for a variety of platforms, as our test su
# execute the entire test suite (linter, bats tests, and app deployment tests)
make test
# run linter & update vagrant dokku install from local git clone
# run linter & update vagrant Dokku install from local git clone
make lint copyfiles
# execute all bats tests
@@ -45,4 +45,4 @@ Additionally you may run a specific app deployment tests with a target similar t
make deploy-test-nodejs-express
```
For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
For a full list of test make targets check out `tests.mk` in the root of the Dokku repository.

View File

@@ -1,10 +1,10 @@
# Advanced installation
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
You can always install Dokku straight from the latest - potentially unstable - master release via the following bash command:
```shell
# using a branch results in installing from source
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh;
sudo DOKKU_BRANCH=master bash bootstrap.sh
```
@@ -26,10 +26,10 @@ sudo SSHCOMMAND_URL=https://raw.githubusercontent.com/yourusername/sshcommand/ma
## Bootstrap a server from your own repository
The bootstrap script allows the dokku repository URL to be overridden to bootstrap a host from your own clone of dokku using the `DOKKU_REPO` environment variable. Example:
The bootstrap script allows the Dokku repository URL to be overridden to bootstrap a host from your own clone of Dokku using the `DOKKU_REPO` environment variable. Example:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh;
chmod +x bootstrap.sh
sudo DOKKU_REPO=https://github.com/yourusername/dokku.git DOKKU_BRANCH=master ./bootstrap.sh
```
@@ -46,19 +46,19 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
## Configuring
Once dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
Once Dokku is installed, if you are not using the web-installer, you'll want to configure a the virtualhost setup as well as the push user. If you do not, your installation will be considered incomplete and you will not be able to deploy applications.
*You should also stop and disable the `dokku-installer` service to remove public access to adding SSH keys.*
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, Dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
Follow the [user management documentation](/dokku/deployment/user-management/) in order to add users to dokku.
Follow the [user management documentation](/dokku/deployment/user-management/) in order to add users to Dokku, or to give other Unix accounts access to Dokku.
That's it!
## VMs with less than 1GB of memory
Having less than 1GB of system memory available for dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867).
Having less than 1GB of system memory available for Dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867).
To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size.

View File

@@ -2,10 +2,10 @@
- If you don't already have one [generate an SSH key pair](https://help.github.com/articles/generating-ssh-keys/).
- Go to the [dokku on azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
- Go to the [Dokku on azure deployment page](https://github.com/azure/azure-quickstart-templates/tree/master/dokku-vm) and click **Deploy to Azure**.
- You'll be prompted to enter a few parameters, including a unique storage account name and a unique name for the sub-domain used for your public IP address. For the `sshKeyData` parameter, copy and paste the contents of the **public** key file you just created. After a few minutes the Dokku instance will be deployed.
- In your browser of choice, navigate to `http://[[dnsNameForPublicIP]].[[location]].cloudapp.azure.com`. Where `[[dnsNameForPublicIP]]` and `[[location]]` are template parameters you used to deploy the template.
- Finish your dokku setup like you normally would by creating a **new** public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select 'Use Virtual Host Naming' and set the `Hostname` to a **public dns name** that you own such as one you would purchase from [namecheap](http://namecheap.com). Alternatively thanks to [xip.io]( http://xip.io/) you can just use yourAzurePublicIP.xip.io for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.
- Finish your Dokku setup like you normally would by creating a **new** public/private key pair for your deployments using `ssh-keygen` (don't use the same one as you created in the first step). You should select 'Use Virtual Host Naming' and set the `Hostname` to a **public dns name** that you own such as one you would purchase from [namecheap](http://namecheap.com). Alternatively thanks to [xip.io]( http://xip.io/) you can just use yourAzurePublicIP.xip.io for free. For example, if your public IP is `44.44.44.44` then you would set it to `44.44.44.44.xip.io`.

View File

@@ -1,6 +1,6 @@
# Debian Package Installation Notes
As of 0.3.18, dokku defaults to being installed via debian package. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
As of 0.3.18, Dokku defaults to being installed via debian package. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
```shell
# install prerequisites
@@ -14,7 +14,7 @@ wget -nv -O - https://get.docker.com/ | sh
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
sudo apt-get update -qq > /dev/null
sudo apt-get install -qq -y dokku
sudo apt-get install -qq -y dokku
sudo dokku plugin:install-dependencies --core
```
@@ -38,4 +38,4 @@ After setting the desired options, proceed with the installation as described ab
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. <app>.dokku.me) |
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: This setting this to true, will require you to manually add an SSH key later on. |
| dokku/key_file | string | /root/.ssh/id_rsa.pub | SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
| dokku/key_file | string | /root/.ssh/id_rsa.pub | Path on disk to an SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |

View File

@@ -5,3 +5,7 @@ On Digital Ocean, there is a pre-made image that can be run for Dokku. You can c
When choosing your Droplet configuration, please disable IPv6 on the droplet. There are known issues with IPv6 on Digital Ocean and Docker, and many have been reported to the Dokku issue tracker.
If you would like to run Dokku on an IPv6 Digital Ocean Droplet, please consult [this guide](https://jeffloughridge.wordpress.com/2015/01/17/native-ipv6-functionality-in-docker/) for modifying Docker to run under the Digital Ocean IPv6 configuration.
Once Dokku is installed, you can then proceed to the ip address or domain name associated with your server to complete the web-based installation.
If you wish for a more unattended installation method, see [these](http://dokku.viewdocs.io/dokku/getting-started/install/debian/#unattended-installation) docs.

View File

@@ -4,7 +4,7 @@ Cloud-init script can be used to automate installation of Dokku on
Dreamhost (or any other OpenStack-compatible cloud with minimal
changes).
A new server can be created on DreamHost Cloud from the command line
A new server instance can be created on DreamHost Cloud from the command line
using openstack client or from the web UI and with the same command
use a cloud-init script to install Dokku. Install the [openstack
cli](https://help.dreamhost.com/hc/en-us/articles/216185658-How-to-Install-the-OpenStack-command-line-clients),
@@ -18,18 +18,18 @@ source openrc.sh # Set the environment variables for DreamHost Cloud
```
This allows openstack client to connect to DreamHost API endpoints.
The command below creates a new server named `my-dokku-instance` based
on Ubuntu 14.04, with 2GB RAM and 1CPU (the flavor called
`semisonic`), opening network port access to http and ssh (the
The command below creates a new server instance named `my-dokku-instance`
based on Ubuntu 14.04, with 2GB RAM and 1CPU (the flavor called
`supersonic`), opening network port access to http and ssh (the
`default` security group), and the name of the chosen SSH key. This
key will be automatically added to the new server in the
`authorized_keys` for the default SSH user (`dhc-user`), and it will
`authorized_keys` for the default SSH user (`ubuntu`), and it will
be reused by Dokku.
```sh
openstack server create \
--image Ubuntu-14.04 \
--flavor gp1.semisonic \
--flavor gp1.supersonic \
--security-group default \
--key-name $YOUR_SSH_KEYNAME \
--user-data dokku-cloudinit.sh \
@@ -37,7 +37,7 @@ openstack server create \
```
The content of dokku-cloudinit.sh script contains instructions to add
Docker and Dokku's apt repositories and install dokku with the proper
Docker and Dokku's apt repositories and install Dokku with the proper
debconf options set. Don't forget to add the FQDN for your application
server:
@@ -178,8 +178,20 @@ debconf_selections: |
# set the domain name of the new Dokku server
dokku dokku/hostname string $YOUR_FULL_QUALIFIED_DOMAIN
# this copies over the public SSH key assigned to the server
dokku dokku/key_file string /home/dhc-user/.ssh/authorized_keys
dokku dokku/key_file string /home/ubuntu/.ssh/authorized_keys
packages:
- dokku
```
Shortly after running the create command you will get a confirmation that the
instance has been created, and after about a minute it should be ready to login.
Check the IP of the instance through the web UI or by running:
```sh
nova list
```
SSH with the `ubuntu` username and the public key previously added.
Keep in mind that if you logged in quick enough dokku might still be installing
in the background, and not be ready. The installation takes a few minutes.

View File

@@ -1,41 +0,0 @@
# Installing on Linode
When installing Dokku on a Linode server, you'll likely see an error during Docker installation:
> Warning: current kernel is not supported by the linux-image-extra-virtual package. We have no AUFS support. Consider installing the packages linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.
After 10 seconds, the installation will continue as normal.
This warning is the result of Linode using its own kernel, which does not support AUFS, instead of using the kernel supplied by Ubuntu. If you ignore the warning, Docker will fall back to using the DeviceMapper storage backend and Dokku will work normally. However, AUFS is better tested and will perform better.
If you would like to use AUFS, follow the steps below to install Ubuntu's kernel and configure your server to boot it instead of Linode's.
## Preparing your Linode for AUFS
__Warning__: These steps will delete *everything* on your Linode.
1. Open your server's dashboard in the [Linode Manager](https://manager.linode.com/).
2. Make sure your Linode is [using KVM](https://www.linode.com/docs/platform/kvm#how-to-enable-kvm), not Xen, for virtualization.
3. In the "Rebuild" tab, select "Ubuntu 14.04 LTS", set a root password, and rebuild.
4. Once your Linode has been created, click "Boot" and wait for it to complete.
5. SSH into your Linode as root and run the following commands:
```shell
apt-get update
apt-get -qq upgrade
apt-get install linux-image-virtual linux-image-extra-virtual
```
6. When prompted, install Grub onto the first hard drive.
7. Back in your server's dashboard, click "Edit" on its Configuration Profile
8. Change the "Kernel" option to "GRUB 2" and save your changes.
9. Lastly, reboot the Linode.
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/getting-started/installation/) and `bootstrap.sh` will take care of everything else.

View File

@@ -0,0 +1,27 @@
# RPM Package Installation Notes
> New as of 0.8.0 *(experimental)*
>**Warning:** Web installer is not available on CentOS. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface.
Dokku defaults to being installed via RPM package on CentOS 7. While certain hosts may require extra work to get running, you may optionally wish to automate the installation of Dokku without the use of our `bootstrap.sh` bash script. The following are the steps run by said script:
```shell
# Install docker
curl -fsSL https://get.docker.com/ | sh
# Install epel for nginx packages to be available
sudo yum install -y epel-release
# Install dokku
curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.rpm.sh | sudo bash
sudo yum install -y herokuish dokku
sudo dokku plugin:install-dependencies --core
systemctl start nginx
# Enable docker and nginx on system startup
systemctl enable docker
systemctl enable nginx
```
The [devicemapper](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the default Docker storage driver on CentOS 7 and defaults to a configuration mode known as `loop-lvm`. This mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under `loop-lvm` mode. The preferred configuration for production deployments is [`direct-lvm`](https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/#/configure-direct-lvm-mode-for-production).

View File

@@ -21,13 +21,15 @@
cd path/to/dokku
vagrant up
```
- Setup SSH Config in `~/.ssh/config`. The port listed here is usually correct, though you may want to verify that it is the same as the one listed in the output of `vagrant ssh-config dokku`
- Setup SSH Config in `~/.ssh/config`.
```ini
Host dokku.me
Port 22
```
> For users that have customized the IP address of their VM - either in a custom `Vagrantfile` or via the `DOKKU_IP` environment variable - and are not using `10.0.0.2` for the Vagrant IP, you'll need to instead use the output of `vagrant ssh-config dokku` for your ~/.ssh/config entry.
- Copy your SSH key via `cat ~/.ssh/id_rsa.pub | pbcopy` and paste it into the dokku-installer at http://dokku.me . Change the `Hostname` field on the Dokku Setup screen to your domain and then check the box that says `Use virtualhost naming`. Then click *Finish Setup* to install your key. You'll be directed to application deployment instructions from here.
Please note, the `dokku.me` domain is setup to point to `10.0.0.2` along with all subdomains (ie yourapp.dokku.me). If you change the `DOKKU_IP` in your vagrant setup you'll need to update your `/etc/hosts` file to point your reconfigured ip address.

View File

@@ -6,12 +6,12 @@ Dokku is an extensible, open source Platform as a Service that runs on a single
To start using Dokku, you'll need a system that meets the following minimum requirements:
- A fresh installation of [Ubuntu 14.04 x64](http://www.ubuntu.com/download/) with the FQDN set <sup>[1]</sup>
- A fresh installation of [Ubuntu 16.04 x64](https://www.ubuntu.com/download), [Ubuntu 14.04 x64](https://www.ubuntu.com/download), [Debian 8.2 x64](https://www.debian.org/distrib/) or [CentOS 7 x64](https://www.centos.org/download/) *(experimental)* with the FQDN set <sup>[1]</sup>
- At least `1GB` of system memory <sup>[2]</sup>
You can *optionally* have a domain name pointed at the host's IP, though this is not necessary.
Dokku is designed for usage on a fresh installation of Ubuntu, and should install all necessary dependencies if installing via the bootstrap method.
Dokku is designed for usage on a fresh VM installation, and should install all necessary dependencies if installing via the bootstrap method.
### Installing the latest stable version
@@ -20,21 +20,23 @@ Dokku is designed for usage on a fresh installation of Ubuntu, and should instal
To install the latest stable version of dokku, you can run the following shell commands:
```shell
# for debian systems, installs dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh
sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh
# for debian systems, installs Dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.9.0/bootstrap.sh;
sudo DOKKU_TAG=v0.9.0 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.
#### 2. Setup SSH key and Virtualhost Settings
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure dokku via the web admin.
Once the installation is complete, you can open a browser to setup your SSH key and virtualhost settings. Open your browser of choice and navigate to the host's IP address - or the domain you assigned to that IP previously - and configure Dokku via the web admin.
*If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your dokku installation will remain vulnerable to anyone finding the setup page and inserting their key.*
>**Warning:** If you don't complete setup via the web installer (even if you set up SSH keys and virtual hosts otherwise) your Dokku installation will remain vulnerable to anyone finding the setup page and inserting their key.
>**Warning:** Web installer is not available on CentOS and Arch Linux. You will need to configure [SSH keys](/dokku/deployment/user-management/#adding-ssh-keys) and [virtual hosts](/dokku/configuration/domains/#customizing-hostnames) using dokku command line interface.
#### 3. Deploy your first application
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the dokku installation.
Once you save your settings, the web admin will self-terminate and you should be able to run or deploy to the Dokku installation.
### Installing via other methods
@@ -42,12 +44,12 @@ For various reasons, certain hosting providers may have other steps that should
- [Digital Ocean Installation Notes](/dokku/getting-started/install/digitalocean)
- [DreamHost Cloud Installation Notes](/dokku/getting-started/install/dreamhost/)
- [Linode Installation Notes](/dokku/getting-started/install/linode/)
- [Microsoft Azure Installation Notes](/dokku/getting-started/install/azure/)
As well, you may wish to customize your installation in some other fashion. or experiment with vagrant. The guides below should get you started:
- [Debian Package Installation Notes](/dokku/getting-started/install/debian/)
- [RPM Package Installation Notes](/dokku/getting-started/install/rpm/)
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant/)
- [Advanced Install Customization](/dokku/getting-started/advanced-installation/)

View File

@@ -43,7 +43,7 @@ __Solution:__
The `remote rejected` error does not give enough information. Anything could have failed.
To enable dokku tracing, simply run the following command:
To enable Dokku tracing, simply run the following command:
```shell
# since 0.3.9
@@ -60,7 +60,7 @@ This will trace all of dokku's activity. If this does not help you, create a [gi
***
__Symptom:__ I get the aforementioned error in the build phase (after turning on dokku tracing)
__Symptom:__ I get the aforementioned error in the build phase (after turning on Dokku tracing)
Most errors that happen in this phase are due to transient network issues (either locally or remotely) buildpack bugs.
@@ -154,3 +154,44 @@ dokku config:set --global CURL_CONNECT_TIMEOUT=30
```
Please see https://github.com/dokku/dokku/issues/509
Another reason for this error (although it may respond immediately ruling out a timeout issue) may be because you've set the config setting `SSL_CERT_FILE`. Using a config setting with this key interferes with the buildpack's ability to download it's dependencies, so you must rename the config setting to something else, e.g. `MY_APP_SSL_CERT_FILE`.
***
__Symptom:__ Build fails with `Killed` message.
__Solution:__
This generally occurs when the server runs out of memory. You can either add more ram to your server or setup swap space. The follow script will create 2gb of swap space.
```shell
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
```
***
__Symptom:__ I successfully deployed my application with no deployment errors but I'm receiving Connection Timeout when attempting to access the application.
__Solution:__
This can occur if Dokku is running on a system with a firewall like ufw enabled (some OS versions like Ubuntu 16.04 have this enabled by default). You can check if this is your case by running the following script:
```shell
sudo ufw status
```
If the previous script returned `Status: active` and a list of ports, ufw is enabled and is probably the cause of the symptom described above. To disable it, run:
```shell
sudo ufw disable
```
***

View File

@@ -1,33 +1,52 @@
# Upgrading
If your version of dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/getting-started/installation/) on a new server.
If your version of Dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/getting-started/installation/) on a new server.
## Migration Guides
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
### 0.5 Migration Guide
- [0.5 Migration Guide](/dokku/appendices/0.5.0-migration-guide/)
### 0.6 Migration Guide
- [0.6 Migration Guide](/dokku/appendices/0.6.0-migration-guide/)
### 0.7 Migration Guide
- [0.7 Migration Guide](/dokku/appendices/0.7.0-migration-guide/)
## Upgrade Instructions
If dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
If Dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
```shell
sudo apt-get update
dokku apps
dokku ps:stop <app> # repeat to shut down each running app
sudo apt-get install -qq -y dokku herokuish
dokku ps:rebuildall # restart all applications
dokku ps:stop APP # repeat to shut down each running app
sudo apt-get install -qq -y dokku herokuish sshcommand plugn
dokku ps:rebuildall # rebuilds all applications
```
> If you have any applications deployed via the `tags` or `tar` commands, do not run the `ps:rebuildall` command,
> and instead trigger `ps:rebuild` manually for each `git`-deployed application:
>
> ```
> dokku ps:rebuild APP
> ```
>
> Please see the [images documentation](/dokku/deployment/methods/images/) and [tar documentation](/dokku/deployment/methods/tar/)
> for instructions on rebuilding applications deployed by those plugins.
### Upgrade From Source
If you installed dokku from source (less common), upgrade with:
If you installed Dokku from source (less common), upgrade with:
```shell
dokku apps
dokku ps:stop <app> # repeat to shut down each running app
dokku ps:stop APP # repeat to shut down each running app
cd ~/dokku
git pull --tags origin master
@@ -36,7 +55,7 @@ sudo DOKKU_BRANCH=master make install
# upgrade to debian package-based installation
sudo make install
dokku ps:rebuildall # restart all applications
dokku ps:rebuildall # rebuilds all applications
```
To upgrade herokuish from source, upgrade with:

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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.9.0/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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style>
</style>
@@ -62,6 +62,9 @@
<li class="nav-item">
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&amp;id=f526006fd5">Newsletter</a>
</li>
</ul>
</div>
</div>
@@ -72,7 +75,7 @@
<div class="container">
<div class="row">
<h2>The smallest PaaS implementation you've ever seen</h2>
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
<p>Dokku helps you build and manage the lifecycle of applications</p>
<div class="blurb-buttons">
<a class="btn btn-lg btn-warning" href="/{{NAME}}/getting-started/installation/">View Documentation</a>
</div>
@@ -95,12 +98,12 @@
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.9.0/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.9.0 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output">&nbsp;# go to your server's IP and follow the web installer</span>
@@ -170,7 +173,7 @@
</div>
<div class="alternate-instructions">
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a> instructions.<p>
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
</div>
</div>

View File

@@ -7,29 +7,28 @@
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="">
<meta name="author" content="">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400:sans-serif|Open+Sans:400:sans-serif" 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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.9.0/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -43,97 +42,18 @@
</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.rawgit.com/dokku/dokku/v0.7.0/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.9.0/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>
.highlight-show-language {
position: relative;
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.highlight-show-language-label {
color: black;
background-color: #CFCFCF;
display: inline-block;
position: absolute;
bottom: auto;
left: auto;
top: 0;
right: 0;
width: auto;
height: auto;
font-size: 0.9em;
border-radius: 0 0 0 5px;
padding: 0 0.5em;
text-shadow: none;
z-index: 1;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
-webkit-transform: none;
-moz-transform: none;
-ms-transform: none;
-o-transform: none;
transform: none;
}
.highlight-output pre {
color: #fff;
background-color: #000;
padding: 10px;
}
.improve-slideout {
position: fixed;
bottom: 66%;
right: 0;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
background: #363637;
padding: 5px 0px 4px;
z-index: 90;
}
.improve-slideout:hover {
right: 205px;
}
.improve-slideout:hover .improve-slideout-inner {
right: 0;
}
.improve-slideout-inner {
position: fixed;
bottom: 66%;
right: -205px;
-webkit-transition-duration: 0.3s;
-moz-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
background: #e0e0d9;
padding: 4px 12px;
width: 205px;
}
.improve-slideout-inner h6 {
color: #363637;
font-weight: 700;
text-transform: uppercase;
margin: 0;
.list-group-item {
font-size: 14px;
}
.git-improve {
font-size: 20px;
vertical-align: -2px;
padding-left: 8px;
}
.back-to-contents {
position: fixed;
bottom: calc(66% - 34px);
right: 0;
background: #363637;
padding: 5px 0px 4px;
z-index: 90;
}
.icon-improve {
color: #bdbdb5;
padding: 2px 9px 0 10px;
font-size: 14px;
.markdown-body {
line-height: 1.5;
}
</style>
</head>
@@ -164,6 +84,9 @@
<li class="nav-item">
<a class="nav-link" href="https://glider-slackin.herokuapp.com/">Slack</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://gliderlabs.us10.list-manage.com/subscribe?u=49c4b06ffd30bcf49ec53c277&amp;id=f526006fd5">Newsletter</a>
</li>
</ul>
</div>
</div>
@@ -195,6 +118,7 @@
<a href="/{{NAME}}/deployment/application-deployment/" class="list-group-item">Deploying an Application</a>
<a href="/{{NAME}}/deployment/application-management/" class="list-group-item">Application Management</a>
<a href="/{{NAME}}/deployment/logs/" class="list-group-item">Application Logs</a>
<a href="/{{NAME}}/deployment/remote-commands/" class="list-group-item">Remote Commands</a>
<a href="/{{NAME}}/deployment/one-off-processes/" class="list-group-item">One Off Processes/Cron</a>
<a href="/{{NAME}}/deployment/process-management/" class="list-group-item">Process Scaling</a>
@@ -223,6 +147,7 @@
<a href="/{{NAME}}/advanced-usage/docker-options/" class="list-group-item">Docker Container Options</a>
<a href="/{{NAME}}/advanced-usage/event-logs/" class="list-group-item">Event Logs</a>
<a href="/{{NAME}}/advanced-usage/persistent-storage/" class="list-group-item">Persistent Storage</a>
<a href="/{{NAME}}/advanced-usage/plugin-management/" class="list-group-item">Plugin Management</a>
<a href="/{{NAME}}/advanced-usage/proxy-management/" class="list-group-item">Proxy and Port Management</a>
<a href="/{{NAME}}/advanced-usage/repository-management/" class="list-group-item">Repository Management</a>

View File

@@ -1,10 +1,10 @@
{
"redirects": {
"advanced-installation": "getting-started/advanced-installation",
"troubleshooting": "getting-started/troubleshooting",
"upgrading": "getting-started/upgrading",
"advanced-installation": "getting-started/advanced-installation/",
"troubleshooting": "getting-started/troubleshooting/",
"upgrading": "getting-started/upgrading/",
"application-deployment": "deployment/application-deployment",
"application-deployment": "deployment/application-deployment/",
"checks-examples": "deployment/zero-downtime-deploys/",
"process-management": "deployment/process-management/",
"remote-commands": "deployment/remote-commands/",
@@ -19,6 +19,7 @@
"backup-recovery": "advanced-usage/backup-recovery/",
"deployment-tasks": "advanced-usage/deployment-tasks/",
"deployment/deployment-tasks": "advanced-usage/deployment-tasks/",
"docker-options": "advanced-usage/docker-options/",
"dokku-events-logs": "advanced-usage/event-logs/",
"dokku-storage": "advanced-usage/persistent-storage/",

26
dokku
View File

@@ -7,17 +7,9 @@ export DOKKU_ROOT=${DOKKU_ROOT:=~dokku}
[[ -d $DOKKU_ROOT/.dokkurc ]] && for f in $DOKKU_ROOT/.dokkurc/*; do source "$f"; done
[[ $DOKKU_TRACE ]] && set -x
case "$(lsb_release -si)" in
Arch)
export DOKKU_DISTRO=${DOKKU_DISTRO:="arch"}
;;
Debian)
export DOKKU_DISTRO=${DOKKU_DISTRO:="debian"}
;;
*)
export DOKKU_DISTRO=${DOKKU_DISTRO:="ubuntu"}
;;
esac
export DOKKU_DISTRO
# shellcheck disable=SC1091
DOKKU_DISTRO=$(. /etc/os-release > /dev/null 2>&1 || true ; echo "$ID")
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish"}
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}
@@ -37,16 +29,18 @@ export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
export DOKKU_CONTAINER_LABEL=dokku
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL --env=USER=herokuishuser"
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL"
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
parse_args "$@"
args=("$@")
skip_arg=false
if [[ "${args[0]}" =~ ^--.* ]]; then
for arg in "$@"; do
$skip_arg && skip_arg=false && continue
if [[ "$arg" == "--app" ]]; then
shift 2
shift 2 && skip_arg=true
elif [[ "$arg" =~ ^--.* ]]; then
shift 1
else
@@ -56,14 +50,14 @@ if [[ "${args[0]}" =~ ^--.* ]]; then
fi
! has_tty && DOKKU_QUIET_OUTPUT=1
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]]; then
if [[ $(id -un) != "dokku" ]] && [[ ! $1 =~ plugin:* ]] && [[ ! $1 == "ssh-keys:add" ]]; then
export SSH_USER=$(id -un)
sudo -u dokku -E -H "$0" "$@"
exit $?
fi
if [[ $(id -un) != "root" && $1 =~ ^plugin:.* ]]; then
dokku_log_fail "plugin:* commands must be run as root"
if [[ $(id -un) != "root" && $1 =~ ^plugin:.* && $1 != "plugin:help" && $1 != "plugin:list" ]] || [[ $(id -un) != "root" && $1 == "ssh-keys:add" ]]; then
dokku_log_fail "This command must be run as root"
fi
if [[ -n "$SSH_ORIGINAL_COMMAND" ]]; then

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
cleanup_container_state() {
declare desc="core post-deploy state cleanup"
local trigger="core-post-deploy cleanup_container_state"
local APP="$1"; local PROCTYPES="$(egrep -v "^#" "$DOKKU_ROOT/$APP/DOKKU_SCALE" | awk -F '=' '{ print $1 }' | xargs)"
local CONTAINER_FILES="$(find "$DOKKU_ROOT/$APP" -maxdepth 1 -name "CONTAINER.*" -printf "%f\n" 2>/dev/null | sort -t . -k 3 -n | xargs)"
local CONTAINER_FILE
for CONTAINER_FILE in $CONTAINER_FILES; do
local CONTAINER_TYPE="$(awk -F '.' '{ print $2 }' <<< "$CONTAINER_FILE")"
if [[ "$(is_val_in_list "$CONTAINER_TYPE" "$PROCTYPES" " ")" == "false" ]]; then
dokku_log_info1 "Container type ($CONTAINER_TYPE) is no longer defined. Removing state"
local IP_FILE="${CONTAINER_FILE//CONTAINER/IP}"
local PORT_FILE="${CONTAINER_FILE//CONTAINER/PORT}"
rm -f "$DOKKU_ROOT/$APP/$CONTAINER_FILE" "$DOKKU_ROOT/$APP/$IP_FILE" "$DOKKU_ROOT/$APP/$PORT_FILE"
fi
done
}
cleanup_container_state "$@"

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
app_user_docker_args() {
local APP="$1"
local STDIN
local DOKKU_APP_TYPE
local DOKKU_APP_USER
STDIN=$(cat)
DOKKU_APP_TYPE=$(config_get "$APP" DOKKU_APP_TYPE || true)
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]]; then
local docker_args="$STDIN --env=USER=${DOKKU_APP_USER}"
else
local docker_args="$STDIN"
fi
echo -n "$docker_args"
}
app_user_docker_args "$@"

View File

@@ -0,0 +1 @@
docker-args-build

View File

@@ -0,0 +1 @@
docker-args-build

View File

@@ -42,7 +42,7 @@ execute_script() {
COMMAND+=" rm -rf /tmp/cache ; "
COMMAND+=" ln -sf /cache /tmp/cache ; "
COMMAND+=" fi ; "
COMMAND+=" $SCRIPT_CMD ;"
COMMAND+=" $SCRIPT_CMD || exit 1;"
COMMAND+=" if [[ -d '/cache' ]]; then "
COMMAND+=" echo removing installation cache... ; "
COMMAND+=" rm -f /tmp/cache ; "

View File

@@ -30,7 +30,8 @@ if [[ $(systemctl 2> /dev/null) =~ -\.mount ]]; then
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
[Unit]
Description=Dokku app redeploy service
After=docker.target
Requires=docker.service
After=docker.service
[Service]
Type=simple

View File

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

View File

@@ -5,30 +5,11 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts"
exec_app_json_scripts() {
declare desc="core app.json scripts execution"
local trigger="pre-deploy app_json_scripts"
local trigger="post-deploy app_json_scripts"
local APP="$1"; local IMAGE_TAG="$4"; local PHASE_SCRIPT_KEY="postdeploy"
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
}
cleanup_container_state() {
declare desc="core post-deploy state cleanup"
local trigger="post-deploy cleanup_container_state"
local APP="$1"; local PROCTYPES="$(egrep -v "^#" "$DOKKU_ROOT/$APP/DOKKU_SCALE" | awk -F '=' '{ print $1 }' | xargs)"
local CONTAINER_FILES="$(find "$DOKKU_ROOT/$APP" -maxdepth 1 -name "CONTAINER.*" -printf "%f\n" | sort -t . -k 3 -n | xargs)"
local CONTAINER_FILE
for CONTAINER_FILE in $CONTAINER_FILES; do
local CONTAINER_TYPE="$(awk -F '.' '{ print $2 }' <<< "$CONTAINER_FILE")"
if [[ "$(is_val_in_list "$CONTAINER_TYPE" "$PROCTYPES" " ")" == "false" ]]; then
dokku_log_info1 "Container type ($CONTAINER_TYPE) is no longer defined. Removing state"
local IP_FILE="${CONTAINER_FILE//CONTAINER/IP}"
local PORT_FILE="${CONTAINER_FILE//CONTAINER/PORT}"
rm -f "$DOKKU_ROOT/$APP/$CONTAINER_FILE" "$DOKKU_ROOT/$APP/$IP_FILE" "$DOKKU_ROOT/$APP/$PORT_FILE"
fi
done
}
exec_app_json_scripts "$@"
cleanup_container_state "$@"

View File

@@ -2,6 +2,7 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/00_dokku-standard/exec-app-json-scripts"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
exec_app_json_scripts() {
declare desc="core app.json scripts execution"
@@ -12,4 +13,28 @@ exec_app_json_scripts() {
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
}
app_user_pre_deploy_trigger() {
local desc="app user pre-deploy trigger"
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE; local DOCKER_ARGS
local DOKKU_APP_TYPE DOKKU_APP_USER APP_PATHS CONTAINER_PATHS
IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
DOKKU_APP_TYPE=$(config_get "$APP" DOKKU_APP_TYPE || true)
DOKKU_APP_USER=$(config_get "$APP" DOKKU_APP_USER || true)
DOKKU_APP_USER=${DOKKU_APP_USER:="herokuishuser"}
APP_PATHS=$(dokku --quiet storage:list "$APP" || true)
if [[ -n "$APP_PATHS" ]]; then
CONTAINER_PATHS=$(echo "$APP_PATHS" | awk -F ':' '{ print $2 }' | xargs)
DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG" | xargs)
fi
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]] && [[ -n "$CONTAINER_PATHS" ]]; then
# shellcheck disable=SC2086
docker run $DOKKU_GLOBAL_RUN_ARGS $DOCKER_ARGS $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
fi
}
exec_app_json_scripts "$@"
app_user_pre_deploy_trigger "$@"

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_run_cmd() {

View File

@@ -0,0 +1 @@
hook

View File

@@ -10,9 +10,10 @@ flag_rsyslog_needs_restart=n
# This can be done unconditionally as mkdir -p
# exits gracefully if the path already exists
# shellcheck disable=SC2174
mkdir -m 775 -p "$DOKKU_LOGS_DIR"
case "$DOKKU_DISTRO" in
arch|debian)
arch|debian|centos)
chgrp dokku "$DOKKU_LOGS_DIR"
;;
*)
@@ -23,7 +24,7 @@ esac
if [[ ! -f "$DOKKU_EVENTS_LOGFILE" ]]; then
touch "$DOKKU_EVENTS_LOGFILE"
case "$DOKKU_DISTRO" in
arch|debian)
arch|debian|centos)
chgrp dokku "$DOKKU_EVENTS_LOGFILE"
;;
*)
@@ -59,7 +60,7 @@ $DOKKU_LOGS_DIR/*.log {
EOF
if [[ "$DOKKU_DISTRO" = "debian" ]]; then
sed -i '/\s*su syslog dokku/d; s/\(create [0-7][0-7][0-7]\) syslog dokku/\1 root dokku/g' $DOKKU_LOGROTATE_FILE
sed -i 's/ syslog dokku$/root dokku/g' $DOKKU_LOGROTATE_FILE
fi
flag_rsyslog_needs_restart=y

View File

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

View File

@@ -8,7 +8,7 @@ events_list_cmd() {
local PLUGIN_DIR="$(dirname "$0")/.."
if [[ "$DOKKU_EVENTS" ]]; then
local logged="$(find "$PLUGIN_DIR" -type l -printf '%f ' | sort)"
local logged="$(find "$PLUGIN_DIR" -type l -printf '%f ' 2>/dev/null | sort)"
dokku_col_log_info2_quiet "Events currently logged"
local hook

View File

@@ -1,36 +1,11 @@
#!/usr/bin/env bash
[[ " help apps:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | apps:help)
help_content_func () {
declare desc="return apps plugin help content"
cat<<help_content
apps, List your apps
apps:create <app>, Create a new app
apps:destroy <app>, Permanently destroy an app
apps:rename <old-app> <new-app>, Rename an app
help_content
}
if [[ $1 = "apps:help" ]] ; then
echo -e 'Usage: dokku apps[:COMMAND]'
echo ''
echo 'List your apps.'
echo ''
echo 'Example:'
echo ''
echo '$ dokku apps'
echo '=====> My Apps'
echo 'example'
echo 'example2'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,
else
help_content_func
fi
apps_help_cmd "$@"
;;
*)

51
plugins/apps/internal-functions Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
apps_help_content_func() {
declare desc="return apps plugin help content"
cat<<help_content
apps, [DEPRECATED] Alias for apps:list
apps:clone <old-app> <new-app>, Clones an app
apps:create <app>, Create a new app
apps:destroy <app>, Permanently destroy an app
apps:list, List your apps
apps:rename <old-app> <new-app>, Rename an app
apps:report [<app>] [<flag>], Display report about an app
help_content
}
apps_help_cmd() {
if [[ $1 = "apps:help" ]] ; then
echo -e 'Usage: dokku apps[:COMMAND]'
echo ''
echo 'Manage Dokku apps'
echo ''
echo 'Example:'
echo ''
echo '$ dokku apps:list'
echo '=====> My Apps'
echo 'example'
echo 'example2'
echo ''
echo 'Additional commands:'
apps_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
apps_help_content_func
else
cat<<help_desc
apps, Manage Dokku apps
help_desc
fi
}
apps_list_cmd() {
declare desc="lists all apps"
local cmd="apps"
local app
dokku_log_info2_quiet "My Apps"
for app in $(dokku_apps); do
echo "$app"
done
}

View File

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

39
plugins/apps/subcommands/clone Executable file
View File

@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
apps_clone_cmd() {
declare desc="clones an app"
declare OLD_APP="$2" NEW_APP="$3"
local cmd="apps:clone"
local SKIP_REBUILD=false
if [[ "$2" == "--skip-deploy" ]]; then
SKIP_REBUILD=true
OLD_APP="$3"
NEW_APP="$4"
fi
[[ -z "$OLD_APP" ]] && dokku_log_fail "Please specify an app to run the command on"
[[ -d "$DOKKU_ROOT/$NEW_APP" ]] && dokku_log_fail "Name is already taken"
local NEW_CACHE_DIR="$DOKKU_ROOT/$NEW_APP/cache"
apps_create "$NEW_APP"
cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP"
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$NEW_CACHE_DIR"
[[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
[[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
[[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
[[ "$SKIP_REBUILD" == "true" ]] || ps_rebuild "$NEW_APP"
plugn trigger post-app-clone "$OLD_APP" "$NEW_APP"
echo "Cloning $OLD_APP to $NEW_APP... done"
}
apps_clone_cmd "$@"

View File

@@ -1,16 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
apps_main_cmd() {
declare desc="lists all apps"
local cmd="apps"
local app
dokku_log_info2_quiet "My Apps"
for app in $(dokku_apps); do
echo "$app"
done
}
apps_main_cmd "$@"
dokku_log_warn "Deprecated: Please use apps:list"
apps_list_cmd "$@"

5
plugins/apps/subcommands/list Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
apps_list_cmd "$@"

View File

@@ -13,11 +13,11 @@ apps_rename_cmd() {
local NEW_APP="$3"
local OLD_CACHE_DIR="$DOKKU_ROOT/$OLD_APP/cache"
mkdir -p "$DOKKU_ROOT/$NEW_APP"
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR"; then
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$OLD_CACHE_DIR"
apps_create "$NEW_APP"
cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP"
DOKKU_APPS_FORCE_DELETE=1 apps_destroy "$OLD_APP"
[[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"

92
plugins/apps/subcommands/report Executable file
View File

@@ -0,0 +1,92 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
report_single_app() {
declare APP="$1" INFO_FLAG="$2"
local APP_DIR="$DOKKU_ROOT/$APP"
local use_echo;
if [[ "$INFO_FLAG" == "true" ]]; then
use_echo=true
INFO_FLAG=""
fi
verify_app_name "$APP"
local DOKKU_APP_CIDS=$(get_app_container_ids "$APP")
if [[ -n $DOKKU_APP_CIDS ]]; then
local cid
for CID in $DOKKU_APP_CIDS; do
local APP_CONTAINER_STATUS
local DOKKU_APP_CID
DOKKU_APP_CID=$CID
APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$CID")
done
fi
local flag_map=(
"--app-dir: $APP_DIR"
"--git-sha: $(GIT_DIR="$APP_DIR" git rev-parse --short HEAD 2> /dev/null || false)"
"--app-cid: ${DOKKU_APP_CID:0:12}"
"--status: $APP_CONTAINER_STATUS"
)
if [[ -z "$INFO_FLAG" ]]; then
dokku_log_info2 "$APP"
if (is_deployed "$APP"); then
for flag in "${flag_map[@]}"; do
key="$(echo "${flag#--}" | cut -f1 -d' ' | tr - ' ')"
dokku_log_verbose "$(printf "%-20s %-25s" "${key^}" "${flag#*: }")"
done
else
if [[ "$use_echo" ]]; then
echo "not deployed"
else
dokku_log_fail "not deployed"
fi
fi
else
local match=false; local value_exists=false
for flag in "${flag_map[@]}"; do
valid_flags="${valid_flags} $(echo "$flag" | cut -d':' -f1)"
if [[ "$flag" == "${INFO_FLAG}:"* ]]; then
value=${flag#*: }
size="${#value}"
if [[ "$size" -ne 0 ]]; then
echo "$value" && match=true && value_exists=true
else
match=true
fi
fi
done
if [[ "$match" == "true" ]]; then
[[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed"
else
dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}"
fi
fi
}
apps_report_cmd() {
declare desc="displays the app report for one or more apps"
local cmd="apps:report"
local INSTALLED_APPS=$(dokku_apps)
local APP="$2" INFO_FLAG="$3"
if [[ -n "$APP" ]] && [[ "$APP" == --* ]]; then
INFO_FLAG="$APP"
APP=""
fi
if [[ -z "$APP" ]] && [[ -z "$INFO_FLAG" ]]; then
INFO_FLAG="true"
fi
if [[ -z "$APP" ]]; then
for app in $INSTALLED_APPS; do
report_single_app "$app" "$INFO_FLAG" | tee || true
done
else
report_single_app "$APP" "$INFO_FLAG"
fi
}
apps_report_cmd "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core build-env plugin"
version = "0.7.0"
version = "0.9.0"
[plugin.config]

View File

@@ -1,34 +1,11 @@
#!/usr/bin/env bash
[[ " help certs:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions"
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
case "$1" in
help | certs:help)
help_content_func () {
declare desc="return certs plugin help content"
cat<<help_content
certs, Manage Dokku apps SSL (TLS) certs
certs:add <app> CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin
certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate
certs:generate <app> DOMAIN, Generate a key and certificate signing request (and self-signed certificate)
certs:info <app>, Show certificate information for an ssl endpoint
certs:key <app> CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate
certs:remove <app>, Remove an SSL Endpoint from an app
certs:rollback <app>, [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app
certs:update <app> CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin
help_content
}
if [[ $1 = "certs:help" ]] ; then
echo -e 'Usage: dokku certs:COMMAND'
echo ''
echo 'Manage Dokku apps SSL (TLS) certs.'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,
else
help_content_func
fi
certs_help_cmd "$@"
;;
*)

View File

@@ -26,6 +26,6 @@ get_ssl_hostnames() {
else
local SSL_HOSTNAMES=$SSL_HOSTNAME
fi
echo -e "$SSL_HOSTNAMES"
echo -e "$SSL_HOSTNAMES" | sort -u
return 0
}

View File

@@ -0,0 +1,71 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/certs/functions"
certs_help_content_func() {
declare desc="return certs plugin help content"
cat<<help_content
certs <app>, [DEPRECATED] Alternative for certs:report
certs:add <app> CRT KEY, Add an ssl endpoint to an app. Can also import from a tarball on stdin
certs:chain CRT [CRT ...], [NOT IMPLEMENTED] Print the ordered and complete chain for the given certificate
certs:generate <app> DOMAIN, Generate a key and certificate signing request (and self-signed certificate)
certs:info <app>, [DEPRECATED] Alternative for certs:report
certs:key <app> CRT KEY [KEY ...], [NOT IMPLEMENTED] Print the correct key for the given certificate
certs:remove <app>, Remove an SSL Endpoint from an app
certs:report [<app>] [<flag>], Displays an ssl report for one or more apps
certs:rollback <app>, [NOT IMPLEMENTED] Rollback an SSL Endpoint for an app
certs:update <app> CRT KEY, Update an SSL Endpoint on an app. Can also import from a tarball on stdin
help_content
}
certs_help_cmd() {
if [[ $1 = "certs:help" ]] ; then
echo -e 'Usage: dokku certs[:COMMAND]'
echo ''
echo 'Manage Dokku apps SSL (TLS) certs.'
echo ''
echo 'Additional commands:'
certs_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
certs_help_content_func
else
cat<<help_desc
certs, Manage Dokku apps SSL (TLS) certs
help_desc
fi
}
certs_info_cmd() {
# This is here because it's used in both the info and the default
declare desc="prints SSL certificate info for app"
local cmd="certs:info"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
verify_app_name "$2"
local APP="$2"
local APP_SSL_PATH="$DOKKU_ROOT/$APP/tls"
if is_ssl_enabled "$APP"; then
dokku_log_info1 "Fetching SSL Endpoint info for $APP..."
dokku_log_info1 "Certificate details:"
dokku_log_info2 "Common Name(s): "
for domain in $(get_ssl_hostnames "$APP" | xargs); do
dokku_log_info2 " $domain"
done
dokku_log_info2 "Expires At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not After :" | awk -F " : " '{ print $2 }')"
dokku_log_info2 "Issuer: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Issuer:" | xargs | sed -e "s/Issuer: //g")"
dokku_log_info2 "Starts At: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -text | grep "Not Before:" | awk -F ": " '{ print $2 }')"
dokku_log_info2 "Subject: $(openssl x509 -in "$APP_SSL_PATH/server.crt" -noout -subject | sed -e "s:subject= ::g"| sed -e "s:^/::g" | sed -e "s:/:; :g")"
local SSL_VERIFY_OUTPUT="$(openssl verify -verbose -purpose sslserver "$APP_SSL_PATH/server.crt" | awk -F ':' '{ print $2 }' | tail -1 | xargs || true)"
if [[ "$SSL_VERIFY_OUTPUT" == "OK" ]]; then
local SSL_SELF_SIGNED="verified by a certificate authority."
else
local SSL_SELF_SIGNED="self signed."
fi
dokku_log_info2 "SSL certificate is $SSL_SELF_SIGNED"
else
dokku_log_info1 "$APP does not have an SSL endpoint"
fi
}

View File

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

View File

@@ -44,7 +44,7 @@ certs_set() {
trap 'popd &> /dev/null || true; rm -rf $CERTS_SET_TMP_WORK_DIR > /dev/null' RETURN
tar xvf - <&0
local CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.crt")
local CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f | grep ".crt$")
local CRT_FILE_COUNT=$(printf "%s" "$CRT_FILE_SEARCH" | grep -c '^')
if [[ $CRT_FILE_COUNT -lt 1 ]]; then
dokku_log_fail "Tar archive is missing .crt file"
@@ -54,7 +54,7 @@ certs_set() {
local CRT_FILE=$CRT_FILE_SEARCH
fi
local KEY_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.key")
local KEY_FILE_SEARCH=$(find . -not -path '*/\.*' -type f | grep ".key$")
local KEY_FILE_COUNT=$(printf "%s" "$KEY_FILE_SEARCH" | grep -c '^')
if [[ $KEY_FILE_COUNT -lt 1 ]]; then
dokku_log_fail "Tar archive is missing .key file"
@@ -72,7 +72,6 @@ certs_set() {
cp "$KEY_FILE" "$APP_SSL_PATH/server.key"
chmod 750 "$APP_SSL_PATH"
chmod 640 "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.key"
cd "$DOKKU_ROOT"
plugn trigger post-certs-update "$APP"
plugn trigger post-domains-update "$APP"
}

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