Compare commits

...

250 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
bdd2b4bfe5 Release 0.6.2 2016-06-20 21:16:21 -04:00
Jose Diaz-Gonzalez
ecd47dcdeb Merge pull request #2259 from andrewsomething/installer-fix
Don't run DeleteInstallerThread() until after set_debconf_selection
2016-06-20 20:21:23 -04:00
Andrew Starr-Bochicchio
3762b7b9f9 Don't run DeleteInstallerThread() until after set_debconf_selection calls. 2016-06-20 19:59:19 -04:00
Jose Diaz-Gonzalez
a79cd7aebf Merge pull request #2256 from dokku/2254_mh-remove-storage-mount-on-build
Revert automatically binding storage mounts in build phase
2016-06-20 14:50:02 -04:00
Michael Hobbs
aa345fad01 revert automatically binding storage mounts in build phase. closes #2254 2016-06-20 11:39:08 -07:00
Jose Diaz-Gonzalez
ed06b8961e Release 0.6.1 2016-06-18 23:54:00 -04:00
Michael Hobbs
8e2a3783ce Merge pull request #2250 from dokku/mh-fix-nginx-template-context-variable
fix missing $ sign in default nginx template
2016-06-18 16:12:29 -07:00
Michael Hobbs
d9ab4d1424 fix missing $ sign in default nginx template 2016-06-18 16:06:46 -07:00
Jose Diaz-Gonzalez
833db67f25 Release 0.6.0 2016-06-18 01:53:48 -04:00
Jose Diaz-Gonzalez
01f370ab82 Add docs for new repository-related tags
Closes #2249

[ci skip]
2016-06-18 01:31:51 -04:00
Michael Hobbs
9d4a288579 Merge pull request #2242 from dokku/2166-avoid-calling-dokku
Avoid calling dokku binary
2016-06-17 20:24:22 -07:00
Jose Diaz-Gonzalez
b6f9672d40 Add note to plugin creation regarding calling the binary directly
[ci skip]
2016-06-17 23:12:11 -04:00
Jose Diaz-Gonzalez
8f8ee9c5da Add a section on how calling the dokku binary should work
[ci skip]
2016-06-17 23:00:43 -04:00
Michael Hobbs
9effe275bd don't call dokku binary in checks/install. fix variable typo 2016-06-17 19:49:15 -07:00
Michael Hobbs
c1ae280a78 [ci skip] clarify triggers being called by internal functions 2016-06-17 19:30:25 -07:00
Michael Hobbs
ce3aa4b93e remove calls to dokku binary for build/receive/release 2016-06-17 16:40:35 -07:00
Michael Hobbs
fcefd4a29b use central deploy lock in git plugin 2016-06-17 16:16:20 -07:00
Michael Hobbs
4f8c1b64c9 implement central deploy lock and use in tar plugin 2016-06-17 15:58:31 -07:00
Michael Hobbs
2ece0e1bf8 move DOKKU_NGINX_SSL_PORT setting to correct logic block 2016-06-17 15:25:09 -07:00
Jose Diaz-Gonzalez
1216a5e65a Remove use of dokku binary from tar plugin 2016-06-17 13:55:43 -07:00
Jose Diaz-Gonzalez
aca2540651 Move tar functions into sourceable functions file 2016-06-17 13:55:43 -07:00
Jose Diaz-Gonzalez
2cb20f3fd0 Remove use of dokku binary from git plugin 2016-06-17 13:55:43 -07:00
Jose Diaz-Gonzalez
946756bd43 Move git functions into sourceable functions file 2016-06-17 13:55:43 -07:00
Michael Hobbs
d74006b51a Merge pull request #2248 from dokku/2239_mh-proxy-ports
proxy port mapping
2016-06-16 19:48:45 -07:00
Michael Hobbs
e6dfdc0732 fix reference to .SPDY_SUPPORTED in default template 2016-06-16 17:23:35 -07:00
Michael Hobbs
21d0859253 make proxy port listing a callable function 2016-06-16 16:04:44 -07:00
Michael Hobbs
2b19881f01 [ci skip] port mapping docs 2016-06-16 16:04:44 -07:00
Michael Hobbs
39375342e0 add port mapping tests 2016-06-16 16:04:44 -07:00
Michael Hobbs
ab94a9fc67 fix broken tar/urls tests 2016-06-16 16:04:44 -07:00
Michael Hobbs
ff18e0d6be cleanup external references to nginx-vhosts plugin 2016-06-16 16:04:44 -07:00
Michael Hobbs
6c1d6225f9 initial pass at implementing DOKKU_PROXY_PORT_MAP. closes #2239. 2016-06-16 16:04:44 -07:00
Michael Hobbs
99c56ccd6d Merge pull request #2243 from dokku/nginx-fixes
Nginx 1.9.5+ support
2016-06-16 16:02:02 -07:00
Jose Diaz-Gonzalez
f99aa2b128 Skip upgrading nginx when the version of nginx is at least 1.8.0
Refs #2059
2016-06-16 17:18:47 -04:00
Jose Diaz-Gonzalez
a43fc39d9a Support nginx 1.9.5+
Newer versions of nginx drop spdy support in favor of http2, and thus the nginx config that we bundle with dokku causes nginx to fail to reload in certain cases. This change drops spdy support in favor of http2 for versions of nginx greater than 1.9.5.

Closes #2216
2016-06-16 17:18:43 -04:00
Michael Hobbs
6be1fd33cd Merge pull request #2241 from dokku/2146-debconf-set-selections
Set debconf selections from dokku-installer.py. Closes #2146
2016-06-16 12:47:09 -07:00
Michael Hobbs
5e9df3a92d Merge pull request #2168 from dokku/2073_mh-zero-downtime
allow zero-downtime to be completely disabled.
2016-06-16 12:46:30 -07:00
Michael Hobbs
5c741696fc Merge pull request #2109 from dokku/modify-deployed-image
Allow user to modify the repository and tag when deploying an app
2016-06-16 12:43:11 -07:00
Michael Hobbs
8e30722c1e Merge pull request #2050 from dokku/1570-repo-plugin
Implement repo:gc and repo:purge-cache
2016-06-16 12:42:25 -07:00
Michael Hobbs
cd48505922 Merge pull request #2018 from pascalw/feature/dokku-run-from-procfile
Support running Procfile commands using `dokku run`
2016-06-16 12:42:01 -07:00
Jose Diaz-Gonzalez
24cab65d9c Make opencollective badges flat-square
Also move gratipay to same line

[ci skip]
2016-06-15 14:24:01 -04:00
Michael Hobbs
dc8acc0da6 Merge pull request #2209 from piamancini/patch-1
Added backers and sponsors from OpenCollective
2016-06-15 10:42:58 -07:00
Michael Hobbs
0297dd9e1f Merge pull request #2244 from basgys/master
Add InfluxDB to plugins
2016-06-13 07:26:51 -07:00
Bastien
e4268148cf Add InfluxDB to plugins 2016-06-13 09:51:08 +02:00
Jose Diaz-Gonzalez
f226dc7c27 Set debconf selections from dokku-installer.py. Closes #2146 2016-06-12 15:07:42 -04:00
Jose Diaz-Gonzalez
b71c5b668f Release 0.5.8 2016-06-10 22:40:57 -04:00
Michael Hobbs
30ae651a59 Merge pull request #2238 from dokku/2207_mh-storage-on-build
mount storage mounts on build and filter for dockerfile apps
2016-06-10 15:33:45 -07:00
Jose Diaz-Gonzalez
d2ee0994c0 Merge pull request #2233 from dokku/lintian-cleanup
Lintian cleanup
2016-06-10 17:09:55 -04:00
Michael Hobbs
1e5a8b146c Merge pull request #2237 from dokku/2231_mh-reject-invalid-domains
reject invalid domains in domains:add
2016-06-10 13:56:39 -07:00
Michael Hobbs
6bf9ef0aa5 mount storage mounts on build and filter for dockerfile apps. closes #2207 2016-06-10 13:50:53 -07:00
Michael Hobbs
100afca1ca Merge pull request #2236 from dokku/2235_mh-hide-img-check-err-output
no need to show output from is_image_herokuish_based()
2016-06-10 13:18:08 -07:00
Michael Hobbs
9a29cc59a8 reject invalid domains in domains:add. closes #2231 2016-06-10 13:10:11 -07:00
Michael Hobbs
6c08b9b343 no need to show output from is_image_herokuish_based(). closes #2235 2016-06-10 12:31:25 -07:00
Michael Hobbs
48965e05bd add tests for repo commands 2016-06-09 20:05:19 -07:00
Jose Diaz-Gonzalez
2c1f32199a Implement repo:gc and repo:purge-cache
These are helper plugins that mimic the repo plugin: https://github.com/heroku/heroku-repo

The following commands will remain unimplemented:

- `clone`: not useful for the host client to clone
- `download`: currently not possible for us to "host" a tarball of the repo
- `reset`: we still store files in the repo (though we shouldn't) so we cannot easily reinitialize the repository.

Also fixes a potential race condition if two separate processes create an application's `$CACHE_DIR`.

Closes #1570
2016-06-09 20:05:19 -07:00
Michael Hobbs
1e0c585b74 allow zero-downtime to be completely disabled. closes #2073. closes #2125 2016-06-09 18:37:31 -07:00
Michael Hobbs
0c58aeaa52 Merge pull request #2234 from dokku/2230_mh-fix-container-rename-on-remove-proctype
cleanup container state files when proc type is removed from app
2016-06-09 17:56:54 -07:00
Michael Hobbs
2cedc19b2a cleanup container state files when proc type is removed from app. closes #2230 2016-06-09 17:03:36 -07:00
Jose Diaz-Gonzalez
9bb554e5bc Run lintian on all built packages 2016-06-09 15:07:31 -04:00
Jose Diaz-Gonzalez
4aab4dcfcf Allow building non-release (patch) packages for dokku 2016-06-09 15:07:13 -04:00
Jose Diaz-Gonzalez
d4660d9fe9 Skip moving the deb to the correct place by building to /tmp 2016-06-09 14:54:19 -04:00
Jose Diaz-Gonzalez
9a7d4fb402 Call deb-setup once to speed up build process 2016-06-09 14:37:15 -04:00
Jose Diaz-Gonzalez
d302316549 sort mkdir calls 2016-06-09 14:33:13 -04:00
Jose Diaz-Gonzalez
327db3d07a Add build-essential requirement 2016-06-09 14:32:58 -04:00
Jose Diaz-Gonzalez
1cba46f3a1 Do not grep a non-existent file 2016-06-09 14:29:50 -04:00
Jose Diaz-Gonzalez
54c5d0dfa6 ensure help2man exists before running addman 2016-06-09 14:29:21 -04:00
Jose Diaz-Gonzalez
ef59ff38f6 Ignore chown failures
This can occur in build environments where there is no dokku user
2016-06-09 14:29:06 -04:00
Jose Diaz-Gonzalez
683113ef78 Update doc reference to dokku binary 2016-06-09 14:28:35 -04:00
Jose Diaz-Gonzalez
79a7342808 Check that the confmodule is sourceable before sourcing it 2016-06-09 12:48:54 -04:00
Jose Diaz-Gonzalez
eab69bd6d5 Create a lintian-overrides file so that we can pass lintian during testing 2016-06-09 12:41:36 -04:00
Jose Diaz-Gonzalez
b1deb45c81 Rewrite sshcommand calls to take into account potential locations of sshcommand 2016-06-09 12:40:01 -04:00
Michael Hobbs
5ff73995f2 Merge pull request #2229 from vshn/fix_slash_domain_removal
Fix removal of domains with schema
2016-06-08 12:44:47 -07:00
Michael Hanselmann
e0f6435d86 Fix removal of domains with schema
In at least one case a customer of ours added a domain including
a schema, as in “http://domain.tld/”. That is obviously incorrect, but
then they couldn't remove it using the dokku command:

  $ dokku domains:remove app7 http://domain.tld/
  sed: -e expression #1, char 9: unknown command: `/'

This patch changes the sed command to use the "\CregexpC" syntax. The
character used is a vertical pipe, which is far less likely to be used
in a URL. After the change:

  $ dokku domains:remove app7 http://domain.tld/
  -----> Removed http://domain.tld/ from app7

Signed-off-by: Michael Hanselmann <hansmi@vshn.ch>
2016-06-08 11:34:30 +02:00
Michael Hobbs
2565ea1543 Merge pull request #2228 from dokku/mh-copy-scale-file-from-workdir
support WORKDIR location for DOKKU_SCALE
2016-06-06 18:26:05 -07:00
Michael Hobbs
cb8a9648c9 support WORKDIR location for DOKKU_SCALE. refs #2226 2016-06-06 17:45:33 -07:00
Michael Hobbs
17f7708226 Merge pull request #2227 from dokku/2226_mh-extract-procfile-with-tags
pass image tag from release_and_deploy down through extract_procfile
2016-06-06 16:55:38 -07:00
Michael Hobbs
166f7f38e4 pass image tag from release_and_deploy down through extract_procfile. closed #2226 2016-06-06 11:31:59 -07:00
Michael Hobbs
74e861417e Merge pull request #2220 from dokku/josegonzalez-patch-1
remove DOKKU_PROCFILE before attempting to extract it
2016-06-03 10:16:52 -07:00
Jose Diaz-Gonzalez
0487083f37 Merge pull request #2223 from dokku/jg-nginx-vhosts
De-duplicate nginx restarting
2016-06-03 12:49:58 -04:00
Jose Diaz-Gonzalez
3c6982a942 De-duplicate restart_nginx in post-delete hook 2016-06-03 03:19:26 -04:00
Michael Hobbs
6760a2d143 Merge pull request #2222 from dokku/mh-reorder-nginx-blocks-in-docs
move nginx upstream blocks to the bottom in docs examples
2016-06-02 13:01:25 -07:00
Michael Hobbs
a9fd2cdbf6 [ci skip] move nginx upstream blocks to the bottom in docs examples 2016-06-02 13:00:39 -07:00
Jose Diaz-Gonzalez
377412f9f8 remove DOKKU_PROCFILE before attempting to extract it 2016-05-31 17:02:25 -04:00
Michael Hobbs
848f92ef7f Merge pull request #2214 from dokku/2210_mh-client-remove-git-push
remove git push from client
2016-05-26 18:04:16 -07:00
Michael Hobbs
8bbb210a10 remove git push from client. closes #2210 2016-05-26 15:32:41 -07:00
Jose Diaz-Gonzalez
401a42f5c4 Merge pull request #2212 from jbothma/unsafe-installer-docs
Warn and instruct users about unsafe publicly-accessible web installer
2016-05-25 11:41:09 -04:00
JD Bothma
5a99b8f0ed Warn and instruct users about unsafe publicly-accessible web installer
Addresses #2211
2016-05-25 14:07:48 +02:00
Pia Mancini
346efbfdd8 removed plus signs 2016-05-23 15:27:45 -07:00
Pia Mancini
498f0eda22 Added backers and sponsors from OpenCollective
Now, your backers & sponsors from open collective will appear automatically here.
2016-05-23 14:58:14 -07:00
Jose Diaz-Gonzalez
c268432bc3 Merge pull request #2205 from dokku/fix-lintian-errors
Fix lintian errors
2016-05-18 16:52:28 -04:00
Jose Diaz-Gonzalez
a833688355 Allow users to override their server_names_hash_bucket_size 2016-05-18 14:45:11 -04:00
Jose Diaz-Gonzalez
4917330b79 Make bash files executable 2016-05-18 14:12:40 -04:00
Jose Diaz-Gonzalez
4d91b2085e Add extended description to dokku package 2016-05-18 14:11:06 -04:00
Jose Diaz-Gonzalez
29c69f9f86 Move dokku binary to /usr/bin from /usr/local/bin 2016-05-18 14:10:45 -04:00
Jose Diaz-Gonzalez
476429a7db Remove stray DS_Store files from package 2016-05-18 14:10:27 -04:00
Jose Diaz-Gonzalez
2d045d1ae1 Update sponsor references 2016-05-18 14:03:11 -04:00
Jose Diaz-Gonzalez
9bd0c69dac Do not peg nginx to a specific version 2016-05-18 13:56:09 -04:00
Jose Diaz-Gonzalez
b232f7cd49 Fix description lintian issue in plugn, sshcommand and sigil 2016-05-18 13:53:30 -04:00
Jose Diaz-Gonzalez
904dfb64aa Pass more lintian rules in sshcommand package 2016-05-18 13:42:47 -04:00
Jose Diaz-Gonzalez
a5ef53f2f5 Pass more lintian rules in plugn package 2016-05-18 13:37:23 -04:00
Jose Diaz-Gonzalez
88db4daa62 Install lintian so built packages can be linted 2016-05-18 13:28:33 -04:00
Jose Diaz-Gonzalez
56dde3ff31 Rename sigil package to gliderlabs-sigl
Also fix a few lintian issues
2016-05-18 13:28:02 -04:00
Jose Diaz-Gonzalez
2da58ff351 Release 0.5.7 2016-05-17 03:15:27 -04:00
Jose Diaz-Gonzalez
af48605054 Merge pull request #2203 from dokku/josegonzalez-patch-1
Allow specifying NO_INSTALL_RECOMMENDS in bootstrapped installs
2016-05-17 03:02:45 -04:00
Jose Diaz-Gonzalez
66790e3d82 Allow specifying NO_INSTALL_RECOMMENDS in bootstrapped installs
[ci skip]
2016-05-17 03:02:17 -04:00
Michael Hobbs
2c201a7d6f Merge pull request #2202 from dokku/2197_mh-nginx-install
attempt to bypass inconsistencies in nginx start behavior
2016-05-16 14:57:44 -07:00
Michael Hobbs
78d2b3e7d2 attempt to bypass inconsistencies in nginx start behavior. closes #2197 2016-05-16 13:29:16 -07:00
Jose Diaz-Gonzalez
9b60f0c3c6 Merge pull request #2195 from dokku/2179-clarify-triggers
Clarify when certain plugin triggers are invoked.
2016-05-14 15:05:08 -04:00
Jose Diaz-Gonzalez
668437a9e5 Clarify when certain plugin triggers are invoked.
Closes #2179

[ci skip]
2016-05-14 15:04:47 -04:00
Jose Diaz-Gonzalez
5f30115796 Merge pull request #2194 from dokku/2158-procfile-docs
Clarify the role of process types for buildpack deployment
2016-05-14 14:54:11 -04:00
Jose Diaz-Gonzalez
5c6e39d2c0 Clarify the role of process types for buildpack deployment
Closes #2158

[ci skip]
2016-05-14 14:53:46 -04:00
Jose Diaz-Gonzalez
6a9d9f212f Merge pull request #2193 from dokku/deb-upgrade-herokuish
Upgrade herokuish version built via deb packaging
2016-05-14 14:39:29 -04:00
Jose Diaz-Gonzalez
599bd59c6f Upgrade herokuish version built via deb packaging
[ci skip]
2016-05-14 14:38:51 -04:00
Jose Diaz-Gonzalez
e4dd40bbcc Merge pull request #2192 from dokku/2186-checks-web
Clarify that the checks are only run against the web process
2016-05-14 14:37:13 -04:00
Jose Diaz-Gonzalez
325b9258e4 Clarify that the checks are only run against the web process
Closes #2186

[ci skip]
2016-05-14 14:36:53 -04:00
Jose Diaz-Gonzalez
8cef6b2074 Merge pull request #2191 from dokku/2041-upgrade-docs
Clarify upgrade docs for bootstrap.sh installations
2016-05-14 14:29:34 -04:00
Jose Diaz-Gonzalez
fe00835aa7 clarify what happens when installing via the bootstrap.sh file
Closes #2041

[ci skip]
2016-05-14 14:28:46 -04:00
Jose Diaz-Gonzalez
ad0d2b1f6d Remove unused contents from docs/index.md
[ci skip]
2016-05-14 14:28:46 -04:00
Jose Diaz-Gonzalez
c27b0c08ed Merge pull request #2187 from pltchuong/patch-1
Update plugin-triggers.md
2016-05-14 11:51:26 -04:00
Jose Diaz-Gonzalez
c73094615e Merge pull request #2175 from dokku/2174_mh-dokku-enter-errmsg
show available types and ids on dokku enter error
2016-05-13 14:30:45 -04:00
Phan Chuong
989ea72490 Update plugin-triggers.md 2016-05-13 09:05:11 -07:00
Michael Hobbs
d9e1548683 Merge pull request #2190 from cu12/add-elasticmq-plugin
Add ElasticMQ plugin to documentation
2016-05-13 07:48:14 -07:00
Domonkos Czinke
e474d49320 Remove newline 2016-05-13 14:45:20 +02:00
Domonkos Czinke
e4d916c308 Add ElasticMQ plugin to documentation 2016-05-13 14:39:52 +02:00
Phan Chuong
e30c01c234 Update plugin-triggers.md
add missing trigger
2016-05-12 20:53:51 -07:00
Michael Hobbs
9ae9c7ad11 Merge pull request #2183 from Epigene/patch-2
Update nginx.md
2016-05-12 08:48:11 -07:00
Augusts Bautra
ea240f117e Update nginx.md
In the spirit of discoverability and least surprise, primary custom template example mirrors nginx.conf generated by default.
2016-05-12 18:45:07 +03:00
Michael Hobbs
68fb0e7b98 Merge pull request #2182 from cu12/add-fake_sns-plugin
Add link to FakeSNS plugin
2016-05-12 06:12:53 -07:00
Domonkos Czinke
9d74f1ecf2 Add FakeSNS plugin to documentation 2016-05-12 14:52:36 +02:00
Michael Hobbs
2356dbd594 make buggy docker-options test consistent 2016-05-11 17:53:12 -07:00
Michael Hobbs
7aa48d3426 enter default container type if only a single type is running 2016-05-11 16:40:10 -07:00
Michael Hobbs
b8b4f6fedf show available types and ids on dokku enter error. closes #2174 2016-05-11 13:12:07 -07:00
Michael Hobbs
25a2801cb1 Merge pull request #2170 from jvanbaarsen/dont-fail-duplicated-domain
Dont fail when adding a duplicated domain
2016-05-10 14:06:04 -07:00
Jeroen van Baarsen
86ef6ae5d1 Make sure we shift by 1 to remove the app_name from the $@ var 2016-05-10 21:31:53 +02:00
Michael Hobbs
4e99078ac1 Merge pull request #2173 from dokku/2171_mh-test-restore
add test for ps:restore with undeployed app
2016-05-10 10:53:41 -07:00
Michael Hobbs
7de160b64d add test for ps:restore with undeployed app. refs #2171 2016-05-10 09:30:55 -07:00
Michael Hobbs
99030a110c Merge pull request #2171 from vshn/fix_apprestore_on_boot
allow all apps to be restored on boot
2016-05-10 08:14:05 -07:00
Tobias Brunner
ee18909935 allow all apps to be restored on boot
When rebooting a Dokku host the init process tries to restore all apps
using `dokku ps:restore`, alphabetically. If an app is defined but not
deployed, the function `ps_start` called by `dokku ps:restore` will
exit 0 and stop trying to restore the other apps later in the alphabet.
This change fixes the restore behaviour.
2016-05-10 11:41:25 +02:00
Jeroen van Baarsen
4f621916a7 Dont fail when adding a duplicated domain
Currently we exit when trying to add a duplicated domain, even if we give a list
of domain names. This behaviour is not as it suppose to work.

**Expected behaviour**
When adding a domain, and the domain already exists, just skip that domain, and
continue with the world. This is no problem since we are already in the state we
want to be in.

**New behaviour**
When you try to add a domain that is already added, we notify the user of this
by showing a log message: `Skipping: example.com already added to example app`,
and then we continue with the list of domain names.

Fixes #2165
2016-05-10 08:58:15 +02:00
Jose Diaz-Gonzalez
f89f946c40 Merge pull request #2167 from iloveitaly/rollbar-plugin
Adding link to rollbar plugin
2016-05-09 12:53:15 -04:00
Michael Bianco
8e34477c96 Adding link to rollbar plugin 2016-05-09 12:41:57 -04:00
Jose Diaz-Gonzalez
5940e43c85 Merge pull request #2164 from iloveitaly/additional-plugins
Adding longtimeout and hostname to dokku plugin list
2016-05-07 20:56:41 -04:00
Michael Bianco
c1c76362e7 Adding longtimeout and hostname to dokku plugin list 2016-05-07 17:53:06 -04:00
Michael Hobbs
a034ec9803 Merge pull request #2163 from dokku/2153_mh-extract-ports-from-image
support deployment of arbitrary docker images not built by dokku build
2016-05-06 12:08:58 -07:00
Michael Hobbs
2da4f5ef03 [ci skip] clarify how we get ports when deploying an arbitrary image 2016-05-06 11:45:58 -07:00
Michael Hobbs
d7386317fc support deployment of arbitrary docker images not built by dokku build. closes #2153 2016-05-06 11:30:22 -07:00
Michael Hobbs
851ca592d5 Merge pull request #2157 from dokku/mh-run-detached-test
test detached container is running
2016-05-03 12:14:23 -07:00
Michael Hobbs
9d584ed145 test detached container is running 2016-05-03 08:22:49 -07:00
Jose Diaz-Gonzalez
ac1c4dc571 Merge pull request #2155 from dokku/detached-run
Add the ability to run containers in detached mode
2016-05-03 10:53:45 -04:00
Jose Diaz-Gonzalez
32505b14e7 Update HISTORY.md 2016-05-02 21:12:01 -04:00
Jose Diaz-Gonzalez
1bcd76ffe9 Add detached run tests 2016-05-02 21:11:28 -04:00
Jose Diaz-Gonzalez
565cd5c0e8 Update one-off-processes.md
[ci skip]
2016-05-02 12:37:49 -04:00
Jose Diaz-Gonzalez
8597b692ee Add the ability to run containers in detached mode 2016-05-02 00:02:37 -04:00
Jose Diaz-Gonzalez
e9447a26d9 Release 0.5.6 2016-04-29 16:07:58 -04:00
Michael Hobbs
17a602efe8 Merge pull request #2150 from dokku/2149_mh-config-vars-in-nginx-template
export app config vars into sigil environment for use in nginx templates
2016-04-27 12:50:49 -07:00
Michael Hobbs
7b1bc522f6 export app config vars into sigil environment for use in nginx templates. closes #2149 2016-04-27 11:56:50 -07:00
Michael Hobbs
64f83f976e small refactor to support config_set for globals (#2147)
* initial pass at config refactor

* support --shell and make sure we unset config globals
2016-04-26 18:08:54 -07:00
Michael Hobbs
cb9efa3322 implement docker stop timeout. closes #2126 (#2148) 2016-04-26 18:06:55 -07:00
Michael Hobbs
28f83ab0d5 Merge pull request #2145 from dokku/mh-fix-tests
fix dockerfile-procfile test
2016-04-25 19:27:58 -07:00
Michael Hobbs
be13b0149a use node base image instead of ubuntu 2016-04-25 18:47:39 -07:00
Michael Hobbs
e73c89abc8 include dockerfile-procfile test app in Makefile 2016-04-25 18:47:33 -07:00
Lorenzo Sicilia
7a36ecf196 fix typo nignx -> nginx (#2144) 2016-04-25 17:37:50 -07:00
Michael Hobbs
33dd90a091 Merge pull request #2142 from Aluxian/patch-1
Add Aluxian/dokku-nginx-cache to the list of plugins
2016-04-25 06:56:22 -07:00
Alexandru Rosianu
c67a4dcc7d Update compatibility for plugin dokku-nginx-cache 2016-04-25 11:15:22 +03:00
Alexandru Rosianu
546551e6e9 Add Aluxian/dokku-nginx-cache to the list of plugins 2016-04-25 11:09:26 +03:00
Jose Diaz-Gonzalez
bd4aee0864 Merge pull request #2129 from christiangenco/patch-3
condense upgrading instructions
2016-04-23 00:29:33 -04:00
Jose Diaz-Gonzalez
06d18b4cbd Merge pull request #2136 from dokku/josegonzalez-patch-1
Use `sleep infinity` for enter cron task
2016-04-23 00:28:45 -04:00
Jose Diaz-Gonzalez
075de78442 Use sleep infinity for enter cron task
Closes #2135

[ci skip]
2016-04-23 00:28:37 -04:00
Michael Hobbs
3cead25acf call dokku to set global config as config plugin scope workaround. closes #2111 (#2130) 2016-04-20 19:01:05 -07:00
Christian Genco
559347f985 /docs => /dokku in upgrading.md 2016-04-20 15:43:39 -05:00
Christian Genco
613679352b condense upgrading instructions + fix broken links 2016-04-20 15:32:52 -05:00
Michael Hobbs
d6c7682068 [ci skip] add some 'neat' plugins by michaelshobbs (#2128) 2016-04-20 13:27:44 -07:00
Jose Diaz-Gonzalez
4cd847fb27 Merge pull request #2127 from crisward/patch-5
added dokku require plugin
2016-04-20 16:04:16 -04:00
Cris Ward
58e3556e0e added dokku require plugin 2016-04-20 21:00:05 +01:00
Cris Ward
500a6dd73b updated hosts file description (#2124) 2016-04-19 07:27:42 -07:00
Michael Hobbs
7d3571757d Merge pull request #2122 from dokku/mh-fix-tests-post-dns-change
add 10.0.0.2 so *.dokku.me works
2016-04-18 21:58:00 -07:00
Michael Hobbs
26ee0d7ae2 add 10.0.0.2 so *.dokku.me works 2016-04-18 20:57:44 -07:00
Justin Clark
13f7727fe3 Merge pull request #2120 from dokku/u2mejc-issue2119
Add apex help_content for certs,nginx,storage,tar plugins
2016-04-18 12:19:53 -07:00
Justin Clark
8a14b34446 Add apex help_content for certs,nginx,storage,tar plugins
Also corrects some punctuation in associated help_content.
2016-04-18 11:37:23 -07:00
Jose Diaz-Gonzalez
6a39fd70e1 Merge pull request #2116 from dokku/warn-on-low-memory
Warn users when there is a low memory condition on installation
2016-04-16 17:46:34 -04:00
Jose Diaz-Gonzalez
fff050c71d Warn users when there is a low memory condition on installation
Closes #1971

[ci skip]
2016-04-16 17:46:07 -04:00
Jose Diaz-Gonzalez
61327620da Merge pull request #2115 from dokku/2067-hot-coffee-is-hot
Document potential dockerfile/nginx.conf.sigil issues
2016-04-16 17:31:08 -04:00
Jose Diaz-Gonzalez
80cc57caa0 Add a note as to Dockerfile support being a power-user feature
Closes #2067

[ci skip]
2016-04-16 17:30:09 -04:00
Jose Diaz-Gonzalez
55f38414d1 Add a note about the nginx.conf.sigil being publicly exposed, and how to remove it.
[ci skip]
2016-04-16 17:27:52 -04:00
Daiwei
96da38a8e4 Fix typo 2016-04-16 16:53:43 -04:00
Daiwei
25b144e496 Remove redundant 2016-04-16 16:52:33 -04:00
Daiwei
478f5e34d3 Add instruction to pull image from docker hub 2016-04-16 16:52:05 -04:00
Jose Diaz-Gonzalez
47dfa921cd Merge pull request #2114 from dokku/table-of-contents
Add table of contents to sidebar when there is a table of contents
2016-04-16 16:40:24 -04:00
Jose Diaz-Gonzalez
c162f57dbd Add table of contents to sidebar when there is a table of contents
[ci skip]
2016-04-16 16:39:53 -04:00
Jose Diaz-Gonzalez
92073eda12 Merge pull request #2112 from dokku/alphabetize-triggers
Alphabetize triggers
2016-04-16 16:14:03 -04:00
Jose Diaz-Gonzalez
bb9b36b291 Add missing plugin triggers to the events plugin 2016-04-16 14:46:40 -04:00
Jose Diaz-Gonzalez
8b93d9bf54 Alphabetize plugin triggers
This will make editing them later easier
2016-04-16 14:46:24 -04:00
Jose Diaz-Gonzalez
d7566daacc Allow user to modify the repository and tag when deploying an app
Uses two new plugin triggers:

- deployed-app-repository
- deployed-app-image-tag

Useful when the image is a custom tagged image on a remote repository
2016-04-16 08:35:18 -04:00
Jose Diaz-Gonzalez
7b8cefbadc Merge pull request #2107 from unfold/deploy-images-ci-documentation
Add CI deployment recipe
2016-04-16 04:11:06 -04:00
Simen Brekken
579ffa5a62 Add Docker Registry note 2016-04-14 06:55:42 +02:00
Simen Brekken
c6fa061604 Fix invalid highlighting language 2016-04-14 06:55:13 +02:00
Jose Diaz-Gonzalez
fd811b020a Clarify note a bit
[ci skip]
2016-04-14 00:38:44 -04:00
Jose Diaz-Gonzalez
9ae2ab105b Merge pull request #2099 from ojosdegris/patch-1
Added clarification on configuration via separate files
2016-04-14 00:36:25 -04:00
Simen Brekken
1a94a62fe3 Add CI deployment recipe 2016-04-14 06:28:31 +02:00
Jose Diaz-Gonzalez
a13a0df35e Release 0.5.5 2016-04-13 13:32:04 -04:00
Jose Diaz-Gonzalez
f6bdd948b1 Merge pull request #2105 from dokku/josegonzalez-patch-1
Add a note about how disabling the proxy affects the host port an application is deployed to
2016-04-13 12:48:08 -04:00
Jose Diaz-Gonzalez
1ceee12fc4 Add a note about how disabling the proxy affects the host port an application is deployed to
[ci skip]
2016-04-13 12:47:50 -04:00
Jose Diaz-Gonzalez
dbacfed855 Merge pull request #2104 from crisward/patch-2
Added new plugin
2016-04-13 11:51:51 -04:00
Cris Ward
3ac21ae9a3 Added new plugin 2016-04-13 16:20:49 +01:00
Michael Hobbs
7985e93e29 Merge pull request #2102 from dokku/josegonzalez-patch-1
Only strip .git directory from end of url
2016-04-13 05:48:33 -07:00
Jose Diaz-Gonzalez
4230e816df Allow acl-add to fail 2016-04-12 19:37:45 -04:00
Jose Diaz-Gonzalez
ae3aae9af8 Only strip .git directory from end of url 2016-04-12 19:13:45 -04:00
Jose Diaz-Gonzalez
67d7a64a51 Merge pull request #2100 from kane-c/fix-domain-menu-link
Fix docs navigation link to domain configuration
2016-04-12 11:13:14 -04:00
vittore
cdc327b777 Added clarification on configuration via separate files 2016-04-11 12:29:25 -04:00
Kane
3c9a1d488b Fix docs navigation link to domain configuration
When `domains.md` was moved to `domain-configuration.md` this link was not updated.
2016-04-11 18:23:34 +10:00
Jose Diaz-Gonzalez
72d46ba64b Merge pull request #2098 from dokku/blog-link
Add a blog link to the header area
2016-04-11 01:54:28 -04:00
Jose Diaz-Gonzalez
d9feca5606 Add a blog link to the header area
[ci skip]
2016-04-11 01:52:57 -04:00
Jose Diaz-Gonzalez
f29f4294c7 Merge pull request #2089 from dokku/2086-ssl-certs
Update how ssl and multiple domains interact
2016-04-09 15:15:22 -04:00
Michael Hobbs
db94fcb6b4 include non ssl server names in SSL server block. fixes #2086 2016-04-08 13:21:26 -07:00
Jose Diaz-Gonzalez
4945bd79ca Merge pull request #2094 from dokku/josegonzalez-patch-1
Create storage directories on install. Closes #2091
2016-04-08 11:22:56 -04:00
Jose Diaz-Gonzalez
22d053c9d0 Create storage directories on install. Closes #2091
[ci skip]
2016-04-08 11:22:43 -04:00
Jose Diaz-Gonzalez
6482ae164c Merge pull request #2093 from econya/2091-DOC-fix_storage_example_path
#2092: fix path in storage example
2016-04-08 11:18:43 -04:00
Felix Wolfsteller
7900a2e97e #2092: fix path in storage example 2016-04-08 12:52:04 +02:00
Jose Diaz-Gonzalez
95993955c5 Move customizing-hostnames documentation
[ci skip]
2016-04-07 21:15:59 -04:00
Jose Diaz-Gonzalez
6b48b250a7 Add documentation on customizing hostnames
[ci skip]
2016-04-07 21:14:56 -04:00
Jose Diaz-Gonzalez
66ad41f814 Fix links
[ci skip]
2016-04-07 21:14:12 -04:00
Jose Diaz-Gonzalez
a36d35d752 Update ssl-configuration.md
[ci skip]
2016-04-07 21:13:18 -04:00
Jose Diaz-Gonzalez
89d1a9751c Update and rename domains.md to domain-configuration.md
[ci skip]
2016-04-07 21:12:58 -04:00
Jose Diaz-Gonzalez
841c8c22d7 Fix casing
[ci skip]
2016-04-07 21:12:36 -04:00
Jose Diaz-Gonzalez
cb9d98a819 Add domain configuration link
[ci skip]
2016-04-07 21:12:18 -04:00
Jose Diaz-Gonzalez
a62bae8c7c Fix link to the domains plugin 2016-04-07 21:08:59 -04:00
Jose Diaz-Gonzalez
344a63b956 Move the domains documentation to its own page 2016-04-07 21:07:47 -04:00
Jose Diaz-Gonzalez
0ea44cfafb Create domains.md 2016-04-07 21:07:21 -04:00
Jose Diaz-Gonzalez
1948a41949 Add a note on how ssl and multiple domains interact
Refs #2086
2016-04-07 21:03:44 -04:00
Jose Diaz-Gonzalez
50e928b685 Merge pull request #2088 from dokku/josegonzalez-patch-1
Upgrade herokuish package
2016-04-07 20:35:34 -04:00
Jose Diaz-Gonzalez
7352cd05c5 Upgrade herokuish 2016-04-07 18:49:53 -04:00
Jose Diaz-Gonzalez
94980c8394 Upgrade herokuish package
Refs #2079
2016-04-07 12:40:02 -04:00
Jose Diaz-Gonzalez
ba66a42891 Clarify contributing documentation
[ci skip]
2016-04-06 15:35:41 -04:00
Jose Diaz-Gonzalez
1ec1a6cd7d Merge pull request #2084 from louisbl/patch-2
Clarify where to put nginx custom template without `WORKDIR`
2016-04-06 09:56:25 -04:00
Jose Diaz-Gonzalez
58eb6f3c54 Merge pull request #2083 from louisbl/patch-1
Clarify 0.5.0 migration guide about `EXPOSE`
2016-04-06 09:56:20 -04:00
Louis Beltramo
78e106cff2 Clarify where to put nginx custom template without WORKDIR
Docker assume `/` as [default `WORKDIR`](https://docs.docker.com/engine/reference/run/#workdir), but dokku [looks in the `/app` folder](https://github.com/dokku/dokku/blob/master/plugins/common/functions#L257)

[ci skip]
2016-04-06 13:00:53 +02:00
Louis Beltramo
1cf82a6020 Clarify 0.5.0 migration guide about EXPOSE
Make it clear that there is now a 1:1 port mapping.
Add links to doc
2016-04-06 12:38:32 +02:00
Jose Diaz-Gonzalez
7938bd08ae Fix slack logo link 2016-04-06 01:56:17 -04:00
Jose Diaz-Gonzalez
20312ffa4b fix slack button link 2016-04-06 01:53:59 -04:00
Jose Diaz-Gonzalez
539b765e21 Update link for flink 2016-04-06 01:46:29 -04:00
Jose Diaz-Gonzalez
36edeb2401 Add team images 2016-04-06 01:40:45 -04:00
Michael Hobbs
58af2417e2 Merge pull request #2082 from dokku/2078_mh-custom-nginx-forwarding-ssl
add use case example for ssl redirect
2016-04-05 17:18:19 -07:00
Michael Hobbs
5fc97e9553 [ci skip] add use case example for ssl redirect. closes #2078 2016-04-05 17:03:41 -07:00
Michael Hobbs
3e868a41e9 Merge pull request #2080 from dokku/mh-issue-template-dockerfile
clarify the need for contents of dockerfile
2016-04-05 09:32:57 -07:00
Michael Hobbs
2e7dde73ab [ci skip] clarify the need for contents of dockerfile 2016-04-05 09:32:33 -07:00
Jose Diaz-Gonzalez
c72d337f69 Merge pull request #2076 from dokku/josegonzalez-patch-1
Add a note to dockerfile deploys concerning ports being exposed as http
2016-04-05 10:47:24 -04:00
Jose Diaz-Gonzalez
a8c1b728d2 Add a note to dockerfile deploys concerning ports being exposed as http
Closes #2075

[ci skip]
2016-04-05 10:47:10 -04:00
Pascal Widdershoven
f073ebe4cd Cleanup Procfile after using it in dokku run 2016-03-24 08:47:49 +01:00
Pascal Widdershoven
5bc3e14eb4 Silence extract_profile logging output in dokku run 2016-03-24 07:36:48 +01:00
Pascal Widdershoven
6548cc4477 Update test to not depend on passing named arguments via Herokuish
There may be a bug in Herokuish that messes up with quoted named
arguments, see discussion in
https://github.com/dokku/dokku/pull/2018
2016-03-24 07:34:43 +01:00
Pascal Widdershoven
e64daa18cf First stab at dokku run Procfile shorthand 2016-03-23 21:36:50 +01:00
178 changed files with 3585 additions and 1742 deletions

View File

@@ -1,6 +1,7 @@
# How to contribute
Dokku loves to welcome your contributions. There are several ways to help out:
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
have found a bug
@@ -8,6 +9,8 @@ Dokku loves to welcome your contributions. There are several ways to help out:
* Write patches for open bug/feature issues, preferably with test cases
included
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
* Blog about different ways you are using dokku
There are a few guidelines that we need contributors to follow so that we have
a chance of keeping on top of things.

View File

@@ -1,5 +1,178 @@
# History
## 0.6.2
This release is a minor bugfix for the web setup, and also reverts a previous addition to the persistent storage. Please see the pull requests for more details.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2256: @michaelshobbs Revert automatically binding storage mounts in build phase
- #2259: @andrewsomething Don't run DeleteInstallerThread() until after set_debconf_selection
## 0.6.1
This release is a minor bugfix to fix an issue with ssl support for spdy-enabled nginx servers. Users are encouraged to upgrade if they have an older version of nginx installed.
### Bug Fixes
- #2250: @michaelshobbs Fix missing $ sign in default nginx template
## 0.6.0
The big-six-o. This release is largely comprised of new features that should allow for easier management of dokku. The highlights of this release are:
- The proxy plugin has been enhanced to allow users to map container ports to host ports. In the 0.5.0 release, we changed the semantics of how Dockerfile `EXPOSE` calls work to better follow Docker's lead, which ended up breaking how some applications were deployed to dokku. Please read our documentation surrounding [port management](http://dokku.viewdocs.io/dokku/proxy/) for more details.
- Zero-downtime deploys can be disabled on a per-app and per-process basis. This can be used to speed up deploys when there are non-web processes being deployed, or when a user wishes to completely avoid any such waiting period. Please see the [checks documentation](http://dokku.viewdocs.io/dokku/checks-examples/) for further information.
Thanks to all the contributors who helped with this release, and a special thanks to @michaelshobbs for ferrying the majority of our new functionality to it's current state!
### Bug Fixes
- #2241: @josegonzalez Set debconf selections from dokku-installer.py
- #2242: @michaelshobbs Avoid calling dokku binary
- #2243: @josegonzalez Nginx 1.9.5+ support
### New Features
- #2018: @pascalw Support running Procfile commands using `dokku run`
- #2050: @josegonzalez Implement repo:gc and repo:purge-cache
- #2109: @josegonzalez Allow user to modify the repository and tag when deploying an app
- #2168: @michaelshobbs Allow zero-downtime deploys to be completely disabled
- #2248: @michaelshobbs Allow users to map container ports to host ports via the proxy plugin
### Documentation
- #2209: @piamancini Added backers and sponsors from OpenCollective
- #2244: @basgys Add InfluxDB to plugins
## 0.5.8
This release is the last release in the `0.5.x` series, and as such is mainly a bugfix release. Users are highly encouraged to upgrade to this release *before* moving to the upcoming `0.6.x` release, as we will be removing deprecated features at that point.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2214: @michaelshobbs Remove git push from client
- #2220: @josegonzalez Remove DOKKU_PROCFILE before attempting to extract it
- #2227: @michaelshobbs Pass image tag from release_and_deploy down through extract_procfile
- #2228: @michaelshobbs Support WORKDIR location for DOKKU_SCALE
- #2229: @hansmi Fix removal of domains with schema
- #2234: @michaelshobbs Cleanup container state files when a process type is removed from app
- #2236: @michaelshobbs Hide unnecessary output from is_image_herokuish_based()
- #2233: @josegonzalez Lintian cleanup
### New Features
- #2205: @josegonzalez Fix lintian errors in built debian packages
- #2223: @josegonzalez De-duplicate nginx restarting
- #2237: @michaelshobbs Reject invalid domains in domains:add
- #2238: @michaelshobbs Mount storage mounts on build for buildpack deploys
### Documentation
- #2212: @jbothma Warn and instruct users about unsafe publicly-accessible web installer
- #2222: @michaelshobbs Move nginx upstream blocks to the bottom in docs examples
## 0.5.7
0.5.7 includes quite a few documentation updates, and a few minor changes in how we handle certain edge-cases in day-to-day dokku tasks.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2157: @michaelshobbs test detached container is running
- #2170: @jvanbaarsen Do not fail domains:add when adding a duplicated domain
- #2171: @tobru Continue to restore applications during boot when any given application does not start
- #2173: @michaelshobbs Add test for ps:restore with undeployed app
- #2202: @michaelshobbs Attempt to bypass inconsistencies in nginx start behavior
### New Features
- #2155: @josegonzalez Add the ability to run containers in detached mode
- #2163: @michaelshobbs Support deployment of arbitrary docker images not built by dokku build
- #2175: @michaelshobbs Show available types and ids on dokku enter error
- #2193: @josegonzalez Upgrade herokuish version built via deb packaging
- #2203: Allow specifying NO_INSTALL_RECOMMENDS via DOKKU_NO_INSTALL_RECOMMENDS in bootstrapped installs
### Documentation
- #2164: @iloveitaly Adding longtimeout and hostname to dokku plugin list
- #2167: @iloveitaly Adding link to rollbar plugin
- #2182: @cu12 Add link to FakeSNS plugin
- #2183: @Epigene Update nginx docs to mirror generated nginx.conf from core
- #2187: @pltchuong Add missing trigger to plugin triggers documentation
- #2190: @cu12 Add ElasticMQ plugin to documentation
- #2191: @josegonzalez Clarify upgrade docs for bootstrap.sh installations
- #2192: @josegonzalez Clarify that the checks are only run against the web process
- #2194: @josegonzalez Clarify the role of process types for buildpack deployment
- #2195: @josegonzalez Clarify when certain plugin triggers are invoked
## 0.5.6
Release 0.5.6 is mostly a documentation release. Please note, however, that we now inject application environment variables into sigil-generated nginx configurations. You can use this to further improve your generated nginx configuration files.
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2120: @u2mejc Add apex help_content for certs,nginx,storage,tar plugins
- #2122: @michaelshobbs Add 10.0.0.2 so *.dokku.me works
- #2145: @michaelshobbs Fix dockerfile-procfile test
### New Features
- #2150: @michaelshobbs export app config vars into sigil environment for use in nginx templates
### Documentation
- #2099: @ojosdegris Added clarification on configuration via separate files
- #2107: @simenbrekken Add CI deployment recipe
- #2112: @josegonzalez Alphabetize triggers
- #2114: @josegonzalez Add table of contents to sidebar when there is a table of contents
- #2115: @josegonzalez Document potential dockerfile/nginx.conf.sigil issues
- #2116: @josegonzalez Warn users when there is a low memory condition on installation
- #2127: @crisward Added dokku require plugin
- #2129: @christiangenco Condense upgrading instructions
- #2136: @josegonzalez Use `sleep infinity` for enter cron task
- #2142: @Aluxian Add dokku-nginx-cache to the list of plugins
## 0.5.5
Release 0.5.5 is mostly a documentation release, further clarifying how our default proxy implementation (nginx) interacts with Dockerfiles. Note that we also updated how ssl certificates interact with application domains, so please check out our domains and ssl documentation.
We've also added a small section to the [dokku homepage](http://dokku.viewdocs.io/dokku/) that lists the current core team. Feel free to look at their beautiful faces and imagine yourself contributing to Dokku and joining our core team. There are [quite a few ways to contribute](https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md) - even without code/documentation - so feel more than free to jump on the bandwagon!
Finally, we've started an [Official Dokku Blog](https://dokku.github.io/), where we will post about dokku internals, roadmaps, potential use-cases, etc. An rss feed is available [here](https://dokku.github.io/feed.xml).
Thanks to all the contributors who helped with this release!
### Bug Fixes
- #2094: @josegonzalez Create storage directories on install. Closes #2091
- #2102: @josegonzalez Only strip .git directory from end of url
### New Features
- #2088: @josegonzalez Upgrade herokuish package
- #2089: @michaelshobbs Update how ssl and multiple domains interact
### Documentation
- #2076: @josegonzalez Add a note to dockerfile deploys concerning ports being exposed as http
- #2080: @michaelshobbs Clarify the need for contents of dockerfile when debugging
- #2082: @michaelshobbs Add use case example for ssl redirect
- #2083: @louisbl Clarify 0.5.0 migration guide about `EXPOSE`
- #2084: @louisbl Clarify where to put nginx custom template without `WORKDIR`
- #2093: @fwolfst Fix path in storage example
- #2098: @josegonzalez Add a blog link to the header area
- #2100: @kane-c Fix docs navigation link to domain configuration
- #2104: @crisward Added new clone plugin
- #2105: @josegonzalez Add a note about how disabling the proxy affects the host port an application is deployed to
## 0.5.4
This release continues on our tradition of making bugfixes in patch releases. Also note that we now release dokku with `sshcommand` version `0.4.0`, which should increase usability of that package quite a bit.

View File

@@ -15,11 +15,11 @@ Output of the following commands
(BEWARE: `docker inspect` 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):
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
- Link to the exact repository being deployed (if possible/applicable):
- If a deploy is failing:
- If a deploy is failing or behaving unexpectedly:
- Application name
- The type of application being deployed (node, php, python, ruby, etc.)
- Whether or not you have a `Dockerfile` in the root of your repository
- 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`
(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):

View File

@@ -62,10 +62,10 @@ copyfiles:
PLUGIN_PATH=${CORE_PLUGINS_PATH} plugn enable $$plugin ;\
PLUGIN_PATH=${PLUGINS_PATH} plugn enable $$plugin ;\
done
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH}
chown dokku:dokku -R ${PLUGINS_PATH} ${CORE_PLUGINS_PATH} || true
$(MAKE) addman
addman:
addman: help2man
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

View File

@@ -1,6 +1,9 @@
# 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) [![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/) [![Gratipay](https://img.shields.io/gratipay/dokku.svg?style=flat-square)](https://gratipay.com/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) [![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. Sponsored by our friends at [Deis](http://deis.io/).
Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
## Requirements
@@ -10,8 +13,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
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.5.4/bootstrap.sh
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh
### Upgrading
@@ -33,7 +36,76 @@ While we may not merge your PR as is, they serve to start conversations and impr
## Sponsors
Dokku is currently sponsored by the enterprise grade, multi-host PaaS project [Deis](http://deis.io/).
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS) file.
Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/dokku#sponsor)]
<a href="https://opencollective.com/dokku/sponsor/0/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/1/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/2/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/3/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/4/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/5/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/6/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/7/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/8/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/9/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/9/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/10/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/10/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/11/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/11/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/12/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/12/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/13/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/13/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/14/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/14/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/15/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/15/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/16/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/16/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/17/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/17/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/18/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/18/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/19/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/19/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/20/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/20/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/21/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/21/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/22/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/22/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/23/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/23/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/24/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/24/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/25/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/25/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/26/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/26/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/27/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/27/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/28/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/28/avatar.svg"></a>
<a href="https://opencollective.com/dokku/sponsor/29/website" target="_blank"><img src="https://opencollective.com/dokku/sponsor/29/avatar.svg"></a>
## Backers
Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/dokku#backer)]
<a href="https://opencollective.com/dokku/backer/0/website" target="_blank"><img src="https://opencollective.com/dokku/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/1/website" target="_blank"><img src="https://opencollective.com/dokku/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/2/website" target="_blank"><img src="https://opencollective.com/dokku/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/3/website" target="_blank"><img src="https://opencollective.com/dokku/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/4/website" target="_blank"><img src="https://opencollective.com/dokku/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/5/website" target="_blank"><img src="https://opencollective.com/dokku/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/6/website" target="_blank"><img src="https://opencollective.com/dokku/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/7/website" target="_blank"><img src="https://opencollective.com/dokku/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/8/website" target="_blank"><img src="https://opencollective.com/dokku/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/9/website" target="_blank"><img src="https://opencollective.com/dokku/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/10/website" target="_blank"><img src="https://opencollective.com/dokku/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/11/website" target="_blank"><img src="https://opencollective.com/dokku/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/12/website" target="_blank"><img src="https://opencollective.com/dokku/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/13/website" target="_blank"><img src="https://opencollective.com/dokku/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/14/website" target="_blank"><img src="https://opencollective.com/dokku/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/15/website" target="_blank"><img src="https://opencollective.com/dokku/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/16/website" target="_blank"><img src="https://opencollective.com/dokku/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/17/website" target="_blank"><img src="https://opencollective.com/dokku/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/18/website" target="_blank"><img src="https://opencollective.com/dokku/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/19/website" target="_blank"><img src="https://opencollective.com/dokku/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/20/website" target="_blank"><img src="https://opencollective.com/dokku/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/21/website" target="_blank"><img src="https://opencollective.com/dokku/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/22/website" target="_blank"><img src="https://opencollective.com/dokku/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/23/website" target="_blank"><img src="https://opencollective.com/dokku/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/24/website" target="_blank"><img src="https://opencollective.com/dokku/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/25/website" target="_blank"><img src="https://opencollective.com/dokku/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/26/website" target="_blank"><img src="https://opencollective.com/dokku/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/dokku/backer/27/website" target="_blank"><img src="https://opencollective.com/dokku/backer/27/avatar.svg"></a>
<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>
## License

2
Vagrantfile vendored
View File

@@ -82,7 +82,7 @@ Vagrant::configure("2") do |config|
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 => "cd /root/dokku && make deb-all"
vm.vm.provision :shell, :inline => "export IS_RELEASE=true && cd /root/dokku && make deb-all"
end
config.vm.define "build-arch", autostart: false do |vm|

View File

@@ -12,6 +12,7 @@ set -eo pipefail; [[ $TRACE ]] && set -x
# It also means that we can't run a partially downloaded script.
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/"
@@ -22,6 +23,12 @@ ensure-environment() {
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"
exit 1
}
FREE_MEMORY=$(grep MemTotal /proc/meminfo | awk '{print $2}')
if [[ "$FREE_MEMORY" -lt 1003600 ]]; then
echo "For dokku to build containers, it is strongly suggested that you have 1024 megabytes or more of free memory"
echo "If necessary, please consult this document to setup swap: http://dokku.viewdocs.io/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory"
fi
}
install-requirements() {
@@ -78,7 +85,7 @@ install-dokku-from-source() {
install-dokku-from-package() {
local DOKKU_CHECKOUT="$1"
local NO_INSTALL_RECOMMENDS=""
local NO_INSTALL_RECOMMENDS=${DOKKU_NO_INSTALL_RECOMMENDS:=""}
if [[ -n $DOKKU_DOCKERFILE ]]; then
NO_INSTALL_RECOMMENDS=" --no-install-recommends "

View File

@@ -11,6 +11,8 @@ dependencies:
override:
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
# dokku.me now resolves to 10.0.0.2. add 10.0.0.2/24 to eth0
- sudo ip a a 10.0.0.2/24 broadcast 10.0.0.255 dev eth0
post:
- sudo -E make -e lint
test:

View File

@@ -9,7 +9,7 @@ import subprocess
import sys
import threading
VERSION = 'v0.5.4'
VERSION = 'v0.6.2'
hostname = ''
try:
@@ -86,8 +86,10 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
'REQUEST_METHOD': 'POST',
'CONTENT_TYPE': self.headers['Content-Type']})
vhost_enable = 'false'
dokku_root = os.getenv('DOKKU_ROOT', '/home/dokku')
if 'vhost' in params and params['vhost'].value == 'true':
vhost_enable = 'true'
with open('{0}/VHOST'.format(dokku_root), 'w') as f:
f.write(params['hostname'].value)
else:
@@ -98,7 +100,6 @@ 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"):
proc = subprocess.Popen(command, stdin=subprocess.PIPE)
@@ -106,6 +107,11 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
proc.stdin.close()
proc.wait()
set_debconf_selection('boolean', 'skip_key_file', 'true')
set_debconf_selection('boolean', 'vhost_enable', vhost_enable)
set_debconf_selection('boolean', 'web_config', 'false')
set_debconf_selection('string', 'hostname', params['hostname'].value)
if 'selfdestruct' in sys.argv:
DeleteInstallerThread()
@@ -114,6 +120,28 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.wfile.write(json.dumps({'status': 'ok'}))
def set_debconf_selection(debconf_type, key, value):
found = False
with open('/etc/os-release', 'r') as f:
for line in f:
if 'debian' in line:
found = True
if not found:
return
ps = subprocess.Popen(['echo', 'dokku dokku/{0} {1} {2}'.format(
key, debconf_type, value
)], stdout=subprocess.PIPE)
try:
subprocess.check_output(['debconf-set-selections'], stdin=ps.stdout)
except subprocess.CalledProcessError:
pass
ps.wait()
class DeleteInstallerThread(object):
def __init__(self, interval=1):
thread = threading.Thread(target=self.run, args=())

View File

@@ -79,8 +79,6 @@ if [[ ! -z $DOKKU_HOST ]]; then
echo "! Dokku remote not added! Do you already have a dokku remote?"
return
fi
git push dokku master
return $?
;;
apps:destroy)
git remote remove dokku

107
deb.mk
View File

@@ -1,6 +1,6 @@
HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku'
HEROKUISH_REPO_NAME ?= gliderlabs/herokuish
HEROKUISH_VERSION ?= 0.3.9
HEROKUISH_VERSION ?= 0.3.13
HEROKUISH_ARCHITECTURE = amd64
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
@@ -8,27 +8,50 @@ DOKKU_DESCRIPTION = 'Docker powered mini-Heroku in around 100 lines of Bash'
DOKKU_REPO_NAME ?= dokku/dokku
DOKKU_ARCHITECTURE = amd64
PLUGN_DESCRIPTION = 'Hook system that lets users extend your application with plugins'
define PLUGN_DESCRIPTION
Hook system that lets users extend your application with plugins
Plugin triggers are simply scripts that are executed by the system.
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_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
SSHCOMMAND_DESCRIPTION = 'Turn SSH into a thin client specifically for your app'
define SSHCOMMAND_DESCRIPTION
Turn SSH into a thin client specifically for your app
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.4.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
SIGIL_DESCRIPTION = 'Standalone string interpolator and template processor'
define SIGIL_DESCRIPTION
Standalone string interpolator and template processor
Sigil is a command line tool for template processing
and POSIX-compliant variable expansion. It was created
for configuration templating, but can be used for any
text processing.
endef
SIGIL_REPO_NAME ?= gliderlabs/sigil
SIGIL_VERSION ?= 0.4.0
SIGIL_ARCHITECTURE = amd64
SIGIL_PACKAGE_NAME = sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
SIGIL_PACKAGE_NAME = gliderlabs_sigil_$(SIGIL_VERSION)_$(SIGIL_ARCHITECTURE).deb
SIGIL_URL = https://github.com/gliderlabs/sigil/releases/download/v$(SIGIL_VERSION)/sigil_$(SIGIL_VERSION)_Linux_x86_64.tgz
ifndef IS_RELEASE
IS_RELEASE = true
endif
export PLUGN_DESCRIPTION
export SIGIL_DESCRIPTION
export SSHCOMMAND_DESCRIPTION
.PHONY: install-from-deb deb-all deb-herokuish deb-dokku deb-plugn deb-setup deb-sshcommand deb-sigil
install-from-deb:
@@ -45,18 +68,18 @@ install-from-deb:
sudo apt-get update -qq > /dev/null
sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -yy dokku
deb-all: deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
deb-all: deb-setup deb-herokuish deb-dokku deb-plugn deb-sshcommand deb-sigil
mv /tmp/*.deb .
@echo "Done"
deb-setup:
@echo "-> Updating deb repository and installing build requirements"
@sudo apt-get update -qq > /dev/null
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git ruby-dev ruby1.9.1 > /dev/null 2>&1
@sudo DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true apt-get install -qq -y gcc git build-essential wget ruby-dev ruby1.9.1 lintian > /dev/null 2>&1
@command -v fpm > /dev/null || sudo gem install fpm --no-ri --no-rdoc
@ssh -o StrictHostKeyChecking=no git@github.com || true
deb-herokuish: deb-setup
deb-herokuish:
rm -rf /tmp/tmp /tmp/build $(HEROKUISH_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build
@@ -83,19 +106,21 @@ deb-herokuish: deb-setup
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1)' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
mv *.deb /tmp
deb-dokku: deb-setup
deb-dokku:
rm -rf /tmp/tmp /tmp/build dokku_*_$(DOKKU_ARCHITECTURE).deb
mkdir -p /tmp/tmp /tmp/build
cp -r debian /tmp/build/DEBIAN
mkdir -p /tmp/build/usr/local/bin
mkdir -p /tmp/build/var/lib/dokku/core-plugins/available
mkdir -p /tmp/build/usr/share/man/man1
mkdir -p /tmp/build/usr/share/dokku/contrib
mkdir -p /tmp/build/usr/bin
mkdir -p /tmp/build/usr/share/doc/dokku
mkdir -p /tmp/build/usr/share/dokku/contrib
mkdir -p /tmp/build/usr/share/lintian/overrides
mkdir -p /tmp/build/usr/share/man/man1
mkdir -p /tmp/build/var/lib/dokku/core-plugins/available
cp dokku /tmp/build/usr/local/bin
cp dokku /tmp/build/usr/bin
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
find . -name ".DS_Store" -depth -exec rm {} \;
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 touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
$(MAKE) help2man
@@ -105,24 +130,38 @@ deb-dokku: deb-setup
cp contrib/dokku-installer.py /tmp/build/usr/share/dokku/contrib
git describe --tags > /tmp/build/var/lib/dokku/VERSION
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
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 "/vagrant/dokku_`cat /tmp/build/var/lib/dokku/STABLE_VERSION`_$(DOKKU_ARCHITECTURE).deb"
mv *.deb /tmp
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"
deb-plugn: deb-setup
deb-plugn:
rm -rf /tmp/tmp /tmp/build $(PLUGN_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
@echo "-> Downloading package"
wget -q -O /tmp/tmp/plugn-$(PLUGN_VERSION).tgz $(PLUGN_URL)
cd /tmp/tmp/ && tar zxf /tmp/tmp/plugn-$(PLUGN_VERSION).tgz
@echo "-> Copying files into place"
cp /tmp/tmp/plugn /tmp/build/usr/local/bin/plugn && chmod +x /tmp/build/usr/local/bin/plugn
cp /tmp/tmp/plugn /tmp/build/usr/bin/plugn && chmod +x /tmp/build/usr/bin/plugn
@echo "-> Creating $(PLUGN_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n plugn -v $(PLUGN_VERSION) -a $(PLUGN_ARCHITECTURE) -p $(PLUGN_PACKAGE_NAME) --url "https://github.com/$(PLUGN_REPO_NAME)" --description $(PLUGN_DESCRIPTION) --license 'MIT License' .
sudo fpm -t deb -s dir -C /tmp/build -n plugn \
--version $(PLUGN_VERSION) \
--architecture $(PLUGN_ARCHITECTURE) \
--package $(PLUGN_PACKAGE_NAME) \
--url "https://github.com/$(PLUGN_REPO_NAME)" \
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
--category utils \
--description "$$PLUGN_DESCRIPTION" \
--license 'MIT License' \
.
mv *.deb /tmp
deb-sshcommand:
@@ -138,20 +177,38 @@ deb-sshcommand:
chmod +x /tmp/build/usr/local/bin/sshcommand
@echo "-> Creating $(SSHCOMMAND_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand -v $(SSHCOMMAND_VERSION) -a $(SSHCOMMAND_ARCHITECTURE) -p $(SSHCOMMAND_PACKAGE_NAME) --url "https://github.com/$(SSHCOMMAND_REPO_NAME)" --description $(SSHCOMMAND_DESCRIPTION) --license 'MIT License' .
sudo fpm -t deb -s dir -C /tmp/build -n sshcommand \
--version $(SSHCOMMAND_VERSION) \
--architecture $(SSHCOMMAND_ARCHITECTURE) \
--package $(SSHCOMMAND_PACKAGE_NAME) \
--url "https://github.com/$(SSHCOMMAND_REPO_NAME)" \
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
--category admin \
--description "$$SSHCOMMAND_DESCRIPTION" \
--license 'MIT License' \
.
mv *.deb /tmp
deb-sigil: deb-setup
deb-sigil:
rm -rf /tmp/tmp /tmp/build $(SIGIL_PACKAGE_NAME)
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/local/bin
mkdir -p /tmp/tmp /tmp/build /tmp/build/usr/bin
@echo "-> Downloading package"
wget -q -O /tmp/tmp/sigil-$(SIGIL_VERSION).tgz $(SIGIL_URL)
cd /tmp/tmp/ && tar zxf /tmp/tmp/sigil-$(SIGIL_VERSION).tgz
@echo "-> Copying files into place"
cp /tmp/tmp/sigil /tmp/build/usr/local/bin/sigil && chmod +x /tmp/build/usr/local/bin/sigil
cp /tmp/tmp/sigil /tmp/build/usr/bin/sigil && chmod +x /tmp/build/usr/bin/sigil
@echo "-> Creating $(SIGIL_PACKAGE_NAME)"
sudo fpm -t deb -s dir -C /tmp/build -n sigil -v $(SIGIL_VERSION) -a $(SIGIL_ARCHITECTURE) -p $(SIGIL_PACKAGE_NAME) --url "https://github.com/$(SIGIL_REPO_NAME)" --description $(SIGIL_DESCRIPTION) --license 'MIT License' .
sudo fpm -t deb -s dir -C /tmp/build -n gliderlabs-sigil \
--version $(SIGIL_VERSION) \
--architecture $(SIGIL_ARCHITECTURE) \
--package $(SIGIL_PACKAGE_NAME) \
--url "https://github.com/$(SIGIL_REPO_NAME)" \
--maintainer "Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>" \
--category utils \
--description "$$SIGIL_DESCRIPTION" \
--license 'MIT License' \
.
mv *.deb /tmp

8
debian/config vendored
View File

@@ -1,6 +1,10 @@
#!/bin/sh -e
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
. /usr/share/debconf/confmodule
if [[ -e /usr/share/debconf/confmodule ]]; then
# shellcheck disable=SC1091
. /usr/share/debconf/confmodule
fi
readonly ACTION="${1:-configure}"
readonly VERSION="${2:-dev}"

9
debian/control vendored
View File

@@ -1,11 +1,12 @@
Package: dokku
Version: 0.5.4
Version: 0.6.2
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, make, curl, gcc, man-db, sshcommand, sigil, docker-engine-cs (>= 1.9.1) | docker-engine (>= 1.9.1), software-properties-common, python-software-properties
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 (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
Pre-Depends: nginx, dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, 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
that runs on a single server of your choice.

3
debian/lintian-overrides vendored Normal file
View File

@@ -0,0 +1,3 @@
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

32
debian/postinst vendored
View File

@@ -1,11 +1,25 @@
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
. /usr/share/debconf/confmodule
if [[ -e /usr/share/debconf/confmodule ]]; then
# shellcheck disable=SC1091
. /usr/share/debconf/confmodule
fi
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
call-sshcommand() {
if [[ -x /usr/local/bin/sshcommand ]]; then
/usr/local/bin/sshcommand "$@"
elif [[ -x /usr/bin/sshcommand ]]; then
/usr/bin/sshcommand "$@"
else
echo "Unable to find sshcommand binary" 1>&2
exit 1
fi
}
case "$1" in
abort-upgrade|abort-remove|abort-deconfigure)
;;
@@ -14,10 +28,15 @@ case "$1" in
mandb
[ ! -x /usr/bin/docker.io ] || ln -sf /usr/bin/docker.io /usr/local/bin/docker
modprobe aufs || echo "WARNING: Restart server to finish installing dokku!"
sshcommand create dokku /usr/local/bin/dokku
call-sshcommand create dokku /usr/bin/dokku
egrep -i "^docker" /etc/group || groupadd docker
usermod -aG docker dokku
echo "Setting up storage directories"
mkdir -p ${DOKKU_LIB_ROOT}/data ${DOKKU_LIB_ROOT}/data/storage
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/data
echo "Setting up plugin directories"
# should be replaced by `plugn init`
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
@@ -46,6 +65,13 @@ case "$1" in
find -L ${DOKKU_LIB_ROOT} -type l -delete
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
echo "Ensure proper sshcommand path"
echo '/usr/bin/dokku' > "${DOKKU_ROOT}/.sshcommand"
if [[ -f .ssh/authorized_keys ]]; then
sed -i.bak 's#/usr/local/bin/dokku#/usr/bin/dokku#' "${DOKKU_ROOT}/.ssh/authorized_keys"
rm "${DOKKU_ROOT}/.ssh/authorized_keys"
fi
echo "Install all core plugins"
dokku plugin:install --core
@@ -88,7 +114,7 @@ case "$1" in
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
db_get "dokku/key_file"
if [ -f "$RET" ]; then
sshcommand acl-add dokku default < "$RET"
call-sshcommand acl-add dokku default < "$RET" || true
fi
fi
;;

10
debian/postrm vendored
View File

@@ -1,6 +1,11 @@
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
if [[ -e /usr/share/debconf/confmodule ]]; then
# shellcheck disable=SC1091
. /usr/share/debconf/confmodule
fi
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
@@ -35,10 +40,7 @@ main() {
find ${DOKKU_ROOT} -type d -empty -delete
fi
if [[ -e /usr/share/debconf/confmodule ]]; then
. /usr/share/debconf/confmodule
db_purge
fi
db_purge
fi
}

5
debian/preinst vendored
View File

@@ -1,7 +1,10 @@
#!/bin/bash
set -eo pipefail; [[ $TRACE ]] && set -x
. /usr/share/debconf/confmodule
if [[ -e /usr/share/debconf/confmodule ]]; then
# shellcheck disable=SC1091
. /usr/share/debconf/confmodule
fi
case "$1" in
install)

View File

@@ -3,7 +3,9 @@
You can always install dokku straight from the latest - potentially unstable - master release via the following bash command:
```shell
wget -qO- https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh | sudo DOKKU_BRANCH=master bash
# using a branch results in installing from source
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
sudo DOKKU_BRANCH=master bash bootstrap.sh
```
## Development
@@ -46,6 +48,8 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
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).
Follow the [user management documentation](/dokku/deployment/user-management) in order to add users to dokku.

View File

@@ -17,6 +17,9 @@
- Replaced "magic" `NO_VHOST` variable with `domains:enable/disable`
- Simplified zero downtime control
- `checks:enable/disable`
## Dockerfile apps with multiple ports
- Dockerfiles with multiple `EXPOSE` clauses will get all **tcp** ports proxied by default (nginx does not support proxying udp)
- UDP can be exposed by disabling the nginx proxy with `dokku proxy:disable myapp`
## Dockerfile apps with exposed ports
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/dockerfiles/#exposed-ports)
- Note that nginx will proxy the same port numbers to listen publicly
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/proxy/) with `dokku proxy:disable myapp`

View File

@@ -0,0 +1,26 @@
# 0.6.0 Migration Guide
## zero-downtime deployment
- You can now **actually** disable zero-downtime deployments per-app and per-process-type
- Some config variables have been moved around
- `DOKKU_CHECKS_ENABLED` has been migrated to `DOKKU_CHECKS_SKIPPED`
- `DOKKU_CHECKS_DISABLED` is now a thing
- The values for the above can be a comma-separated list of process-types or the literal string `_all_`
- See the [updated `checks`](/dokku/checks-examples/) docs for more info
## proxy port mapping
- You can now configure host -> container proxy port mappings
- The UI is handled by the [proxy](/dokku/proxy/) 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.
## 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:
- dokku build
- dokku receive
- dokku release
- dokku tar:build
- dokku tar:build-locked
- dokku git:build
- dokku git:build-locked

View File

@@ -182,11 +182,11 @@ This is in particular useful, then you want to deploy to root domain, as
## Dokku/Docker Container Management Compatibility
Dokku is, at its core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
Dokku is, at its core, a docker container manager. Thus, it does not necessarily play well with other out-of-band processes interacting with the docker daemon. One thing to note as in [issue #1220](https://github.com/dokku/dokku/issues/1220), dokku executes a cleanup function prior to every deployment.
As of 0.5.x, this function removes all containers with the label `dokku` where the status is either `dead` or `exited`, as well as all `dangling` images. Previous versions would remove `dead` or `exited` containers, regardless of their label.
### Adding deploy users
## Adding deploy users
See the [user management documentation](/dokku/deployment/user-management).
@@ -198,7 +198,7 @@ See the [nginx documentation](/dokku/nginx/#default-site).
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
### Specifying a custom buildpack
## Specifying a custom buildpack
See the [buildpack documentation](/dokku/deployment/buildpacks/).

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.2/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.5.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.5.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

BIN
docs/assets/slack-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

View File

@@ -36,13 +36,13 @@ h1 {
background-repeat: no-repeat;
}
.header .navbar-brand a {
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/dokku.png);
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/gplaypattern.png);
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}
@@ -178,6 +178,37 @@ h1 {
display: inline-block;
margin-left: 0.5em
}
.slack-button {
background-image: -webkit-linear-gradient(#FCFCFC, #EAEAEA);
background-image: linear-gradient(#FCFCFC, #EAEAEA);
border: 1px solid #ddd;
padding: 0.25rem 0.5rem;
}
.slack-button img {
height: 1em;
}
.team-members img {
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
-webkit-border-radius: 3px;
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
border-radius: 3px;
border: 8px solid white;
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
display: block;
height: 200px;
margin: 20px auto 20px auto;
}
.team-members .fund-link {
display: block;
font-size: 80%;
}
.team-member {
min-height: 320px;
}
.team-member-image img:last-child { display: none }
.team-member-image:hover img:first-child { display: none; }
.team-member-image:hover img:last-child { display: inline-block; }
.list-group-item {
border: none;
font-weight: normal;
@@ -199,6 +230,15 @@ a.list-group-item {
margin-top: 2em;
text-transform: uppercase;
}
.table-of-contents {
font-size: 0.8em;
padding: 1em;
margin: 0 0 0.5em 0.5em;
}
.table-of-contents ul {
margin-bottom: 0;
padding-left: 20px;
}
.anchorjs-link {
color: #24cbce;
}
@@ -488,11 +528,6 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
font-size: 50px;
}
}
@media (max-width: 992px) {
.featurette img {
width: 200px;
}
}
@media (min-width: 992px) {
.featurette img {
width: 300px;
@@ -501,3 +536,8 @@ ul.fas li .fa-large:before, ul.fas li .fa-large:before {
margin-top: 30px;
}
}
@media (max-width: 992px) {
.featurette img {
width: 200px;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
docs/assets/team/flink.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

BIN
docs/assets/team/u2mejc.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -2,6 +2,7 @@
"max-versions": [
"0.3.26",
"0.4.14",
"0.5.4"
"0.5.8",
"0.6.2"
]
}

View File

@@ -3,9 +3,10 @@
> New as of 0.5.0
```
checks <app> Show zero-downtime status
checks:disable <app> Disable zero-downtime checks
checks:enable <app> Enable zero-downtime checks
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: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:
@@ -15,10 +16,32 @@ dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=30
```
You can also choose to skip checks completely on a per-application basis:
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis:
```shell
dokku checks:disable <app>
dokku checks:skip <app> worker,web
```
```shell
dokku checks:disable <app> worker,web
```
> Note that `checks:disable` will now (as of 0.6.0) cause downtime for that process-type during deployments.
Additionally, any given process can only be configured to skip OR disable zero-downtime. example:
```shell
$ dokku checks:skip testapp worker,web
-----> Skipping zero downtime for app's (testapp) proctypes (worker,web)
-----> Unsetting testapp
-----> Unsetting DOKKU_CHECKS_DISABLED
-----> Setting config vars
DOKKU_CHECKS_SKIPPED: worker,web
$ dokku checks:disable testapp worker
-----> Disabling zero downtime for app's (testapp) proctypes (worker)
-----> Setting config vars
DOKKU_CHECKS_DISABLED: worker
-----> Setting config vars
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:
@@ -34,6 +57,8 @@ dokku config:set <app> DOKKU_WAIT_TO_RETIRE=120
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
@@ -272,8 +297,15 @@ Could not start due to 1 failed checks.
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection
=====> end myapp container output
/usr/local/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
/usr/bin/dokku: line 49: 23409 Killed dokku deploy "$APP"
To dokku@dokku.example.com:myapp
! [remote rejected] dokku -> master (pre-receive hook declined)
error: failed to push some refs to 'dokku@dokku.example.com:myapp'
````
### 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.
```
$ dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
```

View File

@@ -56,6 +56,31 @@ You may also wish to use a **specific** version of a buildpack, which is also si
dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs#v87
```
## Specifying commands via Procfile
While many buildpacks have a default command that is run when a detected repository is pushed, it is possible to override this command via a Procfile. A Procfile can also be used to specify multiple commands, each of which is subject to process scaling. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
A Procfile is a file named `Procfile`. It should be named `Procfile` exactly, and not anything else. For example, `Procfile.txt` is not valid. The file should be a simple text file.
The file must be placed in the root directory of your application. It will not function if placed in a subdirectory.
If the file exists, it should not be empty, as doing so may result in a failed deploy.
The syntax for declaring a `Procfile` is as follows. Note that the format is one process type per line, with no duplicate process types.
```
<process type>: <command>
```
If, for example, you have multiple queue workers and wish to scale them separately, the following would be a valid way to work around the requirement of not duplicating process types:
```
worker: env QUEUE=* bundle exec rake resque:work
importantworker: env QUEUE=important bundle exec rake resque:work
```
The `web` process type holds some significance in that it is the only process type that is automatically scaled to `1` on the initial application deploy. See the [process scaling documentation](/dokku/process-management/) for more details around scaling individual processes.
## Clearing buildpack 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:
@@ -65,7 +90,7 @@ Building containers with buildpacks currently results in a persistent `cache` di
sudo rm -rf /home/dokku/APP/cache/*
```
### Curl Build Timeouts
## Curl Build Timeouts
Certain buildpacks may time out in retrieving dependencies via curl. This can happen when your network connection is poor or if there is significant network congestion. You may see a message similar to `gzip: stdin: unexpected end of file` after a curl command.

View File

@@ -4,6 +4,8 @@
While Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) for deployment, you can also use docker's native `Dockerfile` system to define a container.
> Dockerfile support is considered a **Power User** feature. By using Dockerfile-based deployment, you agree that you will not have the same comfort as that enjoyed by Buildpack users, and Dokku features may work differently. Differences between the two systems will be documented here.
To use a dockerfiles for deployment, commit a valid `Dockerfile` to the root of your repository and push the repository to your Dokku installation. If this file is detected, Dokku will default to using it to construct containers **except** in the following two cases:
- The application has a `BUILDPACK_URL` environment variable set via the `dokku config:set` command or in a committed `.env` file. In this case, Dokku will use your specified buildpack.
@@ -19,6 +21,8 @@ Dokku will extract all tcp ports exposed using the `EXPOSE` directive (one port
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'd like to investigate alternative proxy methods, please refer to our [proxy documentation](/dokku/proxy/).
## Customizing the run command
By default no arguments are passed to `docker run` when deploying the container and the `CMD` or `ENTRYPOINT` defined in the `Dockerfile` are executed. You can take advantage of docker ability of overriding the `CMD` or passing parameters to your `ENTRYPOINT` setting `$DOKKU_DOCKERFILE_START_CMD`. Let's say for example you are deploying a base nodejs image, with the following `ENTRYPOINT`:

View File

@@ -0,0 +1,98 @@
# Domain Configuration
> New as of 0.3.10
```shell
domains:add <app> DOMAIN Add a domain to app
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:set-global <domain> Set global domain name
```
## Customizing hostnames
Applications typically have the following structure for their hostname:
```
scheme://subdomain.domain.tld
```
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
## Disabling VHOSTS
If desired, it is possible to disable vhosts with the domains plugin.
```shell
dokku domains:disable myapp
```
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
```shell
# where `myapp` is the name of your app
# add a domain to an app
dokku domains:add myapp example.com
# list custom domains for app
dokku domains myapp
# clear all custom domains for app
dokku domains:clear myapp
# remove a custom domain from app
dokku domains:remove myapp example.com
```
## 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).
```
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 410;
log_not_found off;
}
```
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`:
```
# Swap both conf.d include line and the sites-enabled include line. From:
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
# to the following
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.

View File

@@ -55,3 +55,70 @@ root@dokku:~# dokku tags:deploy node-js-app v0.9.0
http://node-js-app.dokku.me
```
## 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
```shell
dokku apps:create test-app
```
2. Pull image from Docker Hub
```shell
docker pull demo-repo/some-image:v12
```
3. Retag the image to match the created app
```shell
docker tag demo-repo/some-image:v12 dokku/test-app:v12
```
4. Deploy tag
```shell
dokku tags:deploy test-app v12
```
> 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
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.
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.
1. Build image on CI (or locally)
```shell
docker build -t dokku/test-app:v12
# Note: The image must be tagged `dokku/<app-name>:<version>`
```
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"
```
> Note: You can also use a Docker Registry to push and pull
> the image rather than uploading it directly.
Here's a more complete example using the above method:
```shell
# build the image
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
ssh my.dokku.host "dokku tags:create test-app previous; dokku tags:deploy test-app v12 && dokku tags:create test-app latest"
```

View File

@@ -15,6 +15,17 @@ The `run` command can be used to run a one-off process for a specific command. T
dokku run node-js-app ls -lah
```
The `run` command can also be used to run a command defined in your Procfile:
```
console: bundle exec racksh
```
```shell
# runs `bundle exec racksh` in the `/app` directory of the application `my-app`
dokku run my-app console
```
If you want to remove the container after a command has started, you can run the following command:
```shell
@@ -32,6 +43,15 @@ 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.
```shell
dokku --detach run node-js-app ls -lah
# returns the ID of the new container
```
> Note that you may not use the `--rm-container` or `--rm` flags when running containers in detached mode, and attempting to do so will result in the `--detach` flag being ignored.
### Using `run` for cron tasks
You can always use a one-off container to run an application task:
@@ -59,6 +79,8 @@ dokku enter node-js-app web.1
dokku enter node-js-app --container-id ID
```
Additionally, you can run `enter` with no container-type. If only a single container-type is defined in your app, you will be dropped into the only running container. This behavior is not supported when specifying a custom command; as described below.
By default, it runs a `/bin/bash`, but can also be used to run a custom command:
```shell
@@ -74,7 +96,7 @@ dokku enter node-js-app web python script/background-worker.py
Your procfile can have the following entry:
```
cron: while true; do sleep 10; done
cron: sleep infinity
```
With the `cron` process scaled to `1`:

View File

@@ -35,6 +35,12 @@ dokku certs:add <app> < cert-key.tar
cat yourdomain_com.crt yourdomain_com.ca-bundle > server.crt
```
#### SSL and Multiple Domains
When an SSL certificate is associated to an application, the certificate will be associated with *all* domains currently associated with said application. Your certificate _should_ be associated with all of those domains, otherwise accessing the application will result in SSL errors. If you wish to remove one of the domains from the application, refer to the [domain configuration documentation](/dokku/deployment/domain-configuration/).
Note that with the default nginx template, requests will be redirected to the `https` version of the domain. If this is not the desired state of request resolution, you may customize the nginx template in use. For more details, see the [nginx documentation](/dokku/nginx/).
### Certificate generation
> Note: Using this method will create a self-signed certificate, which is only recommended for development or staging use, not production environments.
@@ -78,12 +84,6 @@ Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarde
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/nginx/#customizing-the-nginx-configuration)
```shell
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
server {
listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }};
@@ -107,6 +107,12 @@ server {
}
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
}
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
```
Only use this option if:

View File

@@ -155,3 +155,4 @@ A few notes:
- 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

View File

@@ -29,69 +29,64 @@ The following plugin triggers describe those available to a dokku installation.
> 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.
### `install`
### `post-config-update`
- Description: Used to setup any files/configuration for a plugin.
- Invoked by: `dokku plugin:install`.
- Arguments: None
- Description: Allows you to get notified when one or more configs is added or removed. Action can be *set* or *unset*
- Invoked by: `dokku config:set`, `dokku config:unset`
- Arguments: `$APP` `set|unset` `key1=VALUE1 key2=VALUE2`
- Example:
```shell
#!/usr/bin/env bash
# Sets the hostname of the dokku server
# based on the output of `hostname -f`
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
hostname -f > $DOKKU_ROOT/HOSTNAME
# TODO
```
### `bind-external-ip`
- Description: Allows you to disable binding to the external box ip
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Force always binding to the docker ip, no matter
# what the settings are for a given app.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
echo false
```
### `check-deploy`
- 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`
- Example:
```shell
#!/usr/bin/env bash
# Disables deploys of containers based on whether the
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
eval "$(config_export app $APP)"
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
echo -e "\033[31m\033[1mDeploys disabled, sorry.\033[0m"
exit 1
fi
```
### `dependencies`
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
- Invoked by: `dokku plugin:install-dependencies`
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Installs nginx for the current plugin
# Supports both opensuse and ubuntu
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export DEBIAN_FRONTEND=noninteractive
case "$DOKKU_DISTRO" in
debian|ubuntu)
apt-get install --force-yes -qq -y nginx
;;
opensuse)
zypper -q in -y nginx
;;
esac
```
### `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.
- Invoked by: `dokku plugin:update`.
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Update the herokuish image from git source
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
cd /root/dokku
sudo BUILD_STACK=true make install
```
### `comands help` and `commands <PLUGIN_NAME>:help`
- Description: Your plugin should implement a `help` command in your `commands` file to take advantage of this plugin trigger. `commands help` is used by `dokku help` to aggregate all plugins abbreviated `help` output. Implementing `<PLUGIN_NAME>:help` in your `commands` file gives users looking for help, a more detailed output. 'commands help' must be implemented inside the `commands` plugin file. It's recommended that `PLUGIN_NAME:help` be added to the commands file to ensure consistency among community plugins and give you a new avenue to share rich help content with your user.
@@ -139,10 +134,37 @@ help_content
esac
```
### `pre-build-buildpack`
### `dependencies`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
- Invoked by: `dokku build`
- Description: Used to install system-level dependencies. Invoked by `plugin:install-dependencies`.
- Invoked by: `dokku plugin:install-dependencies`
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Installs nginx for the current plugin
# Supports both opensuse and ubuntu
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
export DEBIAN_FRONTEND=noninteractive
case "$DOKKU_DISTRO" in
debian|ubuntu)
apt-get install --force-yes -qq -y nginx
;;
opensuse)
zypper -q in -y nginx
;;
esac
```
### `deployed-app-image-tag`
- Description: Used to manage the tag of the image being deployed. Useful for deploying a specific version of an image, or when deploying from an external registry
- Invoked by: `internal function dokku_deploy_cmd() (deploy phase)`
- Arguments: `$APP`
- Example:
@@ -151,13 +173,14 @@ esac
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
# customize the tag version
echo 'not-latest'
```
### `post-build-buildpack`
### `deployed-app-repository`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
- Invoked by: `dokku build`
- Description: Used to manage the remote repository of the image being deployed.
- Invoked by: `internal function dokku_deploy_cmd() (deploy phase)`
- Arguments: `$APP`
- Example:
@@ -166,278 +189,13 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-build-dockerfile`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using a dockerfile.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-build-dockerfile`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using a dockerfile.
- Invoked by: `dokku build`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-release-buildpack`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `dokku release`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Installs the graphicsmagick package into the container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing GraphicsMagick..."
CMD="cat > gm && \
dpkg -s graphicsmagick > /dev/null 2>&1 || \
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `post-release-buildpack`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `dokku release`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Installs a package specified by the `CONTAINER_PACKAGE` env var
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
CMD="cat > gm && \
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `pre-release-dockerfile`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `dokku release`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
### `post-release-dockerfile`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `dokku release`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
### `check-deploy`
- 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`
- Example:
```shell
#!/usr/bin/env bash
# Disables deploys of containers based on whether the
# `DOKKU_DISABLE_DEPLOY` env var is set to `true` for an app
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/config/functions"
CONTAINERID="$1"; APP="$2"; PORT="$3" ; HOSTNAME="${4:-localhost}"
eval "$(config_export app $APP)"
DOKKU_DISABLE_DEPLOY="${DOKKU_DISABLE_DEPLOY:-false}"
if [[ "$DOKKU_DISABLE_DEPLOY" = "true" ]]; then
echo -e "\033[31m\033[1mDeploys disabled, sorry.\033[0m"
exit 1
fi
```
### `pre-deploy`
- Description: Allows the running of code before the container's process is started.
- Invoked by: `dokku deploy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Runs gulp in our container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1 "Running gulp"
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
dokku_log_info1 "Building UI Complete"
```
### `post-create`
- Description: Can be used to run commands after an application is created.
- Invoked by: `dokku apps:create`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Runs a command to ensure that an app
# has a postgres database when it is starting
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
POSTGRES="$1"
dokku postgres:create $POSTGRES
dokku postgres:link $POSTGRES $APP
```
### `post-deploy`
- Description: Allows running of commands after a deploy has completed. 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"
```
### `pre-delete`
- Description: Can be used to run commands before an app is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Clears out the gulp asset build cache for applications
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
if [[ -d $GULP_CACHE_DIR ]]; then
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi
```
### `post-delete`
- Description: Can be used to run commands after an application is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Runs a command to ensure that an app's
# postgres installation is removed
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
dokku postgres:destroy $APP
```
### `post-stop`
- Description: Can be used to run commands after an application is manually stopped
- Invoked by: `dokku ps:stop`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Marks an application as manually stopped
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
echo 'derp.dkr.ecr.us-east-1.amazonaws.com'
```
### `docker-args-build`
- Description:
- Invoked by: `dokku build`
- Invoked by: `internal function dokku_build() (build phase)`
- Arguments: `$APP $IMAGE_SOURCE_TYPE`
- Example:
@@ -485,38 +243,19 @@ verify_app_name "$APP"
# TODO
```
### `bind-external-ip`
### `git-post-pull`
- Description: Allows you to disable binding to the external box ip
- Invoked by: `dokku deploy`
- Description:
- Invoked by: `dokku git-upload-pack`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Force always binding to the docker ip, no matter
# what the settings are for a given app.
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
echo false
```
### `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`
- Arguments: `$APP` `action name` `domains`
- Example:
```shell
#!/usr/bin/env bash
# Reloads haproxy for our imaginary haproxy plugin
# that replaces the nginx-vhosts plugin
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sudo service haproxy reload
# TODO
```
### `git-pre-pull`
@@ -534,19 +273,23 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `git-post-pull`
### `install`
- Description:
- Invoked by: `dokku git-upload-pack`
- Arguments: `$APP`
- Description: Used to setup any files/configuration for a plugin.
- Invoked by: `dokku plugin:install`.
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Sets the hostname of the dokku server
# based on the output of `hostname -f`
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
if [[ ! -f "$DOKKU_ROOT/HOSTNAME" ]]; then
hostname -f > $DOKKU_ROOT/HOSTNAME
fi
```
### `nginx-hostname`
@@ -585,6 +328,267 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
nginx -t
```
### `post-build-buildpack`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using buildpacks.
- Invoked by: `internal function dokku_build() (build phase)`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-build-dockerfile`
- Description: Allows you to run commands after the build image is create for a given app. Only applies to applications using a dockerfile.
- Invoked by: `internal function dokku_build() (build phase)`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `post-create`
- Description: Can be used to run commands after an application is created.
- Invoked by: `dokku apps:create`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Runs a command to ensure that an app
# has a postgres database when it is starting
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
POSTGRES="$1"
dokku postgres:create $POSTGRES
dokku postgres:link $POSTGRES $APP
```
### `post-delete`
- Description: Can be used to run commands after an application is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Runs a command to ensure that an app's
# postgres installation is removed
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
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.
- 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"
```
### `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`
- Arguments: `$APP` `action name` `domains`
- Example:
```shell
#!/usr/bin/env bash
# Reloads haproxy for our imaginary haproxy plugin
# that replaces the nginx-vhosts plugin
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
sudo service haproxy reload
```
### `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".
- Invoked by: `dokku proxy:ports-add`, `dokku proxy:ports-clear`, `dokku proxy:ports-remove`
- Arguments: `$APP` `action name`
- Example:
```shell
#!/usr/bin/env bash
# Rebuilds haproxy config for our imaginary haproxy plugin
# that replaces the nginx-vhosts plugin
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/haproxy/functions"
APP="$1"; verify_app_name "$APP"
haproxy-build-config "$APP"
```
### `post-release-buildpack`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Installs a package specified by the `CONTAINER_PACKAGE` env var
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing $CONTAINER_PACKAGE..."
CMD="cat > gm && \
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `post-release-dockerfile`
- Description: Allows you to run commands after environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
### `post-stop`
- Description: Can be used to run commands after an application is manually stopped
- Invoked by: `dokku ps:stop`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Marks an application as manually stopped
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
```
### `pre-build-buildpack`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using buildpacks.
- Invoked by: `internal function dokku_build() (build phase)`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-build-dockerfile`
- Description: Allows you to run commands before the build image is created for a given app. For instance, this can be useful to add env vars to your container. Only applies to applications using a dockerfile.
- Invoked by: `internal function dokku_build() (build phase)`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
# TODO
```
### `pre-delete`
- Description: Can be used to run commands before an app is deleted.
- Invoked by: `dokku apps:destroy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Clears out the gulp asset build cache for applications
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
if [[ -d $GULP_CACHE_DIR ]]; then
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi
```
### `pre-deploy`
- Description: Allows the running of code before the application's processes are scaled up and after the docker images are prepared.
- Invoked by: `dokku deploy`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Runs gulp in our container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1 "Running gulp"
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
test $(docker wait $id) -eq 0
docker commit $id $IMAGE > /dev/null
dokku_log_info1 "Building UI Complete"
```
### `pre-receive-app`
- Description: Allows you to customize the contents of an application directory before they are processed for deployment. The `IMAGE_SOURCE_TYPE` can be any of `[herokuish, dockerfile]`
@@ -604,6 +608,119 @@ APP="$1"; IMAGE_SOURCE_TYPE="$2"; TMP_WORK_DIR="$3"; REV="$4"
echo "$APP" > "$TMP_WORK_DIR/dokku-is-awesome"
```
### `pre-release-buildpack`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using buildpacks.
- Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
# Installs the graphicsmagick package into the container
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
dokku_log_info1" Installing GraphicsMagick..."
CMD="cat > gm && \
dpkg -s graphicsmagick > /dev/null 2>&1 || \
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
test $(docker wait $ID) -eq 0
docker commit $ID $IMAGE > /dev/null
```
### `pre-release-dockerfile`
- Description: Allows you to run commands before environment variables are set for the release step of the deploy. Only applies to applications using a dockerfile.
- Invoked by: `internal function dokku_release() (release phase)`
- Arguments: `$APP $IMAGE_TAG`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
verify_app_name "$APP"
# TODO
```
### `pre-disable-vhost`
- Description: Allows you to run commands before the VHOST feature is disabled
- Invoked by: `dokku domains:disable`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
# TODO
```
### `pre-enable-vhost`
- Description: Allows you to run commands before the VHOST feature is enabled
- Invoked by: `dokku domains:enable`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
# TODO
```
### `post-certs-update`
- Description: Allows you to run commands after a cert is added/updated
- Invoked by: `dokku certs:add`, `dokku certs:update`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
# TODO
```
### `post-certs-remove`
- Description: Allows you to run commands after a cert is removed
- Invoked by: `dokku certs:remove`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
APP="$1"; verify_app_name "$APP"
# TODO
```
### `receive-app`
- Description: Allows you to customize what occurs when an app is received. Normally just triggers an application build.
@@ -646,6 +763,23 @@ fi
plugn trigger receive-app $APP $newrev
```
### `retire-container-failed`
- Description: Allows you to run commands if/when retiring old containers has failed
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Send an email when a container failed to retire
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; HOSTNAME=$(hostname -s)
mail -s "$APP containers on $HOSTNAME failed to retire" ops@example.com
```
### `tags-create`
- Description: Allows you to run commands once a tag for an application image has been added
@@ -682,21 +816,21 @@ APP="$1"; IMAGE_TAG="$2"
some code to remove a docker hub tag because it's not implemented in the CLI....
```
### `retire-container-failed`
### `update`
- Description: Allows you to run commands if/when retiring old containers has failed
- Invoked by: `dokku deploy`
- Arguments: `$APP`
- 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.
- Invoked by: `dokku plugin:update`.
- Arguments: None
- Example:
```shell
#!/usr/bin/env bash
# Send an email when a container failed to retire
# Update the herokuish image from git source
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; HOSTNAME=$(hostname -s)
mail -s "$APP containers on $HOSTNAME failed to retire" ops@example.com
cd /root/dokku
sudo BUILD_STACK=true make install
```
### `user-auth`

View File

@@ -8,7 +8,6 @@ To propose a release, the following tasks need to be performed:
- The installable version must be changed in the `contrib/dokku-installer.py` file.
- The installable version must be changed in the `debian/control` file.
- The installable version must be changed in the `docs/home.html` file
- The installable version must be changed in the `docs/index.md` file
- The installable version must be changed in the `docs/installation.md` file.
- The installable version must be changed in the `docs/template.html` file.
- The installable version must be changed in the `README.md` file.
@@ -67,7 +66,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.5.4-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.6.2-2 (Mon Feb 22 23:20:37 CET 2016)"
cd ../dokku-arch
git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9'

View File

@@ -2,27 +2,30 @@
> Note: This is a work in progress.
### DNS Versions
## DNS Versions
There are many different DNS servers 'in the wild'. Some of the popular ones on Linux are BIND, dnsmasq, and pdns. Windows has its own built-in DNS server as well as Unbound, Posadis, and more. A full list of DNS packages can be found on Wikipedia under [Comparison of DNS Server Software](http://en.wikipedia.org/wiki/Comparison_of_DNS_server_software). In addition to the various DNS packages, there are tens of thousands of [Managed DNS Providers](http://en.wikipedia.org/wiki/List_of_managed_DNS_providers) out that all have different DNS interfaces.
### Focus
## Focus
Because there are so many different DNS server packages out there as well as a tremendous number of Managed DNS Providers, we will focus on the concepts of DNS as well as providing examples in the 'BIND' format so you can adapt the information to your own server package or managed DNS provider.
### Assumptions
## Assumptions
* 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.
## Caching
### HELP!
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to propagate. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
## HELP!
Don't be afraid to ask if you need help. Create a [new issue](https://github.com/dokku/dokku/issues) and someone will be glad to assist you.
# Getting started
## Getting started
For the examples, we will use the domain name `example.tld` and the IP address `127.0.0.1`.
@@ -30,17 +33,11 @@ Dokku uses DNS to differentiate between apps on your dokku-powered server. If y
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.
# Caching
Please remember that DNS relies heavily on _caching_. Changes you make to DNS could take anywhere from a few seconds to a few *days* to propagate. If you tried surfing to example.tld, then changed the IP address in DNS, it could be a while before your computer picks up on the changes.
## The two methods
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`?
### Using a sub-domain (myapp.myserver.example.tld)
#### Using a sub-domain (myapp.myserver.example.tld)
Using a sub-domain is easy. When you set up your server, you probably gave it a name like `myserver.example.tld`.
@@ -75,7 +72,7 @@ If they all return your IP address, you have set DNS up properly for dokku. You
Proceed with the setup instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md)
### Using the root of your domain (myapp.example.tld)
#### Using the root of your domain (myapp.example.tld)
This section is a work in progress. It is incomplete.

View File

@@ -21,7 +21,7 @@ This example demonstrates how to mount the recommended directory to `/storage` i
```
$ dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
```
Dokku will then mount the shared contents of`/var/lib/dokku/storage` to `/storage` inside the container.
Dokku will then mount the shared contents of`/var/lib/dokku/data/storage` to `/storage` inside the container.
## Use Cases
@@ -41,6 +41,15 @@ Your app may be used in a cluster that requires containers or resources not runn
Your app may have services that are running in memory and need to be backed up locally (like a key store). Mount a non ephemeral storage mount will allow backups that are not lost when the app is shut down.
### 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.
```
$ dokku docker-options:add <app> "-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.
## Docker-Options Note
The storage plugins is compatible with storage mounts created with the docker-options. The storage plugin will only list mounts from the deploy phase.

View File

@@ -8,12 +8,6 @@
git clone https://github.com/dokku/dokku.git
```
- Setup SSH hosts in your `/etc/hosts`
```
10.0.0.2 dokku.me
```
- Create VM
```
# Optional ENV arguments:
@@ -35,6 +29,7 @@
- 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.
You are now ready to deploy an app or install plugins.
For a different, complete, example see https://github.com/RyanBalfanz/dokku-vagrant-example.

View File

@@ -10,70 +10,32 @@
<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.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style>
.team-members img {
-moz-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
-webkit-border-radius: 3px;
-webkit-box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
border-radius: 3px;
border: 8px solid white;
box-shadow: 4px 4px 8px 0px rgba(0,0,0,0.75);
display: block;
height: 200px;
margin: 20px auto 20px auto;
}
.team-members .fund-link {
display: block;
font-size: 80%;
}
.team-member {
min-height: 320px;
}
.team-member-image img:last-child { display: none }
.team-member-image:hover img:first-child { display: none; }
.team-member-image:hover img:last-child { display: inline-block; }
.featurette img {
width: 400px;
}
@media (min-width: 992px) {
.featurette img {
width: 300px;
}
.featurette-heading {
margin-top: 30px;
}
}
@media (max-width: 992px) {
.featurette img {
width: 200px;
}
}
</style>
</head>
<body>
@@ -85,6 +47,9 @@
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
</h1>
<ul class="nav nav-pills pull-xs-right">
<li class="nav-item">
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
</li>
@@ -125,17 +90,17 @@
</div>
<div class="shell shell-curl shell-active">
<p class="line">
<span class="output">&nbsp;# only works on debian systems!</span>
<span class="output">&nbsp;# for debian systems, installs dokku via apt-get</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output">&nbsp;# go to your server's IP and follow the web installer</span>
@@ -215,7 +180,7 @@
<div class="inline-container">
<a class="button slack-button" href="https://glider-slackin.herokuapp.com/">
<img src="/assets/slack-logo.png" alt="Slack Logo">
<img src="./assets/slack-logo.png" alt="Slack Logo">
</a>
</div>
</div>
@@ -292,7 +257,7 @@
<img src="./assets/team/flink.jpg" alt="Loïc Guitaut">
</div>
Loïc Guitaut
<a class="fund-link" href="https://watsi.org/fund-treatments">Help fund a treatment on watsi</a>
<a class="fund-link" href="https://www.amazon.com/gp/registry/wishlist/23NWY5AVAGGGO/">Build out his star wars collection</a>
</div>
<div class="team-member col-md-offset-0 col-md-4 col-sm-offset-2 col-sm-4 col-xs-offset-3 col-xs-6">
<div class="team-member-image">

View File

@@ -1,70 +0,0 @@
<div class="blurb">
<div class="container">
<h2>The smallest PaaS implementation you've ever seen</h2>
<p>Docker powered mini-Heroku in around 200 lines of Bash</p>
<div class="blurb-buttons">
<a class="btn btn-lg btn-warning" href="/dokku/installation">View Documentation</a>
</div>
</div>
</div>
<div class="container marketing">
<div class="quickstart-code">
<p class="title">Quick-start Instructions</p>
<div class="shell">
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh</span>
</p>
<p class="line">
<span class="path">~</span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output"># =&gt; Go to your server's IP and follow the web installer</span>
</p>
</div>
</div>
<hr class="featurette-divider">
<!-- START THE FEATURETTES -->
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Own Your PaaS. <span class="text-muted">Infrastructure at a fraction of the cost.</span></h2>
<p class="lead">Powered by Docker, you can install Dokku on any hardware. Use it on inexpensive cloud providers. Use the extra cash to buy a pony or feed kittens. You'll save tens of dollars a year on your dog photo sharing website.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Docker Logo" src="assets/docker.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7 col-md-push-5">
<h2 class="featurette-heading">Easy Git Deploys. <span class="text-muted">From your command-line to the cloud.</span></h2>
<p class="lead">Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.</p>
</div>
<div class="col-md-5 col-md-pull-7">
<img class="featurette-image img-responsive center-block" alt="Git Logo" src="assets/git.png">
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading">Extensible Platform. <span class="text-muted">Customize your PaaS.</span></h2>
<p class="lead">Write dokku plugins in any language. Share them online with others, and extend those already available. Dokku's simple core is easy to hack and add the features you need to get your job done.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive center-block" alt="Extend Logo" src="assets/extend.png">
</div>
</div>
<hr class="featurette-divider">
</div>

View File

@@ -20,9 +20,9 @@ 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
# installs dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.5.4/bootstrap.sh
sudo DOKKU_TAG=v0.5.4 bash bootstrap.sh
# for debian systems, installs dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.6.2/bootstrap.sh
sudo DOKKU_TAG=v0.6.2 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.
@@ -31,6 +31,8 @@ The installation process takes about 5-10 minutes, depending upon internet conne
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.*
#### 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.

View File

@@ -17,14 +17,14 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
- Copy the following example template to a file named `nginx.conf.sigil` and either:
- check it into the root of your app repo
- `ADD` it to your dockerfile `WORKDIR`
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
> When using a custom `nginx.conf.sigil` file, depending upon your application configuration, you *may* be exposing the file externally. As this file is extracted before the container is run, you can, safely delete it in a custom `entrypoint.sh` configured in a Dockerfile `ENTRYPOINT`.
### Example Custom Template
Use case: add an `X-Served-By` header to requests
```
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
server {
listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }};
@@ -35,6 +35,13 @@ server {
# set a custom header for requests
add_header X-Served-By www-ec2-01;
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_comp_level 6;
location / {
proxy_pass http://{{ .APP }};
proxy_http_version 1.1;
@@ -48,9 +55,13 @@ server {
}
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
}
```
The above is a sample http configuration that adds an `X-Served-By` header to requests.
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
```
### Available template variables
```
@@ -61,11 +72,111 @@ The above is a sample http configuration that adds an `X-Served-By` header to re
{{ .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)
{{ .NOSSL_SERVER_NAME }} List of non-SSL VHOSTS
{{ .PROXY_PORT_MAP }} List of port mappings (same as `DOKKU_PROXY_PORT_MAP` config var)
{{ .PROXY_UPSTREAM_PORTS }} List of configured upstream ports (derived from `DOKKU_PROXY_PORT_MAP` config var)
{{ .RAW_TCP_PORTS }} List of exposed tcp ports as defined by Dockerfile `EXPOSE` directive (**Dockerfile apps only**)
{{ .SSL_INUSE }} Boolean set when an app is SSL-enabled
{{ .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`.
### Example HTTP to HTTPS Custom Template
Use case: a simple dockerfile app that includes `EXPOSE 80`
```
server {
listen [::]:80;
listen 80;
server_name {{ .NOSSL_SERVER_NAME }};
access_log /var/log/nginx/{{ .APP }}-access.log;
error_log /var/log/nginx/{{ .APP }}-error.log;
return 301 https://$host:443$request_uri;
}
server {
listen [::]:443 ssl spdy;
listen 443 ssl spdy;
{{ if .SSL_SERVER_NAME }}server_name {{ .SSL_SERVER_NAME }}; {{ end }}
access_log /var/log/nginx/{{ .APP }}-access.log;
error_log /var/log/nginx/{{ .APP }}-error.log;
ssl_certificate {{ .APP_SSL_PATH }}/server.crt;
ssl_certificate_key {{ .APP_SSL_PATH }}/server.key;
keepalive_timeout 70;
add_header Alternate-Protocol 443:npn-spdy/2;
location / {
proxy_pass http://{{ .APP }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Request-Start $msec;
}
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
}
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
```
### Example using new proxy port mapping
```
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
{{ $port_map_list := $port_map | split ":" }}
{{ $scheme := index $port_map_list 0 }}
{{ $listen_port := index $port_map_list 1 }}
{{ $upstream_port := index $port_map_list 2 }}
server {
listen [::]:{{ $listen_port }};
listen {{ $listen_port }};
server_name {{ $.NOSSL_SERVER_NAME }};
access_log /var/log/nginx/{{ $.APP }}-access.log;
error_log /var/log/nginx/{{ $.APP }}-error.log;
location / {
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_comp_level 6;
proxy_pass http://{{ $.APP }}-{{ $upstream_port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Request-Start $msec;
}
include {{ $.DOKKU_ROOT }}/{{ $.APP }}/nginx.conf.d/*.conf;
}
{{ range $upstream_port := $.PROXY_UPSTREAM_PORTS | split " " }}
upstream {{ $.APP }}-{{ $upstream_port }} {
{{ range $listeners := $.DOKKU_APP_LISTENERS | split " " }}
{{ $listener_list := $listeners | split ":" }}
{{ $listener_ip := index $listener_list 0 }}
{{ $listener_port := index $listener_list 1 }}
server {{ $listener_ip }}:{{ $upstream_port }};{{ end }}
}
{{ end }}
```
### Customizing via configuration files included by the default templates
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
@@ -83,107 +194,23 @@ 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.
## Domains plugin
See the [domain-configuration documentation](/dokku/deployment/domain-configuration/).
## Customizing hostnames
Applications typically have the following structure for their hostname:
See the [customizing hostnames documentation](/dokku/deployment/domain-configuration/#customizing-hostnames).
```
scheme://subdomain.domain.tld
```
The `subdomain` is inferred from the pushed application name, while the `domain.tld` is set during initial configuration and stored in the `$DOKKU_ROOT/VHOST` file. It can then be modified with `dokku domains:set-global`. This value is used as a default TLD for all applications on a host.
If a FQDN such as `other.tld` is used as the application name, the default `$DOKKU_ROOT/VHOST` will be ignored and the resulting vhost URL for that application will be `other.tld`. The exception to this rule being that if the FQDN has the same ending as the default vhost (such as `subdomain.domain.tld`), then the entire FQDN will be treated as a subdomain. The application will therefore be deployed at `subdomain.domain.tld.domain.tld`.
You can optionally override this in a plugin by implementing the `nginx-hostname` plugin trigger. For example, you can reverse the subdomain with the following sample `nginx-hostname` plugin trigger:
```shell
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1"; SUBDOMAIN="$2"; VHOST="$3"
NEW_SUBDOMAIN=`echo $SUBDOMAIN | rev`
echo "$NEW_SUBDOMAIN.$VHOST"
```
If the `nginx-hostname` has no output, the normal hostname algorithm will be executed.
You can also use the built-in `domains` plugin to handle:
### Domains plugin
> New as of 0.3.10
```shell
domains:add <app> DOMAIN Add a domain to app
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:set-global <domain> Set global domain name
```
### Disabling VHOSTS
If desired, it is possible to disable vhosts with the domains plugin.
```shell
dokku domains:disable myapp
```
On subsequent deploys, the nginx virtualhost will be discarded. This is useful when deploying internal-facing services that should not be publicly routeable. As of 0.4.0, nginx will still be configured to proxy your app on some random high port. This allows internal services to maintain the same port between deployments. You may change this port by setting `DOKKU_NGINX_PORT` and/or `DOKKU_NGINX_SSL_PORT` (for services configured to use SSL.)
The domains plugin allows you to specify custom domains for applications. This plugin is aware of any ssl certificates that are imported via `certs:add`. Be aware that disabling domains (with `domains:disable`) will override any custom domains.
```shell
# where `myapp` is the name of your app
# add a domain to an app
dokku domains:add myapp example.com
# list custom domains for app
dokku domains myapp
# clear all custom domains for app
dokku domains:clear myapp
# remove a custom domain from app
dokku domains:remove myapp example.com
```
## Disabling VHOSTS
See the [disabling vhosts documentation](/dokku/deployment/domain-configuration/#disabling-vhosts).
## 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).
```
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 410;
log_not_found off;
}
```
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`:
```
# Swap both conf.d include line and the sites-enabled include line. From:
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
# to the following
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.
See the [default site documentation](/dokku/deployment/domain-configuration/#default-site).
## Running behind a load balancer

View File

@@ -63,6 +63,7 @@ Note: The following plugins have been supplied by our community and may not have
[alex-sherwin]: https://github.com/alex-sherwin
[alexanderbeletsky]: https://github.com/alexanderbeletsky
[alexkruegger]: https://github.com/alexkruegger
[Aluxian]: https://github.com/Aluxian
[Aomitayo]: https://github.com/Aomitayo
[apmorton]: https://github.com/apmorton
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
@@ -72,6 +73,7 @@ Note: The following plugins have been supplied by our community and may not have
[cedricziel]: https://github.com/cedricziel
[cef]: https://github.com/cef
[cjblomqvist]: https://github.com/cjblomqvist
[crisward]: https://github.com/crisward
[darkpixel]: https://github.com/darkpixel
[dokku]: https://github.com/dokku
[dyson]: https://github.com/dyson
@@ -139,7 +141,8 @@ Note: The following plugins have been supplied by our community and may not have
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [Redis](https://github.com/sekjun9878/dokku-redis-plugin) | [sekjun9878][] | 0.3.26+ |
| [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 |
| [Varnish](https://github.com/Zenedith/dokku-varnish-plugin) | [Zenedith][] | Varnish cache between nginx and application with base configuration|
@@ -149,13 +152,16 @@ Note: The following plugins have been supplied by our community and may not have
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [RabbitMQ](https://github.com/jlachowski/dokku-rabbitmq-plugin) | [jlachowski][] | 0.3.x |
| [RabbitMQ (single container)](https://github.com/jlachowski/dokku-rabbitmq-single-plugin) | [jlachowski][] | 0.3.x |
| [ElasticMQ (SQS compatible)](https://github.com/cu12/dokku-elasticmq) | [cu12][] | 0.5.0+ |
#### Other
| Plugin | Author | Compatibility |
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
| [etcd](https://github.com/basgys/dokku-etcd) | [basgys][] | 0.4.x |
| [FakeSNS](https://github.com/cu12/dokku-fake_sns) | [cu12][] | 0.5.0+ |
| [InfluxDB](https://github.com/basgys/dokku-influxdb) | [basgys][] | 0.4.x |
| [RethinkDB](https://github.com/stuartpb/dokku-rethinkdb-plugin) | [stuartpb][] | 0.3.x |
[dccee02]: https://github.com/jeffutter/dokku-riakcs-plugin/commit/dccee02702e7001851917b7814e78a99148fb709
@@ -179,11 +185,14 @@ Note: The following plugins have been supplied by our community and may not have
| 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+ |
| [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 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+ |
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
@@ -193,17 +202,20 @@ Note: The following plugins have been supplied by our community and may not have
| [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+ |
| [SSH Deployment Keys](https://github.com/cedricziel/dokku-deployment-keys)<sup>2</sup> | [cedricziel][] | 0.3.x |
| [SSH Hostkeys](https://github.com/cedricziel/dokku-hostkeys-plugin)<sup>3</sup> | [cedricziel][] | 0.3.x |
| [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 |
| [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 |
[217d00a]: https://github.com/dokku/dokku/commit/217d00a1bc47a7e24d8847617bb08a1633025fc7
<sup>1</sup> On Heroku similar functionality is offered by the [heroku-labs pipeline feature](https://devcenter.heroku.com/articles/labs-pipelines), which allows you to promote builds across multiple environments (staging -> production)
<sup>2</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
<sup>2</sup> Extends app.json support to include creating volumes and creating / linking databases on push
<sup>3</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
<sup>3</sup> Adds the possibility to add SSH deployment keys to receive private hosted packages
<sup>4</sup> Adds the ability to add custom hosts to the containers known_hosts file to be able to ssh them easily (useful with deployment keys)
### Other Plugins
@@ -222,15 +234,19 @@ Note: The following plugins have been supplied by our community and may not have
| [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+ |
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |
| [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 |
| [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.

View File

@@ -1,19 +1,27 @@
# Proxy plugin
> New as of 0.5.0
> Port handling functionality is new as of 0.6.0
As of dokku 0.5.0, the proxy functionality has been decoupled from the nginx-vhosts plugin into the proxy plugin. In the future this will allow other proxy software (HAproxy for example) to be used instead of nginx.
```
proxy:disable <app> Disable proxy for app
proxy:enable <app> Enable proxy for app
proxy:set <app> <proxy_type> NOT IMPLEMENTED YET!!
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>...] Unset proxy port mappings for app
proxy:set <app> <proxy-type> Set proxy type for app
```
## Container network interface binding
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, e.g. `0.0.0.0:32771->5000/tcp`.
```shell
# container bound to docker interface
root@dokku:~/dokku# docker ps

View File

@@ -10,26 +10,26 @@
<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.5.4/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -43,7 +43,7 @@
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.5.4/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.rawgit.com/dokku/dokku/v0.6.2/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<style>
@@ -61,6 +61,9 @@
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
</h1>
<ul class="nav nav-pills pull-xs-right col-md-offset-right-2">
<li class="nav-item">
<a class="nav-link" href="https://dokku.github.io/">Blog</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
</li>
@@ -107,7 +110,8 @@
<a href="#" class="list-group-item disabled">Configuration</a>
<a href="/dokku/configuration-management/" class="list-group-item">Environment Variables</a>
<a href="/dokku/dns" class="list-group-item">DNS Configuration</a>
<a href="/dokku/dns/" class="list-group-item">DNS Configuration</a>
<a href="/dokku/deployment/domain-configuration/" class="list-group-item">Domain Configuration</a>
<a href="/dokku/nginx/" class="list-group-item">Nginx Configuration</a>
<a href="/dokku/deployment/ssl-configuration/" class="list-group-item">SSL Configuration</a>
<a href="/dokku/dokku-events-logs/" class="list-group-item">Dokku Event Logs</a>
@@ -184,6 +188,8 @@
currentVersionEl = document.querySelectorAll('.rst-current-version')[0],
currentVersion = currentVersionEl.getAttribute('data-ref'),
versionContainer = document.querySelectorAll('.rst-versions.rst-badge')[0],
pageHeader = document.querySelectorAll('.markdown-body p')[0],
headers = document.querySelectorAll('h2, h3, h4'),
classNames = ['table', 'table-striped', 'table-hover', 'table-condensed'],
localPath = location.pathname.split('/').splice(2).join("/"),
addClass = function (el, className) {
@@ -234,6 +240,46 @@
}
};
var ToC =
"<nav role='navigation' class='table-of-contents'>" +
"<ul>";
var newLine, el, title, link, currentDepth, count = 0, lastNodeDepth = null;
Array.prototype.forEach.call(headers, function (el, i) {
count++;
title = el.innerText || element.textContent;
link = "#" + el.getAttribute('id');
currentDepth = parseInt(el.nodeName.replace('H', ''), 10);
newLine =
"<li>" +
"<a href='" + link + "' class='current-depth-" + currentDepth + "'>" +
title +
"</a>" +
"</li>";
if (currentDepth === lastNodeDepth || lastNodeDepth === null) {
} else if (currentDepth > lastNodeDepth) {
newLine = '<ul>' + newLine;
} else if (currentDepth < lastNodeDepth) {
newLine = '</ul>' + newLine;
}
ToC += newLine;
lastNodeDepth = currentDepth;
});
ToC += "</ul></nav>";
if (count > 1) {
var navItems = document.querySelectorAll('.list-group-item');
Array.prototype.forEach.call(navItems, function(el, i){
if (el.getAttribute('href') == location.pathname) {
el.insertAdjacentHTML('afterEnd', ToC);
}
});
}
Array.prototype.forEach.call(blockquotes, function (el, i) {
if (el.innerHTML.toLowerCase().indexOf('new as of') !== -1) {
addClass(el, 'new-as-of');

View File

@@ -1,4 +1,4 @@
## Troubleshooting
# Troubleshooting
__Symptom:__ I deployed my app but I am getting the default nginx page

View File

@@ -1,36 +1,33 @@
# Upgrading
This document covers upgrades for the 0.3.0 series and up. If upgrading from older versions, we recommend [a fresh install](/dokku/installation) on a new server.
> As of 0.3.18, dokku is installed by default via a debian package. Source-based installations are still available, though not recommended.
If your version of dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/installation) on a new server.
## Migration Guides
Migration guides contain information regarding the new features introduced in each version and the migration path between versions.
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
- [0.5 Migration Guide](/dokku/appendices/0.5.0-migration-guide/)
- [0.6 Migration Guide](/dokku/appendices/0.6.0-migration-guide/)
## General Information
## Upgrade Instructions
Upgrading is not advised on running apps. Stop them before with `dokku ps:stop <app>`.
Before using `apt-get install`, run `apt-get update` to download the latest packages.
If dokku was installed via a debian package, you can upgrade dokku via the following command:
If dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most common), upgrade with:
```shell
sudo apt-get install dokku
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
```
For unattended upgrades, you may run the following command:
```shell
sudo apt-get install -qq -y dokku
```
If you have installed dokku from source, you may run the following commands to upgrade:
### Upgrade From Source
If you installed dokku from source (less common), upgrade with:
```shell
dokku apps
dokku ps:stop <app> # repeat to shut down each running app
cd ~/dokku
git pull --tags origin master
@@ -39,29 +36,10 @@ sudo DOKKU_BRANCH=master make install
# upgrade to debian package-based installation
sudo make install
dokku ps:rebuildall # restart all applications
```
All changes will take effect upon next application deployment. To trigger a rebuild and restart every application, simply run the following command:
```shell
dokku ps:rebuildall
```
### Herokuish image
If dokku was installed via a debian package, you can upgrade herokuish via the following command:
```shell
sudo apt-get install herokuish
```
For unattended upgrades, you may run the following command:
```shell
sudo apt-get install -qq -y herokuish
```
In some cases, it may be desirable to run a specific version of herokuish. To install/upgrade herokuish from source, run the following commands:
To upgrade herokuish from source, upgrade with:
```shell
cd /tmp

7
dokku
View File

@@ -100,13 +100,10 @@ execute_dokku_cmd() {
nginx|nginx:*)
local PLUGIN_NAME=${PLUGIN_NAME/nginx/nginx-vhosts}
;;
receive|deploy|build|release)
deploy|delete|ls|run|cleanup)
local PLUGIN_NAME="00_dokku-standard"
;;
trace|delete|ls|run|cleanup)
local PLUGIN_NAME="00_dokku-standard"
;;
url|urls|report|version)
trace|url|urls|report|version)
local PLUGIN_NAME="00_dokku-standard"
;;
esac

View File

@@ -23,7 +23,8 @@ get_phase_script() {
execute_script() {
declare desc="executes appropriate phase script key from app.json"
local APP="$1"; local IMAGE="$2"; local PHASE_SCRIPT_KEY="$3"
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
local PHASE_SCRIPT_KEY="$3"
local SCRIPT_CMD=$(get_phase_script "$IMAGE" "$PHASE_SCRIPT_KEY" 2>/dev/null)
if [[ -n "$SCRIPT_CMD" ]];then
dokku_log_info1 "Running '$SCRIPT_CMD' in app container"
@@ -48,7 +49,7 @@ execute_script() {
COMMAND+=" fi "
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP")
local DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
# strip --restart args from DOCKER_ARGS
local DOCKER_ARGS=$(sed -e "s/--restart=[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
@@ -60,6 +61,9 @@ execute_script() {
if ! is_image_herokuish_based "$IMAGE"; then
local DOKKU_DOCKERFILE_ENTRYPOINT=$(config_get "$APP" DOKKU_DOCKERFILE_ENTRYPOINT)
local DOKKU_DOCKERFILE_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_CMD)
[[ -z "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && DOKKU_DOCKERFILE_ENTRYPOINT="$(get_entrypoint_from_image "$IMAGE")"
[[ -z "$DOKKU_DOCKERFILE_CMD" ]] && DOKKU_DOCKERFILE_CMD="$(get_cmd_from_image "$IMAGE")"
[[ -n "$DOKKU_DOCKERFILE_ENTRYPOINT" ]] && local DOCKER_COMMIT_ENTRYPOINT_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_ENTRYPOINT'"
[[ -n "$DOKKU_DOCKERFILE_CMD" ]] && local DOCKER_COMMIT_CMD_CHANGE_ARG="--change='$DOKKU_DOCKERFILE_CMD'"
@@ -74,27 +78,3 @@ execute_script() {
fi
fi
}
exec_app_json_scripts() {
declare desc="core app.json scripts execution"
local trigger="$0 app_json_scripts"
local APP="$1"
case "$0" in
*pre-deploy)
local IMAGE_TAG="$2"
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
local PHASE_SCRIPT_KEY="predeploy"
;;
*post-deploy)
local IMAGE_TAG="$4"
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
local PHASE_SCRIPT_KEY="postdeploy"
;;
esac
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
execute_script "$APP" "$IMAGE" "$PHASE_SCRIPT_KEY"
}
exec_app_json_scripts "$@"

View File

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

View File

@@ -1 +0,0 @@
exec-app-json-scripts

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
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"
exec_app_json_scripts() {
declare desc="core app.json scripts execution"
local trigger="pre-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

@@ -1 +0,0 @@
exec-app-json-scripts

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
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"
exec_app_json_scripts() {
declare desc="core app.json scripts execution"
local trigger="pre-deploy app_json_scripts"
local APP="$1"; local IMAGE_TAG="$2"; local PHASE_SCRIPT_KEY="predeploy"
dokku_log_info1 "Attempting to run scripts.dokku.$PHASE_SCRIPT_KEY from app.json (if defined)"
execute_script "$APP" "$IMAGE_TAG" "$PHASE_SCRIPT_KEY"
}
exec_app_json_scripts "$@"

View File

@@ -1,62 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_build_cmd() {
declare desc="build phase"
local cmd="build"
local APP="$2"; local IMAGE_SOURCE_TYPE="$3"; local TMP_WORK_DIR="$4"; local IMAGE=$(get_app_image_name "$APP")
verify_app_name "$APP"
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
eval "$(config_export app "$APP")"
pushd "$TMP_WORK_DIR" &> /dev/null
case "$IMAGE_SOURCE_TYPE" in
herokuish)
local id=$(tar -c . | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" > /dev/null
[[ -d $CACHE_DIR ]] || mkdir "$CACHE_DIR"
plugn trigger pre-build-buildpack "$APP"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$IMAGE_SOURCE_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
# shellcheck disable=SC2086
local id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
docker attach "$id"
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" > /dev/null
plugn trigger post-build-buildpack "$APP"
;;
dockerfile)
# extract first port from Dockerfile
local DOCKERFILE_PORTS=$(get_dockerfile_exposed_ports Dockerfile)
[[ -n "$DOCKERFILE_PORTS" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_PORTS="$DOCKERFILE_PORTS"
# extract ENTRYPOINT/CMD from Dockerfile
local DOCKERFILE_ENTRYPOINT=$(extract_directive_from_dockerfile Dockerfile ENTRYPOINT)
[[ -n "$DOCKERFILE_ENTRYPOINT" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_ENTRYPOINT="$DOCKERFILE_ENTRYPOINT"
local DOCKERFILE_CMD=$(extract_directive_from_dockerfile Dockerfile CMD)
[[ -n "$DOCKERFILE_CMD" ]] && config_set --no-restart "$APP" DOKKU_DOCKERFILE_CMD="$DOCKERFILE_CMD"
plugn trigger pre-build-dockerfile "$APP"
[[ "$DOKKU_DOCKERFILE_CACHE_BUILD" == "false" ]] && DOKKU_DOCKER_BUILD_OPTS="$DOKKU_DOCKER_BUILD_OPTS --no-cache"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$IMAGE_SOURCE_TYPE")
# shellcheck disable=SC2086
docker build $DOCKER_ARGS $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
plugn trigger post-build-dockerfile "$APP"
;;
*)
dokku_log_fail "Building image source type $IMAGE_SOURCE_TYPE not supported!"
;;
esac
}
dokku_build_cmd "$@"

View File

@@ -1,165 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
dokku_deploy_cmd() {
declare desc="deploy phase"
local cmd="deploy"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to deploy"
local APP="$2"; local IMAGE_TAG="$3"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
verify_app_name "$APP"
plugn trigger pre-deploy "$APP" "$IMAGE_TAG"
is_image_herokuish_based "$IMAGE" && local DOKKU_HEROKUISH=true
local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
local oldids=$(get_app_container_ids "$APP")
local DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
local DOKKU_IS_APP_PROXY_ENABLED="$(is_app_proxy_enabled "$APP")"
local line; local PROC_TYPE; local PROC_COUNT; local CONTAINER_INDEX
while read -r line || [[ -n "$line" ]]; do
[[ "$line" =~ ^#.* ]] && continue
line="$(strip_inline_comments "$line")"
PROC_TYPE=${line%%=*}
PROC_COUNT=${line#*=}
CONTAINER_INDEX=1
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do
local id=""; local port=""; local ipaddr=""
local DOKKU_CONTAINER_ID_FILE="$DOKKU_ROOT/$APP/CONTAINER.$PROC_TYPE.$CONTAINER_INDEX"
local DOKKU_IP_FILE="$DOKKU_ROOT/$APP/IP.$PROC_TYPE.$CONTAINER_INDEX"
local DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_TYPE.$CONTAINER_INDEX"
# start the app
local DOCKER_ARGS="$DOKKU_DEFAULT_DOCKER_ARGS"
local DOCKER_ARGS+=" -e DYNO='$PROC_TYPE.$CONTAINER_INDEX' "
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
[[ -n "$DOKKU_HEROKUISH" ]] && local START_CMD="/start $PROC_TYPE"
if [[ -z "$DOKKU_HEROKUISH" ]]; then
local DOKKU_DOCKERFILE_PORTS=($(config_get "$APP" DOKKU_DOCKERFILE_PORTS || true))
local DOKKU_DOCKERFILE_START_CMD=$(config_get "$APP" DOKKU_DOCKERFILE_START_CMD || true)
local DOKKU_PROCFILE_START_CMD=$(get_cmd_from_procfile "$APP" "$PROC_TYPE")
local START_CMD=${DOKKU_DOCKERFILE_START_CMD:-$DOKKU_PROCFILE_START_CMD}
fi
if [[ "$PROC_TYPE" == "web" ]]; then
if [[ -z "${DOKKU_DOCKERFILE_PORTS[*]}" ]]; then
local port=5000
local DOKKU_DOCKER_PORT_ARGS+="-p $port"
else
local p
for p in ${DOKKU_DOCKERFILE_PORTS[*]};do
if [[ ! "$p" =~ .*udp.* ]]; then
# set port to first non-udp port
local p=${p//\/tcp}
local port=${port:="$p"}
fi
local DOKKU_DOCKER_PORT_ARGS+=" -p $p "
done
fi
if [[ "$DOKKU_IS_APP_PROXY_ENABLED" == "true" ]]; then
# shellcheck disable=SC2086
local id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
local ipaddr=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$id")
# Docker < 1.9 compatibility
if [[ -z $ipaddr ]]; then
local ipaddr=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' "$id")
fi
else
# shellcheck disable=SC2086
local id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $DOKKU_DOCKER_PORT_ARGS -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
local port=$(docker port "$id" "$port" | sed 's/[0-9.]*://')
local ipaddr=127.0.0.1
fi
else
# shellcheck disable=SC2086
local id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $DOCKER_ARGS $IMAGE $START_CMD)
fi
# if we can't post-deploy successfully, kill new container
kill_new() {
declare desc="wrapper function to kill newly started app container"
local id="$1"
docker inspect "$id" &> /dev/null && docker stop "$id" > /dev/null && docker kill "$id" &> /dev/null
trap - INT TERM EXIT
kill -9 $$
}
# run checks first, then post-deploy hooks, which switches Nginx traffic
if [[ "$(is_app_checks_enabled "$APP")" == "false" ]]; then
dokku_log_info1 "zero downtime is disabled for app ($APP). skipping pre-flight checks"
else
trap 'kill_new $id' INT TERM EXIT
dokku_log_info1 "Running pre-flight checks"
plugn trigger check-deploy "$APP" "$id" "$PROC_TYPE" "$port" "$ipaddr"
trap - INT TERM EXIT
fi
# now using the new container
[[ -n "$id" ]] && echo "$id" > "$DOKKU_CONTAINER_ID_FILE"
[[ -n "$ipaddr" ]] && echo "$ipaddr" > "$DOKKU_IP_FILE"
[[ -n "$port" ]] && echo "$port" > "$DOKKU_PORT_FILE"
# cleanup pre-migration files
rm -f "$DOKKU_ROOT/$APP/CONTAINER" "$DOKKU_ROOT/$APP/IP" "$DOKKU_ROOT/$APP/PORT"
local CONTAINER_INDEX=$(( CONTAINER_INDEX + 1 ))
done
# cleanup when we scale down
if [[ "$PROC_COUNT" == 0 ]]; then
local CONTAINER_IDX_OFFSET=0
else
local CONTAINER_IDX_OFFSET=$((PROC_COUNT + 1))
fi
local container_state_filetype
for container_state_filetype in CONTAINER IP PORT; do
cd "$DOKKU_ROOT/$APP"
find . -maxdepth 1 -name "$container_state_filetype.$PROC_TYPE.*" -printf "%f\n" | sort -t . -k 3 -n | tail -n +$CONTAINER_IDX_OFFSET | xargs rm -f
done
done < "$DOKKU_SCALE_FILE"
dokku_log_info1 "Running post-deploy"
plugn trigger post-deploy "$APP" "$port" "$ipaddr" "$IMAGE_TAG"
# kill the old container
if [[ -n "$oldids" ]]; then
if [[ -z "$DOKKU_WAIT_TO_RETIRE" ]]; then
local DOKKU_APP_DOKKU_WAIT_TO_RETIRE=$(config_get "$APP" DOKKU_WAIT_TO_RETIRE || true)
local DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE=$(config_get --global DOKKU_WAIT_TO_RETIRE || true)
local DOKKU_WAIT_TO_RETIRE=${DOKKU_APP_DOKKU_WAIT_TO_RETIRE:="$DOKKU_GLOBAL_DOKKU_WAIT_TO_RETIRE"}
fi
# Let the old container finish processing requests, before terminating it
local WAIT="${DOKKU_WAIT_TO_RETIRE:-60}"
dokku_log_info1 "Shutting down old containers in $WAIT seconds"
local oldid
for oldid in $oldids; do
dokku_log_info2 "$oldid"
done
(
exec >/dev/null 2>/dev/null </dev/null
trap '' INT HUP
sleep "$WAIT"
for oldid in $oldids; do
# Attempt to stop, if that fails, then force a kill as docker seems
# to not send SIGKILL as the docs would indicate. If that fails, move
# on to the next.
docker stop "$oldid" \
|| docker kill "$oldid" \
|| plugn trigger retire-container-failed "$APP" # plugin trigger for event logging
done
) & disown -a
# Use trap since disown/nohup don't seem to keep child alive
# Give child process just enough time to set the traps
sleep 0.1
fi
}
shift 1
dokku_deploy_cmd "$@"

View File

@@ -1,22 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_receive_cmd() {
declare desc="receives an app kicks off deploy process"
local cmd="receive"
local APP="$2"; local IMAGE=$(get_app_image_name "$APP"); local IMAGE_SOURCE_TYPE="$3"; local TMP_WORK_DIR="$4"
if [[ -z "$DOKKU_SKIP_CLEANUP" ]]; then
dokku_log_info1 "Cleaning up..."
docker_cleanup
else
dokku_log_info1 "DOKKU_SKIP_CLEANUP set. Skipping dokku cleanup"
fi
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
config_set --no-restart "$APP" DOKKU_APP_TYPE="$IMAGE_SOURCE_TYPE" &> /dev/null
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
release_and_deploy "$APP"
}
dokku_receive_cmd "$@"

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
dokku_release_cmd() {
declare desc="release phase"
local cmd="release"
local APP="$2"; local IMAGE_SOURCE_TYPE="$3"; local IMAGE_TAG="$4"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
verify_app_name "$APP"
case "$IMAGE_SOURCE_TYPE" in
herokuish)
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
if [[ -n $(config_export global) ]]; then
local id=$(config_export global | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" > /dev/null
fi
if [[ -n $(config_export app "$APP") ]]; then
local id=$(config_export app "$APP" | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" > /dev/null
fi
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
;;
dockerfile)
# buildstep plugins don't necessarily make sense for dockerfiles. call the new breed!!!
plugn trigger pre-release-dockerfile "$APP" "$IMAGE_TAG"
plugn trigger post-release-dockerfile "$APP" "$IMAGE_TAG"
;;
*)
dokku_log_fail "Releasing image source type $IMAGE_SOURCE_TYPE not supported!"
;;
esac
}
dokku_release_cmd "$@"

View File

@@ -1,6 +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/config/functions"
dokku_run_cmd() {
@@ -20,9 +21,28 @@ dokku_run_cmd() {
local DOCKER_ARGS=$(: | plugn trigger docker-args-run "$APP" "$IMAGE_TAG")
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
[[ "$DOKKU_RM_CONTAINER" ]] && local DOKKU_RUN_OPTS="--rm"
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
local DOKKU_RUN_OPTS=""
if [[ "$DOKKU_RM_CONTAINER" ]]; then
DOKKU_RUN_OPTS+=" --rm"
elif [[ "$DOKKU_DETACH_CONTAINER" ]]; then
DOKKU_RUN_OPTS+=" --detach"
fi
has_tty && DOKKU_RUN_OPTS+=" -i -t"
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
DOKKU_QUIET_OUTPUT=1 extract_procfile "$APP"
POTENTIAL_PROCFILE_KEY="$1"
PROC_CMD=$(get_cmd_from_procfile "$APP" "$POTENTIAL_PROCFILE_KEY" || echo '')
remove_procfile "$APP"
if [ ! -z "$PROC_CMD" ]; then
dokku_log_info1 "Found '$POTENTIAL_PROCFILE_KEY' in Procfile, running that command"
set -- "$PROC_CMD" "${@:2}"
fi
# shellcheck disable=SC2086
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
}

View File

@@ -1,10 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
dokku_version_cmd() {
declare desc="prints dokku version"

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

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

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

1
plugins/20_events/post-stop Symbolic link
View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

View File

@@ -0,0 +1 @@
hook

1
plugins/20_events/user-auth Symbolic link
View File

@@ -0,0 +1 @@
hook

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
apps_create() {
declare desc="verifies app name and creates an app"
@@ -34,11 +35,14 @@ apps_destroy() {
plugn trigger pre-delete "$APP" "$IMAGE_TAG"
local DOKKU_APP_CIDS=$(get_app_container_ids "$APP")
local cid
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
if [[ -n $DOKKU_APP_CIDS ]]; then
local cid
for cid in $DOKKU_APP_CIDS; do
docker stop "$cid" > /dev/null || true
# shellcheck disable=SC2086
docker stop $DOCKER_STOP_TIME_ARG "$cid" > /dev/null || true
docker rm "$cid" > /dev/null || true
done
fi

View File

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

View File

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

View File

@@ -7,13 +7,14 @@ case "$1" in
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: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: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
}

View File

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

View File

@@ -2,7 +2,6 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/certs/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
is_tar_import() {
declare desc="determines if we have STDIN open in an attempt to detect a streamed tar import"
@@ -70,7 +69,8 @@ certs_set() {
chmod 750 "$APP_SSL_PATH"
chmod 640 "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.key"
cd "$DOKKU_ROOT"
nginx_build_config "$APP"
plugn trigger post-certs-update "$APP"
plugn trigger post-domains-update "$APP"
}
certs_set "$@"

View File

@@ -2,7 +2,6 @@
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
certs_generate_cmd() {
declare desc="generates a self-signed SSL certificate/key combo"
@@ -26,7 +25,7 @@ certs_generate_cmd() {
mv -f "$CERTS_GENERATE_TMP_WORK_DIR/server.key" "$CERTS_GENERATE_TMP_WORK_DIR/server.crt" "$APP_SSL_PATH"
chmod 750 "$APP_SSL_PATH"
chmod 640 "$APP_SSL_PATH/server.key" "$APP_SSL_PATH/server.crt"
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || nginx_build_config "$APP")
[[ -n "$DOMAIN" ]] && (domains_add "$APP" "$DOMAIN" || plugn trigger post-domains-update "$APP")
dokku_log_info1 "The following is a certificate signing request that can be used"
dokku_log_info1 "to generate an 'officially' signed SSL certificate for $APP at $DOMAIN"
dokku_log_info1 "by a CA of your choosing."

View File

@@ -12,6 +12,7 @@ certs_remove_cmd() {
if [[ -d "$APP_SSL_PATH" ]]; then
dokku_log_info1 "Removing SSL endpoint from $APP"
rm -rf "$APP_SSL_PATH"
plugn trigger post-certs-remove "$APP"
plugn trigger post-domains-update "$APP"
else
dokku_log_fail "An app-specific SSL endpoint is not defined"

View File

@@ -58,8 +58,8 @@ checks_check_deploy() {
eval "$(config_export global)"
eval "$(config_export app "$APP")"
if [[ "$(is_app_checks_enabled "$APP")" == "false" ]]; then
dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been disabled. moving on..."
if [[ "$(is_app_proctype_checks_skipped "$APP" "$PROC_TYPE")" == "true" ]]; then
dokku_log_info2_quiet "Zero downtime checks for app ($APP) have been skipped. moving on..."
exit 0
fi

View File

@@ -8,15 +8,16 @@ case "$1" in
declare desc="return checks plugin help content"
cat<<help_content
checks <app>, Show zero-downtime status
checks:enable <app>, Enable zero-downtime checks
checks:disable <app>, Disable zero-downtime checks
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:skip <app> [process-type(s)], Skip zero-downtime checks for all processes (or comma-separated process-type list)
help_content
}
if [[ $1 = "checks:help" ]] ; then
echo -e 'Usage: dokku checks[:COMAND]'
echo ''
echo 'Manage zero-downtime checks.'
echo 'Manage zero-downtime settings.'
echo ''
echo 'Additional commands:'
help_content_func | sort | column -c2 -t -s,

View File

@@ -3,15 +3,27 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
is_app_checks_enabled() {
declare desc="return app zero-downtime checks status"
is_app_proctype_checks_disabled() {
declare desc="return true if app's proctype(s) checks are disabled"
local APP="$1"; verify_app_name "$APP"
local DOKKU_CHECKS_ENABLED=$(config_get "$APP" DOKKU_CHECKS_ENABLED)
local PROCTYPE="$2" status=false
local DOKKU_CHECKS_DISABLED=$(config_get "$APP" DOKKU_CHECKS_DISABLED || true)
if [[ -z "$DOKKU_CHECKS_ENABLED" ]] || [[ "$DOKKU_CHECKS_ENABLED" == "1" ]];then
local status=true
else
local status=false
if [[ "$DOKKU_CHECKS_DISABLED" == "_all_" ]] || [[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_DISABLED")" == "true" ]] ;then
status=true
fi
echo $status
}
is_app_proctype_checks_skipped() {
declare desc="return true if app's proctype(s) checks are skipped"
local APP="$1"; verify_app_name "$APP"
local PROCTYPE="$2" status=false
local DOKKU_CHECKS_SKIPPED=$(config_get "$APP" DOKKU_CHECKS_SKIPPED || true)
if [[ "$DOKKU_CHECKS_SKIPPED" == "_all_" ]] || [[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_SKIPPED")" == "true" ]] ;then
status=true
fi
echo $status

View File

@@ -3,39 +3,63 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
migrate_checks_vars() {
migrate_checks_vars_0_5_0() {
declare desc="migrates deprecated CHECKS config variables to simplified counter part introduced in 0.5.x"
local APPS="$(dokku_apps)"
local GLOBAL_SKIP_ALL_CHECKS=$(dokku config:get --global DOKKU_SKIP_ALL_CHECKS || true)
local GLOBAL_SKIP_DEFAULT_CHECKS=$(dokku config:get --global DOKKU_SKIP_DEFAULT_CHECKS || true)
local GLOBAL_SKIP_ALL_CHECKS=$(config_get --global DOKKU_SKIP_ALL_CHECKS || true)
local GLOBAL_SKIP_DEFAULT_CHECKS=$(config_get --global DOKKU_SKIP_DEFAULT_CHECKS || true)
local app
dokku_log_info1 "Migrating zero downtime env variables. The following variables have been deprecated"
dokku_log_info1 "Migrating zero downtime env variables to 0.5.x. The following variables have been deprecated"
dokku_log_info2 "DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS"
dokku_log_info2 "Please use dokku checks:[disable|enable] <app> to control zero downtime functionality"
for app in $APPS; do
local APP_SKIP_ALL_CHECKS=$(dokku config:get "$app" DOKKU_SKIP_ALL_CHECKS || true)
local APP_SKIP_DEFAULT_CHECKS=$(dokku config:get "$app" DOKKU_SKIP_DEFAULT_CHECKS || true)
local APP_SKIP_ALL_CHECKS=$(config_get "$app" DOKKU_SKIP_ALL_CHECKS || true)
local APP_SKIP_DEFAULT_CHECKS=$(config_get "$app" DOKKU_SKIP_DEFAULT_CHECKS || true)
if [[ "$APP_SKIP_ALL_CHECKS" == "true" ]] || [[ "$APP_SKIP_DEFAULT_CHECKS" == "true" ]] || \
[[ "$GLOBAL_SKIP_ALL_CHECKS" == "true" ]] || [[ "$GLOBAL_SKIP_DEFAULT_CHECKS" == "true" ]]; then
dokku_log_info2 ""
dokku_log_info2 "zero downtime disabled for app ($app)"
if [[ "$APP_SKIP_ALL_CHECKS" == "true" ]] || [[ "$APP_SKIP_DEFAULT_CHECKS" == "true" ]] || [[ "$GLOBAL_SKIP_ALL_CHECKS" == "true" ]] || [[ "$GLOBAL_SKIP_DEFAULT_CHECKS" == "true" ]]; then
dokku_log_info2 ""
dokku_log_info2 "zero downtime checks disabled for app ($app)"
config_set --no-restart "$app" DOKKU_CHECKS_ENABLED=0
fi
if [[ -n "$APP_SKIP_ALL_CHECKS" ]] || [[ -n "$APP_SKIP_DEFAULT_CHECKS" ]]; then
config_unset --no-restart "$app" DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
fi
dokku_log_info2 "Migration complete"
dokku_log_info2 ""
done
if [[ -n "$GLOBAL_SKIP_ALL_CHECKS" ]] || [[ -n "$GLOBAL_SKIP_DEFAULT_CHECKS" ]]; then
dokku_log_info1 "Removing global zero downtime settings"
config_unset --global DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
fi
dokku_log_info2 "Migration complete"
dokku_log_info2 ""
}
migrate_checks_vars "$@"
migrate_checks_vars_0_5_0 "$@"
migrate_checks_vars_0_6_0() {
declare desc="migrates CHECKS config variables from 0.5.x to support fully-disabled zero-downtime checks"
local APPS="$(dokku_apps)"
local app
dokku_log_info1 "Migrating zero downtime env variables to 0.6.x. The following variables will be migrated"
dokku_log_info2 "DOKKU_CHECKS_ENABLED -> DOKKU_CHECKS_SKIPPED"
for app in $APPS; do
local APP_DOKKU_CHECKS_ENABLED=$(config_get "$app" DOKKU_CHECKS_ENABLED || true)
if [[ $APP_DOKKU_CHECKS_ENABLED ]]; then
if [[ "$APP_DOKKU_CHECKS_ENABLED" == "0" ]]; then
dokku_log_info2 ""
dokku_log_info2 "zero downtime checks disabled for app ($app)"
config_set --no-restart "$app" DOKKU_CHECKS_SKIPPED="_all_"
fi
config_unset --no-restart "$app" DOKKU_CHECKS_ENABLED || true
fi
done
dokku_log_info2 "Migration complete"
dokku_log_info2 ""
}
migrate_checks_vars_0_6_0 "$@"

View File

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

View File

@@ -4,19 +4,24 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
checks_main_cmd() {
declare desc="displays app zero-downtime status"
declare desc="displays app zero-downtime checks status"
local cmd="checks"
[[ "$1" == "$cmd" ]] && shift 1
local APPS=$(dokku_apps)
if [[ -n "$1" ]]; then
local APPS="$1"
fi
dokku_col_log_info1_quiet "App Name" "Zero-Downtime Status"
dokku_col_log_info1_quiet "App Name" "Proctypes Disabled" "Proctypes Skipped"
local app
for app in $APPS; do
verify_app_name "$app"
dokku_col_log_msg "$app" "$(is_app_checks_enabled "$app")"
local DOKKU_CHECKS_DISABLED=$(config_get "$app" DOKKU_CHECKS_DISABLED)
local DOKKU_CHECKS_SKIPPED=$(config_get "$app" DOKKU_CHECKS_SKIPPED)
local checks_disabled="${DOKKU_CHECKS_DISABLED:-none}"
local checks_skipped="${DOKKU_CHECKS_SKIPPED:-none}"
dokku_col_log_msg "$app" "$checks_disabled" "$checks_skipped"
done
}
checks_main_cmd "$2"
checks_main_cmd "$@"

View File

@@ -4,18 +4,41 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
checks_disable_cmd() {
declare desc="disable zero-downtime for app"
local cmd="check:disable"
declare desc="disable zero-downtime checks for app/proctypes"
local cmd="checks:disable"
[[ "$1" == "$cmd" ]] && shift 1
local APP="$1"; verify_app_name "$APP"
local PROCTYPES="${2:-_all_}"
local DOKKU_CHECKS_DISABLED=$(config_get "$APP" DOKKU_CHECKS_DISABLED || true)
local DOKKU_CHECKS_SKIPPED=$(config_get "$APP" DOKKU_CHECKS_SKIPPED || true)
if [[ "$(is_app_checks_enabled "$APP")" == "true" ]]; then
if [[ "$PROCTYPES" == "_all_" ]]; then
dokku_log_info1 "Disabling zero downtime for app ($APP)"
[[ "$2" == "--no-restart" ]] && local CONFIG_SET_ARGS=$2
# shellcheck disable=SC2086
config_set $CONFIG_SET_ARGS $APP DOKKU_CHECKS_ENABLED=0
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$PROCTYPES"
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
else
dokku_log_info1 "zero downtime is already disable for app ($APP)"
dokku_log_info1 "Disabling zero downtime for app's ($APP) proctypes ($PROCTYPES)"
local PROCTYPE OIFS="$IFS" IFS=,
for PROCTYPE in $PROCTYPES; do
IFS="$OIFS"
[[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_DISABLED")" == "false" ]] && \
DOKKU_CHECKS_DISABLED="$(add_val_to_list "$PROCTYPE" "$DOKKU_CHECKS_DISABLED")"
[[ "$(is_val_in_list "$PROCTYPE" "$DOKKU_CHECKS_SKIPPED")" == "true" ]] && \
DOKKU_CHECKS_SKIPPED="$(remove_val_from_list "$PROCTYPE" "$DOKKU_CHECKS_SKIPPED")"
done
DOKKU_CHECKS_DISABLED="$(remove_val_from_list "_all_" "$DOKKU_CHECKS_DISABLED")"
if [[ -z "$DOKKU_CHECKS_DISABLED" ]]; then
config_unset --no-restart "$APP" DOKKU_CHECKS_DISABLED
else
config_set --no-restart "$APP" DOKKU_CHECKS_DISABLED="$DOKKU_CHECKS_DISABLED"
fi
if [[ -z "$DOKKU_CHECKS_SKIPPED" ]]; then
config_unset --no-restart "$APP" DOKKU_CHECKS_SKIPPED
else
config_set --no-restart "$APP" DOKKU_CHECKS_SKIPPED="$DOKKU_CHECKS_SKIPPED"
fi
fi
}
checks_disable_cmd "$2" --no-restart
checks_disable_cmd "$@"

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