diff --git a/HISTORY.md b/HISTORY.md index b7cec737c..ccbc3ca85 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,87 @@ # History +## 0.13.1 + +Install/update via the bootstrap script: + +```shell +wget https://raw.githubusercontent.com/dokku/dokku/v0.13.1/bootstrap.sh +sudo DOKKU_TAG=v0.13.1 bash bootstrap.sh +``` + +### Bug Fixes + +- #3324: @josegonzalez Add missing source of config functions + +## 0.13.0 + +### Bug Fixes + +- #3312: @josegonzalez fix: keep track of failed containers regardless of docker kill output +- #3299: @josegonzalez Wrap script_bin in double-quotes +- #3295: @alexquick Sort config:show by key name +- #3288: @josegonzalez Wrap script binary in single quotes during executable check + +### New Features + +- #3302: @josegonzalez Add ability to check on app lock status via apps:locked command +- #3315: @aokon Upgrade herokuish to 0.4.5 version +- #3236: @josegonzalez Retire old containers +- #3307: @josegonzalez Add support for docker.io package +- #3301: @josegonzalez Add ability to sync packages to a new version of ubuntu +- #3286: @josegonzalez Sanitize docker inspect output with ps:inspect +- #3240: @josegonzalez Refactor Procfile handling to use go-procfile-util +- #3282: @josegonzalez Use create instead of run for faster and more reliable file copy from docker images +- #3280: @josegonzalez Better scheduler support +- #3259: @josegonzalez Check if script is executable when a full path is specified + +### Documentation + +- #3314: @royklutman Remove reference to non-existent DigitalOcean hosting plan +- #3313: @morenoh149 Indicate to user to specify hostname +- #3310: @josegonzalez Add a note to our issue template begging for money +- #3281: @josegonzalez Add documentation on custom error pages + +## 0.12.13 + +### New Features + +- #3257: @josegonzalez Suppress output in git plugin during builds +- #3254: @michaelshobbs Update herokuish to 0.4.4 + +### Documentation + +- #3270: @alexymik Correct typo in git documentation +- #3268: @josegonzalez Correct notice on ubuntu support +- #3247: @mimischi Fix typo in ps:stopall +- #3246: @dv Change DISABLE_CHOWN to disable-chown + +## 0.12.12 + +### New Features + +- #3244: @josegonzalez Allow disabling chown for persistent storage in scheduler-docker-local + +## 0.12.11 + +### Bug Fixes + +- #3238: @josegonzalez Handle proxy issues in app renaming +- #3234: @mashrikt Unset GIT_QUARANTINE_PATH when updating repo submodule +- #3223: @josegonzalez Get the global scheduler if no app is specified +- #3218: @wcalandro Fix error text when using "dokku plugin:uninstall" + +### New Features + +- #3242: @josegonzalez Upgrade herokuish to 0.4.3 +- #3241: @josegonzalez Add a subcommand for retrieving failed app deploy logs +- #3237: @josegonzalez Support --quiet header when showing all environment variables + +### Documentation + +- #3235: @josegonzalez Switch from ps:rebuild to ps:restart +- #3221: @josegonzalez Better callout for why env vars do not get applied to dockerfile builds + ## 0.12.10 ### New Features diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index bc3d753fe..a167f728c 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -1,3 +1,5 @@ +> If you're using Dokku - especially for commercial purposes - consider donating to project development via [OpenCollective](https://opencollective.com/dokku) or [Patreon](https://www.patreon.com/dokku). Funds go to general development, support, and infrastructure costs. +> > If you need help figuring out how to use a specific buildpack, or are having issues using multiple buildpacks, please see our [irc or slack channels](http://dokku.viewdocs.io/dokku/getting-started/where-to-get-help/#the-irc-and-slack-channels). Issues pertaining to buildpacks may be closed and locked. ## Description of problem @@ -27,8 +29,9 @@ ### Additional information -- `docker inspect CONTAINER_ID` (if applicable): - (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): +- Container Inspect Output (if applicable): + - 0.13.0+: `dokku inspect APP_NAME` + - <0.13.0: `docker inspect CONTAINER_ID`: WARNING, `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//nginx.conf` (if applicable): - Link to the exact repository being deployed (if possible/applicable): - If a deploy is failing or behaving unexpectedly: diff --git a/Makefile b/Makefile index 55cbed0cd..39327fef1 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ DOKKU_VERSION ?= master SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.7.0/sshcommand +PROCFILE_UTIL_URL ?= https://github.com/josegonzalez/go-procfile-util/releases/download/v0.4.0/procfile-util_0.4.0_linux_x86_64.tgz PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.3.0/plugn_0.3.0_linux_x86_64.tgz SIGIL_URL ?= https://github.com/gliderlabs/sigil/releases/download/v0.4.0/sigil_0.4.0_Linux_x86_64.tgz STACK_URL ?= https://github.com/gliderlabs/herokuish.git @@ -26,7 +27,7 @@ endif include common.mk -.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies sshcommand plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build +.PHONY: all apt-update install version copyfiles copyplugin man-db plugins dependencies sshcommand procfile-util plugn docker aufs stack count dokku-installer vagrant-acl-add vagrant-dokku go-build include tests.mk include deb.mk @@ -109,13 +110,13 @@ else echo $(DOKKU_VERSION) > ~dokku/VERSION endif -plugin-dependencies: plugn +plugin-dependencies: plugn procfile-util sudo -E dokku plugin:install-dependencies --core -plugins: plugn docker +plugins: plugn procfile-util docker sudo -E dokku plugin:install --core -dependencies: apt-update sshcommand plugn docker help2man man-db sigil +dependencies: apt-update sshcommand plugn procfile-util docker help2man man-db sigil $(MAKE) -e stack apt-update: @@ -132,6 +133,10 @@ sshcommand: chmod +x /usr/local/bin/sshcommand sshcommand create dokku /usr/local/bin/dokku +procfile-util: + wget -qO /tmp/procfile-util_latest.tgz ${PROCFILE_UTIL_URL} + tar xzf /tmp/procfile-util_latest.tgz -C /usr/local/bin + plugn: wget -qO /tmp/plugn_latest.tgz ${PLUGN_URL} tar xzf /tmp/plugn_latest.tgz -C /usr/local/bin diff --git a/README.md b/README.md index b06070c16..a215d5bb6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # 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) +[![Build Status](https://img.shields.io/circleci/project/github/dokku/dokku.svg?style=flat-square "Build Status")](https://circleci.com/gh/dokku/dokku/tree/master) [![Ubuntu Package](https://img.shields.io/badge/package-ubuntu-brightgreen.svg?style=flat-square "Ubuntu Package")](https://packagecloud.io/dokku/dokku) [![Arch Package](https://img.shields.io/badge/package-arch-brightgreen.svg?style=flat-square "Arch Package")](https://aur.archlinux.org/packages/dokku/) [![IRC Network](https://img.shields.io/badge/irc-freenode-blue.svg?style=flat-square "IRC Freenode")](https://webchat.freenode.net/?channels=dokku) @@ -88,9 +88,8 @@ Support us with a monthly donation and help us continue our activities. [[Become A fresh VM running any of the following operating systems: -- Ubuntu 16.04 x64 -- Ubuntu 14.04 x64 -- Debian 8.2 x64 +- Ubuntu x64 - Any currently supported release +- Debian 8.2+ x64 - CentOS 7 x64 *(experimental)* - Arch Linux x64 *(experimental)* @@ -99,8 +98,8 @@ A fresh VM running any of the following operating systems: To install the latest stable release, run the following commands as a user who has access to `sudo`: ```shell -wget https://raw.githubusercontent.com/dokku/dokku/v0.12.10/bootstrap.sh -sudo DOKKU_TAG=v0.12.10 bash bootstrap.sh +wget https://raw.githubusercontent.com/dokku/dokku/v0.13.1/bootstrap.sh +sudo DOKKU_TAG=v0.13.1 bash bootstrap.sh ``` You can then proceed to the ip address or domain name associated with your server to complete the web-based installation. diff --git a/bootstrap.sh b/bootstrap.sh index 0da17ab04..622928a55 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -173,6 +173,7 @@ install-dokku-from-deb-package() { [[ -n $DOKKU_HOSTNAME ]] && echo "dokku dokku/hostname string $DOKKU_HOSTNAME" | sudo debconf-set-selections [[ -n $DOKKU_SKIP_KEY_FILE ]] && echo "dokku dokku/skip_key_file boolean $DOKKU_SKIP_KEY_FILE" | sudo debconf-set-selections [[ -n $DOKKU_KEY_FILE ]] && echo "dokku dokku/key_file string $DOKKU_KEY_FILE" | sudo debconf-set-selections + [[ -n $DOKKU_NGINX_ENABLE ]] && echo "dokku dokku/nginx_enable string $DOKKU_NGINX_ENABLE" | sudo debconf-set-selections if [[ -n $DOKKU_CHECKOUT ]]; then # shellcheck disable=SC2086 diff --git a/contrib/copy-packages b/contrib/copy-packages new file mode 100644 index 000000000..702c6cbe2 --- /dev/null +++ b/contrib/copy-packages @@ -0,0 +1,51 @@ +#!/usr/bin/env python2.7 +import os +import requests +import shutil +import subprocess +from requests.auth import HTTPBasicAuth + +PACKAGECLOUD_API_TOKEN = os.getenv('DOKKU_PACKAGECLOUD_API_TOKEN') + + +def download_file(filename, url): + r = requests.get(url, stream=True) + with open(filename, 'wb') as f: + shutil.copyfileobj(r.raw, f) + + +def upload_file(filename): + versions = [ + "bionic", + ] + cmd_template = "package_cloud push dokku/dokku/ubuntu/{0} {1}" + for version in versions: + cmd = cmd_template.format(version, filename) + subprocess.call(cmd, shell=True) + + +def main(): + auth = HTTPBasicAuth(PACKAGECLOUD_API_TOKEN, '') + base = requests.get('https://packagecloud.io/api/v1/repos/dokku/dokku/packages/deb/ubuntu/trusty.json', + auth=auth) + data = base.json() + urls = [] + for package in data: + urls.append(package['versions_url']) + + download_urls = {} + for url in urls: + base = requests.get('https://packagecloud.io{0}'.format(url), + auth=auth) + data = base.json() + for version in data: + download_urls['downloads/' + version['filename']] = version['download_url'] + + for filename, download_url in download_urls.items(): + print "downloading", filename + download_file(filename, download_url) + upload_file(filename) + + +if __name__ == "__main__": + main() diff --git a/contrib/dokku-installer.py b/contrib/dokku-installer.py index be0c5db40..0e8845f32 100755 --- a/contrib/dokku-installer.py +++ b/contrib/dokku-installer.py @@ -10,7 +10,7 @@ import subprocess import sys import threading -VERSION = 'v0.12.10' +VERSION = 'v0.13.1' hostname = '' try: @@ -120,6 +120,7 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): proc.stdin.close() proc.wait() + set_debconf_selection('boolean', 'nginx_enable', 'true') set_debconf_selection('boolean', 'skip_key_file', 'true') set_debconf_selection('boolean', 'vhost_enable', vhost_enable) set_debconf_selection('boolean', 'web_config', 'false') diff --git a/deb.mk b/deb.mk index 8f8844e81..af6255f4c 100644 --- a/deb.mk +++ b/deb.mk @@ -1,6 +1,6 @@ HEROKUISH_DESCRIPTION = 'Herokuish uses Docker and Buildpacks to build applications like Heroku' HEROKUISH_REPO_NAME ?= gliderlabs/herokuish -HEROKUISH_VERSION ?= 0.4.2 +HEROKUISH_VERSION ?= 0.4.5 HEROKUISH_ARCHITECTURE = amd64 HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb diff --git a/debian/config b/debian/config index d988e0516..eab3ea415 100755 --- a/debian/config +++ b/debian/config @@ -17,6 +17,7 @@ if [ $RET = "true" ]; then exit 0 fi +db_input "high" "dokku/nginx_enable" || true db_input "high" "dokku/hostname" || true db_input "high" "dokku/vhost_enable" || true if [ "$ACTION" != "reconfigure" ]; then diff --git a/debian/control b/debian/control index f3b6a4528..04422fe72 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Package: dokku -Version: 0.12.10 +Version: 0.13.1 Section: web Priority: optional Architecture: amd64 -Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, python-software-properties | python3-software-properties, rsyslog +Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog Recommends: herokuish (>= 0.3.4), parallel, dokku-update Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf Maintainer: Jose Diaz-Gonzalez diff --git a/debian/postinst b/debian/postinst index ac40b8e72..78aa58a91 100755 --- a/debian/postinst +++ b/debian/postinst @@ -59,9 +59,13 @@ case "$1" in fi done + db_get "dokku/nginx_enable" echo "Enabling all core plugins" find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do - if [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then + if [ "$plugin" = "nginx-vhosts" ] && [ "$RET" = "false" ]; then + echo "Skipping enable of nginx-vhosts plugin" + continue + elif [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin; PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn enable $plugin PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn enable $plugin diff --git a/debian/postrm b/debian/postrm index ba0916cb3..f939ee55a 100755 --- a/debian/postrm +++ b/debian/postrm @@ -21,7 +21,10 @@ main() { rm -f /etc/systemd/system/dokku-redeploy.service rm -f /etc/update-motd.d/99-dokku - (nginx -t && service nginx reload) || true + db_get "dokku/nginx_enable" + if [ "$RET" = "true" ]; then + (nginx -t && service nginx reload) || true + fi if [[ "$1" == "purge" ]]; then rm -f /etc/nginx/conf.d/dokku.conf diff --git a/debian/templates b/debian/templates index f3334d60e..e5f314de4 100644 --- a/debian/templates +++ b/debian/templates @@ -22,3 +22,8 @@ Template: dokku/key_file Description: Keyfile for initial user: Type: string Default: /root/.ssh/id_rsa.pub + +Template: dokku/nginx_enable +Description: Enable nginx-vhosts plugin? +Type: boolean +Default: true diff --git a/docs/advanced-usage/persistent-storage.md b/docs/advanced-usage/persistent-storage.md index d01d77881..bf3e68509 100644 --- a/docs/advanced-usage/persistent-storage.md +++ b/docs/advanced-usage/persistent-storage.md @@ -39,11 +39,11 @@ dokku storage:mount node-js-app /var/lib/dokku/data/storage/node-js-app:/storage Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container. -Once you have mounted persistent storage, you will also need to restart the application. See the +Once you have mounted persistent storage, you will also need to restart the application. See the [process scaling documentation](/docs/deployment/process-management.md) for more information. ```shell -dokku ps:rebuild app-name +dokku ps:restart app-name ``` A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container. @@ -132,7 +132,7 @@ Your app may have services that are running in memory and need to be backed up l By default, Dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly. ```shell -dokku docker-options:add build "-v /tmp/python-test:/opt/test" +dokku docker-options:add node-js-app build "-v /tmp/python-test:/opt/test" ``` You cannot use mounted volumes during the build phase of a Dockerfile deploy. This is because Docker does not support volumes when executing `docker build`. @@ -147,4 +147,4 @@ By default, Dokku will execute your buildpack application processes as the `hero > NOTE: this user must exist in your herokuish image. -Additionally, Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. +Additionally, the default `docker-local` scheduler that comes with Dokku will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. See the [scheduler-docker-local documentation](/docs/advanced-usage/schedulers/docker-local.md#disabling-chown-of-persistent-storage) docs for more information. diff --git a/docs/advanced-usage/plugin-management.md b/docs/advanced-usage/plugin-management.md index 81d5afa5d..dc08dc4bb 100644 --- a/docs/advanced-usage/plugin-management.md +++ b/docs/advanced-usage/plugin-management.md @@ -31,31 +31,31 @@ dokku plugin ``` plugn: dev - 00_dokku-standard 0.12.10 enabled dokku core standard plugin - 20_events 0.12.10 enabled dokku core events logging plugin - apps 0.12.10 enabled dokku core apps plugin - build-env 0.12.10 enabled dokku core build-env plugin - certs 0.12.10 enabled dokku core certificate management plugin - checks 0.12.10 enabled dokku core checks plugin - common 0.12.10 enabled dokku core common plugin - config 0.12.10 enabled dokku core config plugin - docker-options 0.12.10 enabled dokku core docker-options plugin - domains 0.12.10 enabled dokku core domains plugin - enter 0.12.10 enabled dokku core enter plugin - git 0.12.10 enabled dokku core git plugin - logs 0.12.10 enabled dokku core logs plugin - named-containers 0.12.10 enabled dokku core named containers plugin - network 0.12.10 enabled dokku core network plugin - nginx-vhosts 0.12.10 enabled dokku core nginx-vhosts plugin - plugin 0.12.10 enabled dokku core plugin plugin - proxy 0.12.10 enabled dokku core proxy plugin - ps 0.12.10 enabled dokku core ps plugin - repo 0.12.10 enabled dokku core repo plugin - shell 0.12.10 enabled dokku core shell plugin - ssh-keys 0.12.10 enabled dokku core ssh-keys plugin - storage 0.12.10 enabled dokku core storage plugin - tags 0.12.10 enabled dokku core tags plugin - tar 0.12.10 enabled dokku core tar plugin + 00_dokku-standard 0.13.1 enabled dokku core standard plugin + 20_events 0.13.1 enabled dokku core events logging plugin + apps 0.13.1 enabled dokku core apps plugin + build-env 0.13.1 enabled dokku core build-env plugin + certs 0.13.1 enabled dokku core certificate management plugin + checks 0.13.1 enabled dokku core checks plugin + common 0.13.1 enabled dokku core common plugin + config 0.13.1 enabled dokku core config plugin + docker-options 0.13.1 enabled dokku core docker-options plugin + domains 0.13.1 enabled dokku core domains plugin + enter 0.13.1 enabled dokku core enter plugin + git 0.13.1 enabled dokku core git plugin + logs 0.13.1 enabled dokku core logs plugin + named-containers 0.13.1 enabled dokku core named containers plugin + network 0.13.1 enabled dokku core network plugin + nginx-vhosts 0.13.1 enabled dokku core nginx-vhosts plugin + plugin 0.13.1 enabled dokku core plugin plugin + proxy 0.13.1 enabled dokku core proxy plugin + ps 0.13.1 enabled dokku core ps plugin + repo 0.13.1 enabled dokku core repo plugin + shell 0.13.1 enabled dokku core shell plugin + ssh-keys 0.13.1 enabled dokku core ssh-keys plugin + storage 0.13.1 enabled dokku core storage plugin + tags 0.13.1 enabled dokku core tags plugin + tar 0.13.1 enabled dokku core tar plugin ``` Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins. diff --git a/docs/advanced-usage/schedulers/docker-local.md b/docs/advanced-usage/schedulers/docker-local.md index 1427a0a97..574486e36 100644 --- a/docs/advanced-usage/schedulers/docker-local.md +++ b/docs/advanced-usage/schedulers/docker-local.md @@ -1,5 +1,12 @@ # Docker Local Scheduler +> Subcommands new as of 0.12.12 + +``` +scheduler-docker-local:report [] [] # Displays a scheduler-docker-local report for one or more apps +scheduler-docker-local:set () # Set or clear a scheduler-docker-local property for an app +``` + > New as of 0.12.0 Dokku natively includes functionality to manage application lifecycles for a single server using the `scheduler-docker-local` plugin. It is the default scheduler, but as with all schedulers, it is set on a per-application basis. The scheduler can currently be overridden by running the following command: @@ -14,6 +21,22 @@ As it is the default, unsetting the `DOCKER_SCHEDULER` config variable is also a dokku config:unset node-js-app DOCKER_SCHEDULER ``` +## Usage + +### Disabling chown of persistent storage + +The `scheduler-docker-local` plugin will ensure your storage mounts are owned by either `herokuishuser` or the overridden value you have set in `DOKKU_APP_USER`. You may disable this by running the following `scheduler-docker-local:set` command for your application: + +```shell +dokku scheduler-docker-local:set node-js-app disable-chown true +``` + +Once set, you may re-enable it by setting a blank value for `disable-chown`: + +```shell +dokku scheduler-docker-local:set node-js-app disable-chown +``` + ## Implemented Triggers This plugin implements various functionality through `plugn` triggers to integrate with Docker for running apps on a single server. The following functionality is supported by the `scheduler-docker-local` plugin. @@ -25,7 +48,8 @@ This plugin implements various functionality through `plugn` triggers to integra - `pre-restore` - `scheduler-deploy` - `scheduler-docker-cleanup` +- `scheduler-logs-failed` - `scheduler-run` - `scheduler-stop` - `scheduler-tags-create` -- `scheduler-tags-destroy` \ No newline at end of file +- `scheduler-tags-destroy` diff --git a/docs/assets/favicons/browserconfig.xml b/docs/assets/favicons/browserconfig.xml index cd18a8fa0..f2c2cb6bb 100644 --- a/docs/assets/favicons/browserconfig.xml +++ b/docs/assets/favicons/browserconfig.xml @@ -2,10 +2,10 @@ - - - - + + + + #da532c diff --git a/docs/assets/favicons/manifest.json b/docs/assets/favicons/manifest.json index ca352c941..b493d9aa2 100644 --- a/docs/assets/favicons/manifest.json +++ b/docs/assets/favicons/manifest.json @@ -2,37 +2,37 @@ "name": "Dokku", "icons": [ { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-36x36.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-36x36.png", "sizes": "36x36", "type": "image\/png", "density": "0.75" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-48x48.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-48x48.png", "sizes": "48x48", "type": "image\/png", "density": "1.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-72x72.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-72x72.png", "sizes": "72x72", "type": "image\/png", "density": "1.5" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-96x96.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-96x96.png", "sizes": "96x96", "type": "image\/png", "density": "2.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-144x144.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-144x144.png", "sizes": "144x144", "type": "image\/png", "density": "3.0" }, { - "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.12.10\/docs\/assets\/favicons\/android-chrome-192x192.png", + "src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.13.1\/docs\/assets\/favicons\/android-chrome-192x192.png", "sizes": "192x192", "type": "image\/png", "density": "4.0" diff --git a/docs/assets/style.css b/docs/assets/style.css index f2b2bbe04..eda490341 100644 --- a/docs/assets/style.css +++ b/docs/assets/style.css @@ -39,13 +39,13 @@ h1 { font-size: 1.6em; } .header .navbar-brand a { - background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.10/docs/assets/dokku.png); + background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.13.1/docs/assets/dokku.png); text-indent: 40px; } .blurb { color: #424242; background-color: #ededed; - background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.12.10/docs/assets/gplaypattern.png); + background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.13.1/docs/assets/gplaypattern.png); padding: 45px 0; text-align: center; } diff --git a/docs/assets/versions.json b/docs/assets/versions.json index dfa36299d..76963588f 100644 --- a/docs/assets/versions.json +++ b/docs/assets/versions.json @@ -9,6 +9,7 @@ "0.9.4", "0.10.5", "0.11.6", - "0.12.10" + "0.12.13", + "0.13.1" ] } diff --git a/docs/configuration/environment-variables.md b/docs/configuration/environment-variables.md index 1eac93ad0..435372e09 100644 --- a/docs/configuration/environment-variables.md +++ b/docs/configuration/environment-variables.md @@ -13,8 +13,9 @@ config:export (|--global) [--envfile] config:keys (|--global) [--merged] Show keys set in environment config:bundle (|--global) [--merged] Bundle environment into tarfile ``` +> For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860). -The variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For security reasons - and as per [docker recommendations](https://github.com/docker/docker/issues/13490) - Dockerfile-based deploys have variables available *only* during runtime, as noted in [this issue](https://github.com/dokku/dokku/issues/1860). +Environment variables are available both at run time and during the application build/compilation step for buildpack-based deploys. For buildpack deploys, Dokku will create a `/app/.env` file that can be used for legacy buildpacks. Note that this is *not* updated when `config:set` or `config:unset` is called, and is only written during a `deploy` or `ps:rebuild`. Developers are encouraged to instead read from the application environment directly, as the proper values will be available then. diff --git a/docs/configuration/nginx.md b/docs/configuration/nginx.md index 091e00ced..e0387b13a 100644 --- a/docs/configuration/nginx.md +++ b/docs/configuration/nginx.md @@ -75,6 +75,16 @@ Your `nginx.conf` file - not to be confused with Dokku's `nginx.conf.sigil` - wo Please adjust the `Procfile` and `nginx.conf` file as appropriate. +## Custom Error Pages + +By default, Dokku provides custom error pages for the following three categories of errors: + +- 4xx: For all non-404 errors with a 4xx response code. +- 404: For "404 Not Found" errors. +- 5xx: For all 5xx error responses + +These are provided as an alternative to the generic Nginx error page, are shared for _all_ applications, and their contents are located on disk at `/var/lib/dokku/data/nginx-vhosts/dokku-errors`. To customize them for a specific app, create a custom `nginx.conf.sigil` as described above and change the paths to point elsewhere. + ## Domains plugin See the [domain configuration documentation](/docs/configuration/domains.md). diff --git a/docs/deployment/application-deployment.md b/docs/deployment/application-deployment.md index 144478833..04165af1d 100644 --- a/docs/deployment/application-deployment.md +++ b/docs/deployment/application-deployment.md @@ -1,5 +1,8 @@ # Deploying to Dokku +> Note: This document uses the hostname `dokku.me` in commands. For your server please +> substitute your server's hostname instead. + ## Deploy tutorial Once Dokku has been configured with at least one user, applications can be deployed via a `git push` command. To quickly see Dokku deployment in action, you can use the Heroku Ruby on Rails example app. @@ -63,6 +66,10 @@ git push dokku master > the upstream with the scheme `ssh://` like so: `ssh://dokku@dokku.me:ruby-rails-sample` > Please see the [Git](https://git-scm.com/docs/git-clone#_git_urls_a_id_urls_a) documentation for more details. +> Note: Your private key should be registered with ssh-agent in local development. If you get a +> permission denied error when pushing you can register your private key by running +> `ssh-add -k ~/`. + ``` Counting objects: 231, done. Delta compression using up to 8 threads. diff --git a/docs/deployment/application-management.md b/docs/deployment/application-management.md index 6fdbaa249..2c5395343 100644 --- a/docs/deployment/application-management.md +++ b/docs/deployment/application-management.md @@ -8,10 +8,11 @@ apps:create # Create a new app apps:destroy # Permanently destroy an app apps:exists # Checks if an app exists apps:list # List your apps -apps:lock # Creates a '.deploy.lock' file in an application's repo +apps:lock # Locks an app for deployment +apps:locked # Checks if an app is locked for deployment apps:rename # Rename an app apps:report [] [] # Display report about an app -apps:unlock # Removes the '.deploy.lock' file from an application's repo +apps:unlock # Unlocks an app for deployment ``` ## Usage @@ -193,10 +194,25 @@ dokku apps:unlock node-js-app ``` ! A deploy may be in progress. - ! Removing the application lock will not stop in progress deploys. + ! Removing the app lock will not stop in progress deploys. -----> Deploy lock removed. ``` +### Checking lock status + +> New as of 0.13.0 + +In some cases, you may wish to inspect the state of an app lock. To do so, you can issue an `apps:lock` command. This will exit non-zero if there is no app lock in place. + + +```shell +dokku apps:locked node-js-app +``` + +``` +Deploy lock does not exist +``` + ### Displaying reports about an app > New as of 0.8.1 diff --git a/docs/deployment/logs.md b/docs/deployment/logs.md index eefb5983c..656e0a858 100644 --- a/docs/deployment/logs.md +++ b/docs/deployment/logs.md @@ -1,19 +1,21 @@ # Log Management ``` -logs # display recent log output +logs [-h] [-t] [-n num] [-q] [-p process] # Display recent log output +logs:failed [] # Shows the last failed deploy logs ``` ## Usage -### Application Logs -You can easily get logs of an application using the `logs` command: +### App Logs + +You can easily get logs of an app using the `logs` command: ```shell dokku logs node-js-app ``` -## Behavioral modifiers +#### Behavioral modifiers Dokku also supports certain command-line arguments that augment the `log` command's behavior. @@ -26,8 +28,25 @@ Dokku also supports certain command-line arguments that augment the `log` comman You can use these modifiers as follows: - ```shell dokku logs node-js-app -t -p web ``` will show logs continually from the web process. + +### Failed Deploy Logs + +> Warning: The default `docker-local` scheduler will "store" these until the next deploy or until the old containers are garbage collected - whichever runs first. If you require the logs beyond this point in time, please ship the logs to a centralized log server. + +In some cases, it may be useful to retrieve the logs from a previously failed deploy. + +You can retrieve these logs by using the `logs:failed` command + +```shell +dokku logs:failed node-js-app +``` + +You can also retrieve the failed logs for each app: + +```shell +dokku logs:failed node-js-app +``` diff --git a/docs/deployment/methods/git.md b/docs/deployment/methods/git.md index 106805c8c..5d301c9ea 100644 --- a/docs/deployment/methods/git.md +++ b/docs/deployment/methods/git.md @@ -51,7 +51,7 @@ dokku git:set --global deploy-branch SOME_BRANCH_NAME dokku git:set node-js-app deploy-branch SOME_BRANCH_NAME ``` -Pushing multiple branches can also be supportec by creating a [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin. +Pushing multiple branches can also be supported by creating a [receive-branch](/docs/development/plugin-triggers.md#receive-branch) plugin trigger in a custom plugin. ### Configuring the GIT_REV Environment Variable diff --git a/docs/deployment/process-management.md b/docs/deployment/process-management.md index b11a919cc..6a62317d0 100644 --- a/docs/deployment/process-management.md +++ b/docs/deployment/process-management.md @@ -4,6 +4,7 @@ ``` ps # List processes running in app container(s) +ps:inspect # Displays a sanitized version of docker inspect for an app ps:rebuild # Rebuild an app from source ps:rebuildall # Rebuild all apps from source ps:report [] [] # Displays a process report for one or more apps @@ -32,6 +33,18 @@ To find out if your application's containers are running the commands you expect dokku ps node-js-app ``` +### Inspecting app containers + +> New as of 0.13.0 + +A common administrative task to perform is calling `docker inspect` on the containers that are running for an application. This can be an error-prone task to perform, and may also reveal sensitive environment variables if not done correctly. Dokku provides a wrapper around this command via the `ps:inspect` subcommand: + +```shell +dokku ps:inspect node-js-app +``` + +This command will gather all the running container IDs for your application and call `docker inspect`, sanitizing the output data so it can be copy-pasted elsewhere safely. + ### Rebuilding applications There are some Dokku commands which will not automatically rebuild an application's environment, or which can be told to skip a rebuild. For instance, you may wish to run multiple `config:set` commands without a restart so as to speed up configuration. In these cases, you can ultimately trigger an application rebuild using `ps:rebuild` diff --git a/docs/development/plugin-triggers.md b/docs/development/plugin-triggers.md index c655ca3c3..6bf29a48f 100644 --- a/docs/development/plugin-triggers.md +++ b/docs/development/plugin-triggers.md @@ -373,6 +373,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # TODO ``` +### `network-clear-config` + +- Description: Clears network configuration +- Invoked by: `internally triggered by proxy-clear-config within proxy implementations` +- Arguments: `$APP` +- Example: + +```shell +#!/usr/bin/env bash + +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x + +# TODO +``` + ### `network-compute-ports` - Description: Computes the ports for a given app container @@ -1040,6 +1055,21 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x # TODO ``` +### `proxy-clear-config` + +- Description: Clears the proxy implementation configuration for a given app +- Invoked by: `internally triggered by apps:rename` +- Arguments: `$APP` +- Example: + +```shell +#!/usr/bin/env bash + +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x + +# TODO +``` + ### `proxy-enable` - Description: Enables the configured proxy implementation for an app @@ -1147,9 +1177,12 @@ APP="$1"; ### `scheduler-deploy` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when an app is deployed - Invoked by: `dokku deploy` -- Arguments: `$DOKKU_SCHEDULER APP IMAGE_TAG` +- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_TAG` - Example: ```shell @@ -1163,9 +1196,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; IMAGE_TAG="$3"; ### `scheduler-docker-cleanup` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when dokku cleanup is invoked - Invoked by: `dokku deploy, dokku cleanup` -- Arguments: `$DOKKU_SCHEDULER APP FORCE_CLEANUP` +- Arguments: `$DOKKU_SCHEDULER $APP $FORCE_CLEANUP` - Example: ```shell @@ -1177,11 +1213,52 @@ DOKKU_SCHEDULER="$1"; APP="$2"; FORCE_CLEANUP="$3"; # TODO ``` +### `scheduler-inspect` + +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + +- Description: Allows you to run inspect commands for all containers for a given app +- Invoked by: `dokku ps:inspect` +- Arguments: `$DOKKU_SCHEDULER $APP` +- Example: + +```shell +#!/usr/bin/env bash + +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +DOKKU_SCHEDULER="$1"; APP="$2"; + +# TODO +``` + +### `scheduler-logs-failed` + +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + +- Description: Allows you to run scheduler commands when retrieving failed container logs +- Invoked by: `dokku logs:failed` +- Arguments: `$DOKKU_SCHEDULER $APP` +- Example: + +```shell +#!/usr/bin/env bash + +set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x +DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}"; + +# TODO +``` + ### `scheduler-run` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when a command is executed for your app - Invoked by: `dokku run` -- Arguments: `$DOKKU_SCHEDULER APP ...ARGS` +- Arguments: `$DOKKU_SCHEDULER $APP ...ARGS` - Example: ```shell @@ -1195,9 +1272,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; ARGS="${@:3}"; ### `scheduler-stop` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when a tag is destroyed - Invoked by: `dokku apps:destroy, dokku ps:stop` -- Arguments: `$DOKKU_SCHEDULER APP REMOVE_CONTAINERS` +- Arguments: `$DOKKU_SCHEDULER $APP $REMOVE_CONTAINERS` - Example: ```shell @@ -1211,9 +1291,12 @@ DOKKU_SCHEDULER="$1"; APP="$2"; REMOVE_CONTAINERS="$3"; ### `scheduler-tags-create` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when a tag is created - Invoked by: `dokku tags:create` -- Arguments: `$DOKKU_SCHEDULER APP SOURCE_IMAGE TARGET_IMAGE` +- Arguments: `$DOKKU_SCHEDULER $APP $SOURCE_IMAGE $TARGET_IMAGE` - Example: ```shell @@ -1227,9 +1310,12 @@ DOKKU_SCHEDULER="$1" APP="$2" SOURCE_IMAGE="$3" TARGET_IMAGE="$4" ### `scheduler-tags-destroy` +> Warning: The scheduler plugin trigger apis are under development and may change +> between minor releases until the 1.0 release. + - Description: Allows you to run scheduler commands when a tag is destroyed - Invoked by: `dokku tags:destroy` -- Arguments: `$DOKKU_SCHEDULER APP IMAGE_REPO IMAGE_TAG` +- Arguments: `$DOKKU_SCHEDULER $APP $IMAGE_REPO $IMAGE_TAG` - Example: ```shell diff --git a/docs/development/release-process.md b/docs/development/release-process.md index 079048eaf..f21d59abd 100644 --- a/docs/development/release-process.md +++ b/docs/development/release-process.md @@ -30,7 +30,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.12.10-2 (Mon Feb 22 23:20:37 CET 2016)" +# wait for "==> build-arch: ==> Finished making: dokku 0.13.1-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' diff --git a/docs/getting-started/advanced-installation.md b/docs/getting-started/advanced-installation.md index 9effe46b5..42c951c82 100644 --- a/docs/getting-started/advanced-installation.md +++ b/docs/getting-started/advanced-installation.md @@ -62,7 +62,7 @@ Follow the [user management documentation](/docs/deployment/user-management.md) ## VMs with less than 1GB of memory -Having less than 1GB of system memory available for Dokku and its containers, for example Digital Ocean's small 512MB machines, might result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). +Having less than 1GB of system memory available for Dokku and its containers may result in unexpected errors, such as **! [remote rejected] master -> master (pre-receive hook declined)** during installation of NPM dependencies (https://github.com/npm/npm/issues/3867). To work around this issue, it might suffice to augment the linux swap file size to a maximum of twice the physical memory size. @@ -80,4 +80,5 @@ free echo "/var/swap.img none swap sw 0 0" >> /etc/fstab ``` -Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps + +[Reference](https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps) diff --git a/docs/getting-started/install/debian.md b/docs/getting-started/install/debian.md index 4282d12c3..d902180ce 100644 --- a/docs/getting-started/install/debian.md +++ b/docs/getting-started/install/debian.md @@ -41,3 +41,4 @@ After setting the desired options, proceed with the installation as described ab | dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy | | dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: Setting this to true, will require you to manually add an SSH key later on. | | dokku/key_file | string | /root/.ssh/id_rsa.pub | Path on disk to an SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) | +| dokku/nginx_enable | boolean | true | Enable nginx-vhosts plugin | diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 124e8ff5c..760757789 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -21,8 +21,8 @@ To install the latest stable version of dokku, you can run the following shell c ```shell # for debian systems, installs Dokku via apt-get -wget https://raw.githubusercontent.com/dokku/dokku/v0.12.10/bootstrap.sh; -sudo DOKKU_TAG=v0.12.10 bash bootstrap.sh +wget https://raw.githubusercontent.com/dokku/dokku/v0.13.1/bootstrap.sh; +sudo DOKKU_TAG=v0.13.1 bash bootstrap.sh ``` The installation process takes about 5-10 minutes, depending upon internet connection speed. diff --git a/docs/home.html b/docs/home.html index 79b8b7cb9..b9083befa 100644 --- a/docs/home.html +++ b/docs/home.html @@ -10,30 +10,30 @@ Dokku - The smallest PaaS implementation you've ever seen - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - + @@ -98,12 +98,12 @@

$ - wget https://raw.githubusercontent.com/dokku/dokku/v0.12.10/bootstrap.sh + wget https://raw.githubusercontent.com/dokku/dokku/v0.13.1/bootstrap.sh

$ - sudo DOKKU_TAG=v0.12.10 bash bootstrap.sh + sudo DOKKU_TAG=v0.13.1 bash bootstrap.sh

 # go to your server's IP and follow the web installer @@ -269,7 +269,7 @@

-

© 2013-2017 Dokku

+

© 2013-2018 Dokku

- +