Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b930ed9600 | ||
|
|
5a8a4fe75c | ||
|
|
4f17e0fa04 | ||
|
|
60a44c88af | ||
|
|
edd7c3c248 | ||
|
|
6f04d84b59 | ||
|
|
926a752e31 | ||
|
|
cc05a64fbe | ||
|
|
159e6e8c98 | ||
|
|
080b7b98bd | ||
|
|
c16e75197f | ||
|
|
828404c285 | ||
|
|
5983a1e673 | ||
|
|
12360639bb | ||
|
|
f01afb541d | ||
|
|
1d08888234 | ||
|
|
e61f55671c | ||
|
|
53fac6d5dd | ||
|
|
1cbdde748e | ||
|
|
cb9c5b6988 | ||
|
|
124e331e52 | ||
|
|
117bb9ea96 | ||
|
|
1f1efe97e1 | ||
|
|
b2fac23d58 | ||
|
|
2474c87bbd | ||
|
|
115b939071 | ||
|
|
9dfeb16329 | ||
|
|
b3b1f12e69 | ||
|
|
372802f834 | ||
|
|
be3574136b | ||
|
|
8ffbbffb53 | ||
|
|
2732dda770 | ||
|
|
de550094da | ||
|
|
0d4560177a | ||
|
|
c93396aff9 | ||
|
|
85bdeaf47a | ||
|
|
a441a7ac00 | ||
|
|
9093827424 | ||
|
|
9d387fd666 | ||
|
|
81f444c807 | ||
|
|
a269f8e003 | ||
|
|
514ebf4d84 | ||
|
|
5337a3a479 | ||
|
|
f4f2c1e4db | ||
|
|
002e3b457d | ||
|
|
714da78df6 | ||
|
|
3de1c73592 | ||
|
|
920c4d5011 | ||
|
|
c6776c5e49 | ||
|
|
d9e90f0128 | ||
|
|
fa6084786b | ||
|
|
cab258d75a | ||
|
|
002bc3d80e | ||
|
|
ce04cb14ac | ||
|
|
2a62763cc1 | ||
|
|
d743a27de8 | ||
|
|
93d42c0aa8 | ||
|
|
391dc39e95 | ||
|
|
b2fd5676eb | ||
|
|
4a74156e88 | ||
|
|
01d65fccdd | ||
|
|
fb2c7af9e1 | ||
|
|
9aef528edc | ||
|
|
c8405ddf34 | ||
|
|
d2854b9e90 | ||
|
|
2d0374ec52 | ||
|
|
283ed52520 | ||
|
|
0c5123410b | ||
|
|
9b28d80e95 | ||
|
|
fc452e90d4 | ||
|
|
bdc3353a5c | ||
|
|
fa9c09ee7d | ||
|
|
f58ae52886 | ||
|
|
43e3c51f3f | ||
|
|
371949f4ec | ||
|
|
164f48913f | ||
|
|
6286962c5c | ||
|
|
0ae459a933 | ||
|
|
64c5a24919 | ||
|
|
72f1a85459 | ||
|
|
3dccf814e8 | ||
|
|
b10de90682 | ||
|
|
905b3028b4 | ||
|
|
0c62804b1d | ||
|
|
6f6f2b6f9a | ||
|
|
7848ab2a8c | ||
|
|
c940b7f979 | ||
|
|
3ae6b3f1a8 | ||
|
|
35947100b8 | ||
|
|
29847b7ab6 | ||
|
|
f623a0a8bf | ||
|
|
a05792b363 | ||
|
|
b615e55ec5 | ||
|
|
388642e388 | ||
|
|
edc0961e19 | ||
|
|
8c7a031061 | ||
|
|
a45da81396 | ||
|
|
900943a1b6 | ||
|
|
49b48a6828 | ||
|
|
a4b2447c85 | ||
|
|
a9617f23ce | ||
|
|
2e9b1c9bd6 | ||
|
|
24aef3781e | ||
|
|
47db01550f | ||
|
|
ef5a0a3524 | ||
|
|
39ab116bac | ||
|
|
b26da8e3a5 | ||
|
|
4c976d8097 | ||
|
|
04ec0ff5c4 | ||
|
|
866e55d436 | ||
|
|
50060df55c | ||
|
|
3dc4724e60 | ||
|
|
d24031ab49 | ||
|
|
d69fa55b7d | ||
|
|
55747cfea8 | ||
|
|
59c9207797 | ||
|
|
b4481cfd3a | ||
|
|
d21f5811d1 | ||
|
|
4bf29f276a | ||
|
|
7eba7bf722 | ||
|
|
7f0ac9bbee | ||
|
|
7e4dea82f5 | ||
|
|
1b690d4d49 | ||
|
|
10e05635a7 | ||
|
|
4625db771e |
@@ -11,6 +11,7 @@ several ways to help out:
|
||||
* Contribute to the [documentation](http://dokku.viewdocs.io/dokku/)
|
||||
* Come up with new ways to show off our [lovely logo](https://avatars1.githubusercontent.com/u/13455795)
|
||||
* Blog about different ways you are using dokku
|
||||
* [Sponsor](https://opencollective.com/dokku#support) the Dokku project financially
|
||||
|
||||
There are a few guidelines that we need contributors to follow so that we have
|
||||
a chance of keeping on top of things.
|
||||
|
||||
59
HISTORY.md
@@ -1,5 +1,64 @@
|
||||
# History
|
||||
|
||||
## 0.7.0
|
||||
|
||||
Another great minor release! There are no known backwards incompatibilities with this release, though the following may be of interest to our users:
|
||||
|
||||
- #2316 #2326: Support for setting the correct user/group permissions on files stored in persistent storage
|
||||
- #2290: Container restart policy support in the core
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2302: @u2mejc Fix is_valid_hostname regex
|
||||
- #2331: @josegonzalez Fix repo plugin version
|
||||
- #2334: @josegonzalez Cleanup image retrieval
|
||||
- #2332: @josegonzalez Properly handle non-deployed applications during apps:rename
|
||||
|
||||
### New Features
|
||||
|
||||
- #2316: @michaelshobbs Use default privileged user in herokuish-0.3.17
|
||||
- #2335: @xtian Update herokuish to 0.3.18
|
||||
- #2317: @josegonzalez Properly remap http port 80 mappings to https 443 when adding an ssl certificate
|
||||
- #2290: @josegonzalez Implement restart-policy handling
|
||||
- #2287: @u2mejc Add ssh-keys core plugin
|
||||
- #2283: @xadh00m Add support for multiple global domains
|
||||
- #2277: @josegonzalez Add support for config values with double-quotes
|
||||
- #2273: @josegonzalez Add the ability to manually execute checks against an application
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2308: @josegonzalez Clarify that nginx.conf.sigil is only extracted from repo root for buildpack applications
|
||||
- #2314: @dm-wyncode Add flags to apt-get command in unattended docs so that the installation is truly unattended
|
||||
- #2315: @smaffulli Adding DreamHost Cloud installation with cloud-init
|
||||
- #2325: @fanminjian Update to without -qq for proper Grub prompt.
|
||||
- #2326: @josegonzalez Document the user and group id to use for persistent storage permissions
|
||||
- #2336: @josegonzalez Clarify documentation
|
||||
|
||||
## 0.6.5
|
||||
|
||||
This was a big documentation release with a minor bugfix to the `app.json` functionality introduced in 0.5.0.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #2301: @michaelshobbs Fix app.json extraction in dockerfile apps not using /app
|
||||
|
||||
### New Features
|
||||
|
||||
- #2297: @josegonzalez Add plugin trigger to override the image repository
|
||||
|
||||
### Documentation
|
||||
|
||||
- #2296: @josegonzalez Add an example plugin trigger for cache busting Dockerfile builds
|
||||
- #2295: @josegonzalez Add documentation for the apps, repo, and tar plugin
|
||||
- #2292: @josegonzalez General documentation cleanup
|
||||
- #2291: @josegonzalez Clean up documentation surrounding persistent storage
|
||||
- #2289: @PeterDaveHello Optimize png images using zopflipng
|
||||
- #2282: @prodicus Fixed link to sponsors doc
|
||||
|
||||
## 0.6.4
|
||||
|
||||
Included in this release are a couple of bug fixes for existing features.
|
||||
|
||||
2
Makefile
@@ -1,6 +1,6 @@
|
||||
DOKKU_VERSION = master
|
||||
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.4.0/sshcommand
|
||||
SSHCOMMAND_URL ?= https://raw.githubusercontent.com/dokku/sshcommand/v0.5.0/sshcommand
|
||||
PLUGN_URL ?= https://github.com/dokku/plugn/releases/download/v0.2.1/plugn_0.2.1_linux_x86_64.tgz
|
||||
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
|
||||
|
||||
14
README.md
@@ -1,4 +1,4 @@
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://webchat.freenode.net/?channels=dokku) [](https://glider-slackin.herokuapp.com/) [](http://dokku.viewdocs.io/dokku/)
|
||||
# Dokku [](https://circleci.com/gh/dokku/dokku/tree/master) [](https://packagecloud.io/dokku/dokku) [](https://aur.archlinux.org/packages/dokku/) [](https://webchat.freenode.net/?channels=dokku) [](https://glider-slackin.herokuapp.com/) [](http://dokku.viewdocs.io/dokku/)
|
||||
[](#sponsors)
|
||||
[](#backers)
|
||||
[](https://gratipay.com/dokku/)
|
||||
@@ -13,12 +13,12 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen.
|
||||
|
||||
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.6.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.6.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/upgrading) from an older version of Dokku.
|
||||
[View the docs for upgrading](http://dokku.viewdocs.io/dokku/getting-started/upgrading/) from an older version of Dokku.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -26,17 +26,17 @@ Full documentation - including advanced installation docs - are available online
|
||||
|
||||
## Support
|
||||
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/troubleshooting) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
You can use [Github Issues](https://github.com/dokku/dokku/issues), check [Troubleshooting](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) in the documentation, or join us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku)
|
||||
|
||||
## Contribution
|
||||
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/troubleshooting) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
After checking [Github Issues](https://github.com/dokku/dokku/issues), the [Troubleshooting Guide](http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/) or having a chat with us on [freenode in #dokku](https://webchat.freenode.net/?channels=%23dokku), feel free to fork and create a Pull Request.
|
||||
|
||||
While we may not merge your PR as is, they serve to start conversations and improve the general dokku experience for all users.
|
||||
|
||||
## Sponsors
|
||||
|
||||
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS) file.
|
||||
See our list of past sponsors in the [SPONSORS](https://github.com/dokku/dokku/blob/master/SPONSORS.md) 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)]
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.6.4'
|
||||
VERSION = 'v0.7.0'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
@@ -218,7 +218,7 @@ PAGE = """
|
||||
$.post('/setup', data)
|
||||
.done(function() {
|
||||
$("#result").html("Success!")
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/application-deployment";
|
||||
window.location.href = "http://progrium.viewdocs.io/dokku/deployment/application-deployment/";
|
||||
})
|
||||
.fail(function(data) {
|
||||
$("#result").html("Something went wrong...")
|
||||
|
||||
6
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.3.13
|
||||
HEROKUISH_VERSION ?= 0.3.18
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -26,7 +26,7 @@ Simplifies running a single command over SSH, and
|
||||
manages authorized keys (ACL) and users in order to do so.
|
||||
endef
|
||||
SSHCOMMAND_REPO_NAME ?= dokku/sshcommand
|
||||
SSHCOMMAND_VERSION ?= 0.4.0
|
||||
SSHCOMMAND_VERSION ?= 0.5.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
|
||||
@@ -95,7 +95,7 @@ deb-herokuish:
|
||||
@echo "sudo docker build -t gliderlabs/herokuish /var/lib/herokuish 1> /dev/null" >> /tmp/tmp/post-install
|
||||
|
||||
@echo "-> Cloning repository"
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" /tmp/tmp/herokuish > /dev/null
|
||||
git clone -q "https://github.com/$(HEROKUISH_REPO_NAME).git" --branch "v$(HEROKUISH_VERSION)" /tmp/tmp/herokuish > /dev/null
|
||||
rm -rf /tmp/tmp/herokuish/.git /tmp/tmp/herokuish/.gitignore
|
||||
|
||||
@echo "-> Copying files into place"
|
||||
|
||||
2
debian/control
vendored
@@ -1,5 +1,5 @@
|
||||
Package: dokku
|
||||
Version: 0.6.4
|
||||
Version: 0.7.0
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
|
||||
40
docs/advanced-usage/backup-recovery.md
Normal file
@@ -0,0 +1,40 @@
|
||||
# Backup and Recovery
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the dokku remote in you local app's repo.
|
||||
|
||||
```shell
|
||||
git remote rm dokku
|
||||
git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
Some plugins, like the official [dokku-postgres](https://github.com/dokku/dokku-postgres) plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
For [dokku-postgres](https://github.com/dokku/dokku-postgres), use:
|
||||
|
||||
```shell
|
||||
dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb](https://devcenter.heroku.com/articles/slug-compiler#slug-size) limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
See the [persistent storage documentation](/dokku/advanced-usage/persistent-storage/) for more details.
|
||||
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote dokku server (assuming you still have the ssh key).
|
||||
|
||||
```shell
|
||||
mkdir [app-name] ; cd !$
|
||||
git init && git remote add dokku dokku@[dokku.me:app-name]
|
||||
git pull dokku/master && git checkout dokku/master
|
||||
```
|
||||
@@ -11,14 +11,15 @@ Common use cases include:
|
||||
|
||||
## `app.json` and `scripts.dokku`
|
||||
|
||||
Dokku accomplishes this by using an `app.json` file. We (mostly) use the same format as Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
|
||||
Dokku accomplishes this by using an `app.json` file. The format in use is similar to format of Heroku's [app.json](https://devcenter.heroku.com/articles/app-json-schema).
|
||||
However, dokku currently only supports the nodes `scripts.dokku.predeploy` and `scripts.dokku.postdeploy`.
|
||||
Simply place an `app.json` file in the root of your repository or for dockerfile apps, `ADD` it to /app.
|
||||
For buildpack apps, simply place an `app.json` file in the root of your repository.
|
||||
For dockerfile apps, place `app.json` in the configured `WORKDIR` directory; otherwise dokku defaults to the buildpack app behavior of looking in `/app`.
|
||||
>NOTE: postdeploy changes are *NOT* committed to the app image.
|
||||
|
||||
### Example app.json
|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"name": "barebones nodejs",
|
||||
"description": "A barebones Node.js app using Express 4.",
|
||||
@@ -5,14 +5,14 @@
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
docker-options <app> [phase(s)] Display app's Docker options for all phases (or comma separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION Add Docker option to app for phase (comma-separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION Remove Docker option from app for phase (comma-separated phase list)
|
||||
docker-options <app> [phase(s)] # Display app's Docker options for all phases (or comma separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION # Add Docker option to app for phase (comma-separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION # Remove Docker option from app for phase (comma-separated phase list)
|
||||
```
|
||||
|
||||
> When specifying multiple phases, they **must** be comma-separated _without_ spaces in between each phase, like so:
|
||||
>
|
||||
> ```
|
||||
> ```shell
|
||||
> dokku docker-options:add myapp deploy,run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
> ```
|
||||
|
||||
@@ -28,7 +28,7 @@ Dokku deploys your application in multiple "phases" and the `docker-options` plu
|
||||
|
||||
### Add Docker options
|
||||
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](deployment/one-off-processes/):
|
||||
Add some options for the deployed/running app and when executing [`dokku run`](/dokku/deployment/one-off-processes/):
|
||||
|
||||
```shell
|
||||
# Mount a host volume in a Docker container: "-v /host/path:/container/path"
|
||||
@@ -42,10 +42,13 @@ dokku docker-options:add myapp run "-v /home/dokku/logs/myapp:/app/logs"
|
||||
|
||||
```shell
|
||||
dokku docker-options myapp
|
||||
# Deploy options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
# Run options:
|
||||
# -v /home/dokku/logs/myapp:/app/logs
|
||||
```
|
||||
|
||||
```
|
||||
Deploy options:
|
||||
-v /home/dokku/logs/myapp:/app/logs
|
||||
Run options:
|
||||
-v /home/dokku/logs/myapp:/app/logs
|
||||
```
|
||||
|
||||
### Remove a Docker option
|
||||
@@ -5,22 +5,29 @@
|
||||
Docker provides an _events_ command to show system's real time events. Likewise, Dokku can record events as syslog entries and also provides a plugin to display the last ones.
|
||||
|
||||
```
|
||||
events [-t] Show the last events (-t follows)
|
||||
events:list List logged events
|
||||
events:on Enable events logger
|
||||
events:off Disable events logger
|
||||
events [-t] # Show the last events (-t follows)
|
||||
events:list # List logged events
|
||||
events:on # Enable events logger
|
||||
events:off # Disable events logger
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Enable the plugin:
|
||||
|
||||
```shell
|
||||
dokku events:on
|
||||
```
|
||||
|
||||
```
|
||||
$ dokku events:on
|
||||
Enabling dokku events logger
|
||||
```
|
||||
|
||||
Dokku will then write log entries to ``/var/log/syslog`` as well as a Dokku-specific logs sub-directory ``/var/log/dokku/events.log``, which can be easily displayed with the command `dokku events`:
|
||||
Dokku will then write log entries to `/var/log/syslog` as well as a Dokku-specific logs sub-directory `/var/log/dokku/events.log`, which can be easily displayed with the command `dokku events`:
|
||||
|
||||
```shell
|
||||
dokku events
|
||||
```
|
||||
|
||||
```
|
||||
Jul 3 16:09:48 dokku.me dokku[127630]: INVOKED: pre-release-buildpack( pythonapp )
|
||||
@@ -42,6 +49,11 @@ Jul 3 16:30:02 dokku.me dokku[131384]: INVOKED: docker-args-run( rubyapp )
|
||||
```
|
||||
|
||||
You can list all events that are currently being recorded via `dokku events:list`:
|
||||
|
||||
```shell
|
||||
dokku events:list
|
||||
```
|
||||
|
||||
```
|
||||
=====> Events currently logged
|
||||
docker-args-build
|
||||
@@ -1,14 +1,14 @@
|
||||
# Dokku Core Storage Plugin
|
||||
# Persistent Storage
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
The preferred method to mount external containers to a dokku managed container, is to use the dokku storage plugin.
|
||||
|
||||
|
||||
```shell
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
storage:list <app> # List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir> # Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir> # Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Ideology and Background
|
||||
@@ -18,10 +18,30 @@ The storage plugin requires explicit paths on the host side. This is intentional
|
||||
## Usage
|
||||
|
||||
This example demonstrates how to mount the recommended directory to `/storage` inside the container:
|
||||
|
||||
```shell
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
```
|
||||
$ dokku storage:mount app-name /var/lib/dokku/data/storage:/storage
|
||||
|
||||
Dokku will then mount the shared contents of `/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
A more complete workflow may require making a custom directory for your application and mounting it within your `/app/storage` directory instead. The mount point is *not* relative to your application's working directory, and is instead relative to the root of the container.
|
||||
|
||||
```shell
|
||||
# creating storage for the app 'ruby-rails-sample'
|
||||
mkdir -p /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# ensure the proper user has access to this directory
|
||||
chown -R dokku:dokku /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# as of 0.7.x, you should chown using the `32767` user and group id
|
||||
chown -R 32767:32767 /var/lib/dokku/data/storage/ruby-rails-sample
|
||||
|
||||
# mount the directory into your container's /app/storage directory, relative to root
|
||||
dokku storage:mount app-name /var/lib/dokku/data/storage/app-name:/app/storage
|
||||
```
|
||||
Dokku will then mount the shared contents of`/var/lib/dokku/data/storage` to `/storage` inside the container.
|
||||
|
||||
You can mount one or more directories as desired by following the above pattern.
|
||||
|
||||
## Use Cases
|
||||
|
||||
@@ -44,8 +64,9 @@ Your app may have services that are running in memory and need to be backed up l
|
||||
### Build phase
|
||||
|
||||
By default, dokku will only bind storage mounts during the deploy and run phases. Under certain conditions, one might want to bind a storage mount during the build phase. This can be accomplished by using the `docker-options` plugin directly.
|
||||
```
|
||||
$ dokku docker-options:add <app> "-v /tmp/python-test:/opt/test"
|
||||
|
||||
```shell
|
||||
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.
|
||||
@@ -1,16 +1,16 @@
|
||||
# Proxy plugin
|
||||
# Proxy Management
|
||||
|
||||
> New as of 0.5.0, Enhanced in 0.6.0
|
||||
|
||||
```
|
||||
proxy <app> Show proxy settings for app
|
||||
proxy:disable <app> Disable proxy for app
|
||||
proxy:enable <app> Enable proxy for app
|
||||
proxy:ports <app> List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] Set proxy port mappings for app
|
||||
proxy:ports-clear <app> Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] Unset proxy port mappings for app
|
||||
proxy:set <app> <proxy-type> Set proxy type for app
|
||||
proxy <app> # Show proxy settings for app
|
||||
proxy:disable <app> # Disable proxy for app
|
||||
proxy:enable <app> # Enable proxy for app
|
||||
proxy:ports <app> # List proxy port mappings for app
|
||||
proxy:ports-add <app> <scheme>:<host-port>:<container-port> [<scheme>:<host-port>:<container-port>...] # Set proxy port mappings for app
|
||||
proxy:ports-clear <app> # Clear all proxy port mappings for app
|
||||
proxy:ports-remove <app> <host-port> [<host-port>|<scheme>:<host-port>:<container-port>...] # Unset proxy port mappings for app
|
||||
proxy:set <app> <proxy-type> # Set proxy type for app
|
||||
```
|
||||
|
||||
In Dokku 0.5.0, port proxying was decoupled from the `nginx-vhosts` plugin into the proxy plugin. Dokku 0.6.0 introduced the ability to map host ports to specific container ports. In the future this will allow other proxy software - such as HAProxy or Caddy - to be used in place of nginx.
|
||||
@@ -23,21 +23,37 @@ By default, the deployed docker container running your app's web process will bi
|
||||
|
||||
> If a proxy is disabled, dokku will bind your container's port to a random port on the host for every deploy, e.g. `0.0.0.0:32771->5000/tcp`.
|
||||
|
||||
By way of example, in the default case, each container is bound to the docker interface:
|
||||
|
||||
```shell
|
||||
# container bound to docker interface
|
||||
$ docker ps
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
1b88d8aec3d1 dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute node-js-app.web.1
|
||||
```
|
||||
|
||||
# internal IP address for the container
|
||||
$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
|
||||
As such, the container's IP address will be an internal IP, and thus it is only accessible on the host itself:
|
||||
|
||||
```
|
||||
docker inspect --format '{{ .NetworkSettings.IPAddress }}' node-js-app.web.1
|
||||
```
|
||||
|
||||
```
|
||||
172.17.0.6
|
||||
```
|
||||
|
||||
# disable the proxy so it listens on a host ip address
|
||||
$ dokku proxy:disable node-js-app
|
||||
However, you can disable the internal proxying via the `proxy:disable` command so that it will listen on the host's IP address:
|
||||
|
||||
```shell
|
||||
dokku proxy:disable node-js-app
|
||||
|
||||
# container bound to all interfaces
|
||||
$ docker ps
|
||||
docker ps
|
||||
```
|
||||
|
||||
```
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp node-js-app.web.1
|
||||
```
|
||||
@@ -48,33 +64,79 @@ d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a mi
|
||||
|
||||
You can now configure `host -> container` port mappings with the `proxy:ports-*` commands. This mapping is currently supported by the built-in nginx-vhosts plugin.
|
||||
|
||||
To inspect the port mapping for a given application, use the `proxy:ports` command:
|
||||
|
||||
```shell
|
||||
$ dokku proxy:ports node-js-app
|
||||
dokku proxy:ports node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
-----> Port mappings for node-js-app
|
||||
-----> scheme host port container port
|
||||
http 80 5000
|
||||
```
|
||||
|
||||
$ curl http://node-js-app.dokku.me
|
||||
The above application is listening on the host's port `80`, which we can test via curl:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
$ curl http://node-js-app.dokku.me:8080
|
||||
There are cases where we may wish for the service to be listening on more than one port, such as port 8080. Normally, this would not be possible:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
curl: (7) Failed to connect to node-js-app.dokku.me port 8080: Connection refused
|
||||
```
|
||||
|
||||
$ dokku proxy:ports-add node-js-app http:8080:5000
|
||||
However, we can use the `proxy:ports-add` command to add a second external port mapping - `8080` - to our application's port `5000`.
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-add node-js-app http:8080:5000
|
||||
```
|
||||
|
||||
```
|
||||
-----> Setting config vars
|
||||
DOKKU_PROXY_PORT_MAP: http:80:5000 http:8080:5000
|
||||
-----> Configuring node-js-app.dokku.me...(using built-in template)
|
||||
-----> Creating http nginx.conf
|
||||
-----> Running nginx-pre-reload
|
||||
Reloading nginx
|
||||
```
|
||||
|
||||
$ curl http://node-js-app.dokku.me
|
||||
Hello World!
|
||||
We can now test that port 80 still responds properly:
|
||||
|
||||
$ curl http://node-js-app.dokku.me:8080
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
And our new listening port of `8080` also works:
|
||||
|
||||
```shell
|
||||
curl http://node-js-app.dokku.me:8080
|
||||
```
|
||||
|
||||
```
|
||||
Hello World!
|
||||
```
|
||||
|
||||
You can also remove a port mapping that is no longer necessary:
|
||||
|
||||
```shell
|
||||
dokku proxy:ports-remove node-js-app http:80:5000
|
||||
```
|
||||
|
||||
By default, buildpack apps and dockerfile apps **without** explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on port `80` (and additionally a listener on 443 if ssl is enabled) that will proxy to the application container on port `5000`. Dockerfile apps **with** explicitly exposed ports will be configured with a listener on each exposed port and will proxy to that same port of the deployed application container.
|
||||
|
||||
> NOTE: This default behavior **will not** be automatically changed on subsequent pushes and must be manipulated with the `proxy:ports-*` syntax detailed above.
|
||||
34
docs/advanced-usage/repository-management.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Repository Management
|
||||
|
||||
> New as of 0.6.0
|
||||
|
||||
```
|
||||
repo:gc <app> # Runs 'git gc --agressive' against the application's repo
|
||||
repo:purge-cache <app> # Deletes the contents of the build cache stored in the repository
|
||||
```
|
||||
|
||||
The repository plugin is meant to allow users to perform management commands against a repository.
|
||||
|
||||
## Git Garbage Collection
|
||||
|
||||
This will run a git gc --agressive against the applications repo. This is performed on the Dokku host, and not within an application container.
|
||||
|
||||
```shell
|
||||
dokku repo:gc node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Counting objects: 396, done.
|
||||
Delta compression using up to 2 threads.
|
||||
Compressing objects: 100% (365/365), done.
|
||||
Writing objects: 100% (396/396), done.
|
||||
Total 396 (delta 79), reused 315 (delta 0)
|
||||
```
|
||||
|
||||
## Clearing Application cache
|
||||
|
||||
Building containers with buildpacks currently results in a persistent `cache` directory between deploys. If you need to clear this cache directory for any reason, you may do so by running the following shell command:
|
||||
|
||||
```shell
|
||||
dokku repo:purge-cache node-js-app
|
||||
```
|
||||
@@ -5,11 +5,11 @@
|
||||
- The nginx-vhosts template language is now [sigil](https://github.com/gliderlabs/sigil)
|
||||
- No need to escape literal `$` characters (or other "bash-isms")
|
||||
- Template variables are represented as {{ .VARIABLE_NAME }}
|
||||
- A detailed list of template variables can be found [here](/dokku/nginx#available-template-variables)
|
||||
- A detailed list of template variables can be found [here](/dokku/configuration/nginx/#available-template-variables)
|
||||
- A custom nginx-vhosts template must be named `nginx.conf.sigil`
|
||||
- The default path for this custom template is the root of your repo (i.e. `/app` in the container or `WORKDIR` if defined in a dockerfile app)
|
||||
- Dokku no longer looks for this file in `/home/dokku/myapp` on the dokku server
|
||||
- Check out an example template [here](/dokku/nginx/)
|
||||
- Check out an example template [here](/dokku/configuration/nginx/)
|
||||
- Support for server-wide SSL certs have been dropped in favor of using the `certs` plugin
|
||||
- `dokku certs:add myapp < certs.tar`
|
||||
- All domains for an SSL-enabled app will be redirected to https by default
|
||||
@@ -20,6 +20,6 @@
|
||||
|
||||
## Dockerfile apps with exposed ports
|
||||
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/dockerfiles/#exposed-ports)
|
||||
- Dockerfiles with `EXPOSE` clauses will get [all **tcp** ports proxied by default](/dokku/deployment/methods/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`
|
||||
- UDP ports can be exposed by disabling the [nginx proxy](/dokku/advanced-usage/proxy-management/) with `dokku proxy:disable myapp`
|
||||
|
||||
@@ -7,26 +7,26 @@
|
||||
- `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
|
||||
- See the [updated `checks`](/dokku/deployment/zero-downtime-deploys/) 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.
|
||||
- The UI is handled by the [proxy](/dokku/advanced-usage/proxy-management/) interface plugin by setting the `DOKKU_PROXY_PORT_MAP` config variable in the format of `scheme:host-port:container-port`. The default `nginx-vhosts` proxy plugin supports both the `http` and `https` schemes.
|
||||
- Default port mappings
|
||||
- buildpack apps will be set to `http:80:5000` and will also include `https:443:5000` if SSL is enabled.
|
||||
- dockerfile apps with explicitly exposed ports (i.e. using the `EXPOSE` directive) will be configured with a listener on each exposed port that proxies to the same port of the deployed application container.
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/dokku/proxy/) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- You may override this behavior with the [`proxy:ports-*` commands](/dokku/advanced-usage/proxy-management/) or by directly setting `DOKKU_PROXY_PORT_MAP` with the `config:set` command
|
||||
- dockerfile apps without explicitly exposed ports will behave the same as a buildpack app
|
||||
- NOTE: These defaults **are not** automatically changed on subsequent pushes and must be manipulated with the aforementioned commands
|
||||
|
||||
## calling the dokku binary
|
||||
|
||||
- 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
|
||||
- `dokku build`
|
||||
- `dokku receive`
|
||||
- `dokku release`
|
||||
- `dokku tar:build`
|
||||
- `dokku tar:build-locked`
|
||||
- `dokku git:build`
|
||||
- `dokku git:build-locked`
|
||||
|
||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 861 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 974 B |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
|
Before Width: | Height: | Size: 455 B After Width: | Height: | Size: 431 B |
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.6.4\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.7.0\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 7.3 KiB |
@@ -36,13 +36,13 @@ h1 {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.header .navbar-brand a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/dokku.png);
|
||||
text-indent: 40px;
|
||||
}
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -282,6 +282,39 @@ a.list-group-item {
|
||||
.markdown-body h1 + h2 {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.highlight-show-language {
|
||||
position: relative;
|
||||
}
|
||||
.highlight-show-language-label {
|
||||
color: black;
|
||||
background-color: #CFCFCF;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
font-size: 0.9em;
|
||||
border-radius: 0 0 0 5px;
|
||||
padding: 0 0.5em;
|
||||
text-shadow: none;
|
||||
z-index: 1;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-transform: none;
|
||||
-moz-transform: none;
|
||||
-ms-transform: none;
|
||||
-o-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
.highlight-output pre {
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
padding: 10px;
|
||||
}
|
||||
code {
|
||||
padding: 0;
|
||||
padding-top: 0.2em;
|
||||
@@ -348,6 +381,61 @@ blockquote {
|
||||
.clearfix:after {
|
||||
clear: both
|
||||
}
|
||||
.improve-slideout {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: 0;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #363637;
|
||||
padding: 5px 0 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.improve-slideout:hover {
|
||||
right: 205px;
|
||||
}
|
||||
.improve-slideout:hover .improve-slideout-inner {
|
||||
right: 0;
|
||||
}
|
||||
.improve-slideout-inner {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: -205px;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #e0e0d9;
|
||||
padding: 4px 12px;
|
||||
width: 205px;
|
||||
}
|
||||
.improve-slideout-inner h6 {
|
||||
color: #363637;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.git-improve {
|
||||
font-size: 20px;
|
||||
vertical-align: -2px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
.back-to-contents {
|
||||
position: fixed;
|
||||
bottom: calc(66% - 34px);
|
||||
right: 0;
|
||||
background: #363637;
|
||||
padding: 5px 0 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.icon-improve {
|
||||
color: #bdbdb5;
|
||||
padding: 2px 9px 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
a .fa {
|
||||
display: inline-block;
|
||||
text-decoration: inherit
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
{
|
||||
"max-versions": [
|
||||
"0.3.26",
|
||||
"0.4.14",
|
||||
"0.5.8",
|
||||
"0.6.4"
|
||||
]
|
||||
}
|
||||
{ "max-versions": [ "0.3.26", "0.4.14", "0.5.8", "0.6.5", "0.7.0" ] }
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Backup and Recovery
|
||||
|
||||
> The backup plugin was deprecated in 0.4.x, below are backup recommendations for 0.5.x and later.
|
||||
|
||||
## Backup and Migration Tutorial
|
||||
|
||||
Because Dokku is git based, rebuilding a deployed app is as easy as pushing from git. You can push to a new server by updating the dokku remote in you local app's repo.
|
||||
|
||||
```
|
||||
$ git remote rm dokku
|
||||
$ git remote add dokku dokku@[dokku.me:dokku.me]
|
||||
$ git push dokku [master]
|
||||
```
|
||||
## Databases
|
||||
|
||||
Some plugins, like the official [dokku-postgres] plugin, have built-in commands that allow non-volatile data be exported and imported.
|
||||
|
||||
For [dokku-postgres], use:
|
||||
```
|
||||
dokku postgres:export [db_name] > [db_name].dump
|
||||
dokku postgres:import [db_name] < [db_name].dump
|
||||
```
|
||||
|
||||
## Volumes and Static Assets
|
||||
|
||||
Dokku doesn't enforce a [300mb] limit on apps, but it's best practice to keep binary assets outside of git. Since containers are considered volatile in Dokku, external stores like s3 or storage mounts should be used for non-volatile items like user uploads. The dokku storage core plugin can be used to mount local directories / volumes inside the docker container.
|
||||
|
||||
```
|
||||
storage:list <app>, List bind mounts for app's container(s) (host:container)
|
||||
storage:mount <app> <host-dir:container-dir>, Create a new bind mount
|
||||
storage:unmount <app> <host-dir:container-dir>, Remove an existing bind mount
|
||||
```
|
||||
|
||||
## Disaster Recovery
|
||||
|
||||
The best plan for disaster recovery is to always keep multiple (remote) copies of your local repo, static assets and periodic database dumps. In case of an emergency when your git repo and backups are completely lost, you can recover the last pushed copy from your remote dokku server (assuming you still have the ssh key).
|
||||
|
||||
```
|
||||
mkdir [app-name] ; cd !$
|
||||
git init && git remote add dokku dokku@[dokku.me:app-name]
|
||||
git pull dokku/master && git checkout dokku/master
|
||||
```
|
||||
|
||||
[dokku-postgres]: <https://github.com/dokku/dokku-postgres>
|
||||
[300mb]: <https://devcenter.heroku.com/articles/slug-compiler#slug-size>
|
||||
@@ -26,7 +26,7 @@ dokku plugins-install
|
||||
|
||||
## Creating your own plugin
|
||||
|
||||
[See the full documentation](/dokku/development/plugin-creation).
|
||||
[See the full documentation](/dokku/development/plugin-creation/).
|
||||
|
||||
## Official Plugins (Beta)
|
||||
|
||||
@@ -86,6 +86,8 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[iamale]: https://github.com/iamale
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iloveitaly]: https://github.com/iloveitaly
|
||||
[investtools]: https://github.com/investtools
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
@@ -1,8 +0,0 @@
|
||||
# Components
|
||||
|
||||
* [Docker](https://github.com/dotcloud/docker) - Container runtime and manager
|
||||
* [Herokuish](https://github.com/gliderlabs/herokuish) - Buildpack builder
|
||||
* [plugn](https://github.com/dokku/plugn) - Shell based plugins and hooks
|
||||
* [sshcommand](https://github.com/dokku/sshcommand) - Fixed commands over SSH
|
||||
|
||||
Looking to keep codebase as simple and hackable as possible, so try to keep your line count down.
|
||||
@@ -70,7 +70,7 @@ If everything is working correctly, you should also be able to query for any oth
|
||||
|
||||
If they all return your IP address, you have set DNS up properly for dokku. You should also be able to `ssh root@myserver.example.tld` and access your server.
|
||||
|
||||
Proceed with the setup instructions in the [README](https://github.com/dokku/dokku/blob/master/README.md)
|
||||
Proceed with the setup instructions in the [installation documentation](/dokku/getting-started/installation/)
|
||||
|
||||
#### Using the root of your domain (myapp.example.tld)
|
||||
|
||||
@@ -2,15 +2,18 @@
|
||||
|
||||
> 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
|
||||
```
|
||||
domains:add <app> DOMAIN # Add a domain to app
|
||||
domains:add-global <domain> # Add global domain name
|
||||
domains [<app>] # List domains
|
||||
domains:clear <app> # Clear all domains for app
|
||||
domains:disable <app> # Disable VHOST support
|
||||
domains:enable <app> # Enable VHOST support
|
||||
domains:remove <app> DOMAIN # Remove a domain from app
|
||||
domains:remove-global <domain> # Remove global domain name
|
||||
```
|
||||
|
||||
> Adding a domain before deploying an application will result in port mappings being set. This may cause issues for applications that use non-standard ports, as those will not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
@@ -20,7 +23,7 @@ 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.
|
||||
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:add-global` and `dokku domains:remove-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`.
|
||||
|
||||
@@ -71,7 +74,7 @@ dokku domains:remove myapp example.com
|
||||
|
||||
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).
|
||||
|
||||
```
|
||||
```nginx
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
@@ -84,7 +87,7 @@ server {
|
||||
|
||||
You may also wish to use a separate vhost in your `/etc/nginx/sites-enabled` directory. To do so, create the vhost in that directory as `/etc/nginx/sites-enabled/00-default.conf`. You will also need to change two lines in the main `nginx.conf`:
|
||||
|
||||
```
|
||||
```nginx
|
||||
# Swap both conf.d include line and the sites-enabled include line. From:
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
@@ -3,19 +3,19 @@
|
||||
Dokku uses nginx as its server for routing requests to specific applications. By default, access and error logs are written for each app to `/var/log/nginx/${APP}-access.log` and `/var/log/nginx/${APP}-error.log` respectively
|
||||
|
||||
```
|
||||
nginx:access-logs <app> [-t] Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t] Show the nginx error logs for an application (-t follows)
|
||||
nginx:access-logs <app> [-t] # Show the nginx access logs for an application (-t follows)
|
||||
nginx:build-config <app> # (Re)builds nginx config for given app
|
||||
nginx:error-logs <app> [-t] # Show the nginx error logs for an application (-t follows)
|
||||
```
|
||||
|
||||
## Customizing the nginx configuration
|
||||
|
||||
> New as of 0.5.0
|
||||
|
||||
Dokku uses a templating library by the name of [sigil](https://github.com/gliderlabs/sigil) to generate nginx configuration for each app. If you'd like to provide a custom template for your application, there are a couple options:
|
||||
Dokku uses a templating library by the name of [sigil](https://github.com/gliderlabs/sigil) to generate nginx configuration for each app. You may also provide a custom template for your application as follows:
|
||||
|
||||
- Copy the following example template to a file named `nginx.conf.sigil` and either:
|
||||
- check it into the root of your app repo
|
||||
- check it into the root of your app repo for buildpack applications
|
||||
- `ADD` it to your dockerfile `WORKDIR`
|
||||
- if your dockerfile has no `WORKDIR`, `ADD` it to the `/app` folder
|
||||
|
||||
@@ -24,7 +24,8 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider
|
||||
### Example Custom Template
|
||||
|
||||
Use case: add an `X-Served-By` header to requests
|
||||
```
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
@@ -64,6 +65,7 @@ upstream {{ .APP }} {
|
||||
```
|
||||
|
||||
### Available template variables
|
||||
|
||||
```
|
||||
{{ .APP }} Application name
|
||||
{{ .APP_SSL_PATH }} Path to SSL certificate and key
|
||||
@@ -84,7 +86,8 @@ upstream {{ .APP }} {
|
||||
|
||||
### Example HTTP to HTTPS Custom Template
|
||||
Use case: a simple dockerfile app that includes `EXPOSE 80`
|
||||
```
|
||||
|
||||
```go
|
||||
server {
|
||||
listen [::]:80;
|
||||
listen 80;
|
||||
@@ -130,7 +133,8 @@ upstream {{ .APP }} {
|
||||
```
|
||||
|
||||
### Example using new proxy port mapping
|
||||
```
|
||||
|
||||
```go
|
||||
{{ range $port_map := .PROXY_PORT_MAP | split " " }}
|
||||
{{ $port_map_list := $port_map | split ":" }}
|
||||
{{ $scheme := index $port_map_list 0 }}
|
||||
@@ -181,7 +185,7 @@ upstream {{ $.APP }}-{{ $upstream_port }} {
|
||||
|
||||
The default nginx.conf template will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
|
||||
|
||||
```
|
||||
```go
|
||||
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;
|
||||
```
|
||||
|
||||
@@ -198,36 +202,36 @@ The example above uses additional configuration files directly on the dokku host
|
||||
|
||||
## Domains plugin
|
||||
|
||||
See the [domain-configuration documentation](/dokku/deployment/domain-configuration/).
|
||||
See the [domain configuration documentation](/dokku/configuration/domains/).
|
||||
|
||||
## Customizing hostnames
|
||||
|
||||
See the [customizing hostnames documentation](/dokku/deployment/domain-configuration/#customizing-hostnames).
|
||||
See the [customizing hostnames documentation](/dokku/configuration/domains/#customizing-hostnames).
|
||||
|
||||
## Disabling VHOSTS
|
||||
|
||||
See the [disabling vhosts documentation](/dokku/deployment/domain-configuration/#disabling-vhosts).
|
||||
See the [disabling vhosts documentation](/dokku/configuration/domains/#disabling-vhosts).
|
||||
|
||||
## Default site
|
||||
|
||||
See the [default site documentation](/dokku/deployment/domain-configuration/#default-site).
|
||||
See the [default site documentation](/dokku/configuration/domains/#default-site).
|
||||
|
||||
## Running behind a load balancer
|
||||
|
||||
See the [load balancer documentation](/dokku/deployment/ssl-configuration/#running-behind-a-load-balancer).
|
||||
See the [load balancer documentation](/dokku/configuration/ssl/#running-behind-a-load-balancer).
|
||||
|
||||
## HSTS Header
|
||||
|
||||
See the [HSTS documentation](/dokku/deployment/ssl-configuration/#hsts-header).
|
||||
See the [HSTS documentation](/dokku/configuration/ssl/#hsts-header).
|
||||
|
||||
## SSL Configuration
|
||||
|
||||
See the [ssl documentation](/dokku/deployment/ssl-configuration/).
|
||||
See the [ssl documentation](/dokku/configuration/ssl/).
|
||||
|
||||
## Disabling Nginx
|
||||
|
||||
See the [proxy documentation](/dokku/proxy/).
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/).
|
||||
|
||||
## Managing Proxy Port mappings
|
||||
|
||||
See the [proxy documentation](/dokku/proxy/#proxy-port-mapping).
|
||||
See the [proxy documentation](/dokku/advanced-usage/proxy-management/#proxy-port-mapping).
|
||||
@@ -5,16 +5,20 @@
|
||||
Dokku supports SSL/TLS certificate inspection and CSR/Self-signed certificate generation via the `certs` plugin. Note that whenever SSL/TLS support is enabled SPDY is also enabled.
|
||||
|
||||
```
|
||||
certs:add <app> CRT KEY Add an ssl endpoint to an app. Can also import from a tarball on stdin.
|
||||
certs:generate <app> DOMAIN Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app> Show certificate information for an ssl endpoint.
|
||||
certs:remove <app> Remove an SSL Endpoint from an app.
|
||||
certs:update <app> CRT KEY Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
certs:add <app> CRT KEY # Add an ssl endpoint to an app. Can also import from a tarball on stdin.
|
||||
certs:generate <app> DOMAIN # Generate a key and certificate signing request (and self-signed certificate)
|
||||
certs:info <app> # Show certificate information for an ssl endpoint.
|
||||
certs:remove <app> # Remove an SSL Endpoint from an app.
|
||||
certs:update <app> CRT KEY # Update an SSL Endpoint on an app. Can also import from a tarball on stdin
|
||||
```
|
||||
|
||||
```shell
|
||||
# for 0.3.x
|
||||
dokku nginx:import-ssl <app> < certs.tar
|
||||
```
|
||||
|
||||
> Adding an ssl certificate before deploying an application will result in port mappings being updated. This may cause issues for applications that use non-standard ports, as those may not be automatically detected. Please refer to the [proxy documentation](/dokku/advanced-usage/proxy-management/) for information as to how to reconfigure the mappings.
|
||||
|
||||
## Per-application certificate management
|
||||
|
||||
Dokku provides built-in support for managing SSL certificates on a per-application basis. SSL is managed via nginx outside of application containers, and as such can be updated on-the-fly without rebuilding containers. At this time, applications only support a single SSL certificate at a time. To support multiple domains for a single application, wildcard certificate usage is encouraged.
|
||||
@@ -37,9 +41,9 @@ 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/).
|
||||
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/configuration/domains/).
|
||||
|
||||
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/).
|
||||
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/configuration/nginx/).
|
||||
|
||||
### Certificate generation
|
||||
|
||||
@@ -53,8 +57,11 @@ If you decide to obtain a CA signed certficate, you can import that certificate
|
||||
|
||||
The `certs:info` command will simply inspect the install SSL cert and print out details. NOTE: The server-wide certificate will be inspect if installed and no app-specific certificate exists.
|
||||
|
||||
```shell
|
||||
dokku certs:info node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
$ dokku certs:info node-js-app
|
||||
-----> Fetching SSL Endpoint info for node-js-app...
|
||||
-----> Certificate details:
|
||||
=====> Common Name(s):
|
||||
@@ -81,9 +88,9 @@ Beware that if you enable the header and a subsequent deploy of your application
|
||||
|
||||
Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarded-For` and `X-Forwarded-Port`. These headers indicate the protocol of the original request (HTTP or HTTPS), the port number, and the IP address of the client making the request, respectively. The default configuration is for Nginx to set these headers.
|
||||
|
||||
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)
|
||||
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/configuration/nginx/#customizing-the-nginx-configuration)
|
||||
|
||||
```shell
|
||||
```go
|
||||
server {
|
||||
listen [::]:{{ .NGINX_PORT }};
|
||||
listen {{ .NGINX_PORT }};
|
||||
@@ -91,9 +98,6 @@ server {
|
||||
access_log /var/log/nginx/{{ .APP }}-access.log;
|
||||
error_log /var/log/nginx/{{ .APP }}-error.log;
|
||||
|
||||
# set a custom header for requests
|
||||
add_header X-Served-By www-ec2-01;
|
||||
|
||||
location / {
|
||||
proxy_pass http://{{ .APP }};
|
||||
proxy_http_version 1.1;
|
||||
@@ -20,7 +20,7 @@ dokku apps:create ruby-rails-sample
|
||||
|
||||
### Create the backing services
|
||||
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
When you create a new app, Dokku by default *does not* provide any datastores such as MySQL or PostgreSQL. You will need to install plugins to handle that, but fortunately [Dokku has official plugins](/dokku/community/plugins/#official-plugins-beta) for common datastores. Our sample app requires a PostgreSQL service:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
@@ -56,8 +56,6 @@ git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```
|
||||
Counting objects: 231, done.
|
||||
Delta compression using up to 8 threads.
|
||||
@@ -78,47 +76,15 @@ Total 231 (delta 93), reused 147 (delta 53)
|
||||
Using rake 10.4.2
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown.
|
||||
|
||||
```shell
|
||||
=====> Application deployed:
|
||||
http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
|
||||
When the deploy finishes, the application's URL will be shown as seen above.
|
||||
|
||||
Dokku supports deploying applications via [Heroku buildpacks](https://devcenter.heroku.com/articles/buildpacks) with [Herokuish](https://github.com/gliderlabs/herokuish#buildpacks) or using a project's [dockerfile](https://docs.docker.com/reference/builder/).
|
||||
|
||||
### Removing a deployed app
|
||||
|
||||
You can also remove an application from your Dokku installation. This will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# replace APP with the name of your application
|
||||
dokku apps:destroy APP
|
||||
```
|
||||
|
||||
This will prompt you to verify the application's name before destroying it. You may also use the `--force` flag to circumvent this verification process:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
# replace APP with the name of your application
|
||||
dokku --force apps:destroy APP
|
||||
```
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
> New as of 0.4.7
|
||||
|
||||
You can rename a deployed app using the `apps:rename` CLI tool:
|
||||
|
||||
```shell
|
||||
# on your dokku host
|
||||
dokku apps:rename OLD_NAME NEW_NAME
|
||||
```
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
|
||||
### Deploying non-master branch
|
||||
|
||||
@@ -152,28 +118,34 @@ Note that if the buildpack or dockerfile build process require ssh key access fo
|
||||
|
||||
The name of remote repository is used as the name of application to be deployed, as for example above:
|
||||
|
||||
$ git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
$ git push dokku master
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:ruby-rails-sample
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
Is deployed to,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
remote: -----> Application deployed:
|
||||
remote: http://ruby-rails-sample.dokku.me
|
||||
```
|
||||
|
||||
You can also specify fully qualified names, say `app.dokku.me`, as
|
||||
|
||||
$ git remote add dokku dokku@dokku.me:app.dokku.me
|
||||
$ git push dokku master
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:app.dokku.me
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
So, after deployment the application will be available at,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://app.dokku.me
|
||||
```
|
||||
remote: -----> Application deployed:
|
||||
remote: http://app.dokku.me
|
||||
```
|
||||
|
||||
This is in particular useful, then you want to deploy to root domain, as
|
||||
|
||||
$ git remote add dokku dokku@dokku.me:dokku.me
|
||||
$ git push dokku master
|
||||
```shell
|
||||
git remote add dokku dokku@dokku.me:dokku.me
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
... deployment ...
|
||||
|
||||
@@ -192,20 +164,28 @@ See the [user management documentation](/dokku/deployment/user-management).
|
||||
|
||||
## Default vhost
|
||||
|
||||
See the [nginx documentation](/dokku/nginx/#default-site).
|
||||
See the [nginx documentation](/dokku/configuration/nginx/#default-site).
|
||||
|
||||
## Dockerfile deployment
|
||||
|
||||
See the [dockerfile documentation](/dokku/deployment/dockerfiles/).
|
||||
See the [dockerfile documentation](/dokku/deployment/methods/dockerfiles/).
|
||||
|
||||
## Specifying a custom buildpack
|
||||
|
||||
See the [buildpack documentation](/dokku/deployment/buildpacks/).
|
||||
See the [buildpack documentation](/dokku/deployment/methods/buildpacks/).
|
||||
|
||||
## Image tagging
|
||||
|
||||
See the [image tagging documentation](/dokku/deployment/images).
|
||||
See the [image tagging documentation](/dokku/deployment/methods/images/).
|
||||
|
||||
## Removing a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#removing-a-deployed-app).
|
||||
|
||||
### Renaming a deployed app
|
||||
|
||||
See the [application management documentation](/dokku/deployment/application-management/#renaming-a-deployed-app).
|
||||
|
||||
## Zero downtime deploy
|
||||
|
||||
See the [zero-downtime deploy documentation](/dokku/checks-examples/).
|
||||
See the [zero-downtime deploy documentation](/dokku/deployment/zero-downtime-deploys/).
|
||||
110
docs/deployment/application-management.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# Application Management
|
||||
|
||||
> New as of 0.3.1
|
||||
|
||||
```
|
||||
apps # List your apps
|
||||
apps:create <app> # Create a new app
|
||||
apps:destroy <app> # Permanently destroy an app
|
||||
apps:rename <old-app> <new-app> # Rename an app
|
||||
```
|
||||
|
||||
You can easily list all available applications using the `apps` command:
|
||||
|
||||
```shell
|
||||
dokku apps
|
||||
```
|
||||
|
||||
```
|
||||
=====> My Apps
|
||||
node-js-app
|
||||
python-app
|
||||
```
|
||||
|
||||
Note that you can easily hide extra output from dokku commands by using the `--quiet` flag, which makes it easier to parse on the command-line.
|
||||
|
||||
```shell
|
||||
dokku --quiet apps
|
||||
```
|
||||
|
||||
```
|
||||
node-js-app
|
||||
python-app
|
||||
```
|
||||
|
||||
## Manually creating an application
|
||||
|
||||
A common pattern for deploying applications to Dokku is to configure an application before deploying it. You can do so via the `apps:create` command:
|
||||
|
||||
```shell
|
||||
dokku apps:create node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Creating node-js-app... done
|
||||
```
|
||||
|
||||
Once created, you can configure the application as normal, and deploy the application whenever ready. This is useful for cases where you may wish to do any of the following kinds of tasks:
|
||||
|
||||
- configure domain names and ssl certificates
|
||||
- create and link datastores
|
||||
- set environment variables
|
||||
|
||||
## Removing a deployed app
|
||||
|
||||
In some cases, you may need to destroy an application, whether it is because the application is temporary or because it was misconfigured. In these cases, you can use the `apps:destroy` command. Performing any destructive actions in Dokku requires confirmation, and this command will ask for the name of the application being deleted before doing so.
|
||||
|
||||
```shell
|
||||
dokku apps:destroy node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
! WARNING: Potentially Destructive Action
|
||||
! This command will destroy node-js-app (including all add-ons).
|
||||
! To proceed, type "node-js-app"
|
||||
|
||||
> node-js-app
|
||||
Destroying node-js-app (including all add-ons)
|
||||
```
|
||||
|
||||
This will prompt you to verify the application's name before destroying it. You may also use the `--force` flag to circumvent this verification process:
|
||||
|
||||
```shell
|
||||
dokku --force apps:destroy node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Destroying node-js-app (including all add-ons)
|
||||
```
|
||||
|
||||
|
||||
Destroying an application will unlink all linked services and destroy any config related to the application. Note that linked services will retain their data for later use (or removal).
|
||||
|
||||
## Renaming a deployed app
|
||||
|
||||
> New as of 0.4.7
|
||||
|
||||
You can rename a deployed app using the `apps:rename` command. Note that the application *must* have been deployed at least once, or the rename will not complete successfully:
|
||||
|
||||
```shell
|
||||
dokku apps:rename node-js-app io-js-app
|
||||
```
|
||||
|
||||
```
|
||||
Destroying node-js-app (including all add-ons)
|
||||
-----> Cleaning up...
|
||||
-----> Building io-js-app from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
-----> Node.js app detected
|
||||
|
||||
-----> Creating runtime environment
|
||||
|
||||
...
|
||||
|
||||
=====> Application deployed:
|
||||
http://io-js-app.ci.dokku.me
|
||||
|
||||
Renaming node-js-app to io-js-app... done
|
||||
```
|
||||
|
||||
This will copy all of your app's contents into a new app directory with the name of your choice, delete your old app, then rebuild the new version of the app and deploy it. All of your config variables, including database urls, will be preserved.
|
||||
@@ -4,7 +4,7 @@ Dokku normally defaults to using [heroku buildpacks](https://devcenter.heroku.co
|
||||
|
||||
- Use `dokku config:set` to set the `BUILDPACK_URL` environment variable.
|
||||
- Add `BUILDPACK_URL` to a committed `.env` file in the root of your repository.
|
||||
- See the [environment variable documentation](/dokku/configuration-management/) for more details.
|
||||
- See the [environment variable documentation](/dokku/configuration/environment-variables/) for more details.
|
||||
- Create a `.buildpacks` file in the root of your repository.
|
||||
|
||||
## Specifying a custom buildpack
|
||||
@@ -59,7 +59,7 @@ dokku config:set APP BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-no
|
||||
|
||||
## 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.
|
||||
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/deployment/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.
|
||||
|
||||
@@ -75,21 +75,12 @@ The syntax for declaring a `Procfile` is as follows. Note that the format is one
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
```Procfile
|
||||
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:
|
||||
|
||||
```shell
|
||||
# replace APP with the name of your application
|
||||
sudo rm -rf /home/dokku/APP/cache/*
|
||||
```
|
||||
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/deployment/process-management/) for more details around scaling individual processes.
|
||||
|
||||
## Curl Build Timeouts
|
||||
|
||||
@@ -101,3 +92,7 @@ If you see output similar this when deploying , you may need to override the cur
|
||||
dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
|
||||
## Clearing buildpack cache
|
||||
|
||||
See the [repository management documentation](/dokku/advanced-usage/repository-management/#clearing-app-cache).
|
||||
@@ -21,19 +21,19 @@ 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/).
|
||||
When ports are exposed through the default nginx proxy, they are proxied externally as HTTP ports. At this time, in no case do we proxy plain TCP or UDP ports. If you would like to investigate alternative proxy methods, please refer to our [proxy management documentation](/dokku/advanced-usage/proxy-management/).
|
||||
|
||||
## 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`:
|
||||
|
||||
```
|
||||
```Dockerfile
|
||||
ENTRYPOINT ["node"]
|
||||
```
|
||||
|
||||
You can do:
|
||||
|
||||
```
|
||||
```shell
|
||||
dokku config:set APP DOKKU_DOCKERFILE_START_CMD="--harmony server.js"
|
||||
```
|
||||
|
||||
@@ -52,14 +52,14 @@ When you deploy your app a Docker image will be built, the `Procfile` will be ex
|
||||
(it must be in the folder defined in your `Dockerfile` as `WORKDIR` or `/app`) and the commands
|
||||
in it will be passed to `docker run` to start your process(es). Here's an example `Procfile`:
|
||||
|
||||
```
|
||||
```Procfile
|
||||
web: bin/run-prod.sh
|
||||
worker: bin/run-worker.sh
|
||||
```
|
||||
|
||||
And `Dockerfile`:
|
||||
|
||||
```
|
||||
```Dockerfile
|
||||
FROM debian:jessie
|
||||
WORKDIR /app
|
||||
COPY . ./
|
||||
@@ -1,39 +1,63 @@
|
||||
# Image Tagging
|
||||
# Image Tag Deployment
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
The dokku tags plugin allows you to add docker image tags to the currently deployed app image for versioning and subsequent deployment.
|
||||
|
||||
```
|
||||
tags <app> List all app image tags
|
||||
tags:create <app> <tag> Add tag to latest running app image
|
||||
tags:deploy <app> <tag> Deploy tagged app image
|
||||
tags:destroy <app> <tag> Remove app image tag
|
||||
tags <app> # List all app image tags
|
||||
tags:create <app> <tag> # Add tag to latest running app image
|
||||
tags:deploy <app> <tag> # Deploy tagged app image
|
||||
tags:destroy <app> <tag> # Remove app image tag
|
||||
```
|
||||
|
||||
Example:
|
||||
For exampple, you can list all tags for a given application:
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
$ dokku tags node-js-app
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
$ dokku tags:create node-js-app v0.9.0
|
||||
=====> Added v0.9.0 tag to dokku/node-js-app
|
||||
You can also create new tags for that app using the `tags:create` function. Tags should conform to the docker tagging specification for your docker version. As of 1.10, that specification is available [here](https://github.com/docker/docker/blob/master/image/spec/v1.1.md), while users of older versions can check the documentation [here](https://github.com/docker/docker/blob/master/image/spec/v1.md).
|
||||
|
||||
$ dokku tags node-js-app
|
||||
```shell
|
||||
dokku tags:create node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
=====> Added v1 tag to dokku/node-js-app
|
||||
```
|
||||
|
||||
Once the tag is created, you can see the output by running the `tags` command again.
|
||||
|
||||
```shell
|
||||
dokku tags node-js-app
|
||||
```
|
||||
|
||||
```
|
||||
=====> Image tags for dokku/node-js-app
|
||||
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
|
||||
dokku/node-js-app latest 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v0.9.0 936a42f25901 About a minute ago 1.025 GB
|
||||
dokku/node-js-app v1 936a42f25901 About a minute ago 1.025 GB
|
||||
```
|
||||
|
||||
$ dokku tags:deploy node-js-app v0.9.0
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v0.9.0)...
|
||||
Finally, you can also deploy a local image using the `tags:deploy` command.
|
||||
|
||||
```shell
|
||||
dokku tags:deploy node-js-app v1
|
||||
```
|
||||
|
||||
```
|
||||
-----> Releasing node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Deploying node-js-app (dokku/node-js-app:v1)...
|
||||
-----> Running pre-flight checks
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
@@ -53,7 +77,6 @@ $ dokku tags:deploy node-js-app v0.9.0
|
||||
=====> 025eec3fa3b442fded90933d58d8ed8422901f0449f5ea0c23d00515af5d3137
|
||||
=====> Application deployed:
|
||||
http://node-js-app.dokku.me
|
||||
|
||||
```
|
||||
|
||||
## Deploying from a Docker Registry
|
||||
25
docs/deployment/methods/tar.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Tarfile Deployment
|
||||
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
tar:from <app> <url> # Loads an app tarball from url
|
||||
tar:in <app> # Reads an tarball containing the app from stdin
|
||||
```
|
||||
|
||||
## Deploying from a tarball
|
||||
|
||||
In some cases, it may be useful to deploy an application from a tarball. For instance, if you implemented a non-git based deployment plugin, tarring the generated artifact may be an easier route to interface with the existing dokku infrastructure.
|
||||
|
||||
You can place the tarball on an external webserver and deploy via the `tar:from` command.
|
||||
|
||||
```shell
|
||||
dokku tar:from node-js-app https://dokku.me/releases/node-js-app/v1
|
||||
```
|
||||
|
||||
As an alternative, a deploy can be trigged from a tarball read from stdin using the `tar:in` command:
|
||||
|
||||
```shell
|
||||
# run from the generated artifact directory
|
||||
tar c . $* | dokku tar:in node-js-app
|
||||
```
|
||||
@@ -5,7 +5,7 @@ Sometimes you need to either inspect running containers or run a one-off command
|
||||
## Run a command in an app environment
|
||||
|
||||
```
|
||||
run <app> <cmd> Run a command in the environment of an application
|
||||
run <app> <cmd> # Run a command in the environment of an application
|
||||
```
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container will be stay around even after command completes. The container will be the same container as was used to start the currently deployed application.
|
||||
@@ -68,7 +68,7 @@ For tasks that should not be interrupted, run is the **preferred** method of han
|
||||
> New as of 0.4.0
|
||||
|
||||
```
|
||||
enter <app> [<container-type> || --container-id <container-id>] Connect to a specific app container
|
||||
enter <app> [<container-type> || --container-id <container-id>] # Connect to a specific app container
|
||||
```
|
||||
|
||||
The `enter` command can be used to enter a running container. The following variations of the command exist:
|
||||
@@ -95,7 +95,7 @@ dokku enter node-js-app web python script/background-worker.py
|
||||
|
||||
Your procfile can have the following entry:
|
||||
|
||||
```
|
||||
```Procfile
|
||||
cron: sleep infinity
|
||||
```
|
||||
|
||||
@@ -138,7 +138,7 @@ Regularly scheduled tasks can be a bit of a pain with dokku. The following are g
|
||||
|
||||
The following is a sample cronfile that you can use for your applications:
|
||||
|
||||
```
|
||||
```cron
|
||||
# server cron jobs
|
||||
MAILTO="mail@example.com"
|
||||
PATH=/usr/local/bin:/usr/bin:/bin
|
||||
|
||||
66
docs/deployment/process-management.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Process and Container Management
|
||||
|
||||
> New as of 0.3.14, Enhanced in 0.7.0
|
||||
|
||||
```
|
||||
ps <app> # List processes running in app container(s)
|
||||
ps:rebuildall # Rebuild all apps
|
||||
ps:rebuild <app> # Rebuild an app
|
||||
ps:restartall # Restart all deployed app containers
|
||||
ps:restart <app> # Restart app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>] # Set how many processes of a given process to run
|
||||
ps:start <app> # Start app container(s)
|
||||
ps:stop <app> # Stop app container(s)
|
||||
ps:restart-policy <app> # Shows the restart-policy for an app
|
||||
ps:set-restart-policy <app> <policy> # Sets app restart-policy
|
||||
```
|
||||
|
||||
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or via a custom `DOKKU_SCALE` file.
|
||||
|
||||
> The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only process type that will be launched in a container that is either proxied via nginx or bound to an external port.
|
||||
|
||||
### `ps:scale` command
|
||||
|
||||
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
|
||||
|
||||
```shell
|
||||
dokku ps:scale APP web=1 worker=2
|
||||
```
|
||||
|
||||
### DOKKU_SCALE file
|
||||
|
||||
You can optionally create a `DOKKU_SCALE` file in the root of your repository. Dokku expects this file to contain one line for every process defined in your Procfile.
|
||||
|
||||
Example:
|
||||
|
||||
```Procfile
|
||||
web=1
|
||||
worker=2
|
||||
```
|
||||
|
||||
> *NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
|
||||
|
||||
## Restart Policies
|
||||
|
||||
> New as of 0.7.0
|
||||
|
||||
By default, Dokku will automatically restart containers that exit with a non-zero status up to 10 times via the [on-failure Docker restart policy](https://docs.docker.com/engine/reference/run/#restart-policies-restart). You can configure this via the relevant `ps` commands:
|
||||
|
||||
```shell
|
||||
# always restart an exited container
|
||||
dokku ps:set-restart-policy node-js-app always
|
||||
|
||||
# never restart an exited container
|
||||
dokku ps:set-restart-policy node-js-app no
|
||||
|
||||
# only restart it on Docker restart if it was not manually stopped
|
||||
dokku ps:set-restart-policy node-js-app unless-stopped
|
||||
|
||||
# restart only on non-zero exit status
|
||||
dokku ps:set-restart-policy node-js-app on-failure
|
||||
|
||||
# restart only on non-zero exit status up to 20 times
|
||||
dokku ps:set-restart-policy node-js-app on-failure:20
|
||||
```
|
||||
|
||||
Restart policies have no bearing on server reboot, and Dokku will always attempt to restart your applications at that point unless they were manually stopped.
|
||||
@@ -4,9 +4,9 @@ Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, ju
|
||||
The `-t` is used to request a pty. It is highly recommended to do so.
|
||||
To avoid the need to type the `-t` option each time, simply create/modify a section in the `.ssh/config` on the client side, as follows:
|
||||
|
||||
```
|
||||
```ini
|
||||
Host dokku.me
|
||||
RequestTTY yes
|
||||
RequestTTY yes
|
||||
```
|
||||
|
||||
## Behavioral modifiers
|
||||
@@ -14,7 +14,7 @@ RequestTTY yes
|
||||
Dokku also supports certain command-line arguments that augment it's behavior. If using these over ssh, you must use the form `ssh -t dokku@dokku.me -- <command>`
|
||||
in order to avoid ssh interpretting dokku arguments for itself.
|
||||
|
||||
```shell
|
||||
```
|
||||
--quiet suppress output headers
|
||||
--trace enable DOKKU_TRACE for current execution only
|
||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
||||
@@ -1,48 +1,52 @@
|
||||
# User Management
|
||||
|
||||
While it is possible to use password-based authorization to push to Dokku, it is preferable to use key-based authentication for security.
|
||||
|
||||
Users in dokku are managed via the `~/dokku/.ssh/authorized_keys` file. While you *can* manually edit this file, it is **highly** recommended that you follow the below steps to manage users on a dokku server.
|
||||
|
||||
## SSHCommand
|
||||
|
||||
Dokku uses the [`sshcommand`](https://github.com/dokku/sshcommand) utility to manage ssh keys for the dokku user. The following is the usage output for sshcommand.
|
||||
> New as of 0.7.0
|
||||
|
||||
```
|
||||
sshcommand create <user> <command> # creates a user forced to run command when SSH connects
|
||||
sshcommand acl-add <user> <ssh-key-name> # adds named SSH key to user from STDIN
|
||||
sshcommand acl-remove <user> <ssh-key-name> # removes SSH key by name
|
||||
sshcommand help # displays the usage help message
|
||||
ssh-keys:add <name> [/path/to/key] # Add a new public key by pipe or path
|
||||
ssh-keys:list # List of all authorized Dokku public ssh keys
|
||||
ssh-keys # Manage public ssh keys that are allowed to connect to Dokku
|
||||
ssh-keys:remove <name> # Remove SSH public key by name
|
||||
```
|
||||
|
||||
In dokku's case, the `<user>` section is *always* `dokku`, as this is the system user that the dokku binary performs all it's actions. Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization.
|
||||
When pushing to Dokku, ssh key based authorization is the preferred authentication method, for ease of use and increased security.
|
||||
|
||||
Users in Dokku are managed via the `~/dokku/.ssh/authorized_keys` file. It is **highly** recommended that you follow the steps below to manage users on a Dokku server.
|
||||
|
||||
> Users of older versions of Dokku should use the `sshcommand` binary to manage keys. Please refer to the Dokku documentation for your version for more details.
|
||||
|
||||
## Adding deploy users
|
||||
|
||||
You can add your public key to the dokku user's `~/dokku/.ssh/authorized_keys` file with the following command:
|
||||
You can add your public key to Dokku with the following command:
|
||||
|
||||
```shell
|
||||
# from your local machine
|
||||
# replace dokku.me with your domain name or the host's IP
|
||||
# replace root with your server's root user
|
||||
# USER is the username you use to refer to this particular key
|
||||
cat ~/.ssh/id_rsa.pub | ssh root@dokku.me "sudo sshcommand acl-add dokku USER"
|
||||
dokku ssh-keys:add KEY_NAME path/to/id_rsa.pub
|
||||
```
|
||||
|
||||
At it's base, the `sshcommand` *must* be run under a user with sudo access, as it sets keys for the dokku user.
|
||||
`KEY_NAME` is the username prefer to use to refer to this particular key. Including the word `admin` in the name will grant the user privileges to add additional keys remotely.
|
||||
|
||||
For instance, if you stored your public key at `~/.ssh/id_rsa.pub-open` and are deploying to EC2 where the default root-enabled user is `ubuntu`, you can run the following command to add your key under the `superuser` username:
|
||||
Key names are unique, and attempting to re-use a name will result in an error.
|
||||
|
||||
```
|
||||
cat ~/.ssh/id_rsa.pub-open | ssh ubuntu@dokku.me "sudo sshcommand acl-add dokku superuser"
|
||||
> The unique `KEY_NAME` is for ease of identifying the keys. The ssh (git) user is *always* `dokku`, as this is the system user that the `dokku` binary uses to perform all it's actions.
|
||||
|
||||
As key names are unique, they can be used to remove a public ssh key:
|
||||
|
||||
```SHELL
|
||||
dokku ssh-keys:remove KEY_NAME
|
||||
```
|
||||
|
||||
If you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to dokku (it will use your host username as the `USER`):
|
||||
Admin users and root can also add keys remotely:
|
||||
|
||||
```shell
|
||||
cat ~/.ssh/id_rsa.pub | ssh dokku@dokku.me ssh-keys:add KEY_NAME
|
||||
```
|
||||
|
||||
Finally, if you are using the vagrant installation, you can also use the `make vagrant-acl-add` target to add your public key to Dokku (it will use your host username as the `USER`):
|
||||
|
||||
```shell
|
||||
cat ~/.ssh/id_rsa.pub | make vagrant-acl-add
|
||||
```
|
||||
|
||||
## Scoping commands to specific users
|
||||
|
||||
See the [user auth plugin trigger documentation](/dokku/development/plugin-triggers/#user-auth).
|
||||
Keys are given unique names, which can be used in conjunction with the [user-auth](/dokku/development/plugin-triggers/#user-auth) plugin trigger to handle command authorization. Please see the documentation on that trigger for more information.
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
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:run <app> [process-type(s)] Runs zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
checks:skip <app> [process-type(s)] Skip zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
```
|
||||
|
||||
@@ -13,31 +14,34 @@ Following a deploy, dokku will wait `10` seconds before routing traffic to the n
|
||||
|
||||
```shell
|
||||
dokku config:set --global DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
dokku config:set node-js-app DOKKU_DEFAULT_CHECKS_WAIT=30
|
||||
```
|
||||
|
||||
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis:
|
||||
You can also choose to skip checks or disable zero-downtime completely on a per-application/per-process basis
|
||||
|
||||
```shell
|
||||
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
|
||||
dokku checks:skip node-js-app worker,web
|
||||
```
|
||||
|
||||
```
|
||||
-----> Skipping zero downtime for app's (node-js-app) proctypes (worker,web)
|
||||
-----> Unsetting node-js-app
|
||||
-----> 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)
|
||||
```
|
||||
|
||||
Additionally, any given process can only be configured to disable zero-downtime. example:
|
||||
|
||||
|
||||
```shell
|
||||
dokku checks:disable node-js-app worker
|
||||
```
|
||||
|
||||
```
|
||||
-----> Disabling zero downtime for app's (node-js-app) proctypes (worker)
|
||||
-----> Setting config vars
|
||||
DOKKU_CHECKS_DISABLED: worker
|
||||
-----> Setting config vars
|
||||
@@ -53,7 +57,93 @@ dokku config:set <app> DOKKU_WAIT_TO_RETIRE=120
|
||||
|
||||
> Note that during this time, multiple containers may be running on your server, which can be an issue for memory-hungry applications on memory-constrained servers.
|
||||
|
||||
## Checks
|
||||
## Manually Invoking Checks
|
||||
|
||||
Checks can also be manually invoked via the `checks:run` command. This can be used to check the status of an application via cron to provide integration with external healthchecking software.
|
||||
|
||||
Checks are run against a specific application:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
Checks can be scoped to a particular process type:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP worker
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.worker.1)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
An app process id may also be specified:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP web.2
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
-----> Running checks for app (APP.web.2)
|
||||
For more efficient zero downtime deployments, create a file CHECKS.
|
||||
See http://dokku.viewdocs.io/dokku/checks-examples.md for examples
|
||||
CHECKS file not found in container: Running simple container check...
|
||||
-----> Waiting for 10 seconds ...
|
||||
-----> Default container check successful!
|
||||
```
|
||||
|
||||
Non-existent process types will result in an error:
|
||||
|
||||
```shell
|
||||
dokku checks:run APP non-existent
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
Invalid process type specified (APP.non-existent)
|
||||
```
|
||||
|
||||
Non-existent process ids will *also* result in an error
|
||||
|
||||
```shell
|
||||
dokku checks:run APP web.3
|
||||
```
|
||||
|
||||
```
|
||||
-----> Running pre-flight checks
|
||||
Invalid container id specified (APP.web.3)
|
||||
```
|
||||
|
||||
## Customizing Checks
|
||||
|
||||
If your application needs a longer period to boot up - perhaps to load data into memory, or because of slow boot time - you may also use dokku's `checks` functionality to more precisely check whether an application can serve traffic or not.
|
||||
|
||||
@@ -61,10 +151,10 @@ Checks are run against the detected `web` process from your application's `Procf
|
||||
|
||||
To specify checks, add a `CHECKS` file to the root of your project directory. The `CHECKS` file should be plain text and may contain:
|
||||
|
||||
* Check instructions
|
||||
* Settings (NAME=VALUE)
|
||||
* Comments (lines starting with #)
|
||||
* Empty lines
|
||||
* Check instructions
|
||||
* Settings (NAME=VALUE)
|
||||
* Comments (lines starting with #)
|
||||
* Empty lines
|
||||
|
||||
> For dockerfile-based deploys, the file *must* be in `/app/CHECKS` within the container. `/app` is used by default as the root container directory for buildpack-based deploys.
|
||||
|
||||
@@ -127,31 +217,41 @@ If your application runs multiple processes (a background worker configured in y
|
||||
dokku config:set <app> DOKKU_DEFAULT_CHECKS_WAIT=0
|
||||
```
|
||||
|
||||
### Configuring docker stop timeout
|
||||
|
||||
[By default](https://docs.docker.com/engine/reference/commandline/stop/), docker will wait 10 seconds from the time the `stop` command is passed to a container before it attempts to kill said container. This timeout can be configured on a per-app basis in dokku by setting the `DOKKU_DOCKER_STOP_TIMEOUT` configuration variable. This timeout applies to normal zero-downtime deployments as well as the `ps:stop` and `apps:destroy` commands.
|
||||
|
||||
```shell
|
||||
dokku config:set $APP DOKKU_DOCKER_STOP_TIMEOUT=20
|
||||
```
|
||||
|
||||
## Example: Successful Rails Deployment
|
||||
|
||||
In this example, a Rails application is successfully deployed to dokku. The initial round of checks fails while the server is starting, but once it starts they succeed and the deployment is successful. `WAIT` is set to `10` because our application takes a while to boot up. `ATTEMPTS` is set to `6`, but the third attempt succeeds.
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
```
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/check.txt simple_check
|
||||
````
|
||||
```
|
||||
|
||||
For this check to work, we've added a line to `config/routes.rb` that simply returns a string:
|
||||
|
||||
````
|
||||
```
|
||||
get '/check.txt', to: proc {[200, {}, ['simple_check']]}
|
||||
````
|
||||
```
|
||||
|
||||
### Deploy Output
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
````
|
||||
```shell
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
@@ -199,7 +299,7 @@ curl: (7) Failed to connect to 172.17.0.155 port 5000: Connection refused
|
||||
-----> Shutting down old container in 60 seconds
|
||||
=====> Application deployed:
|
||||
http://myapp.dokku.example.com
|
||||
````
|
||||
```
|
||||
|
||||
## Example: Failing Rails Deployment
|
||||
|
||||
@@ -209,11 +309,11 @@ Once the attempts have been exceeded, the deployment fails and we see the contai
|
||||
|
||||
### CHECKS file
|
||||
|
||||
````
|
||||
```
|
||||
WAIT=10
|
||||
ATTEMPTS=6
|
||||
/
|
||||
````
|
||||
```
|
||||
|
||||
> The check to the root url '/' would normally access the database.
|
||||
|
||||
@@ -221,9 +321,11 @@ ATTEMPTS=6
|
||||
|
||||
> Note: The output has been trimmed for brevity
|
||||
|
||||
````
|
||||
```shell
|
||||
git push dokku master
|
||||
```
|
||||
|
||||
```
|
||||
-----> Cleaning up...
|
||||
-----> Building myapp from herokuish...
|
||||
-----> Adding BUILD_ENV to build environment...
|
||||
@@ -301,11 +403,4 @@ Could not start due to 1 failed checks.
|
||||
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
|
||||
```
|
||||
@@ -5,7 +5,7 @@ If you create your own plugin:
|
||||
1. Take a look at the plugins shipped with dokku and hack away!
|
||||
2. Check out the [list of triggers](/dokku/development/plugin-triggers) your plugin can implement.
|
||||
3. Upload your plugin to github with a repository name in form of `dokku-<name>` (e.g. `dokku-mariadb`)
|
||||
4. Edit [this page](/dokku/plugins) and add a link to it.
|
||||
4. Edit [this page](/dokku/community/plugins/) and add a link to it.
|
||||
5. Subscribe to the [dokku development blog](http://progrium.com) to be notified about API changes and releases
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ esac
|
||||
|
||||
Each plugin requires a `plugin.toml` descriptor file with the following required fields:
|
||||
|
||||
```shell
|
||||
```toml
|
||||
[plugin]
|
||||
description = "dokku hello plugin"
|
||||
version = "0.1.0"
|
||||
|
||||
@@ -177,6 +177,23 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
echo 'not-latest'
|
||||
```
|
||||
|
||||
### `deployed-app-image-repo`
|
||||
|
||||
- Description: Used to manage the full repo of the image being deployed. Useful for deploying from an external registry where the repository name is not `dokku/$APP`
|
||||
- Invoked by: `internal function dokku_deploy_cmd() (deploy phase)`
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"
|
||||
# change the repo from dokku/APP to dokkupaas/APP
|
||||
echo "dokkupaas/$APP"
|
||||
```
|
||||
|
||||
### `deployed-app-repository`
|
||||
|
||||
- Description: Used to manage the remote repository of the image being deployed.
|
||||
@@ -201,10 +218,23 @@ echo 'derp.dkr.ecr.us-east-1.amazonaws.com'
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Sets a docker build-arg called CACHEBUST which can be used
|
||||
# to bust cache at any arbitrary point in a Dockerfile build
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# TODO
|
||||
cache-bust-build-arg() {
|
||||
declare desc="dockerfile cache busting plugin trigger"
|
||||
local STDIN=$(cat)
|
||||
local APP="$1" IMAGE_SOURCE_TYPE="$2"
|
||||
local output=""
|
||||
|
||||
if [[ "$IMAGE_SOURCE_TYPE" == "dockerfile" ]]; then
|
||||
output=" --build-arg CACHEBUST=$(date +%s)"
|
||||
fi
|
||||
echo -n "$STDIN$output"
|
||||
}
|
||||
|
||||
cache-bust-build-arg "$@"
|
||||
```
|
||||
|
||||
### `docker-args-deploy`
|
||||
|
||||
@@ -66,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.6.4-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
# wait for "==> build-arch: ==> Finished making: dokku 0.7.0-2 (Mon Feb 22 23:20:37 CET 2016)"
|
||||
cd ../dokku-arch
|
||||
git add PKGBUILD .SRCINFO
|
||||
git commit -m 'Update to dokku 0.9.9'
|
||||
|
||||
@@ -1,36 +1,48 @@
|
||||
# Dokku test suite
|
||||
|
||||
Dokku now has a full test suite to assist in quick iterating development. These tests include a linter using [shellcheck](https://github.com/koalaman/shellcheck), functional unit tests using the [bats testing framework](https://github.com/sstephenson/bats), and a deployment suite of example apps that use the most popular languages and frameworks.
|
||||
Dokku has a full test suite to assist in quick iterating development. These tests include a linter using [shellcheck](https://github.com/koalaman/shellcheck), functional unit tests using the [bats testing framework](https://github.com/sstephenson/bats), and a deployment suite of example apps that use the most popular languages and frameworks.
|
||||
|
||||
Bats tests can be found here:
|
||||
```
|
||||
tests/unit/*.bats
|
||||
```
|
||||
We maintain the Dokku test harness within the `tests` directory:
|
||||
|
||||
Example apps can be found here:
|
||||
```
|
||||
tests/apps/
|
||||
```
|
||||
- `tests/unit/*.bats`: Bats tests
|
||||
- `tests/apps/`: Example applications that can be used for tests
|
||||
|
||||
### Executing tests locally
|
||||
## Continuous Integration
|
||||
|
||||
All pull requests have tests run against them on [CircleCI](https://circleci.com/), a continuous integration platform that provides Docker support for Ubuntu Trusty 14.04.
|
||||
|
||||
If you wish to skip tests for a particular commit - e.g. Documentation changes - you may add the `[ci skip]` designator to your commit message. Commits that *should* be tested but have the above designator will not be merged.
|
||||
|
||||
While we do provide official packages for a variety of platforms, as our test suite currently runs on Ubuntu Trusty 14.04, we only provide official installation support for that platform.
|
||||
|
||||
## Local Test Execution
|
||||
|
||||
- Setup dokku in a [vagrant vm](/dokku/getting-started/install/vagrant)
|
||||
- Test setup and execution
|
||||
- Run the following to setup tests and execute them:
|
||||
|
||||
```shell
|
||||
$ vagrant ssh
|
||||
$ sudo su -
|
||||
$ cd ~/dokku
|
||||
$ make ci-dependencies setup-deploy-tests
|
||||
$ make test # execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$
|
||||
$ make lint copyfiles # run linter & update vagrant dokku install from local git clone
|
||||
$ make unit-tests # execute all bats tests
|
||||
$ make deploy-tests # execute all app deployment tests
|
||||
```
|
||||
- Additionally you may run a specific app deployment tests with a target similar to:
|
||||
vagrant ssh
|
||||
sudo su -
|
||||
cd ~/dokku
|
||||
make ci-dependencies setup-deploy-tests
|
||||
|
||||
```shell
|
||||
$ make deploy-test-nodejs-express
|
||||
# execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
make test
|
||||
|
||||
# run linter & update vagrant dokku install from local git clone
|
||||
make lint copyfiles
|
||||
|
||||
# execute all bats tests
|
||||
make unit-tests
|
||||
|
||||
# execute all app deployment tests
|
||||
make deploy-tests
|
||||
```
|
||||
- For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
|
||||
|
||||
Additionally you may run a specific app deployment tests with a target similar to:
|
||||
|
||||
```shell
|
||||
make deploy-test-nodejs-express
|
||||
```
|
||||
|
||||
For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
|
||||
|
||||
@@ -52,7 +52,7 @@ Once dokku is installed, if you are not using the web-installer, you'll want to
|
||||
|
||||
Set up a domain and a wildcard domain pointing to that host. Make sure `/home/dokku/VHOST` is set to this domain. By default it's set to whatever hostname the host has. This file is only created if the hostname can be resolved by dig (`dig +short $(hostname -f)`). Otherwise you have to create the file manually and set it to your preferred domain. If this file still is not present when you push your app, dokku will publish the app with a port number (i.e. `http://example.com:49154` - note the missing subdomain).
|
||||
|
||||
Follow the [user management documentation](/dokku/deployment/user-management) in order to add users to dokku.
|
||||
Follow the [user management documentation](/dokku/deployment/user-management/) in order to add users to dokku.
|
||||
|
||||
That's it!
|
||||
|
||||
@@ -14,7 +14,7 @@ wget -nv -O - https://get.docker.com/ | sh
|
||||
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
|
||||
echo "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main" | sudo tee /etc/apt/sources.list.d/dokku.list
|
||||
sudo apt-get update -qq > /dev/null
|
||||
sudo apt-get install dokku
|
||||
sudo apt-get install -qq -y dokku
|
||||
sudo dokku plugin:install-dependencies --core
|
||||
```
|
||||
|
||||
|
||||
185
docs/getting-started/install/dreamhost.md
Normal file
@@ -0,0 +1,185 @@
|
||||
# Install Dokku on DreamHost Cloud Server with cloud-init
|
||||
|
||||
Cloud-init script can be used to automate installation of Dokku on
|
||||
Dreamhost (or any other OpenStack-compatible cloud with minimal
|
||||
changes).
|
||||
|
||||
A new server can be created on DreamHost Cloud from the command line
|
||||
using openstack client or from the web UI and with the same command
|
||||
use a cloud-init script to install Dokku. Install the [openstack
|
||||
cli](https://help.dreamhost.com/hc/en-us/articles/216185658-How-to-Install-the-OpenStack-command-line-clients),
|
||||
download the [DreamHost Cloud credentials
|
||||
file](https://iad2.dreamcompute.com/project/access_and_security/api_access/openrc/)
|
||||
before proceeding and make sure your public SSH key is added to the
|
||||
cloud.
|
||||
|
||||
```sh
|
||||
source openrc.sh # Set the environment variables for DreamHost Cloud
|
||||
```
|
||||
|
||||
This allows openstack client to connect to DreamHost API endpoints.
|
||||
The command below creates a new server named `my-dokku-instance` based
|
||||
on Ubuntu 14.04, with 2GB RAM and 1CPU (the flavor called
|
||||
`semisonic`), opening network port access to http and ssh (the
|
||||
`default` security group), and the name of the chosen SSH key. This
|
||||
key will be automatically added to the new server in the
|
||||
`authorized_keys` for the default SSH user (`dhc-user`), and it will
|
||||
be reused by Dokku.
|
||||
|
||||
```sh
|
||||
openstack server create \
|
||||
--image Ubuntu-14.04 \
|
||||
--flavor gp1.semisonic \
|
||||
--security-group default \
|
||||
--key-name $YOUR_SSH_KEYNAME \
|
||||
--user-data dokku-cloudinit.sh \
|
||||
my-dokku-instance
|
||||
```
|
||||
|
||||
The content of dokku-cloudinit.sh script contains instructions to add
|
||||
Docker and Dokku's apt repositories and install dokku with the proper
|
||||
debconf options set. Don't forget to add the FQDN for your application
|
||||
server:
|
||||
|
||||
```yaml
|
||||
#cloud-config
|
||||
apt_upgrade: true
|
||||
|
||||
apt_sources:
|
||||
- source: "deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: pgpkeys.eu
|
||||
|
||||
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
|
||||
=H60S
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
filename: dokku.list
|
||||
- source: "deb https://apt.dockerproject.org/repo ubuntu-trusty main"
|
||||
key: |
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: SKS 1.1.5
|
||||
Comment: Hostname: pgpkeys.co.uk
|
||||
|
||||
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
|
||||
=Yhur
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
filename: docker.list
|
||||
|
||||
package_upgrade: true
|
||||
|
||||
debconf_selections: |
|
||||
|
||||
dokku dokku/web_config boolean false
|
||||
dokku dokku/vhost_enable boolean true
|
||||
# set the domain name of the new Dokku server
|
||||
dokku dokku/hostname string $YOUR_FULL_QUALIFIED_DOMAIN
|
||||
# this copies over the public SSH key assigned to the server
|
||||
dokku dokku/key_file string /home/dhc-user/.ssh/authorized_keys
|
||||
|
||||
packages:
|
||||
- dokku
|
||||
```
|
||||
@@ -24,9 +24,11 @@ __Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
5. SSH into your Linode as root and run the following commands:
|
||||
|
||||
apt-get update
|
||||
apt-get -qq upgrade
|
||||
apt-get -qq install linux-image-virtual linux-image-extra-virtual
|
||||
```shell
|
||||
apt-get update
|
||||
apt-get -qq upgrade
|
||||
apt-get install linux-image-virtual linux-image-extra-virtual
|
||||
```
|
||||
|
||||
6. When prompted, install Grub onto the first hard drive.
|
||||
|
||||
@@ -36,4 +38,4 @@ __Warning__: These steps will delete *everything* on your Linode.
|
||||
|
||||
9. Lastly, reboot the Linode.
|
||||
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/installation) and `bootstrap.sh` will take care of everything else.
|
||||
Once your server comes back online, you'll be running Ubuntu's default kernel. You can now follow Dokku's [normal installation instructions](/dokku/getting-started/installation/) and `bootstrap.sh` will take care of everything else.
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
- Download and install [Vagrant](http://www.vagrantup.com/downloads.html)
|
||||
- Clone Dokku
|
||||
|
||||
```
|
||||
```shell
|
||||
git clone https://github.com/dokku/dokku.git
|
||||
```
|
||||
|
||||
- Create VM
|
||||
```
|
||||
|
||||
```shell
|
||||
# Optional ENV arguments:
|
||||
# - `BOX_NAME`
|
||||
# - `BOX_URI`
|
||||
@@ -22,7 +23,7 @@
|
||||
```
|
||||
- Setup SSH Config in `~/.ssh/config`. The port listed here is usually correct, though you may want to verify that it is the same as the one listed in the output of `vagrant ssh-config dokku`
|
||||
|
||||
```
|
||||
```ini
|
||||
Host dokku.me
|
||||
Port 22
|
||||
```
|
||||
|
||||
@@ -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.6.4/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.6.4 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
@@ -41,16 +41,17 @@ Once you save your settings, the web admin will self-terminate and you should be
|
||||
For various reasons, certain hosting providers may have other steps that should be preferred to the above. If hosted on any of the following popular hosts, please follow the linked to instructions:
|
||||
|
||||
- [Digital Ocean Installation Notes](/dokku/getting-started/install/digitalocean)
|
||||
- [DreamHost Cloud Installation Notes](/dokku/getting-started/install/dreamhost/)
|
||||
- [Linode Installation Notes](/dokku/getting-started/install/linode/)
|
||||
- [Microsoft Azure Installation Notes](/dokku/getting-started/install/azure/)
|
||||
|
||||
As well, you may wish to customize your installation in some other fashion. or experiment with vagrant. The guides below should get you started:
|
||||
|
||||
- [Debian Package Installation Notes](/dokku/getting-started/install/debian)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant)
|
||||
- [Advanced Install Customization](/dokku/advanced-installation)
|
||||
- [Debian Package Installation Notes](/dokku/getting-started/install/debian/)
|
||||
- [Vagrant Installation Notes](/dokku/getting-started/install/vagrant/)
|
||||
- [Advanced Install Customization](/dokku/getting-started/advanced-installation/)
|
||||
|
||||
---
|
||||
|
||||
- <sup>[1]: To check whether your system has an fqdn set, run `sudo hostname -f`</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||
- <sup>[2]: If your system has less than 1GB of memory, you can use [this workaround](/dokku/getting-started/advanced-installation/#vms-with-less-than-1gb-of-memory).</sup>
|
||||
@@ -6,14 +6,14 @@ __Solution:__
|
||||
|
||||
Most of the time it's caused by some defaults newer versions of nginx set. To make sure that's the issue you're having run the following:
|
||||
|
||||
```
|
||||
$ nginx -t
|
||||
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
|
||||
```shell
|
||||
nginx -t
|
||||
## nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
|
||||
```
|
||||
|
||||
If you get a similar error just edit __/etc/nginx/nginx.conf__ and add the following line to your http section:
|
||||
|
||||
```
|
||||
```nginx
|
||||
http {
|
||||
(... existing content ...)
|
||||
server_names_hash_bucket_size 64;
|
||||
@@ -26,11 +26,11 @@ A value of 64 would allow domains with up to 64 characters. Set it to 128 if you
|
||||
|
||||
Save the file and try stopping nginx and starting it again:
|
||||
|
||||
```
|
||||
$ /etc/init.d/nginx stop
|
||||
* Stopping nginx nginx [ OK ]
|
||||
$ /etc/init.d/nginx start
|
||||
* Starting nginx nginx [ OK ]
|
||||
```shell
|
||||
/etc/init.d/nginx stop
|
||||
## * Stopping nginx nginx [ OK ]
|
||||
/etc/init.d/nginx start
|
||||
## * Starting nginx nginx [ OK ]
|
||||
```
|
||||
|
||||
***
|
||||
@@ -45,12 +45,16 @@ The `remote rejected` error does not give enough information. Anything could hav
|
||||
|
||||
To enable dokku tracing, simply run the following command:
|
||||
|
||||
# Since 0.3.9
|
||||
dokku trace on
|
||||
```shell
|
||||
# since 0.3.9
|
||||
dokku trace on
|
||||
```
|
||||
|
||||
In versions older than 0.3.9, you can create a `/home/dokku/dokkurc` file containing the following :
|
||||
|
||||
export DOKKU_TRACE=1
|
||||
```shell
|
||||
export DOKKU_TRACE=1
|
||||
```
|
||||
|
||||
This will trace all of dokku's activity. If this does not help you, create a [gist](https://gist.github.com) containing the full log, and create an issue.
|
||||
|
||||
@@ -64,28 +68,28 @@ __Solution (Less solution, more helpful troubleshooting steps):__
|
||||
|
||||
Find the failed phase's container image (*077581956a92* in this example)
|
||||
|
||||
```
|
||||
$ docker ps -a | grep build
|
||||
94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
|
||||
```
|
||||
```shell
|
||||
docker ps -a | grep build
|
||||
## 94d9515e6d93 077581956a92 "/build" 29 minutes ago Exited (0) 25 minutes ago cocky_bell
|
||||
```
|
||||
|
||||
Start a new container with the failed image and poke around (i.e. ensure you can access the internet from within the container or attempt the failed command, if known)
|
||||
|
||||
```
|
||||
$ docker run -ti 077581956a92 /bin/bash
|
||||
root@9763ab86e1b4:/# curl -s -S icanhazip.com
|
||||
192.168.0.1
|
||||
curl http://s3pository.heroku.com/node/v0.10.30/node-v0.10.30-linux-x64.tar.gz -o node-v0.10.30-linux-x64.tar.gz
|
||||
tar tzf node-v0.10.30-linux-x64.tar.gz
|
||||
...
|
||||
```
|
||||
```shell
|
||||
docker run -ti 077581956a92 /bin/bash
|
||||
curl -s -S icanhazip.com
|
||||
## 192.168.0.1
|
||||
curl http://s3pository.heroku.com/node/v0.10.30/node-v0.10.30-linux-x64.tar.gz -o node-v0.10.30-linux-x64.tar.gz
|
||||
tar tzf node-v0.10.30-linux-x64.tar.gz
|
||||
## ...
|
||||
```
|
||||
|
||||
Sometimes (especially on DO) deploying again seems to get past these seemingly transient issues
|
||||
Additionally we've seen issues if changing networks that have different DNS resolvers. In this case, you can run the following to update your resolv.conf
|
||||
|
||||
```
|
||||
$ resolvconf -u
|
||||
```
|
||||
```shell
|
||||
resolvconf -u
|
||||
```
|
||||
|
||||
Please see https://github.com/dokku/dokku/issues/841 and https://github.com/dokku/dokku/issues/649
|
||||
|
||||
@@ -102,8 +106,10 @@ You get asked for a password because your ssh secret key can't be found. This ma
|
||||
|
||||
You have to point ssh to the correct secret key for your domain name. Add the following to your `~/.ssh/config`:
|
||||
|
||||
Host DOKKU_HOSTNAME
|
||||
IdentityFile "~/.ssh/KEYNAME"
|
||||
```ini
|
||||
Host DOKKU_HOSTNAME
|
||||
IdentityFile "~/.ssh/KEYNAME"
|
||||
```
|
||||
|
||||
Also see [issue #116](https://github.com/dokku/dokku/issues/116)
|
||||
|
||||
@@ -117,7 +123,9 @@ In many cases the application will require the a `process.env.PORT` port opposed
|
||||
|
||||
When specifying your port you may want to use something similar to:
|
||||
|
||||
var port = process.env.PORT || 3000
|
||||
```javascript
|
||||
var port = process.env.PORT || 3000
|
||||
```
|
||||
|
||||
Please see https://github.com/dokku/dokku/issues/282
|
||||
|
||||
@@ -145,6 +153,4 @@ dokku config:set --global CURL_TIMEOUT=600
|
||||
dokku config:set --global CURL_CONNECT_TIMEOUT=30
|
||||
```
|
||||
|
||||
References
|
||||
* https://github.com/dokku/dokku/issues/509
|
||||
* https://github.com/dokku-alt/dokku-alt/issues/169
|
||||
Please see https://github.com/dokku/dokku/issues/509
|
||||
@@ -1,6 +1,6 @@
|
||||
# Upgrading
|
||||
|
||||
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.
|
||||
If your version of dokku is pre 0.3.0 (check with `dokku version`), we recommend [a fresh install](/dokku/getting-started/installation/) on a new server.
|
||||
|
||||
## Migration Guides
|
||||
|
||||
@@ -4,7 +4,7 @@ If you’re stuck, there are a number of places you can get help:
|
||||
|
||||
## The Official Dokku Website
|
||||
|
||||
[http://dokku.viewdocs.io/dokku](/dokku)
|
||||
- [http://dokku.viewdocs.io/dokku/](/dokku/)
|
||||
|
||||
The Official Dokku website is always a great place to visit. It features links to oft-used developer tools, community plugins, and guides on using dokku.
|
||||
|
||||
@@ -17,6 +17,6 @@ If you’re stumped, give us a holler in the Dokku IRC or Slack channels. Someon
|
||||
|
||||
## Stack Overflow
|
||||
|
||||
http://stackoverflow.com/
|
||||
- [https://stackoverflow.com/questions/tagged/dokku](https://stackoverflow.com/questions/tagged/dokku)
|
||||
|
||||
Tag your questions with `dokku` to enable existing users of Stack Overflow to find your questions.
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
|
||||
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon.ico">
|
||||
<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.6.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="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.6.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<style>
|
||||
</style>
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="row">
|
||||
<div>
|
||||
<h1 class="heading navbar-brand">
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
<a href="/{{NAME}}/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right">
|
||||
<li class="nav-item">
|
||||
@@ -54,7 +54,7 @@
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/{{NAME}}/installation/">Docs</a>
|
||||
<a class="nav-link" href="/{{NAME}}/getting-started/installation/">Docs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://webchat.freenode.net/?channels=dokku">IRC</a>
|
||||
@@ -74,7 +74,7 @@
|
||||
<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>
|
||||
<a class="btn btn-lg btn-warning" href="/{{NAME}}/getting-started/installation/">View Documentation</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,12 +95,12 @@
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.6.4/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path"></span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.6.4 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"> # go to your server's IP and follow the web installer</span>
|
||||
@@ -170,7 +170,7 @@
|
||||
</div>
|
||||
|
||||
<div class="alternate-instructions">
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
|
||||
<p>Hate <code>curl | bash</code>? See our official <a href="https://github.com/Azure/azure-quickstart-templates/tree/master/dokku-vm" target="_blank">Azure</a>, <a href="https://www.digitalocean.com/features/one-click-apps/dokku/" target="_blank">DigitalOcean</a>, <a href="/{{NAME}}~{{REF}}/getting-started/install/dreamhost/">DreamHost Cloud</a>, and <a href="/{{NAME}}~{{REF}}/getting-started/install/linode/" target="_blank">Linode</a> instructions.<p>
|
||||
<p>Still no love? <a href="https://github.com/dokku/dokku/blob/master/CONTRIBUTING.md" target="_blank">Contributions welcome</a>!</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
# Process/Container management
|
||||
|
||||
> New as of 0.3.14
|
||||
|
||||
Dokku supports rudimentary process (really container) management via the `ps` plugin.
|
||||
|
||||
```
|
||||
ps <app> List processes running in app container(s)
|
||||
ps:rebuildall Rebuild all apps
|
||||
ps:rebuild <app> Rebuild an app
|
||||
ps:restartall Restart all deployed app containers
|
||||
ps:restart <app> Restart app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>] Set how many processes of a given process to run
|
||||
ps:start <app> Start app container(s)
|
||||
ps:stop <app> Stop app container(s)
|
||||
```
|
||||
|
||||
## Scaling
|
||||
|
||||
Dokku allows you to run multiple process types at different container counts. For example, if you had an app that contained 1 web app listener and 1 background job processor, dokku can, spin up 1 container for each process type defined in the Procfile. *By default, dokku will only start a single web process (if defined.)* However, if you wanted, for example, 2 job processors running simultaneously, you can modify this behavior in one of the following ways.
|
||||
|
||||
### DOKKU_SCALE file
|
||||
|
||||
You can optionally create a `DOKKU_SCALE` file in the root of your repository. Dokku expects this file to contain one line for every process defined in your Procfile.
|
||||
|
||||
Example:
|
||||
```
|
||||
web=1
|
||||
worker=2
|
||||
```
|
||||
|
||||
### `ps:scale` command
|
||||
|
||||
Dokku can also manage scaling itself via the `ps:scale` command. This command can be used to scale multiple process types at the same time.
|
||||
|
||||
```
|
||||
dokku ps:scale app_name web=1 worker=2
|
||||
```
|
||||
|
||||
*NOTE*: Dokku will always use the DOKKU_SCALE file that ships with the repo to override any local settings.
|
||||
|
||||
|
||||
## The web proctype
|
||||
|
||||
Like Heroku, we handle the `web` proctype differently from others. The `web` proctype is the only proctype that will invoke custom checks as defined by a CHECKS file. It is also the only proctype that will be launched in a container that is either proxied via nginx or bound to an external port.
|
||||
@@ -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.6.4/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/favicon.ico">
|
||||
<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.6.4/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.6.4/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<script>
|
||||
@@ -43,10 +43,98 @@
|
||||
</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.6.4/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.7.0/docs/assets/style.css" rel="stylesheet">
|
||||
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
<style>
|
||||
.highlight-show-language {
|
||||
position: relative;
|
||||
}
|
||||
.highlight-show-language-label {
|
||||
color: black;
|
||||
background-color: #CFCFCF;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
font-size: 0.9em;
|
||||
border-radius: 0 0 0 5px;
|
||||
padding: 0 0.5em;
|
||||
text-shadow: none;
|
||||
z-index: 1;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-transform: none;
|
||||
-moz-transform: none;
|
||||
-ms-transform: none;
|
||||
-o-transform: none;
|
||||
transform: none;
|
||||
}
|
||||
.highlight-output pre {
|
||||
color: #fff;
|
||||
background-color: #000;
|
||||
padding: 10px;
|
||||
}
|
||||
.improve-slideout {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: 0;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #363637;
|
||||
padding: 5px 0px 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.improve-slideout:hover {
|
||||
right: 205px;
|
||||
}
|
||||
.improve-slideout:hover .improve-slideout-inner {
|
||||
right: 0;
|
||||
}
|
||||
.improve-slideout-inner {
|
||||
position: fixed;
|
||||
bottom: 66%;
|
||||
right: -205px;
|
||||
-webkit-transition-duration: 0.3s;
|
||||
-moz-transition-duration: 0.3s;
|
||||
-o-transition-duration: 0.3s;
|
||||
transition-duration: 0.3s;
|
||||
background: #e0e0d9;
|
||||
padding: 4px 12px;
|
||||
width: 205px;
|
||||
}
|
||||
.improve-slideout-inner h6 {
|
||||
color: #363637;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
.git-improve {
|
||||
font-size: 20px;
|
||||
vertical-align: -2px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
.back-to-contents {
|
||||
position: fixed;
|
||||
bottom: calc(66% - 34px);
|
||||
right: 0;
|
||||
background: #363637;
|
||||
padding: 5px 0px 4px;
|
||||
z-index: 90;
|
||||
}
|
||||
.icon-improve {
|
||||
color: #bdbdb5;
|
||||
padding: 2px 9px 0 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -58,7 +146,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-offset-2">
|
||||
<h1 class="heading navbar-brand">
|
||||
<a href="http://dokku.viewdocs.io/dokku/">Dokku</a>
|
||||
<a href="/{{NAME}}/">Dokku</a>
|
||||
</h1>
|
||||
<ul class="nav nav-pills pull-xs-right col-md-offset-right-2">
|
||||
<li class="nav-item">
|
||||
@@ -68,7 +156,7 @@
|
||||
<a class="nav-link" href="https://github.com/dokku/dokku/">Code</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/{{NAME}}/installation/">Docs</a>
|
||||
<a class="nav-link" href="/{{NAME}}/getting-started/installation/">Docs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://webchat.freenode.net/?channels=dokku">IRC</a>
|
||||
@@ -83,6 +171,14 @@
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="improve-slideout">
|
||||
<i class="fa fa-pencil icon-improve"></i>
|
||||
<a href="https://github.com/{{USER}}/{{NAME}}/edit/master/docs/{{DOC}}" target="_blank">
|
||||
<div class="improve-slideout-inner"><h6>Improve This Doc <i class="fa fa-github git-improve"></i></h6></div>
|
||||
</a>
|
||||
</div>
|
||||
<a class="back-to-contents" href="#page-contents"><i class="fa fa-arrow-circle-up icon-improve" title="Back to Contents"></i></a>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-8 col-md-6 col-md-push-4 markdown-body" style="padding-top:16px">
|
||||
{{CONTENT}}
|
||||
@@ -90,51 +186,57 @@
|
||||
<div class="col-xs-4 col-md-2 col-md-pull-6 col-md-offset-2" style="padding-top:16px">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item disabled">Getting Started</a>
|
||||
<a href="/dokku/installation/" class="list-group-item">Getting Started with Dokku</a>
|
||||
<a href="/dokku/upgrading/" class="list-group-item">Upgrading Dokku</a>
|
||||
<a href="/dokku/troubleshooting/" class="list-group-item">Troubleshooting</a>
|
||||
<a href="/dokku/getting-started/where-to-get-help/" class="list-group-item">Getting Help</a>
|
||||
<a href="/{{NAME}}/getting-started/installation/" class="list-group-item">Getting Started with Dokku</a>
|
||||
<a href="/{{NAME}}/getting-started/upgrading/" class="list-group-item">Upgrading Dokku</a>
|
||||
<a href="/{{NAME}}/getting-started/troubleshooting/" class="list-group-item">Troubleshooting</a>
|
||||
<a href="/{{NAME}}/getting-started/where-to-get-help/" class="list-group-item">Getting Help</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment</a>
|
||||
|
||||
<a href="/dokku/application-deployment/" class="list-group-item">Deploying an Application</a>
|
||||
<a href="/dokku/deployment/buildpacks/" class="list-group-item">Buildpack Deployment</a>
|
||||
<a href="/dokku/deployment/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/dokku/deployment/images/" class="list-group-item">Image Tagging</a>
|
||||
<a href="/dokku/remote-commands/" class="list-group-item">Remote Commands</a>
|
||||
<a href="/dokku/deployment/one-off-processes/" class="list-group-item">One Off Processes/Cron</a>
|
||||
<a href="/dokku/process-management/" class="list-group-item">Scaling Apps</a>
|
||||
<a href="/dokku/deployment/user-management/" class="list-group-item">User Management</a>
|
||||
<a href="/dokku/checks-examples/" class="list-group-item">Zero Downtime Deploy Checks</a>
|
||||
<a href="/{{NAME}}/deployment/application-deployment/" class="list-group-item">Deploying an Application</a>
|
||||
<a href="/{{NAME}}/deployment/application-management/" class="list-group-item">Application Management</a>
|
||||
<a href="/{{NAME}}/deployment/remote-commands/" class="list-group-item">Remote Commands</a>
|
||||
<a href="/{{NAME}}/deployment/one-off-processes/" class="list-group-item">One Off Processes/Cron</a>
|
||||
<a href="/{{NAME}}/deployment/process-management/" class="list-group-item">Process Scaling</a>
|
||||
<a href="/{{NAME}}/deployment/user-management/" class="list-group-item">User Management</a>
|
||||
<a href="/{{NAME}}/deployment/zero-downtime-deploys/" class="list-group-item">Zero Downtime Deploy Checks</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Deployment Methods</a>
|
||||
|
||||
<a href="/{{NAME}}/deployment/methods/buildpacks/" class="list-group-item">Buildpack Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/dockerfiles/" class="list-group-item">Dockerfile Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/images/" class="list-group-item">Docker Image Deployment</a>
|
||||
<a href="/{{NAME}}/deployment/methods/tar/" class="list-group-item">Tarfile Deployment</a>
|
||||
|
||||
<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/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>
|
||||
<a href="/{{NAME}}/configuration/environment-variables/" class="list-group-item">Environment Variables</a>
|
||||
<a href="/{{NAME}}/configuration/dns/" class="list-group-item">DNS Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/domains/" class="list-group-item">Domain Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/nginx/" class="list-group-item">Nginx Configuration</a>
|
||||
<a href="/{{NAME}}/configuration/ssl/" class="list-group-item">SSL Configuration</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Advanced Usage</a>
|
||||
|
||||
<a href="/dokku/backup-recovery/" class="list-group-item">Backup and Recovery</a>
|
||||
<a href="/dokku/deployment/deployment-tasks/" class="list-group-item">Deployment Tasks</a>
|
||||
<a href="/dokku/docker-options/" class="list-group-item">Docker Container Options</a>
|
||||
<a href="/dokku/dokku-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/dokku/proxy/" class="list-group-item">Proxy Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/backup-recovery/" class="list-group-item">Backup and Recovery</a>
|
||||
<a href="/{{NAME}}/advanced-usage/deployment-tasks/" class="list-group-item">Deployment Tasks</a>
|
||||
<a href="/{{NAME}}/advanced-usage/docker-options/" class="list-group-item">Docker Container Options</a>
|
||||
<a href="/{{NAME}}/advanced-usage/event-logs/" class="list-group-item">Event Logs</a>
|
||||
<a href="/{{NAME}}/advanced-usage/persistent-storage/" class="list-group-item">Persistent Storage</a>
|
||||
<a href="/{{NAME}}/advanced-usage/proxy-management/" class="list-group-item">Proxy and Port Management</a>
|
||||
<a href="/{{NAME}}/advanced-usage/repository-management/" class="list-group-item">Repository Management</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Community Contributions</a>
|
||||
|
||||
<a href="/dokku/community/clients/" class="list-group-item">Clients</a>
|
||||
<a href="/dokku/plugins/" class="list-group-item">Plugins</a>
|
||||
<a href="/{{NAME}}/community/clients/" class="list-group-item">Clients</a>
|
||||
<a href="/{{NAME}}/community/plugins/" class="list-group-item">Plugins</a>
|
||||
|
||||
<a href="#" class="list-group-item disabled">Development</a>
|
||||
|
||||
<a href="/dokku/development/plugin-creation/" class="list-group-item">Plugin Creation</a>
|
||||
<a href="/dokku/development/plugin-triggers/" class="list-group-item">Plugin Triggers</a>
|
||||
<a href="/dokku/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/dokku/development/release-process/" class="list-group-item">Release Process</a>
|
||||
<a href="/{{NAME}}/development/plugin-creation/" class="list-group-item">Plugin Creation</a>
|
||||
<a href="/{{NAME}}/development/plugin-triggers/" class="list-group-item">Plugin Triggers</a>
|
||||
<a href="/{{NAME}}/development/testing/" class="list-group-item">Running Tests</a>
|
||||
<a href="/{{NAME}}/development/release-process/" class="list-group-item">Release Process</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -172,6 +274,35 @@
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/1.3.0/anchor.js"></script>
|
||||
<script>
|
||||
// Source: https://github.com/Alhadis/Snippets/blob/master/js/polyfills/IE8-child-elements.js
|
||||
if (!('nextElementSibling' in document.documentElement)) {
|
||||
Object.defineProperty(Element.prototype, 'nextElementSibling', {
|
||||
get: function () {
|
||||
var e = this.nextSibling;
|
||||
while (e && 1 !== e.nodeType) {
|
||||
e = e.nextSibling;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
});
|
||||
}
|
||||
// Source: https://jonlabelle.com/snippets/view/javascript/wrap-an-html-element-in-javascript
|
||||
HTMLElement.prototype.wrap = function (elms) {
|
||||
if (!elms.length) elms = [elms];
|
||||
for (var i = elms.length - 1; i >= 0; i--) {
|
||||
var child = (i > 0) ? this.cloneNode(true) : this;
|
||||
var el = elms[i];
|
||||
var parent = el.parentNode;
|
||||
var sibling = el.nextSibling;
|
||||
child.appendChild(el);
|
||||
if (sibling) {
|
||||
parent.insertBefore(child, sibling);
|
||||
} else {
|
||||
parent.appendChild(child);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function (e) {
|
||||
var markdownBody = document.querySelectorAll('.markdown-body')[0],
|
||||
isRedirect = markdownBody.innerHTML.trim().indexOf('<p>See the <a href=') === 0;
|
||||
@@ -185,13 +316,14 @@
|
||||
var tables = document.querySelectorAll('table'),
|
||||
blockquotes = document.querySelectorAll('blockquote'),
|
||||
versionList = document.querySelectorAll('.rst-other-versions dl')[0],
|
||||
backToContentsEl = document.querySelectorAll('.back-to-contents')[0]
|
||||
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("/"),
|
||||
localPath = location.pathname.split('/').splice(2).join('/'),
|
||||
addClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.add(className);
|
||||
@@ -203,37 +335,69 @@
|
||||
if (elem.addEventListener) {
|
||||
elem.addEventListener(type, fn, false);
|
||||
} else if (elem.attachEvent) {
|
||||
elem.attachEvent("on" + type, function() {
|
||||
elem.attachEvent('on' + type, function() {
|
||||
return fn.call(elem, window.event);
|
||||
});
|
||||
} else {
|
||||
elem["on" + type] = fn;
|
||||
elem['on' + type] = fn;
|
||||
}
|
||||
},
|
||||
hasClass = function(el, className) {
|
||||
hasClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
return el.classList.contains(className);
|
||||
} else {
|
||||
return new RegExp('(^| )' + className + '( |$)', 'gi').test(el.className);
|
||||
}
|
||||
},
|
||||
removeClass = function(el, className) {
|
||||
removeClass = function (el, className) {
|
||||
if (el.classList) {
|
||||
el.classList.remove(className);
|
||||
} else {
|
||||
el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');;
|
||||
}
|
||||
},
|
||||
languageClass = function (el) {
|
||||
if (!hasClass(el, 'highlight')) {
|
||||
return;
|
||||
}
|
||||
var classes = [];
|
||||
if (el.classList) {
|
||||
classes = el.classList.value.split(/\s+/);
|
||||
} else {
|
||||
classes = el.className.split(/\s+/);
|
||||
}
|
||||
var language = null;
|
||||
for (i = 0; i < classes.length; i++) {
|
||||
if (classes[i].lastIndexOf('highlight-source-', 0) === 0) {
|
||||
language = classes[i].replace('highlight-source-', '');
|
||||
break;
|
||||
}
|
||||
}
|
||||
return language;
|
||||
};
|
||||
|
||||
addListener(backToContentsEl, 'click', function(e) {
|
||||
e.preventDefault();
|
||||
var scrollToTop = window.setInterval(function() {
|
||||
var pos = window.pageYOffset;
|
||||
if ( pos > 0 ) {
|
||||
window.scrollTo( 0, pos - 20 );
|
||||
} else {
|
||||
window.clearInterval( scrollToTop );
|
||||
}
|
||||
}, 1);
|
||||
return false;
|
||||
});
|
||||
|
||||
var ls2 = {
|
||||
save : function(key, jsonData, expirationMS) {
|
||||
if (typeof (Storage) == "undefined") { return false; }
|
||||
save : function (key, jsonData, expirationMS) {
|
||||
if (typeof (Storage) === 'undefined') { return false; }
|
||||
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime()/1000 + expirationMS}
|
||||
localStorage.setItem(key, JSON.stringify(record));
|
||||
return jsonData;
|
||||
},
|
||||
load : function(key) {
|
||||
if (typeof (Storage) == "undefined") { return false; }
|
||||
load : function (key) {
|
||||
if (typeof (Storage) === 'undefined') { return false; }
|
||||
var record = JSON.parse(localStorage.getItem(key));
|
||||
if (!record){return false;}
|
||||
return (new Date().getTime()/1000 < record.timestamp && JSON.parse(record.value));
|
||||
@@ -241,22 +405,22 @@
|
||||
};
|
||||
|
||||
var ToC =
|
||||
"<nav role='navigation' class='table-of-contents'>" +
|
||||
"<ul>";
|
||||
'<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');
|
||||
link = '#' + el.getAttribute('id');
|
||||
currentDepth = parseInt(el.nodeName.replace('H', ''), 10);
|
||||
|
||||
newLine =
|
||||
"<li>" +
|
||||
"<a href='" + link + "' class='current-depth-" + currentDepth + "'>" +
|
||||
'<li>' +
|
||||
'<a href="' + link + '" class="current-depth-' + currentDepth + '">' +
|
||||
title +
|
||||
"</a>" +
|
||||
"</li>";
|
||||
'</a>' +
|
||||
'</li>';
|
||||
|
||||
if (currentDepth === lastNodeDepth || lastNodeDepth === null) {
|
||||
} else if (currentDepth > lastNodeDepth) {
|
||||
@@ -268,7 +432,7 @@
|
||||
|
||||
lastNodeDepth = currentDepth;
|
||||
});
|
||||
ToC += "</ul></nav>";
|
||||
ToC += '</ul></nav>';
|
||||
|
||||
if (count > 1) {
|
||||
var navItems = document.querySelectorAll('.list-group-item');
|
||||
@@ -279,7 +443,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Array.prototype.forEach.call(blockquotes, function (el, i) {
|
||||
if (el.innerHTML.toLowerCase().indexOf('new as of') !== -1) {
|
||||
addClass(el, 'new-as-of');
|
||||
@@ -293,6 +456,36 @@
|
||||
});
|
||||
});
|
||||
|
||||
var addLanguageLabel = function (el, language) {
|
||||
var labelWrapper = document.createElement('div'),
|
||||
label = document.createElement('div');
|
||||
|
||||
labelWrapper.setAttribute('class', 'highlight-show-language');
|
||||
label.setAttribute('class', 'highlight-show-language-label');
|
||||
label.appendChild(document.createTextNode(language));
|
||||
labelWrapper.appendChild(label);
|
||||
el.insertBefore(labelWrapper, el.firstChild);
|
||||
};
|
||||
|
||||
var highlightElements = document.querySelectorAll('pre');
|
||||
Array.prototype.forEach.call(highlightElements, function(el, i) {
|
||||
var language = languageClass(el.parentElement);
|
||||
if (typeof (language) === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
addLanguageLabel(el.parentElement, language);
|
||||
|
||||
var nextEl = el.parentElement.nextElementSibling;
|
||||
if (nextEl !== null && nextEl.nodeName.toLowerCase() === 'pre') {
|
||||
var wrapper = document.createElement('div');
|
||||
wrapper.setAttribute('class', 'highlight-output');
|
||||
wrapper.wrap(nextEl);
|
||||
addLanguageLabel(wrapper, 'output');
|
||||
addClass(el, 'highlight-has-output');
|
||||
}
|
||||
});
|
||||
|
||||
addListener(currentVersionEl, 'click', function() {
|
||||
if (hasClass(versionContainer, 'shift-up')) {
|
||||
removeClass(versionContainer, 'shift-up');
|
||||
@@ -330,7 +523,7 @@
|
||||
versionName = 'master';
|
||||
}
|
||||
|
||||
a.setAttribute('href', "/" + ref + "/" + localPath);
|
||||
a.setAttribute('href', '/' + ref + '/' + localPath);
|
||||
a.appendChild(document.createTextNode(versionName));
|
||||
if (versionName == currentVersion) {
|
||||
var strong = document.createElement('strong');
|
||||
@@ -369,7 +562,7 @@
|
||||
if (!data) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open('GET', '/dokku/assets/versions.json', true);
|
||||
request.setRequestHeader("Cache-Control", "no-cache, no-store");
|
||||
request.setRequestHeader('Cache-Control', 'no-cache, no-store');
|
||||
|
||||
request.onload = function() {
|
||||
if (request.status >= 200 && request.status < 400) {
|
||||
|
||||
29
docs/viewdocs.json
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"redirects": {
|
||||
"advanced-installation": "getting-started/advanced-installation",
|
||||
"troubleshooting": "getting-started/troubleshooting",
|
||||
"upgrading": "getting-started/upgrading",
|
||||
|
||||
"application-deployment": "deployment/application-deployment",
|
||||
"checks-examples": "deployment/zero-downtime-deploys/",
|
||||
"process-management": "deployment/process-management/",
|
||||
"remote-commands": "deployment/remote-commands/",
|
||||
|
||||
"deployment/buildpacks": "deployment/methods/buildpacks/",
|
||||
"deployment/dockerfiles": "deployment/methods/dockerfiles/",
|
||||
"deployment/images": "deployment/methods/images/",
|
||||
"configuration-management": "configuration/environment-variables/",
|
||||
"deployment/ssl-configuration": "configuration/ssl/",
|
||||
"dns": "configuration/dns/",
|
||||
"nginx": "configuration/nginx/",
|
||||
|
||||
"backup-recovery": "advanced-usage/backup-recovery/",
|
||||
"deployment-tasks": "advanced-usage/deployment-tasks/",
|
||||
"docker-options": "advanced-usage/docker-options/",
|
||||
"dokku-events-logs": "advanced-usage/event-logs/",
|
||||
"dokku-storage": "advanced-usage/persistent-storage/",
|
||||
"proxy": "advanced-usage/proxy-management/",
|
||||
|
||||
"plugins": "community/plugins/"
|
||||
}
|
||||
}
|
||||
2
dokku
@@ -37,7 +37,7 @@ export DOKKU_LOGS_DIR=${DOKKU_LOGS_DIR:="/var/log/dokku"}
|
||||
export DOKKU_EVENTS_LOGFILE=${DOKKU_EVENTS_LOGFILE:="$DOKKU_LOGS_DIR/events.log"}
|
||||
|
||||
export DOKKU_CONTAINER_LABEL=dokku
|
||||
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL"
|
||||
export DOKKU_GLOBAL_RUN_ARGS="--label=$DOKKU_CONTAINER_LABEL --env=USER=herokuishuser"
|
||||
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ get_phase_script() {
|
||||
local APP_JSON_FILE="$GET_PHASE_SCRIPT_TMP_WORK_DIR/app.json"
|
||||
trap 'rm -rf "$GET_PHASE_SCRIPT_TMP_WORK_DIR" > /dev/null' RETURN INT TERM
|
||||
|
||||
copy_from_image "$IMAGE" "/app/app.json" "$GET_PHASE_SCRIPT_TMP_WORK_DIR" 2>/dev/null || true
|
||||
copy_from_image "$IMAGE" "app.json" "$GET_PHASE_SCRIPT_TMP_WORK_DIR" 2>/dev/null || true
|
||||
|
||||
if [[ -f "$APP_JSON_FILE" ]];then
|
||||
local VALUE=$(get_json_value "scripts.dokku.${PHASE_SCRIPT_KEY}" < "$APP_JSON_FILE")
|
||||
@@ -23,7 +23,7 @@ get_phase_script() {
|
||||
|
||||
execute_script() {
|
||||
declare desc="executes appropriate phase script key from app.json"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_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
|
||||
@@ -49,6 +49,8 @@ execute_script() {
|
||||
COMMAND+=" fi "
|
||||
|
||||
local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
[[ -d $CACHE_DIR ]] || mkdir -p "$CACHE_DIR"
|
||||
|
||||
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")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core standard plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -8,7 +8,7 @@ dokku_run_cmd() {
|
||||
declare desc="runs command in container based on app image"
|
||||
local cmd="run"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local APP="$2"; local IMAGE_TAG=$(get_running_image_tag "$APP"); local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
verify_app_name "$APP"
|
||||
|
||||
shift 2
|
||||
|
||||
1
plugins/20_events/deployed-app-image-repo
Symbolic link
@@ -0,0 +1 @@
|
||||
hook
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core events logging plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core apps plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
apps_pre_delete() {
|
||||
declare desc="apps pre-delete plugin trigger"
|
||||
local trigger="apps_pre_delete"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG"); local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG"); local CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $CACHE_DIR ]]; then
|
||||
|
||||
@@ -11,15 +11,18 @@ apps_rename_cmd() {
|
||||
[[ -d "$DOKKU_ROOT/$3" ]] && dokku_log_fail "Name is already taken"
|
||||
local OLD_APP="$2"
|
||||
local NEW_APP="$3"
|
||||
local OLD_CACHE_DIR="$DOKKU_ROOT/$OLD_APP/cache"
|
||||
|
||||
mkdir -p "$DOKKU_ROOT/$NEW_APP"
|
||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$DOKKU_ROOT/$OLD_APP/cache:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
rm -rf "$DOKKU_ROOT/$OLD_APP/cache"
|
||||
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR"; then
|
||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
fi
|
||||
rm -rf "$OLD_CACHE_DIR"
|
||||
cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP"
|
||||
DOKKU_APPS_FORCE_DELETE=1 apps_destroy "$OLD_APP"
|
||||
sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
||||
ps_rebuild "$NEW_APP"
|
||||
plugn trigger post-app-rename "$OLD_APP" "$NEW_APP"
|
||||
echo "Renaming $OLD_APP to $NEW_APP... done"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core build-env plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -27,7 +27,7 @@ build_env_pre_build_buildpack() {
|
||||
dokku_log_info1 "Adding BUILD_ENV to build environment..."
|
||||
# create build env files for use in buildpacks like this:
|
||||
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
|
||||
local id=$(echo $BUILD_ENV |sed -e 's@export @@g' -e 's@\\n@ @g' | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "for ENV_VAR in $(cat); do echo \$ENV_VAR |sed 's@^\([^=]*\)=\(.*\)\$@echo \\\"\2\\\" >/tmp/env/\1@g' >>/tmp/set_env.sh; done && mkdir -p /tmp/env && /bin/bash /tmp/set_env.sh")
|
||||
local id=$(echo $BUILD_ENV | sed -e 's@export @@g' -e 's@\\n@ @g' | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; for ENV_VAR in $(cat); do echo \$ENV_VAR | cut -d'=' -f2- > /tmp/env/\$(echo \$ENV_VAR | cut -d'=' -f1); done " )
|
||||
test "$(docker wait "$id")" -eq 0
|
||||
docker commit "$id" "$IMAGE" > /dev/null
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core certificate management plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -38,7 +38,6 @@ certs_set() {
|
||||
if is_file_import "$CRT_FILE" "$KEY_FILE"; then
|
||||
# importing from file
|
||||
true
|
||||
|
||||
elif is_tar_import; then
|
||||
local CERTS_SET_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku_certs_set.XXXX")
|
||||
pushd "$CERTS_SET_TMP_WORK_DIR" &> /dev/null
|
||||
@@ -64,10 +63,8 @@ certs_set() {
|
||||
else
|
||||
local KEY_FILE=$KEY_FILE_SEARCH
|
||||
fi
|
||||
|
||||
else
|
||||
dokku_log_fail "Tar archive containing server.crt and server.key expected on stdin"
|
||||
|
||||
fi
|
||||
|
||||
mkdir -p "$APP_SSL_PATH"
|
||||
|
||||
@@ -53,7 +53,6 @@ checks_check_deploy() {
|
||||
local DOKKU_APP_CONTAINER_ID=${DOKKU_APP_CIDS[0]}
|
||||
fi
|
||||
|
||||
|
||||
# source global and in-app envs to get DOKKU_CHECKS_WAIT and any other necessary vars
|
||||
eval "$(config_export global)"
|
||||
eval "$(config_export app "$APP")"
|
||||
@@ -95,7 +94,7 @@ checks_check_deploy() {
|
||||
# We allow custom check for web instances only
|
||||
if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then
|
||||
dokku_log_verbose "For more efficient zero downtime deployments, create a file CHECKS."
|
||||
dokku_log_verbose "See http://dokku.viewdocs.io/dokku/checks-examples.md for examples"
|
||||
dokku_log_verbose "See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples"
|
||||
dokku_log_verbose "CHECKS file not found in container: Running simple container check..."
|
||||
else
|
||||
dokku_log_verbose "Non web container detected: Running default container check..."
|
||||
|
||||
@@ -10,6 +10,7 @@ case "$1" in
|
||||
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:run <app> [process-type(s)], Runs zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
checks:skip <app> [process-type(s)], Skip zero-downtime checks for all processes (or comma-separated process-type list)
|
||||
help_content
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core checks plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
89
plugins/checks/subcommands/run
Executable file
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
|
||||
check_all_processes() {
|
||||
local APP="$1"; CHECK_PROC_TYPE="$2"
|
||||
local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
|
||||
local VALID_CHECK_PROC_TYPE=false
|
||||
|
||||
local line; local PROC_TYPE; local PROC_COUNT
|
||||
while read -r line || [[ -n "$line" ]]; do
|
||||
[[ "$line" =~ ^#.* ]] && continue
|
||||
line="$(strip_inline_comments "$line")"
|
||||
local PROC_TYPE=${line%%=*}
|
||||
local PROC_COUNT=${line#*=}
|
||||
|
||||
if [[ -n "$CHECK_PROC_TYPE" ]] && [[ "$CHECK_PROC_TYPE" != "$PROC_TYPE" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
VALID_CHECK_PROC_TYPE=true
|
||||
if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "true" ]]; then
|
||||
dokku_log_info1 "Zero downtime is disabled for app ($APP.$PROC_TYPE). Skipping checks"
|
||||
continue
|
||||
fi
|
||||
|
||||
check_process_type "$APP" "$PROC_TYPE" "$PROC_COUNT"
|
||||
done < "$DOKKU_SCALE_FILE"
|
||||
|
||||
if [[ "$VALID_CHECK_PROC_TYPE" == "false" ]]; then
|
||||
dokku_log_fail "Invalid process type specified ($APP.$CHECK_PROC_TYPE)"
|
||||
fi
|
||||
}
|
||||
|
||||
check_process_type() {
|
||||
local APP="$1" PROC_TYPE="$2" PROC_COUNT="$3"
|
||||
local CONTAINER_INDEX=1
|
||||
|
||||
while [[ $CONTAINER_INDEX -le $PROC_COUNT ]]; do
|
||||
check_process "$APP" "$PROC_TYPE" "$CONTAINER_INDEX"
|
||||
local CONTAINER_INDEX=$(( CONTAINER_INDEX + 1 ))
|
||||
done
|
||||
}
|
||||
|
||||
check_process() {
|
||||
local APP="$1" PROC_TYPE="$2" CONTAINER_INDEX="$3"
|
||||
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"
|
||||
|
||||
if [[ ! -f "$DOKKU_CONTAINER_ID_FILE" ]]; then
|
||||
dokku_log_fail "Invalid container index specified ($APP.$PROC_TYPE.$CONTAINER_INDEX)"
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Running checks for app ($APP.$PROC_TYPE.$CONTAINER_INDEX)"
|
||||
local CONTAINER_ID=$(< "$DOKKU_CONTAINER_ID_FILE")
|
||||
local IP=$(< "$DOKKU_IP_FILE")
|
||||
local PORT=$(< "$DOKKU_PORT_FILE")
|
||||
plugn trigger check-deploy "$APP" "$CONTAINER_ID" "$PROC_TYPE" "$PORT" "$IP"
|
||||
}
|
||||
|
||||
checks_run_cmd() {
|
||||
declare desc="run zero-downtime checks for app/proctypes"
|
||||
local cmd="checks:run"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
local APP="$1"; verify_app_name "$APP"
|
||||
local PROCTYPES="${2:-_all_}"
|
||||
|
||||
dokku_log_info1 "Running pre-flight checks"
|
||||
if [[ "$PROCTYPES" == "_all_" ]]; then
|
||||
check_all_processes "$APP"
|
||||
else
|
||||
local PROC_TYPE OIFS="$IFS" IFS=,
|
||||
for PROC_TYPE in $PROCTYPES; do
|
||||
IFS="$OIFS"
|
||||
|
||||
local CONTAINER_INDEX=$(echo "$PROC_TYPE" | cut -d'.' -f2 -s)
|
||||
local PROC_TYPE=$(echo "$PROC_TYPE" | cut -d'.' -f1)
|
||||
if [[ -n "$CONTAINER_INDEX" ]]; then
|
||||
check_process "$APP" "$PROC_TYPE" "$CONTAINER_INDEX"
|
||||
else
|
||||
check_all_processes "$APP" "$PROC_TYPE"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
checks_run_cmd "$@"
|
||||
@@ -168,29 +168,33 @@ get_app_image_repo() {
|
||||
}
|
||||
|
||||
get_deploying_app_image_name() {
|
||||
declare desc="return deployed image identifier for a given app, tag tuple. validate if tag is presented"
|
||||
local APP="$1"; local IMAGE_TAG="$2";
|
||||
[[ -z "$APP" ]] && dokku_log_fail "(get_app_image_name) APP must not be null"
|
||||
declare desc="return deploying image identifier for a given app, tag tuple. validate if tag is presented"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; IMAGE_REPO="$3"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "(get_deploying_app_image_name) APP must not be null"
|
||||
|
||||
local IMAGE_REMOTE_REPOSITORY=$(plugn trigger deployed-app-repository "$APP")
|
||||
local NEW_IMAGE_TAG=$(plugn trigger deployed-app-image-tag "$APP")
|
||||
local NEW_IMAGE_REPO=$(plugn trigger deployed-app-image-repo "$APP")
|
||||
|
||||
if [[ -n "$NEW_IMAGE_TAG" ]]; then
|
||||
IMAGE_TAG="$NEW_IMAGE_TAG"
|
||||
fi
|
||||
[[ -n "$NEW_IMAGE_REPO" ]] && IMAGE_REPO="$NEW_IMAGE_REPO"
|
||||
[[ -n "$NEW_IMAGE_TAG" ]] && IMAGE_TAG="$NEW_IMAGE_TAG"
|
||||
[[ -z "$IMAGE_REPO" ]] && IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
[[ -z "$IMAGE_TAG" ]] && IMAGE_TAG="latest"
|
||||
|
||||
local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
if [[ -n "$IMAGE_REMOTE_REPOSITORY" ]]; then
|
||||
IMAGE="${IMAGE_REMOTE_REPOSITORY}${IMAGE}"
|
||||
fi
|
||||
local IMAGE="${IMAGE_REMOTE_REPOSITORY}${IMAGE_REPO}:${IMAGE_TAG}"
|
||||
verify_image "$IMAGE" || dokku_log_fail "app image ($IMAGE) not found"
|
||||
echo "$IMAGE"
|
||||
}
|
||||
|
||||
get_app_image_name() {
|
||||
declare desc="return image identifier for a given app, tag tuple. validate if tag is presented"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
local APP="$1"; local IMAGE_TAG="$2"; IMAGE_REPO="$3"
|
||||
[[ -z "$APP" ]] && dokku_log_fail "(get_app_image_name) APP must not be null"
|
||||
|
||||
if [[ -z "$IMAGE_REPO" ]]; then
|
||||
IMAGE_REPO=$(get_app_image_repo "$APP")
|
||||
fi
|
||||
|
||||
if [[ -n "$IMAGE_TAG" ]]; then
|
||||
local IMAGE="$IMAGE_REPO:$IMAGE_TAG"
|
||||
verify_image "$IMAGE" || dokku_log_fail "app image ($IMAGE) not found"
|
||||
@@ -375,7 +379,7 @@ is_deployed() {
|
||||
fi
|
||||
}
|
||||
|
||||
is_container_running () {
|
||||
is_container_running() {
|
||||
declare desc="return 0 if given docker container id is in running state"
|
||||
local CID=$1
|
||||
local CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" || true)
|
||||
@@ -387,7 +391,7 @@ is_container_running () {
|
||||
fi
|
||||
}
|
||||
|
||||
is_container_status () {
|
||||
is_container_status() {
|
||||
declare desc="return 0 if given docker container id is in given state"
|
||||
local CID=$1
|
||||
local TEMPLATE="{{.State.$2}}"
|
||||
@@ -514,7 +518,7 @@ dokku_deploy_cmd() {
|
||||
local cmd="deploy"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/proxy/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to deploy"
|
||||
local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
@@ -614,7 +618,7 @@ dokku_deploy_cmd() {
|
||||
trap 'kill_new $id' INT TERM EXIT
|
||||
if [[ "$(is_app_proctype_checks_disabled "$APP" "$PROC_TYPE")" == "false" ]]; then
|
||||
dokku_log_info1 "Attempting pre-flight checks"
|
||||
plugn trigger check-deploy "$APP" "$id" "$PROC_TYPE" "$port" "$ipaddr"
|
||||
plugn trigger check-deploy "$APP" "$id" "$PROC_TYPE" "$port" "$ipaddr"
|
||||
fi
|
||||
trap - INT TERM EXIT
|
||||
|
||||
@@ -814,24 +818,28 @@ get_ipv6_regex() {
|
||||
echo "${RE_IPV6}\$"
|
||||
}
|
||||
|
||||
get_global_vhost() {
|
||||
declare desc="return global vhost"
|
||||
get_global_vhosts() {
|
||||
declare desc="return global vhosts"
|
||||
local GLOBAL_VHOST_FILE="$DOKKU_ROOT/VHOST"
|
||||
[[ -f "$GLOBAL_VHOST_FILE" ]] && local GLOBAL_VHOST=$(< "$GLOBAL_VHOST_FILE")
|
||||
echo "$GLOBAL_VHOST"
|
||||
[[ -f "$GLOBAL_VHOST_FILE" ]] && local GLOBAL_VHOSTS=$(< "$GLOBAL_VHOST_FILE")
|
||||
echo "$GLOBAL_VHOSTS"
|
||||
}
|
||||
|
||||
is_global_vhost_enabled() {
|
||||
declare desc="returns true if we have a valid global vhost set; otherwise returns false"
|
||||
local GLOBAL_VHOST=$(get_global_vhost)
|
||||
local GLOBAL_VHOST_ENABLED=true
|
||||
local GLOBAL_VHOSTS=$(get_global_vhosts)
|
||||
local GLOBAL_VHOSTS_ENABLED=false
|
||||
local RE_IPV4="$(get_ipv4_regex)"
|
||||
local RE_IPV6="$(get_ipv6_regex)"
|
||||
|
||||
if [[ -z "$GLOBAL_VHOST" ]] || [[ "$GLOBAL_VHOST" =~ $RE_IPV4 ]] || [[ "$GLOBAL_VHOST" =~ $RE_IPV6 ]]; then
|
||||
local GLOBAL_VHOST_ENABLED=false
|
||||
fi
|
||||
echo $GLOBAL_VHOST_ENABLED
|
||||
while read -r GLOBAL_VHOST; do
|
||||
if (is_valid_hostname "$GLOBAL_VHOST"); then
|
||||
local GLOBAL_VHOSTS_ENABLED=true
|
||||
break
|
||||
fi
|
||||
done <<< "$GLOBAL_VHOSTS"
|
||||
|
||||
echo $GLOBAL_VHOSTS_ENABLED
|
||||
}
|
||||
|
||||
is_app_vhost_enabled() {
|
||||
@@ -1057,7 +1065,7 @@ strip_inline_comments() {
|
||||
|
||||
is_valid_hostname() {
|
||||
declare desc="return 0 if argument is a valid hostname; else return 1"
|
||||
local hostname_string="$1"; local hostname_regex='^(([a-zA-Z0-9\*](-?[a-zA-Z0-9])*)\.)*[a-zA-Z\*](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}$'
|
||||
local hostname_string="${1,,}"; local hostname_regex='^(([a-z0-9\*](-?[a-z0-9])*)\.)*[a-z0-9\*](-?[a-z0-9])+\.[a-z]{2,}$'
|
||||
if [[ $hostname_string =~ $hostname_regex ]]; then
|
||||
return 0
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core common plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -6,7 +6,7 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
config_docker_args() {
|
||||
declare desc="config docker-args plugin trigger"
|
||||
local trigger="$0 config_docker_args"
|
||||
local STDIN=$(cat); local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local STDIN=$(cat); local APP="$1"; local IMAGE_TAG="$2"; local IMAGE=$(get_deploying_app_image_name "$APP" "$IMAGE_TAG")
|
||||
local DOCKERFILE_ENV_FILE="$DOKKU_ROOT/$APP/DOCKERFILE_ENV_FILE"
|
||||
verify_app_name "$APP"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core config plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core docker-options plugin"
|
||||
version = "0.6.4"
|
||||
version = "0.7.0"
|
||||
[plugin.config]
|
||||
|
||||
@@ -9,11 +9,12 @@ case "$1" in
|
||||
cat<<help_content
|
||||
domains [<app>], List domains
|
||||
domains:add <app> DOMAIN, Add a domain to app
|
||||
domains:add-global DOMAIN, Add global domain name
|
||||
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
|
||||
domains:remove-global DOMAIN, Remove global domain name
|
||||
help_content
|
||||
}
|
||||
|
||||
|
||||
@@ -20,27 +20,30 @@ get_app_domains() {
|
||||
fi
|
||||
}
|
||||
|
||||
get_default_vhost() {
|
||||
declare desc="return default vhost"
|
||||
get_default_vhosts() {
|
||||
declare desc="return default vhosts"
|
||||
verify_app_name "$1"
|
||||
local APP="$1"; local RE_IPV4="$(get_ipv4_regex)"; local RE_IPV6="$(get_ipv6_regex)"
|
||||
|
||||
|
||||
if [[ "$(is_global_vhost_enabled)" == "true" ]]; then
|
||||
local VHOST=$(get_global_vhost)
|
||||
if ! ([[ "$VHOST" =~ $RE_IPV4 ]] || [[ "$VHOST" =~ $RE_IPV6 ]]); then
|
||||
local SUBDOMAIN=${APP/%\.${VHOST}/}
|
||||
local hostname=$(: | plugn trigger nginx-hostname "$APP" "$SUBDOMAIN" "$VHOST")
|
||||
if [[ ! -n $hostname ]]; then
|
||||
if [[ "$APP" == *.* ]] && [[ "$SUBDOMAIN" == "$APP" ]]; then
|
||||
local hostname="${APP/\//-}"
|
||||
else
|
||||
local hostname="${APP/\//-}.$VHOST"
|
||||
local VHOSTS=$(get_global_vhosts)
|
||||
|
||||
while read -r VHOST; do
|
||||
if ! ([[ "$VHOST" =~ $RE_IPV4 ]] || [[ "$VHOST" =~ $RE_IPV6 ]]); then
|
||||
local SUBDOMAIN=${APP/%\.${VHOST}/}
|
||||
local hostname=$(: | plugn trigger nginx-hostname "$APP" "$SUBDOMAIN" "$VHOST")
|
||||
if [[ ! -n $hostname ]]; then
|
||||
if [[ "$APP" == *.* ]] && [[ "$SUBDOMAIN" == "$APP" ]]; then
|
||||
local hostname="${APP/\//-}"
|
||||
else
|
||||
local hostname="${APP/\//-}.$VHOST"
|
||||
fi
|
||||
fi
|
||||
echo "$hostname"
|
||||
fi
|
||||
local DEFAULT_VHOST="$hostname"
|
||||
fi
|
||||
done <<< "$VHOSTS"
|
||||
fi
|
||||
echo "$DEFAULT_VHOST"
|
||||
}
|
||||
|
||||
domains_setup() {
|
||||
@@ -48,12 +51,12 @@ domains_setup() {
|
||||
verify_app_name "$1"
|
||||
local APP="$1"; local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"; local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
|
||||
local RE_IPV4="$(get_ipv4_regex)"; local RE_IPV6="$(get_ipv6_regex)"
|
||||
local DEFAULT_VHOST="$(get_default_vhost "$APP")"
|
||||
local DEFAULT_VHOSTS="$(get_default_vhosts "$APP")"
|
||||
|
||||
if [[ ! -f $APP_VHOST_PATH ]]; then
|
||||
if [[ -n "$DEFAULT_VHOST" ]]; then
|
||||
if [[ -n "$DEFAULT_VHOSTS" ]]; then
|
||||
dokku_log_info1 "Creating new $APP_VHOST_PATH..."
|
||||
echo "$DEFAULT_VHOST" > "$APP_VHOST_PATH"
|
||||
echo "$DEFAULT_VHOSTS" > "$APP_VHOST_PATH"
|
||||
else
|
||||
dokku_log_info2 "no global VHOST set. disabling vhost support"
|
||||
disable_app_vhost "$APP" --no-restart
|
||||
@@ -93,11 +96,10 @@ domains_remove() {
|
||||
declare desc="remove list of app domains"
|
||||
verify_app_name "$1"
|
||||
local APP="$1"; local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
|
||||
local DEFAULT_VHOST="$(get_default_vhost "$APP")"
|
||||
shift 1
|
||||
|
||||
for DOMAIN in "$@"; do
|
||||
sed -i "\|^$DOMAIN\$|d" "$DOKKU_ROOT/$APP/VHOST"
|
||||
sed -i "\|^$DOMAIN\$|d" "$APP_VHOST_PATH"
|
||||
dokku_log_info1 "Removed $DOMAIN from $APP"
|
||||
done
|
||||
plugn trigger post-domains-update "$APP" "remove" "$@"
|
||||
@@ -119,11 +121,11 @@ domains_enable() {
|
||||
declare desc="enable domains/VHOST support"
|
||||
verify_app_name "$1"
|
||||
local APP="$1"; local APP_VHOST_PATH="$DOKKU_ROOT/$APP/VHOST"
|
||||
local DEFAULT_VHOST="$(get_default_vhost "$APP")"
|
||||
local DEFAULT_VHOSTS="$(get_default_vhosts "$APP")"
|
||||
|
||||
if [[ "$(is_app_vhost_enabled "$APP")" == "false" ]];then
|
||||
if [[ -n "$DEFAULT_VHOST" ]]; then
|
||||
echo "$DEFAULT_VHOST" > "$APP_VHOST_PATH"
|
||||
if [[ -n "$DEFAULT_VHOSTS" ]]; then
|
||||
echo "$DEFAULT_VHOSTS" > "$APP_VHOST_PATH"
|
||||
fi
|
||||
[[ "$2" == "--no-restart" ]] && local ENABLE_APP_VHOST_ARGS=$2
|
||||
enable_app_vhost "$APP" "$ENABLE_APP_VHOST_ARGS"
|
||||
@@ -132,14 +134,32 @@ domains_enable() {
|
||||
fi
|
||||
}
|
||||
|
||||
domains_set_global() {
|
||||
declare desc="set global domain name"
|
||||
local NEW_GLOBAL_VHOST="$1"; local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
|
||||
domains_add_global() {
|
||||
declare desc="add list of global domains"
|
||||
local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
|
||||
|
||||
if [[ -n "$NEW_GLOBAL_VHOST" ]]; then
|
||||
echo "$NEW_GLOBAL_VHOST" > "$GLOBAL_VHOST_PATH"
|
||||
dokku_log_info1 "Set global domain to $NEW_GLOBAL_VHOST"
|
||||
else
|
||||
dokku_log_fail "New global domain name must not be blank"
|
||||
fi
|
||||
for DOMAIN in "$@"; do
|
||||
if ! (is_valid_hostname "$DOMAIN"); then
|
||||
dokku_log_fail "$DOMAIN is invalid. exiting..."
|
||||
fi
|
||||
done
|
||||
|
||||
for DOMAIN in "$@"; do
|
||||
if [[ $(egrep -w "^$DOMAIN$" "$GLOBAL_VHOST_PATH" > /dev/null 2>&1; echo $?) -eq 0 ]]; then
|
||||
dokku_log_info1 "Skipping: $DOMAIN already added"
|
||||
else
|
||||
echo "$DOMAIN" >> "$GLOBAL_VHOST_PATH"
|
||||
dokku_log_info1 "Added $DOMAIN"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
domains_remove_global() {
|
||||
declare desc="remove list of domains"
|
||||
local GLOBAL_VHOST_PATH="$DOKKU_ROOT/VHOST"
|
||||
|
||||
for DOMAIN in "$@"; do
|
||||
sed -i "\|^$DOMAIN\$|d" "$GLOBAL_VHOST_PATH"
|
||||
dokku_log_info1 "Removed $DOMAIN"
|
||||
done
|
||||
}
|
||||
|
||||