Compare commits
113 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a0b299af7 | ||
|
|
543642eb5f | ||
|
|
bf1e9ddaee | ||
|
|
71351f1a02 | ||
|
|
33c6e56030 | ||
|
|
a0e1416027 | ||
|
|
c79a43f38a | ||
|
|
3630cc2a99 | ||
|
|
309cdc6ab6 | ||
|
|
2b7e327e09 | ||
|
|
db300f06da | ||
|
|
a2b775af42 | ||
|
|
999cbc0739 | ||
|
|
eb9d659361 | ||
|
|
99ce2fa51d | ||
|
|
d3a6e39b4e | ||
|
|
bc00acb5ff | ||
|
|
9a966f6f08 | ||
|
|
34a5766ce3 | ||
|
|
be9ab06116 | ||
|
|
2a4155aefc | ||
|
|
4dde70abdc | ||
|
|
7eeb6a2b95 | ||
|
|
6931c3df5a | ||
|
|
0ad650fb91 | ||
|
|
72135f8fbf | ||
|
|
546522264e | ||
|
|
353f96cb93 | ||
|
|
7a72146e82 | ||
|
|
f3627d4f84 | ||
|
|
d98ed122a6 | ||
|
|
30be9b7959 | ||
|
|
8562afde38 | ||
|
|
09936b37fa | ||
|
|
8051fb86e7 | ||
|
|
c29ae712f3 | ||
|
|
88b0fc5d22 | ||
|
|
889555bb43 | ||
|
|
50194e5923 | ||
|
|
bfecd3beb4 | ||
|
|
74fd7e22d0 | ||
|
|
2b97d9d677 | ||
|
|
546010246c | ||
|
|
f002a662bd | ||
|
|
fde47dfa80 | ||
|
|
f7e8c9be90 | ||
|
|
606e27653f | ||
|
|
28633003d5 | ||
|
|
dcf9e0ae58 | ||
|
|
5b526a52fc | ||
|
|
729a2246c6 | ||
|
|
c8c3381dd6 | ||
|
|
9767b90826 | ||
|
|
68b02c40a7 | ||
|
|
16544a77e2 | ||
|
|
1c6916c68f | ||
|
|
d7b5d6e904 | ||
|
|
fdefff329a | ||
|
|
39bba0b36e | ||
|
|
17e7869150 | ||
|
|
fec6db13fb | ||
|
|
fc512b3231 | ||
|
|
1805f41918 | ||
|
|
7562610c7d | ||
|
|
95d96ce1ab | ||
|
|
16365a5a44 | ||
|
|
f13c77d50d | ||
|
|
245718f236 | ||
|
|
07aace9975 | ||
|
|
244bb25e6a | ||
|
|
2a94bf267b | ||
|
|
b22b366fb1 | ||
|
|
5387bce2d9 | ||
|
|
f2c1cd8a35 | ||
|
|
188694fb29 | ||
|
|
84fba7ff2b | ||
|
|
6c7d34a773 | ||
|
|
61f9ae6e67 | ||
|
|
5a74d5c247 | ||
|
|
bb525a3cf1 | ||
|
|
933a5c0abf | ||
|
|
a2f0962b76 | ||
|
|
73b3c4af40 | ||
|
|
51a50fb571 | ||
|
|
40047f0f8b | ||
|
|
89d96dfee1 | ||
|
|
cac272a247 | ||
|
|
932e8191ad | ||
|
|
63d961afa0 | ||
|
|
7c88cecad4 | ||
|
|
389d677392 | ||
|
|
70b29590b9 | ||
|
|
f7a1f5c095 | ||
|
|
220923071c | ||
|
|
3fb59fd04d | ||
|
|
5667f9cef1 | ||
|
|
b8630b45d7 | ||
|
|
4cb713cebf | ||
|
|
b962221b41 | ||
|
|
1d22f8c897 | ||
|
|
b0a32dfd1b | ||
|
|
1314b3942d | ||
|
|
55b2aba3a8 | ||
|
|
9da11dc8f8 | ||
|
|
1581884c6d | ||
|
|
2b1929fc33 | ||
|
|
6c50e62f32 | ||
|
|
3f0a6a99da | ||
|
|
94b2a6a014 | ||
|
|
ae2b2febe9 | ||
|
|
908f551e0f | ||
|
|
07506f1f53 | ||
|
|
29ce25a040 |
@@ -58,7 +58,7 @@ etc). Please include:
|
||||
* The output of `free -m`
|
||||
* The output of `docker version`.
|
||||
* The output of `docker -D info`.
|
||||
* The output of `docker run -ti gliderlabs/herokuish:latest herokuish version`
|
||||
* The output of `docker run --rm -ti gliderlabs/herokuish:latest herokuish version`
|
||||
* The output of `dokku version`.
|
||||
* The output of `dokku plugin`.
|
||||
|
||||
|
||||
103
HISTORY.md
103
HISTORY.md
@@ -1,5 +1,108 @@
|
||||
# History
|
||||
|
||||
## 0.4.13
|
||||
|
||||
We lied. *This* is the final 0.4.x release. This specific release fixes support for bash `4.2`, which may be the only bash version available for certain testing environments.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1871: @michaelshobbs Support bash 4.2 so we don't have to modify all plugin test envs
|
||||
- #1872: @kenips Update log to better reflect what's going on with CHECKS
|
||||
|
||||
## 0.4.12
|
||||
|
||||
This is a small bugfix release, which will be the final release before the 0.5.x line. You can follow along on bugs/features we hope to cleanup for 0.5.x [here](https://github.com/dokku/dokku/milestones/v0.5.0).
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1868: @alessio Prevent dokku to hang on events:help
|
||||
- #1870: @u2mejc Remove arg check from docker-options/functions, global var cleanup
|
||||
|
||||
## 0.4.11
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1840: @alessio Append trailing slash '/' to $PLUGIN_DIR
|
||||
- #1841: @michaelshobbs Don't build nginx config if the app has not been deployed
|
||||
- #1844: @michaelshobbs Handle multiple old containers and don't attempt to rename a dead container
|
||||
- #1845: @michaelshobbs Update nodejs in test apps
|
||||
- #1849: @floriangosse Fix logrotate file for debian system
|
||||
- #1862: @michaelshobbs Install bash 4.3.x on circleci
|
||||
- #1863: @znz Fix a typo in IPV6 detection
|
||||
|
||||
### New Features
|
||||
|
||||
- #1842: @michaelshobbs skip cleanup in ci to speed up tests
|
||||
- #1848: @u2mejc Move docker-options functions to functions file, rework phase_file_path
|
||||
- #1855: @jvanbaarsen Add skip_keyfile option for deb package
|
||||
- #1864: @znz Remove nullglob from ps commands
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1838: @Epigene Fixed typo in installation documentation
|
||||
- #1843: @sseemayer Move let's encrypt plugin to official plugins
|
||||
- #1854: @fedosov Update year in footer (2013-2016)
|
||||
- #1856: @madflow Fixed dead documentation link
|
||||
- #1859: @dhinus Fix command for debconf-set-selections
|
||||
|
||||
## 0.4.10
|
||||
|
||||
This release is mostly a bugfix release, though we have a few important changes:
|
||||
|
||||
- `dokku plugin:update` can now be used to update a specific plugin. Previously, this could potentially result in an error a user would have to manually resolve.
|
||||
- We have started labeling all dokku-managed containers. In a future minor release, triggering a `dokku cleanup` will remove *only* exited containers that are managed by dokku. This change allows users to start containers outside of dokku and be assured that dokku would not inadvertently remove them.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1818: @josegonzalez Fix pre-receive git-hook in apps:rename
|
||||
- #1819: @andrewsomething Write out /home/dokku/HOSTNAME as specified by the web installer.
|
||||
- #1823: @josegonzalez Fix output formatting of dokku apps
|
||||
- #1827: @michaelshobbs Use docker 1.9.0 on circleci
|
||||
- #1834: @jvanbaarsen Make sure we ignore hidden files in the SSL cert check
|
||||
- #1835: @josegonzalez Add support to herokuish for more versions of docker-engine
|
||||
- #1837: @michaelshobbs Add back some deploy tests that test dokku functionality
|
||||
|
||||
### New Features
|
||||
|
||||
- #1826: @michaelshobbs Implement plugn update
|
||||
- #1828: @michaelshobbs Label all dokku-managed containers
|
||||
- #1829: @michaelshobbs Implement dokku report command
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1822: --no-restart option after config:set not before
|
||||
|
||||
## 0.4.9
|
||||
|
||||
This release is significant for two reasons:
|
||||
|
||||
- A bugfix for git submodule support that was broken in 0.4.7
|
||||
- Improved and tested support for modern variants of Ubuntu/Debian. This should also improve support for docker-based deployments of dokku, as well as potential support for the upcoming Ubuntu 16.04 release.
|
||||
|
||||
Thanks to all the contributors who helped with this release!
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- #1810: @josegonzalez Fix debian packaging for usage inside of docker containers
|
||||
- #1814: @blackxored Add support for new method of extracting container IP
|
||||
- #1807: @josegonzalez Allow updating submodules at any revision
|
||||
|
||||
### New Features
|
||||
|
||||
- #1812: @josegonzalez Fully-tested debian packaging for modern Ubuntu/Debian distributions
|
||||
|
||||
### Documentation
|
||||
|
||||
- #1811: @josegonzalez Add dokku haproxy to plugins
|
||||
|
||||
## 0.4.8
|
||||
|
||||
If upgrading to 0.4.8, please note that we have tightened the application naming schema, per docker requirements. Upgrade your dokku installation to 0.4.7 first to take advantage of the `dokku apps:rename` command if you are having issues with the new requirement.
|
||||
|
||||
@@ -10,8 +10,8 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
|
||||
|
||||
To install the latest stable release, you can run the following commands as a user that has access to `sudo`:
|
||||
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.13/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.13 bash bootstrap.sh
|
||||
|
||||
### Upgrading
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ hostname -f > /dev/null 2>&1 || {
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "--> Ensuring we have the proper dependencies"
|
||||
apt-get update -qq > /dev/null
|
||||
[[ $(lsb_release -sr) == "12.04" ]] && apt-get install -qq -y python-software-properties
|
||||
|
||||
@@ -90,6 +91,7 @@ elif [[ -n $DOKKU_TAG ]]; then
|
||||
elif [[ "$major" -eq "0" ]] && [[ "$minor" -ge "4" ]] && [[ "$patch" -ge "0" ]]; then
|
||||
export DOKKU_CHECKOUT="$DOKKU_SEMVER"
|
||||
dokku_install_package
|
||||
echo "--> Running post-install dependency installation"
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
else
|
||||
export DOKKU_CHECKOUT="$DOKKU_TAG"
|
||||
@@ -97,6 +99,7 @@ elif [[ -n $DOKKU_TAG ]]; then
|
||||
fi
|
||||
else
|
||||
dokku_install_package
|
||||
echo "--> Running post-install dependency installation"
|
||||
sudo -E dokku plugin:install-dependencies --core
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
machine:
|
||||
pre:
|
||||
- echo 'DOCKER_OPTS="-s btrfs -e lxc -D --userland-proxy=false"' | sudo tee -a /etc/default/docker
|
||||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.8.2-circleci-cp-workaround'
|
||||
- echo 'DOCKER_OPTS="-s btrfs -e lxc --userland-proxy=false"' | sudo tee -a /etc/default/docker
|
||||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci-cp-workaround'
|
||||
- sudo chmod 0755 /usr/bin/docker
|
||||
services:
|
||||
- docker
|
||||
@@ -10,8 +10,9 @@ dependencies:
|
||||
- "~/docker"
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh setup: { timeout: 300 }
|
||||
- echo "export DOKKU_SKIP_CLEANUP=true" > /home/dokku/.dokkurc/dokku_skip_cleanup
|
||||
post:
|
||||
- sudo -E make -e lint
|
||||
test:
|
||||
override:
|
||||
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 1800 }
|
||||
- ./tests/ci/parallel_runner.sh testing: { parallel: true, timeout: 3600 }
|
||||
|
||||
@@ -9,7 +9,7 @@ import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
||||
VERSION = 'v0.4.8'
|
||||
VERSION = 'v0.4.13'
|
||||
|
||||
hostname = ''
|
||||
try:
|
||||
@@ -95,6 +95,9 @@ class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
os.remove('{0}/VHOST'.format(dokku_root))
|
||||
except OSError:
|
||||
pass
|
||||
with open('{0}/HOSTNAME'.format(dokku_root), 'w') as f:
|
||||
f.write(params['hostname'].value)
|
||||
|
||||
|
||||
command = ['sshcommand', 'acl-add', 'dokku', 'admin']
|
||||
for key in params['keys'].value.split("\n"):
|
||||
|
||||
15
deb.mk
15
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.6
|
||||
HEROKUISH_VERSION ?= 0.3.8
|
||||
HEROKUISH_ARCHITECTURE = amd64
|
||||
HEROKUISH_PACKAGE_NAME = herokuish_$(HEROKUISH_VERSION)_$(HEROKUISH_ARCHITECTURE).deb
|
||||
|
||||
@@ -75,7 +75,7 @@ deb-herokuish: deb-setup
|
||||
cp -rf /tmp/tmp/herokuish /tmp/build/var/lib/herokuish
|
||||
|
||||
echo "-> Creating $(HEROKUISH_PACKAGE_NAME)"
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine | docker-engine-cs' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
|
||||
sudo fpm -t deb -s dir -C /tmp/build -n herokuish -v $(HEROKUISH_VERSION) -a $(HEROKUISH_ARCHITECTURE) -p $(HEROKUISH_PACKAGE_NAME) --deb-pre-depends 'docker-engine-cs | docker-engine | lxc-docker (>= 1.6.1) | docker.io (>= 1.6.1) | tutum-agent' --deb-pre-depends sudo --after-install /tmp/tmp/post-install --url "https://github.com/$(HEROKUISH_REPO_NAME)" --description $(HEROKUISH_DESCRIPTION) --license 'MIT License' .
|
||||
mv *.deb /tmp
|
||||
|
||||
deb-dokku: deb-setup
|
||||
@@ -85,16 +85,19 @@ deb-dokku: deb-setup
|
||||
cp -r debian /tmp/build/DEBIAN
|
||||
mkdir -p /tmp/build/usr/local/bin
|
||||
mkdir -p /tmp/build/var/lib/dokku/core-plugins/available
|
||||
mkdir -p /tmp/build/usr/local/share/man/man1
|
||||
mkdir -p /tmp/build/usr/local/share/dokku/contrib
|
||||
mkdir -p /tmp/build/usr/share/man/man1
|
||||
mkdir -p /tmp/build/usr/share/dokku/contrib
|
||||
mkdir -p /tmp/build/usr/share/doc/dokku
|
||||
|
||||
cp dokku /tmp/build/usr/local/bin
|
||||
cp LICENSE /tmp/build/usr/share/doc/dokku/copyright
|
||||
cp -r plugins/* /tmp/build/var/lib/dokku/core-plugins/available
|
||||
find plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read plugin; do touch /tmp/build/var/lib/dokku/core-plugins/available/$$plugin/.core; done
|
||||
$(MAKE) help2man
|
||||
$(MAKE) addman
|
||||
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/local/share/man/man1/dokku.1
|
||||
cp contrib/dokku-installer.py /tmp/build/usr/local/share/dokku/contrib
|
||||
cp /usr/local/share/man/man1/dokku.1 /tmp/build/usr/share/man/man1/dokku.1
|
||||
gzip -9 /tmp/build/usr/share/man/man1/dokku.1
|
||||
cp contrib/dokku-installer.py /tmp/build/usr/share/dokku/contrib
|
||||
git describe --tags > /tmp/build/var/lib/dokku/VERSION
|
||||
cat /tmp/build/var/lib/dokku/VERSION | cut -d '-' -f 1 | cut -d 'v' -f 2 > /tmp/build/var/lib/dokku/STABLE_VERSION
|
||||
git rev-parse HEAD > /tmp/build/var/lib/dokku/GIT_REV
|
||||
|
||||
0
debian/conffiles
vendored
0
debian/conffiles
vendored
6
debian/control
vendored
6
debian/control
vendored
@@ -1,11 +1,11 @@
|
||||
Package: dokku
|
||||
Version: 0.4.8
|
||||
Version: 0.4.13
|
||||
Section: web
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Depends: locales, git, make, curl, gcc, man-db, sshcommand, docker-engine-cs | docker-engine | lxc-docker (>= 1.6.1) | docker.io (>= 1.6.1) | tutum-agent, software-properties-common, python-software-properties
|
||||
Recommends: herokuish
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo
|
||||
Pre-Depends: nginx (>= 1.4.6), dnsutils, apparmor, cgroupfs-mount | cgroup-lite, plugn, sudo, python2.7, debconf
|
||||
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>
|
||||
Description: A docker-powered PaaS that helps you build and manage the lifecycle of applications
|
||||
Description: Docker-powered PaaS that helps build and manage the lifecycle of applications
|
||||
|
||||
|
||||
29
debian/postinst
vendored
29
debian/postinst
vendored
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
@@ -18,13 +18,13 @@ case "$1" in
|
||||
egrep -i "^docker" /etc/group || groupadd docker
|
||||
usermod -aG docker dokku
|
||||
|
||||
# setup plugin directories
|
||||
echo "Setting up plugin directories"
|
||||
# should be replaced by `plugn init`
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/available ${DOKKU_LIB_ROOT}/plugins/available
|
||||
mkdir -p ${DOKKU_LIB_ROOT}/core-plugins/enabled ${DOKKU_LIB_ROOT}/plugins/enabled
|
||||
touch ${DOKKU_LIB_ROOT}/core-plugins/config.toml ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
|
||||
# migrate old plugins
|
||||
echo "Migrating old plugins"
|
||||
find ${DOKKU_LIB_ROOT}/plugins/ -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ "$plugin" = "available" ] || [ "$plugin" = "enabled" ]; then
|
||||
continue
|
||||
@@ -35,7 +35,7 @@ case "$1" in
|
||||
fi
|
||||
done
|
||||
|
||||
# enable all core plugins
|
||||
echo "Enabling all core plugins"
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
ln -s ${DOKKU_LIB_ROOT}/core-plugins/available/$plugin ${DOKKU_LIB_ROOT}/plugins/available/$plugin;
|
||||
@@ -45,17 +45,31 @@ case "$1" in
|
||||
done
|
||||
chown dokku:dokku -R ${DOKKU_LIB_ROOT}/plugins ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
echo "Install all core plugins"
|
||||
dokku plugin:install --core
|
||||
|
||||
rm -f ${DOKKU_ROOT}/VERSION
|
||||
cp ${DOKKU_LIB_ROOT}/STABLE_VERSION ${DOKKU_ROOT}/VERSION
|
||||
|
||||
if [ -f /etc/init/dokku-installer.conf ] && service dokku-installer status 2> /dev/null | grep waiting; then
|
||||
sudo service dokku-installer start
|
||||
if [[ -f /etc/nginx/conf.d/dokku-installer.conf ]]; then
|
||||
echo "Setting up dokku-installer"
|
||||
/usr/share/dokku/contrib/dokku-installer.py onboot
|
||||
|
||||
if command -v systemctl &>/dev/null; then
|
||||
echo "Enabling dokku-installer"
|
||||
systemctl enable dokku-installer
|
||||
fi
|
||||
|
||||
installer_status="$(service dokku-installer status 2> /dev/null || true)"
|
||||
if echo $installer_status | grep -Eq "(inactive|waiting)" > /dev/null; then
|
||||
echo "Starting dokku-installer"
|
||||
service dokku-installer start || echo "Unable to start dokku-installer"
|
||||
fi
|
||||
fi
|
||||
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
db_stop
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -84,4 +98,5 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
db_stop
|
||||
exit 0
|
||||
|
||||
45
debian/postrm
vendored
Executable file
45
debian/postrm
vendored
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
main() {
|
||||
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
|
||||
service dokku-installer stop || true
|
||||
fi
|
||||
|
||||
rm -f /etc/init/dokku-installer.conf
|
||||
rm -f /etc/init/dokku-redeploy.conf
|
||||
rm -f /etc/systemd/system/dokku-installer.conf
|
||||
rm -f /etc/systemd/system/dokku-redeploy.service
|
||||
rm -f /etc/update-motd.d/99-dokku
|
||||
|
||||
service nginx reload
|
||||
|
||||
if [[ "$1" == "purge" ]]; then
|
||||
rm -f ${DOKKU_ROOT}/.dokkurc ${DOKKU_ROOT}/dokkurc ${DOKKU_ROOT}/tls
|
||||
rm -f ${DOKKU_ROOT}/.ssh/authorized_keys ${DOKKU_ROOT}/.sshcommand
|
||||
rm -f ${DOKKU_ROOT}/ENV ${DOKKU_ROOT}/HOSTNAME ${DOKKU_ROOT}/VERSION
|
||||
rm -rf ${DOKKU_ROOT}/.cache
|
||||
rm -rf ${DOKKU_LIB_ROOT}/core-plugins
|
||||
|
||||
rm -f ${DOKKU_LIB_ROOT}/plugins/config.toml
|
||||
if [[ -d ${DOKKU_LIB_ROOT} ]]; then
|
||||
find -L ${DOKKU_LIB_ROOT} -type l -delete
|
||||
find ${DOKKU_LIB_ROOT} -type d -empty -delete
|
||||
fi
|
||||
|
||||
if [[ -d ${DOKKU_ROOT} ]]; then
|
||||
find -L ${DOKKU_ROOT} -type l -delete
|
||||
find ${DOKKU_ROOT} -type d -empty -delete
|
||||
fi
|
||||
|
||||
if [[ -e /usr/share/debconf/confmodule ]]; then
|
||||
. /usr/share/debconf/confmodule
|
||||
db_purge
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
main "$@"
|
||||
13
debian/preinst
vendored
13
debian/preinst
vendored
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
@@ -7,14 +7,8 @@ case "$1" in
|
||||
install)
|
||||
db_get "dokku/web_config"
|
||||
if [ "$RET" = "true" ]; then
|
||||
INIT_CONF="/etc/init/dokku-installer.conf"
|
||||
NGINX_CONF="/etc/nginx/conf.d/dokku-installer.conf"
|
||||
|
||||
rm -f $INIT_CONF
|
||||
touch $INIT_CONF
|
||||
echo 'start on runlevel [2345]' >> $INIT_CONF
|
||||
echo 'exec /usr/local/share/dokku/contrib/dokku-installer.py selfdestruct' >> $INIT_CONF
|
||||
|
||||
rm -f $NGINX_CONF
|
||||
touch $NGINX_CONF
|
||||
|
||||
@@ -33,7 +27,8 @@ case "$1" in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ]; then
|
||||
db_get "dokku/skip_key_file"
|
||||
if [ -z "${DEBCONF_RECONFIGURE}" ] && [ "$RET" != "true" ]; then
|
||||
db_get "dokku/key_file"
|
||||
if [ ! -f "$RET" ]; then
|
||||
echo "Error: keyfile '$RET' not found."
|
||||
|
||||
55
debian/prerm
vendored
Executable file
55
debian/prerm
vendored
Executable file
@@ -0,0 +1,55 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail; [[ $TRACE ]] && set -x
|
||||
|
||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||
|
||||
ps_backtrace() {
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $0 PID" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare -i pid=$1;
|
||||
ppid=0;
|
||||
header_modifier="";
|
||||
while : ; do
|
||||
if [ $ppid -ne 0 ]; then
|
||||
header_modifier=h;
|
||||
fi;
|
||||
ppid=$(ps -o ppid= $pid);
|
||||
ps uww $header_modifier -p $pid;
|
||||
if [ $pid -eq 1 ]; then
|
||||
break;
|
||||
fi;
|
||||
pid=$ppid;
|
||||
done;
|
||||
}
|
||||
|
||||
main() {
|
||||
# HACK: Ensure that we only delete data when purging dokku from the system
|
||||
if ps_backtrace $BASHPID 2> /dev/null | grep dpkg | grep -- "--purge" > /dev/null; then
|
||||
echo "Processing purge"
|
||||
|
||||
echo "Destroying deployed applications"
|
||||
for app in $(DOKKU_QUIET_OUTPUT=1 dokku apps); do
|
||||
dokku --force apps:destroy $app
|
||||
done
|
||||
|
||||
# HACK: Only disable core plugins, as we don't know what data users store in non-core plugin directories
|
||||
echo "Disabling all core plugins"
|
||||
find ${DOKKU_LIB_ROOT}/core-plugins/available -mindepth 1 -maxdepth 1 -type d -printf '%f\n' | while read -r plugin; do
|
||||
if [ ! -d ${DOKKU_LIB_ROOT}/plugins/available/$plugin ]; then
|
||||
rm ${DOKKU_LIB_ROOT}/plugins/available/$plugin;
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/core-plugins plugn disable $plugin
|
||||
PLUGIN_PATH=${DOKKU_LIB_ROOT}/plugins plugn disable $plugin
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Processing $1"
|
||||
fi
|
||||
|
||||
dokku cleanup
|
||||
}
|
||||
|
||||
main "$@"
|
||||
13
debian/templates
vendored
13
debian/templates
vendored
@@ -1,19 +1,24 @@
|
||||
Template: dokku/web_config
|
||||
Description: Use the web-based config page?
|
||||
Description: Enable the web-based config page?
|
||||
Type: boolean
|
||||
Default: true
|
||||
|
||||
Template: dokku/vhost_enable
|
||||
Description: Use vhost based deployments?
|
||||
Description: Enable vhost-based deployments?
|
||||
Type: boolean
|
||||
Default: false
|
||||
|
||||
Template: dokku/hostname
|
||||
Description: Machine's hostname or IP
|
||||
Description: Hostname or IP for server:
|
||||
Type: string
|
||||
Default: dokku.me
|
||||
|
||||
Template: dokku/skip_key_file
|
||||
Description: Skip key file requirement?
|
||||
Type: boolean
|
||||
Default: false
|
||||
|
||||
Template: dokku/key_file
|
||||
Description: Keyfile for initial user
|
||||
Description: Keyfile for initial user:
|
||||
Type: string
|
||||
Default: /root/.ssh/id_rsa.pub
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<square70x70logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-70x70.png"/>
|
||||
<square150x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-150x150.png"/>
|
||||
<square310x310logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-310x310.png"/>
|
||||
<wide310x150logo src="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-310x150.png"/>
|
||||
<TileColor>#da532c</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
"name": "Dokku",
|
||||
"icons": [
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image\/png",
|
||||
"density": "0.75"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image\/png",
|
||||
"density": "1.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image\/png",
|
||||
"density": "1.5"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image\/png",
|
||||
"density": "2.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image\/png",
|
||||
"density": "3.0"
|
||||
},
|
||||
{
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"src": "https:\/\/cdn.rawgit.com\/progrium\/dokku\/v0.4.13\/docs\/assets\/favicons\/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image\/png",
|
||||
"density": "4.0"
|
||||
|
||||
@@ -25,7 +25,7 @@ h1 {
|
||||
padding: 0 0 0 1em;
|
||||
}
|
||||
.header a {
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/dokku.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/dokku.png);
|
||||
color: #fff;
|
||||
text-indent: 40px;
|
||||
background-position: center left;
|
||||
@@ -40,7 +40,7 @@ h1 {
|
||||
.blurb {
|
||||
color: #424242;
|
||||
background-color: #ededed;
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/gplaypattern.png);
|
||||
background-image: url(https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/gplaypattern.png);
|
||||
padding: 45px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ dokku config:set node-js-app KEY=\"VAL\ WITH\ SPACES\"
|
||||
When setting or unsetting environment variables, you may wish to avoid an application restart. This is useful when developing plugins or when setting multiple environment variables in a scripted manner. To do so, use the `--no-restart` flag:
|
||||
|
||||
```shell
|
||||
dokku --no-restart config:set node-js-app ENV=prod
|
||||
dokku config:set --no-restart node-js-app ENV=prod
|
||||
```
|
||||
|
||||
If you wish to have the variables output in an `eval`-compatible form, you can use the `--export` flag:
|
||||
|
||||
@@ -90,3 +90,4 @@ A few notes:
|
||||
```
|
||||
- From time to time you may want to allow other plugins access to (some of) your plugin's functionality. You can expose this by including a `functions` file in your plugin for others to source. Consider all functions in that file to be publicly accessible by other plugins. Any functions not wished to be made "public" should reside within your plugin trigger or commands files.
|
||||
- As of 0.4.0, we allow image tagging and deployment of said tagged images. Therefore, hard-coding of `$IMAGE` as `dokku/$APP` is no longer sufficient. Instead, for non `pre/post-build-*` plugins, use `get_running_image_tag()` & `get_app_image_name()` as sourced from common/functions. See the [plugin triggers](http://dokku.viewdocs.io/dokku/development/plugin-triggers) doc for examples.
|
||||
- As of 0.5.0, we use container labels to help cleanup intermediate containers with `dokku cleanup`. If manually calling `docker run`, include `$DOKKU_GLOBAL_RUN_ARGS`. This will ensure you intermediate containers labeled correctly.
|
||||
|
||||
@@ -263,7 +263,7 @@ CMD="cat > gm && \
|
||||
dpkg -s graphicsmagick > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y graphicsmagick && apt-get clean)"
|
||||
|
||||
ID=$(docker run -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
@@ -290,7 +290,7 @@ CMD="cat > gm && \
|
||||
dpkg -s CONTAINER_PACKAGE > /dev/null 2>&1 || \
|
||||
(apt-get update && apt-get install -y CONTAINER_PACKAGE && apt-get clean)"
|
||||
|
||||
ID=$(docker run -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
ID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "$CMD")
|
||||
test $(docker wait $ID) -eq 0
|
||||
docker commit $ID $IMAGE > /dev/null
|
||||
```
|
||||
@@ -374,7 +374,7 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG)
|
||||
verify_app_name "$APP"
|
||||
|
||||
dokku_log_info1 "Running gulp"
|
||||
id=$(docker run -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE /bin/bash -c "cd /app && gulp default")
|
||||
test $(docker wait $id) -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
dokku_log_info1 "Building UI Complete"
|
||||
@@ -435,7 +435,7 @@ APP="$1"; GULP_CACHE_DIR="$DOKKU_ROOT/$APP/gulp"; IMAGE=$(get_app_image_name $AP
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $GULP_CACHE_DIR ]]; then
|
||||
docker run --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$GULP_CACHE_DIR:/gulp" "$IMAGE" find /gulp -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
```
|
||||
|
||||
|
||||
@@ -22,15 +22,15 @@ Example apps can be found here:
|
||||
$ sudo su -
|
||||
$ cd ~/dokku
|
||||
$ make ci-dependencies setup-deploy-tests
|
||||
$ make test # run the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$ make test # execute the entire test suite (linter, bats tests, and app deployment tests)
|
||||
$
|
||||
$ make lint # linter
|
||||
$ make unit-tests # bats tests
|
||||
$ make deploy-tests # 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:
|
||||
|
||||
```shell
|
||||
make deploy-test-nodejs-express
|
||||
$ make deploy-test-nodejs-express
|
||||
```
|
||||
- For a full list of test make targets check out `tests.mk` in the root of the dokku repository.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> New as of 0.3.17
|
||||
|
||||
Pass [options](http://docs.docker.io/en/latest/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
Pass [options](https://docs.docker.com/engine/reference/run/) to Docker during Dokku's `build`, `deploy` and `run` phases
|
||||
|
||||
```
|
||||
docker-options <app> Display app's Docker options for all phases
|
||||
|
||||
@@ -25,7 +25,7 @@ In case you want to perform an unattended installation of dokku, this is made po
|
||||
You can set any of the below options through the `debconf-set-selections` command, for example to enable vhost-based deployments:
|
||||
|
||||
```bash
|
||||
sudo echo "dokku dokku/vhost_enable boolean true" | debconf-set-selections
|
||||
echo "dokku dokku/vhost_enable boolean true" | sudo debconf-set-selections
|
||||
```
|
||||
|
||||
After setting the desired options, proceed with the installation as described above.
|
||||
@@ -37,4 +37,5 @@ After setting the desired options, proceed with the installation as described ab
|
||||
| dokku/web_config | boolean | true | Use web-based config for below options |
|
||||
| dokku/vhost_enable | boolean | false | Use vhost-based deployments (e.g. <app>.dokku.me) |
|
||||
| dokku/hostname | string | dokku.me | Hostname, used as vhost domain and for showing app URL after deploy |
|
||||
| dokku/skip_key_file| boolean | false | Don't check for the existence of the dokku/key_file. Warning: This setting this to true, will require you to manually add an SSH key later on. |
|
||||
| dokku/key_file | string | /root/.ssh/id_rsa.pub | SSH key to add to the Dokku user (Will be ignored on `dpkg-reconfigure`) |
|
||||
|
||||
@@ -10,26 +10,26 @@
|
||||
<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.4.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/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.4.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
|
||||
@@ -87,12 +87,12 @@
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.13/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.13 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
@@ -144,7 +144,7 @@
|
||||
<div class="container">
|
||||
<footer>
|
||||
<p class="pull-right"><a href="#">Back to top</a></p>
|
||||
<p>© 2013 Dokku</p>
|
||||
<p>© 2013-2016 Dokku</p>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh</span>
|
||||
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.4.13/bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="path">~</span>
|
||||
<span class="prompt">$</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh</span>
|
||||
<span class="command">sudo DOKKU_TAG=v0.4.13 bash bootstrap.sh</span>
|
||||
</p>
|
||||
<p class="line">
|
||||
<span class="output"># => Go to your server's IP and follow the web installer</span>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Dokku is an extensible, open source Platform as a Service that runs on a single server of your choice.
|
||||
|
||||
To start using Dokku, you'll need a system with that meets the following minimum requirements:
|
||||
To start using Dokku, you'll need a system that meets the following minimum requirements:
|
||||
|
||||
- A fresh installation of [Ubuntu 14.04 x64](http://www.ubuntu.com/download/) with the FQDN set <sup>[1]</sup>
|
||||
- At least `1GB` of system memory <sup>[2]</sup>
|
||||
@@ -19,8 +19,8 @@ To install the latest stable version of dokku, you can run the following shell c
|
||||
|
||||
```shell
|
||||
# installs dokku via apt-get
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.8/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.8 bash bootstrap.sh
|
||||
wget https://raw.githubusercontent.com/dokku/dokku/v0.4.13/bootstrap.sh
|
||||
sudo DOKKU_TAG=v0.4.13 bash bootstrap.sh
|
||||
```
|
||||
|
||||
The installation process takes about 5-10 minutes, depending upon internet connection speed.
|
||||
|
||||
@@ -16,7 +16,7 @@ Let's take a quick look at the current dokku nginx plugin that's shipped with do
|
||||
# This command requires `root` permissions as the `install` and `install-dependencies`
|
||||
# plugin triggers may utilize commands such as `apt-get`. For non-core plugins, please
|
||||
# inspect those plugins before running the following command as `root` user.
|
||||
sudo dokku plugin:install <git_url>
|
||||
sudo dokku plugin:install <git_url> [--committish tag/branch/commit|--name custom-plugin-name]
|
||||
|
||||
# previous versions (0.3.x and below) of dokku require a manual process to install plugins
|
||||
cd /var/lib/dokku/plugins
|
||||
@@ -47,6 +47,7 @@ The following plugins are available and provided by dokku maintainers. Where not
|
||||
| [RethinkDB (beta)](https://github.com/dokku/dokku-rethinkdb-plugin) | [dokku][] | 0.4.0+ |
|
||||
| [Copy Files to Image](https://github.com/dokku/dokku-copyfiles-to-image) | [dokku][] | 0.4.0+ |
|
||||
| [HTTP Auth (beta)](https://github.com/dokku/dokku-http-auth) | [dokku][] | 0.4.0+ |
|
||||
| [Let's Encrypt (beta)](https://github.com/dokku/dokku-letsencrypt) | [dokku][] | 0.4.0+ |
|
||||
| [Maintenance mode (beta)](https://github.com/dokku/dokku-maintenance) | [dokku][] | 0.4.0+ |
|
||||
| [Redirect (beta)](https://github.com/dokku/dokku-redirect) | [dokku][] | 0.4.0+ |
|
||||
|
||||
@@ -54,39 +55,48 @@ The following plugins are available and provided by dokku maintainers. Where not
|
||||
|
||||
Note: The following plugins have been supplied by our community and may not have been tested by dokku maintainers.
|
||||
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[256dpi]: https://github.com/256dpi
|
||||
[abossard]: https://github.com/dudagroup
|
||||
[ademuk]: https://github.com/ademuk
|
||||
[agco-adm]: https://github.com/agco-adm
|
||||
[alessio]: https://github.com/alessio
|
||||
[alex-sherwin]: https://github.com/alex-sherwin
|
||||
[alexanderbeletsky]: https://github.com/alexanderbeletsky
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[Aomitayo]: https://github.com/Aomitayo
|
||||
[apmorton]: https://github.com/apmorton
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[blag]: https://github.com/blag
|
||||
[cameron-martin]: https://github.com/cameron-martin
|
||||
[cedricziel]: https://github.com/cedricziel
|
||||
[cef]: https://github.com/cef
|
||||
[cjblomqvist]: https://github.com/cjblomqvist
|
||||
[darkpixel]: https://github.com/darkpixel
|
||||
[dokku]: https://github.com/dokku
|
||||
[dyson]: https://github.com/dyson
|
||||
[F4-Group]: https://github.com/F4-Group
|
||||
[fermuch]: https://github.com/fermuch
|
||||
[fgrehm]: https://github.com/fgrehm
|
||||
[Flink]: https://github.com/Flink
|
||||
[gdi2290]: https://github.com/gdi2290
|
||||
[heichblatt]: https://github.com/heichblatt
|
||||
[hughfletcher]: https://github.com/hughfletcher
|
||||
[ignlg]: https://github.com/ignlg
|
||||
[iskandar]: https://github.com/iskandar
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[jeffutter]: https://github.com/jeffutter
|
||||
[jlachowski]: https://github.com/jlachowski
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[Kloadut]: https://github.com/Kloadut
|
||||
[krisrang]: https://github.com/krisrang
|
||||
[luxifer]: https://github.com/luxifer
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
||||
[matto1990]: https://github.com/matto1990
|
||||
[mbriskar]: https://github.com/mbriskar
|
||||
[michaelshobbs]: https://github.com/michaelshobbs
|
||||
[mikecsh]: https://github.com/mikecsh
|
||||
[mikexstudios]: https://github.com/mikexstudios
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[mlebkowski]: https://github.com/mlebkowski
|
||||
[motin]: https://github.com/motin
|
||||
[musicglue]: https://github.com/musicglue
|
||||
[neam]: https://github.com/neam
|
||||
@@ -96,27 +106,19 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
[pauldub]: https://github.com/pauldub
|
||||
[pnegahdar]: https://github.com/pnegahdar
|
||||
[RaceHub]: https://github.com/racehub
|
||||
[ribot]: https://github.com/ribot
|
||||
[rlaneve]: https://github.com/rlaneve
|
||||
[robv]: https://github.com/robv
|
||||
[scottatron]: https://github.com/scottatron
|
||||
[sehrope]: https://github.com/sehrope
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[sgulseth]: https://github.com/sgulseth
|
||||
[sseemayer]: https://github.com/sseemayer
|
||||
[statianzo]: https://github.com/statianzo
|
||||
[stuartpb]: https://github.com/stuartpb
|
||||
[thrashr888]: https://github.com/thrashr888
|
||||
[wmluke]: https://github.com/wmluke
|
||||
[Zenedith]: https://github.com/Zenedith
|
||||
[sekjun9878]: https://github.com/sekjun9878
|
||||
[Flink]: https://github.com/Flink
|
||||
[ribot]: https://github.com/ribot
|
||||
[Benjamin-Dobell]: https://github.com/Benjamin-Dobell
|
||||
[jagandecapri]: https://github.com/jagandecapri
|
||||
[mixxorz]: https://github.com/mixxorz
|
||||
[Maciej Łebkowski]: https://github.com/mlebkowski
|
||||
[abossard]: https://github.com/dudagroup
|
||||
[alexkruegger]: https://github.com/alexkruegger
|
||||
[dokku]: https://github.com/dokku
|
||||
[sgulseth]: https://github.com/sgulseth
|
||||
[sseemayer]: https://github.com/sseemayer
|
||||
|
||||
### Datastores
|
||||
|
||||
@@ -175,15 +177,15 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [App name as env](https://github.com/cjblomqvist/dokku-app-name-env) | [cjblomqvist][] | 0.3.x |
|
||||
| [Docker Direct](https://github.com/heichblatt/dokku-docker-direct) | [heichblatt][] | |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/alexkruegger/dokku-app-configfiles) | [alexkruegger][] | Compatible with 0.3.17+ |
|
||||
| [Dokku Copy App Config Files](https://github.com/heichblatt/dokku-supply-config) | [heichblatt][] | |
|
||||
| [Dokku Name](https://github.com/alex-sherwin/dokku-name) | [alex-sherwin][] | dokku >= [c77cbf1][] |
|
||||
| [Dokku Registry](https://github.com/agco-adm/dokku-registry)<sup>1</sup> | [agco-adm][] | 0.4.0+ |
|
||||
| [git rev-parse HEAD in env](https://github.com/cjblomqvist/dokku-git-rev) | [cjblomqvist][] | 0.4.0+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Graduate (Environment Management)](https://github.com/glassechidna/dokku-graduate) | [Benjamin-Dobell][] | 0.3.14+ |
|
||||
| [Haproxy tcp load balancer](https://github.com/256dpi/dokku-haproxy) | [256dpi][] | 0.4.0+ |
|
||||
| [HTTP Auth Secure Apps](https://github.com/matto1990/dokku-secure-apps) | [matto1990][] | 0.4.0+ |
|
||||
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
|
||||
| [Lets Encrypt](https://github.com/sseemayer/dokku-letsencrypt) | [sseemayer][] | 0.4.0+ |
|
||||
| [Multi-Buildpack](https://github.com/pauldub/dokku-multi-buildpack) | [pauldub][] | |
|
||||
| [Nuke Containers](https://github.com/heichblatt/dokku-nuke) | [heichblatt][] | |
|
||||
| [Open App Ports](https://github.com/heichblatt/dokku-ports) | [heichblatt][] | |
|
||||
@@ -223,7 +225,7 @@ Note: The following plugins have been supplied by our community and may not have
|
||||
| [Slack Notifications](https://github.com/ribot/dokku-slack) | [ribot][] | 0.4.0+ |
|
||||
| [User ACL](https://github.com/mlebkowski/dokku-acl) | [Maciej Łebkowski][] | 0.4.0+ |
|
||||
| [Webhooks](https://github.com/nickstenning/dokku-webhooks) | [nickstenning][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [Wkhtmltopdf](https://github.com/mbriskar/dokku-wkhtmltopdf) | [mbriskar][] | |
|
||||
| [Wordpress](https://github.com/dudagroup/dokku-wordpress-template) | [abossard][] | Dokku dev, mariadb, volume, domains |
|
||||
|
||||
<sup>1</sup> Forked from [jezdez/dokku-elasticsearch-plugin](https://github.com/jezdez/dokku-elasticsearch-plugin): uses Elasticsearch 1.2 (instead of 0.90), doesn't depend on dokku-link, runs as elasticsearch user instead of root, and turns off multicast autodiscovery for use in a VPS environment.
|
||||
@@ -235,18 +237,18 @@ The following plugins have been removed as their functionality is now in Dokku C
|
||||
| Plugin | Author | In Dokku Since |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------- |
|
||||
| [Custom Domains](https://github.com/neam/dokku-custom-domains) | [motin][] | v0.3.10 (domains plugin) |
|
||||
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
|
||||
| [Debug](https://github.com/heichblatt/dokku-debug) | [heichblatt][] | v0.3.9 (trace command) |
|
||||
| [Docker Options](https://github.com/dyson/dokku-docker-options) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [Events Logger](https://github.com/alessio/dokku-events) | [alessio][] | v0.3.21 (events plugin) |
|
||||
| [Host Port binding](https://github.com/stuartpb/dokku-bind-port) | [stuartpb][] | v0.3.17 (docker-options plugin) |
|
||||
| [List Containers](https://github.com/heichblatt/dokku-list) | [heichblatt][] | v0.3.14 (ps plugin |
|
||||
| [List Containers](https://github.com/heichblatt/dokku-list) | [heichblatt][] | v0.3.14 (ps plugin |
|
||||
| [Link Containers](https://github.com/rlaneve/dokku-link) | [rlaneve][] | v0.3.17 (docker-options plugin) |
|
||||
| [Multiple Domains](https://github.com/wmluke/dokku-domains-plugin)<sup>1</sup> | [wmluke][] | v0.3.10 (domains plugin) |
|
||||
| [Named-containers](https://github.com/Flink/dokku-named-containers) | [Flink][] | v0.4.2 (named-containers plugin) |
|
||||
| [Nginx-Alt](https://github.com/mikexstudios/dokku-nginx-alt) | [mikexstudios][] | v0.3.10 (domains plugin) |
|
||||
| [Persistent Storage](https://github.com/dyson/dokku-persistent-storage) | [dyson][] | v0.3.17 (docker-options plugin) |
|
||||
| [PrimeCache](https://github.com/darkpixel/dokku-prime-cache) | [darkpixel][] | v0.3.0 (zero downtime deploys) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Rebuild application](https://github.com/scottatron/dokku-rebuild) | [scottatron][] | v0.3.14 (ps plugin) |
|
||||
| [Supply env vars to buildpacks](https://github.com/cameron-martin/dokku-build-env)<sup>2</sup> | [cameron-martin][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/musicglue/dokku-user-env-compile)<sup>2</sup> | [musicglue][] | v0.3.9 (build-env plugin) |
|
||||
| [user-env-compile](https://github.com/motin/dokku-user-env-compile)<sup>2</sup> | [motin][] | v0.3.9 (build-env plugin) |
|
||||
@@ -265,11 +267,11 @@ The following plugins are no longer maintained by their developers.
|
||||
| Plugin | Author | Compatibility |
|
||||
| ------------------------------------------------------------------------------------------------- | --------------------- | --------------------- |
|
||||
| [app-url](https://github.com/mikecsh/dokku-app-url) | [mikecsh][] | Works with 0.2.0 |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
||||
| [CouchDB (multi containers)](https://github.com/Flink/dokku-couchdb-multi-containers) | [Flink][] | 0.4.0+ |
|
||||
| [CouchDB](https://github.com/racehub/dokku-couchdb-plugin) | [RaceHub][] | Compatible with 0.2.0 |
|
||||
| [Elasticsearch](https://github.com/robv/dokku-elasticsearch) | [robv][] | Not compatible with >= 0.3.0 (still uses /home/git) |
|
||||
| [Elasticsearch](https://github.com/blag/dokku-elasticsearch-plugin)<sup>1</sup> | [blag][] | Compatible with 0.2.0 |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
||||
| [Memcached](https://github.com/Flink/dokku-memcached-plugin) | [Flink][] | 0.4.0+ |
|
||||
| [MongoDB (single container)](https://github.com/jeffutter/dokku-mongodb-plugin) | [jeffutter][] | |
|
||||
| [MySQL](https://github.com/hughfletcher/dokku-mysql-plugin) | [hughfletcher][] | |
|
||||
| [Neo4j](https://github.com/Aomitayo/dokku-neo4j-plugin) | [Aomitayo][] | |
|
||||
|
||||
@@ -10,30 +10,30 @@
|
||||
<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.4.8/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/manifest.json">
|
||||
<link rel="shortcut icon" href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/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.4.8/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="https://cdn.rawgit.com/dokku/dokku/v0.4.13/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/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.4.8/docs/assets/style.css" rel="stylesheet">
|
||||
<link href="https://cdn.rawgit.com/dokku/dokku/v0.4.13/docs/assets/style.css" rel="stylesheet">
|
||||
<style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
23
dokku
23
dokku
@@ -29,6 +29,9 @@ export DOKKU_VALID_EXIT=0
|
||||
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"
|
||||
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
[[ -f $DOKKU_ROOT/dokkurc ]] && source $DOKKU_ROOT/dokkurc
|
||||
@@ -80,8 +83,12 @@ fi
|
||||
case "$1" in
|
||||
receive)
|
||||
APP="$2"; IMAGE=$(get_app_image_name $APP); IMAGE_SOURCE_TYPE="$3"; TMP_WORK_DIR="$4"
|
||||
dokku_log_info1 "Cleaning up..."
|
||||
docker_cleanup
|
||||
if [[ -z "$DOKKU_SKIP_CLEANUP" ]]; then
|
||||
dokku_log_info1 "Cleaning up..."
|
||||
docker_cleanup
|
||||
else
|
||||
dokku_log_info1 "DOKKU_SKIP_CLEANUP set. Skipping dokku cleanup"
|
||||
fi
|
||||
dokku_log_info1 "Building $APP from $IMAGE_SOURCE_TYPE..."
|
||||
dokku build "$APP" "$IMAGE_SOURCE_TYPE" "$TMP_WORK_DIR"
|
||||
release_and_deploy "$APP"
|
||||
@@ -136,15 +143,19 @@ case "$1" in
|
||||
if [[ "$PROC_TYPE" == "web" ]]; then
|
||||
port=${DOKKU_DOCKERFILE_PORT:=5000}
|
||||
if [[ "$BIND_EXTERNAL" = "true" ]]; then
|
||||
id=$(docker run -d -p $port -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -p $port -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
port=$(docker port $id $port | sed 's/[0-9.]*://')
|
||||
ipaddr=127.0.0.1
|
||||
else
|
||||
id=$(docker run -d -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
ipaddr=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $id)
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$port $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
ipaddr=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $id)
|
||||
# Docker < 1.9 compatibility
|
||||
if [[ -z $ipaddr ]]; then
|
||||
ipaddr=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $id)
|
||||
fi
|
||||
fi
|
||||
else
|
||||
id=$(docker run -d $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $DOCKER_ARGS $IMAGE $START_CMD)
|
||||
fi
|
||||
|
||||
# if we can't post-deploy successfully, kill new container
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " build release trace delete ls run url urls version help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
[[ " build release trace delete ls run url urls report version help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
@@ -17,7 +17,7 @@ case "$1" in
|
||||
|
||||
case "$IMAGE_SOURCE_TYPE" in
|
||||
herokuish)
|
||||
id=$(tar -c . | docker run -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||
id=$(tar -c . | docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $DOKKU_IMAGE /bin/bash -c "mkdir -p /app && tar -xC /app")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
[[ -d $CACHE_DIR ]] || mkdir $CACHE_DIR
|
||||
@@ -25,7 +25,7 @@ case "$1" in
|
||||
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-build $APP $IMAGE_SOURCE_TYPE)
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
id=$(docker run -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
|
||||
id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache $DOCKER_ARGS $IMAGE /build)
|
||||
docker attach $id
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
@@ -60,12 +60,12 @@ case "$1" in
|
||||
herokuish)
|
||||
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
|
||||
if [[ -n $(config_export global) ]]; then
|
||||
id=$(config_export global | docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
||||
id=$(config_export global | docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
fi
|
||||
if [[ -n $(config_export app $APP) ]]; then
|
||||
id=$(config_export app $APP | docker run -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
||||
id=$(config_export app $APP | docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
fi
|
||||
@@ -144,7 +144,7 @@ case "$1" in
|
||||
has_tty && DOKKU_RUN_OPTS+=" -i -t"
|
||||
is_image_herokuish_based "$IMAGE" && EXEC_CMD="/exec"
|
||||
|
||||
docker run $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS $DOKKU_RUN_OPTS $DOCKER_ARGS $IMAGE $EXEC_CMD "$@"
|
||||
;;
|
||||
|
||||
url | urls)
|
||||
@@ -191,6 +191,21 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
|
||||
report)
|
||||
dokku_log_info1 "uname: $(uname -a)"
|
||||
dokku_log_info1 "memory: "
|
||||
free -m
|
||||
dokku_log_info1 "docker version: "
|
||||
docker version
|
||||
dokku_log_info1 "docker daemon info: "
|
||||
docker -D info
|
||||
dokku_log_info1 "herokuish version: "
|
||||
docker run --rm -ti gliderlabs/herokuish:latest herokuish version
|
||||
dokku_log_info1 "dokku version: $(dokku version)"
|
||||
dokku_log_info1 "dokku plugins: "
|
||||
dokku plugin
|
||||
;;
|
||||
|
||||
version)
|
||||
cat "$DOKKU_ROOT/VERSION" || dokku_log_fail "Unable to determine dokku's version"
|
||||
;;
|
||||
|
||||
@@ -11,9 +11,8 @@ fi
|
||||
|
||||
# temporary hack for https://github.com/dokku/dokku/issues/82
|
||||
# redeploys all apps after a reboot
|
||||
case "$DOKKU_DISTRO" in
|
||||
ubuntu)
|
||||
cat<<EOF > /etc/init/dokku-redeploy.conf
|
||||
if [[ $(/sbin/init --version 2> /dev/null) =~ upstart ]]; then
|
||||
cat<<EOF > /etc/init/dokku-redeploy.conf
|
||||
description "Dokku app redeploy service"
|
||||
|
||||
start on filesystem and started docker
|
||||
@@ -23,10 +22,10 @@ script
|
||||
sudo -i -u dokku /usr/local/bin/dokku ps:restore
|
||||
end script
|
||||
EOF
|
||||
;;
|
||||
fi
|
||||
|
||||
debian|opensuse)
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
if [[ $(systemctl 2> /dev/null) =~ -\.mount ]]; then
|
||||
cat<<EOF > /etc/systemd/system/dokku-redeploy.service
|
||||
[Unit]
|
||||
Description=Dokku app redeploy service
|
||||
After=docker.target
|
||||
@@ -39,9 +38,10 @@ ExecStart=/usr/local/bin/dokku ps:restore
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
if command -v systemctl &>/dev/null; then
|
||||
systemctl enable dokku-redeploy
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p /etc/update-motd.d
|
||||
cat<<EOF > /etc/update-motd.d/99-dokku
|
||||
|
||||
@@ -26,7 +26,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
events:list)
|
||||
PLUGIN_DIR="$(dirname $0)"
|
||||
PLUGIN_DIR="$(dirname $0)/"
|
||||
if [[ "$DOKKU_EVENTS" ]]; then
|
||||
logged="$(find $PLUGIN_DIR -type l -printf '%f ' | sort)"
|
||||
dokku_col_log_info2_quiet "Events currently logged"
|
||||
@@ -39,7 +39,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
help | events:help)
|
||||
cat && cat<<EOF
|
||||
cat<<EOF
|
||||
events [-t], Show the last events (-t follows)
|
||||
events:list, List logged events
|
||||
events:on, Enable events logger
|
||||
|
||||
@@ -56,6 +56,11 @@ $DOKKU_LOGS_DIR/*.log {
|
||||
create 664 syslog dokku
|
||||
}
|
||||
EOF
|
||||
|
||||
if [[ "$DOKKU_DISTRO" = "debian" ]]; then
|
||||
sed -i '/\s*su syslog dokku/d; s/\(create [0-7][0-7][0-7]\) syslog dokku/\1 root dokku/g' $DOKKU_LOGROTATE_FILE
|
||||
fi
|
||||
|
||||
flag_rsyslog_needs_restart=y
|
||||
fi
|
||||
|
||||
|
||||
@@ -7,13 +7,15 @@ source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
case "$1" in
|
||||
apps)
|
||||
dokku_log_info2_quiet "My Apps"
|
||||
find $DOKKU_ROOT -follow -maxdepth 1 -type d \( ! -iname ".*" \) -not -path $DOKKU_ROOT/tls | sed 's|^\./||g' | sed 's|'$DOKKU_ROOT'\/||' | tail -n +2 | sort
|
||||
for app in $(dokku_apps); do
|
||||
echo "$app"
|
||||
done
|
||||
;;
|
||||
|
||||
apps:create)
|
||||
apps_create $2
|
||||
;;
|
||||
|
||||
|
||||
apps:rename)
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ -d "$DOKKU_ROOT/$3" ]] && dokku_log_fail "Name is already taken"
|
||||
@@ -21,17 +23,18 @@ case "$1" in
|
||||
NEW_APP="$3"
|
||||
|
||||
mkdir -p "$DOKKU_ROOT/$NEW_APP"
|
||||
docker run --rm -v "$DOKKU_ROOT/$OLD_APP/cache:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||
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"
|
||||
cp -a "$DOKKU_ROOT/$OLD_APP/." "$DOKKU_ROOT/$NEW_APP"
|
||||
dokku apps:destroy $OLD_APP --force
|
||||
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"
|
||||
dokku ps:rebuild $NEW_APP
|
||||
plugn trigger post-app-rename $OLD_APP $NEW_APP
|
||||
echo "Renaming $OLD_APP to $NEW_APP... done"
|
||||
;;
|
||||
|
||||
|
||||
apps:destroy)
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
[[ "$2" == "tls" ]] && dokku_log_fail "Unable to destroy tls directory"
|
||||
|
||||
@@ -6,5 +6,5 @@ APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG); CACHE_DIR
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $CACHE_DIR ]]; then
|
||||
docker run --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --rm -v "$CACHE_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
|
||||
fi
|
||||
|
||||
@@ -24,12 +24,12 @@ if [[ ! -z "$BUILD_ENV" ]]; then
|
||||
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
|
||||
id=$(echo $BUILD_ENV |sed -e 's@export @@g' -e 's@\\n@ @g' | docker run -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")
|
||||
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")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
|
||||
# create build env for 'old style' buildpacks and dokku plugins
|
||||
id=$(echo -e "$BUILD_ENV" | docker run -i -a stdin $IMAGE /bin/bash -c "cat >> /app/.env")
|
||||
id=$(echo -e "$BUILD_ENV" | docker run $DOKKU_GLOBAL_RUN_ARGS -i -a stdin $IMAGE /bin/bash -c "cat >> /app/.env")
|
||||
test "$(docker wait $id)" -eq 0
|
||||
docker commit $id $IMAGE > /dev/null
|
||||
fi
|
||||
|
||||
@@ -39,7 +39,7 @@ certs_set() {
|
||||
cd $TEMP_DIR
|
||||
tar xvf - <&0
|
||||
|
||||
CRT_FILE_SEARCH=$(find . -type f -name "*.crt")
|
||||
CRT_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.crt")
|
||||
CRT_FILE_COUNT=$(printf "%s" "$CRT_FILE_SEARCH" | grep -c '^')
|
||||
if [[ $CRT_FILE_COUNT -lt 1 ]]; then
|
||||
dokku_log_fail "Tar archive is missing .crt file"
|
||||
@@ -49,7 +49,7 @@ certs_set() {
|
||||
CRT_FILE=$CRT_FILE_SEARCH
|
||||
fi
|
||||
|
||||
KEY_FILE_SEARCH=$(find . -type f -name "*.key")
|
||||
KEY_FILE_SEARCH=$(find . -not -path '*/\.*' -type f -name "*.key")
|
||||
KEY_FILE_COUNT=$(printf "%s" "$KEY_FILE_SEARCH" | grep -c '^')
|
||||
if [[ $KEY_FILE_COUNT -lt 1 ]]; then
|
||||
dokku_log_fail "Tar archive is missing .key file"
|
||||
|
||||
@@ -84,14 +84,19 @@ if [[ ! -s "${TMPDIR}/CHECKS" ]] || [[ "$DOKKU_APP_CONTAINER_TYPE" != "web" ]];
|
||||
dokku_log_verbose "Skipping default check..."
|
||||
exit 0
|
||||
fi
|
||||
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 "CHECKS file not found in container: Running simple container check..."
|
||||
|
||||
# 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 "CHECKS file not found in container: Running simple container check..."
|
||||
else
|
||||
dokku_log_verbose "Non web container detected: Running default container check..."
|
||||
fi
|
||||
|
||||
rm -rf $TMPDIR
|
||||
|
||||
# simple default check to see if the container stuck around
|
||||
# for more thorough checks, create a CHECKS file
|
||||
DOKKU_DEFAULT_CHECKS_WAIT="${DOKKU_DEFAULT_CHECKS_WAIT:-10}"
|
||||
dokku_log_info1 "Waiting for $DOKKU_DEFAULT_CHECKS_WAIT seconds ..."
|
||||
sleep $DOKKU_DEFAULT_CHECKS_WAIT
|
||||
|
||||
@@ -10,7 +10,7 @@ has_tty() {
|
||||
}
|
||||
|
||||
dokku_apps() {
|
||||
local INSTALLED_APPS=$(find $DOKKU_ROOT -maxdepth 1 -mindepth 1 -type d ! -name 'tls' ! -name '.*' -printf "%f\n") || (dokku_log_fail "You haven't deployed any applications yet")
|
||||
local INSTALLED_APPS=$(find $DOKKU_ROOT -follow -maxdepth 1 -mindepth 1 -type d ! -name 'tls' ! -name '.*' -printf "%f\n" | sort) || (dokku_log_fail "You haven't deployed any applications yet")
|
||||
[[ $INSTALLED_APPS ]] && echo $INSTALLED_APPS
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ get_running_image_tag() {
|
||||
is_image_herokuish_based() {
|
||||
# circleci can't support --rm as they run lxc in lxc
|
||||
[[ ! -f "/home/ubuntu/.circlerc" ]] && local DOCKER_ARGS="--rm"
|
||||
docker run --entrypoint="/bin/sh" $DOCKER_ARGS "$@" -c "test -f /exec"
|
||||
docker run $DOKKU_GLOBAL_RUN_ARGS --entrypoint="/bin/sh" $DOCKER_ARGS "$@" -c "test -f /exec"
|
||||
}
|
||||
|
||||
is_number() {
|
||||
@@ -211,7 +211,7 @@ copy_from_image() {
|
||||
verify_app_name $APP
|
||||
|
||||
if verify_image "$IMAGE"; then
|
||||
CID=$(docker run -d $IMAGE bash)
|
||||
CID=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $IMAGE bash)
|
||||
docker cp "$CID:$SRC_FILE" "$DST_DIR"
|
||||
docker rm -f "$CID" &> /dev/null
|
||||
else
|
||||
@@ -405,7 +405,7 @@ get_ipv4_regex() {
|
||||
}
|
||||
|
||||
get_ipv6_regex() {
|
||||
local RE_IPV6="$(_ipv4_regex)"
|
||||
local RE_IPV6="$(_ipv6_regex)"
|
||||
# Ensure the ip address continues to the end of the line
|
||||
# Fixes using a wildcard dns service such as xip.io which allows for *.<ip address>.xip.io
|
||||
echo "${RE_IPV6}\$"
|
||||
|
||||
@@ -1,118 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " docker-options docker-options:add docker-options:remove help docker-options:help " == *" $1 "* ]] || exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
[[ " docker-options docker-options:add docker-options:remove help docker-options:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
get_app() {
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$1"
|
||||
APP="$1"
|
||||
}
|
||||
|
||||
get_phases() {
|
||||
local passed_phases_list=$1
|
||||
local phase
|
||||
if [[ -n $passed_phases_list ]]; then
|
||||
IFS=',' read -ra passed_phases <<< "$passed_phases_list"
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
verify_phase $phase
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
verify_phase() {
|
||||
local phase
|
||||
local phases=(build deploy run)
|
||||
for phase in "${phases[@]}"; do
|
||||
if [[ "$phase" = "$1" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
dokku_log_fail "Phase(s) must be one of [${phases[*]}]"
|
||||
}
|
||||
|
||||
get_phase_file_path() {
|
||||
local phase=$1
|
||||
local prefix="DOCKER_OPTIONS_"
|
||||
phase_file_path="${DOKKU_ROOT}/${APP}/${prefix}${phase^^}"
|
||||
}
|
||||
|
||||
create_phase_file_if_required() {
|
||||
local phase_file_path=$1
|
||||
[[ -f $phase_file_path ]] || {
|
||||
touch $phase_file_path
|
||||
}
|
||||
}
|
||||
|
||||
display_phase_options() {
|
||||
local phase=$1
|
||||
local phase_file_path=$2
|
||||
echo "${phase^} options:"
|
||||
sed -e 's/^/ /' $phase_file_path
|
||||
}
|
||||
|
||||
display_all_phases_options() {
|
||||
local phases=(build deploy run)
|
||||
for phase in "${phases[@]}"; do
|
||||
get_phase_file_path $phase
|
||||
if [[ -s $phase_file_path ]]; then
|
||||
display_phase_options $phase $phase_file_path
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
display_passed_phases_options() {
|
||||
local passed_phases=("${!1}")
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
get_phase_file_path $phase
|
||||
if [[ ! -s $phase_file_path ]]; then
|
||||
echo "${phase^} options: none"
|
||||
else
|
||||
display_phase_options $phase $phase_file_path
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
get_passed_docker_option() {
|
||||
[[ -z "$@" ]] && dokku_log_fail "Please specify docker options to add to the phase"
|
||||
passed_docker_option=("$@")
|
||||
}
|
||||
|
||||
add_passed_docker_option() {
|
||||
local passed_phases=("${!1}")
|
||||
shift
|
||||
local passed_option_string="$*"
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
get_phase_file_path $phase
|
||||
create_phase_file_if_required $phase_file_path
|
||||
echo "${passed_option_string}" >> $phase_file_path
|
||||
all_phase_options=$(< $phase_file_path)
|
||||
echo -e "${all_phase_options}" | sed '/^$/d' | sort -u > $phase_file_path
|
||||
done
|
||||
}
|
||||
|
||||
remove_passed_docker_option() {
|
||||
local passed_phases=("${!1}")
|
||||
shift
|
||||
local passed_option_string="$*"
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
get_phase_file_path $phase
|
||||
[[ ! -s $phase_file_path ]] || {
|
||||
all_phase_options=$(< $phase_file_path)
|
||||
all_phase_options=$(echo -e "${all_phase_options}" | sed "s#^${passed_option_string}\$##")
|
||||
echo -e "${all_phase_options}" | sed '/^$/d' | sort -u > $phase_file_path
|
||||
}
|
||||
done
|
||||
}
|
||||
declare APP # global assigned in case
|
||||
|
||||
case "$1" in
|
||||
# Display applications docker options
|
||||
docker-options)
|
||||
get_app $2
|
||||
get_phases $3
|
||||
verify_app_name "$2" && APP="$2"
|
||||
read -ra passed_phases <<< "$(get_phases "$3")"
|
||||
if [[ ! "${passed_phases[@]}" ]]; then
|
||||
display_all_phases_options
|
||||
else
|
||||
@@ -122,19 +20,20 @@ case "$1" in
|
||||
|
||||
# Add a docker option to application
|
||||
docker-options:add)
|
||||
get_app $2
|
||||
get_phases $3
|
||||
verify_app_name "$2" && APP="$2"
|
||||
read -ra passed_phases <<< "$(get_phases "$3")"
|
||||
shift 3 # everything else passed is the docker option
|
||||
get_passed_docker_option "$@"
|
||||
passed_docker_option="$*"
|
||||
[[ -z "$passed_docker_option" ]] && dokku_log_fail "Please specify docker options to add to the phase"
|
||||
add_passed_docker_option passed_phases[@] "${passed_docker_option[@]}"
|
||||
;;
|
||||
|
||||
# Remove a docker option from application
|
||||
docker-options:remove)
|
||||
get_app $2
|
||||
get_phases $3
|
||||
verify_app_name "$2" && APP="$2"
|
||||
read -ra passed_phases <<< "$(get_phases "$3")"
|
||||
shift 3 # everything else passed is the docker option
|
||||
get_passed_docker_option "$@"
|
||||
[[ -z ${passed_docker_option="$@"} ]] && dokku_log_fail "Please specify docker options to add to the phase"
|
||||
remove_passed_docker_option passed_phases[@] "${passed_docker_option[@]}"
|
||||
;;
|
||||
|
||||
@@ -149,7 +48,7 @@ EOF
|
||||
;;
|
||||
|
||||
*)
|
||||
exit $DOKKU_NOT_IMPLEMENTED_EXIT
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
98
plugins/docker-options/functions
Normal file
98
plugins/docker-options/functions
Normal file
@@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
AVAILABLE_PHASES=(build deploy run)
|
||||
|
||||
get_phase_file_path() {
|
||||
local phase_file_prefix="DOCKER_OPTIONS_"
|
||||
local phase=$1
|
||||
[[ "$DOKKU_ROOT" && "$APP" && "$phase_file_prefix" && "$phase" ]] || dokku_log_fail "Error: phase_file_path is incomplete."
|
||||
echo "${DOKKU_ROOT}/${APP}/${phase_file_prefix}${phase^^}"
|
||||
}
|
||||
|
||||
get_phases() {
|
||||
local passed_phases_list="$1"
|
||||
local -r phases_allowed=$(sed -e 's/ /\|/g' <<< "${AVAILABLE_PHASES[@]}")
|
||||
local phase
|
||||
local passed_phases
|
||||
if [[ -n "$passed_phases_list" ]]; then
|
||||
OIFS=$IFS; IFS=','
|
||||
read -ra passed_phases <<< "$passed_phases_list"
|
||||
IFS=$OIFS
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
[[ "$phase" = @($phases_allowed) ]] || dokku_log_fail "Phase(s) must be one of [${AVAILABLE_PHASES[*]}]"
|
||||
done
|
||||
echo "${passed_phases[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
create_phase_file_if_required() {
|
||||
local phase_file_path="$1"
|
||||
[[ -f "$phase_file_path" ]] || {
|
||||
touch "$phase_file_path"
|
||||
}
|
||||
}
|
||||
|
||||
display_phase_options() {
|
||||
local phase="$1"
|
||||
local phase_file_path="$2"
|
||||
echo "${phase^} options:"
|
||||
sed -e 's/^/ /' "$phase_file_path"
|
||||
}
|
||||
|
||||
display_all_phases_options() {
|
||||
local phases=("${AVAILABLE_PHASES[@]}")
|
||||
for phase in "${phases[@]}"; do
|
||||
local phase_file_path
|
||||
phase_file_path="$(get_phase_file_path "$phase")"
|
||||
if [[ -s "$phase_file_path" ]]; then
|
||||
display_phase_options "$phase" "$phase_file_path"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
display_passed_phases_options() {
|
||||
local passed_phases=("${!1}")
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
local phase_file_path
|
||||
phase_file_path="$(get_phase_file_path "$phase")"
|
||||
if [[ ! -s "$phase_file_path" ]]; then
|
||||
echo "${phase^} options: none"
|
||||
else
|
||||
display_phase_options "$phase" "$phase_file_path"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
add_passed_docker_option() {
|
||||
local passed_phases=("${!1}")
|
||||
shift
|
||||
local passed_option_string="$*"
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
local phase_file_path
|
||||
phase_file_path="$(get_phase_file_path "$phase")"
|
||||
create_phase_file_if_required "$phase_file_path"
|
||||
echo "${passed_option_string}" >> "$phase_file_path"
|
||||
all_phase_options="$(< "$phase_file_path")"
|
||||
echo -e "${all_phase_options}" | sed '/^$/d' | sort -u > "$phase_file_path"
|
||||
done
|
||||
}
|
||||
|
||||
remove_passed_docker_option() {
|
||||
local passed_phases=("${!1}")
|
||||
shift
|
||||
local passed_option_string="$*"
|
||||
local phase
|
||||
for phase in "${passed_phases[@]}"; do
|
||||
local phase_file_path
|
||||
phase_file_path="$(get_phase_file_path "$phase")"
|
||||
[[ ! -s "$phase_file_path" ]] || {
|
||||
all_phase_options="$(< "$phase_file_path")"
|
||||
all_phase_options=$(echo -e "${all_phase_options}" | sed "s#^${passed_option_string}\$##")
|
||||
echo -e "${all_phase_options}" | sed '/^$/d' | sort -u > "$phase_file_path"
|
||||
}
|
||||
done
|
||||
}
|
||||
@@ -27,7 +27,7 @@ git_build_app_repo() {
|
||||
git remote add origin "$DOKKU_ROOT/$APP" &> /dev/null
|
||||
git fetch --depth=1 origin "refs/tags/$TMP_TAG" &> /dev/null
|
||||
git reset --hard FETCH_HEAD &> /dev/null
|
||||
git submodule update --init --recursive --depth=1 &> /dev/null
|
||||
git submodule update --init --recursive &> /dev/null
|
||||
GIT_DIR="$DOKKU_ROOT/$APP" git tag -d "$TMP_TAG" &> /dev/null || true
|
||||
find -name .git -prune -exec rm -rf {} \; > /dev/null
|
||||
|
||||
|
||||
@@ -1,16 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
APP="$1"; APP_ROOT="$DOKKU_ROOT/$APP"
|
||||
[[ -z $(stat -t "$APP_ROOT"/CONTAINER.* 2>/dev/null) ]] && exit 0
|
||||
for container in "$APP_ROOT"/CONTAINER.*; do
|
||||
DYNO=$(echo "$container" | sed -r 's/.*CONTAINER\.(.*)/\1/') || true
|
||||
NAME="$APP.$DYNO"
|
||||
PREVIOUS=$(docker ps -a -q -f name="^.?$NAME\$") || true
|
||||
if [[ -n $PREVIOUS ]]; then
|
||||
docker rename "$NAME" "$NAME.$(date +%s)" > /dev/null
|
||||
CURRENT_CONTAINER_ID="$(< $container)"
|
||||
PREVIOUS_CIDS=$(docker ps -a -q -f name="^.?$NAME\$" | xargs) || true
|
||||
if [[ -n $PREVIOUS_CIDS ]]; then
|
||||
dokku_log_info1_quiet "Found previous container(s) ($PREVIOUS_CIDS) named $NAME"
|
||||
# in case $PREVIOUS_CIDS has more than one entry
|
||||
for cid in $PREVIOUS_CIDS; do
|
||||
PREVIOUS_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$cid" || echo "dead")
|
||||
# dead containers cannot be renamed
|
||||
if [[ "$PREVIOUS_CONTAINER_STATUS" != "dead" ]]; then
|
||||
CONTAINER_DATE_NAME="$NAME.$(date +%s)"
|
||||
dokku_log_info2_quiet "renaming container ($cid) ${NAME} to $CONTAINER_DATE_NAME"
|
||||
docker rename "$NAME" "$CONTAINER_DATE_NAME" > /dev/null
|
||||
fi
|
||||
done
|
||||
fi
|
||||
ID=$(cat "$container")
|
||||
CURRENT_NAME=$(docker inspect -f '{{.Name}}' "$ID" | tr -d /)
|
||||
dokku_log_info2_quiet "renaming container (${ID:0:12}) $CURRENT_NAME to $NAME"
|
||||
docker rename "$CURRENT_NAME" "$NAME" > /dev/null
|
||||
done
|
||||
|
||||
@@ -235,8 +235,13 @@ EOF
|
||||
echo "}" >> $NGINX_CONF
|
||||
fi
|
||||
|
||||
dokku_log_info1 "Creating $SCHEME nginx.conf"
|
||||
mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf"
|
||||
if is_deployed "$APP"; then
|
||||
dokku_log_info1 "Creating $SCHEME nginx.conf"
|
||||
mv $NGINX_CONF "$DOKKU_ROOT/$APP/nginx.conf"
|
||||
else
|
||||
dokku_log_info1 "App $APP has not been deployed. Skipping nginx config creation"
|
||||
rm -f $NGINX_CONF
|
||||
fi
|
||||
|
||||
if is_deployed "$APP"; then
|
||||
dokku_log_info1 "Running nginx-pre-reload"
|
||||
|
||||
@@ -16,8 +16,8 @@ case "$1" in
|
||||
PLUGIN_PATH="$PLUGIN_CORE_PATH" plugn trigger install
|
||||
;;
|
||||
https:*|git:*|ssh:*)
|
||||
PLUGIN_GIT_URL="$2"
|
||||
download_and_enable_plugin "$PLUGIN_GIT_URL" "$3"
|
||||
shift
|
||||
download_and_enable_plugin "$@"
|
||||
plugn trigger install
|
||||
;;
|
||||
*)
|
||||
@@ -34,16 +34,12 @@ case "$1" in
|
||||
;;
|
||||
|
||||
plugin:update)
|
||||
case "$2" in
|
||||
https:*|git:*)
|
||||
PLUGIN_GIT_URL="$2"
|
||||
download_and_enable_plugin "$PLUGIN_GIT_URL" "$3"
|
||||
plugn trigger update
|
||||
;;
|
||||
*)
|
||||
plugn trigger update
|
||||
;;
|
||||
esac
|
||||
if [[ -n "$2" ]]; then
|
||||
PLUGIN="$2"
|
||||
PLUGIN_COMMITTISH="$3"
|
||||
plugn update "$PLUGIN" "$PLUGIN_COMMITTISH"
|
||||
fi
|
||||
plugn trigger update
|
||||
;;
|
||||
|
||||
plugin:disable)
|
||||
@@ -67,9 +63,9 @@ case "$1" in
|
||||
help | plugin:help)
|
||||
cat<<EOF
|
||||
plugin, Print active plugins
|
||||
plugin:install [--core|git-url], Optionally download git-url & run install trigger for active plugins (or only core ones)
|
||||
plugin:install [--core|git-url [--committish tag|branch|commit|--name custom-plugin-name]], Optionally download git-url (with custom tag/committish) & run install trigger for active plugins (or only core ones)
|
||||
plugin:install-dependencies [--core], Run install-dependencies trigger for active plugins (or only core ones)
|
||||
plugin:update [git-url], Optionally download git-url & run update trigger for active plugins
|
||||
plugin:update [name [committish]], Optionally update named plugin from git (with custom tag/committish) & run update trigger for active plugins
|
||||
plugin:enable <name>, Enable a previously disabled plugin
|
||||
plugin:disable <name>, Disable an installed plugin (third-party only)
|
||||
plugin:uninstall <name>, Uninstall a plugin (third-party only)
|
||||
|
||||
@@ -27,18 +27,44 @@ download_plugin() {
|
||||
|
||||
download_and_enable_plugin() {
|
||||
local PLUGIN_GIT_URL="$1"
|
||||
local CUSTOM_NAME="$2"
|
||||
shift
|
||||
while getopts ":-:" opt "$@"; do
|
||||
case "$opt" in
|
||||
-)
|
||||
case "$OPTARG" in
|
||||
committish)
|
||||
val="${!OPTIND}"; OPTIND=$(( OPTIND + 1 ))
|
||||
local PLUGIN_COMMITTISH="$val"
|
||||
;;
|
||||
name)
|
||||
val="${!OPTIND}"; OPTIND=$(( OPTIND + 1 ))
|
||||
local CUSTOM_NAME="$val"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
done
|
||||
local PLUGIN_NAME=${CUSTOM_NAME:-$(plugin_name "$PLUGIN_GIT_URL")}
|
||||
dokku_log_info1_quiet "Cloning plugin repo $PLUGIN_GIT_URL to $PLUGIN_AVAILABLE_PATH/$PLUGIN_NAME"
|
||||
download_plugin "$PLUGIN_GIT_URL" "$PLUGIN_NAME"
|
||||
enable_plugin "$PLUGIN_NAME"
|
||||
if [[ -n "$PLUGIN_COMMITTISH" ]];then
|
||||
update_plugin "$PLUGIN_NAME" "$PLUGIN_COMMITTISH"
|
||||
fi
|
||||
}
|
||||
|
||||
update_plugin() {
|
||||
local PLUGIN="$1"
|
||||
local PLUGIN_COMMITTISH="$2"
|
||||
[[ ! -e $PLUGIN_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail "Plugin ($PLUGIN) is not currently installed"
|
||||
plugn update "$@"
|
||||
}
|
||||
|
||||
uninstall_plugin() {
|
||||
local PLUGIN_NAME="$1"
|
||||
local PLUGIN="$1"
|
||||
[[ -e $PLUGIN_CORE_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail "Cannot uninstall a core plugin"
|
||||
[[ ! -e $PLUGIN_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail "Plugin does not exist"
|
||||
plugn uninstall $PLUGIN_NAME
|
||||
[[ ! -e $PLUGIN_AVAILABLE_PATH/$PLUGIN ]] && dokku_log_fail "Plugin ($PLUGIN) is not currently installed"
|
||||
plugn uninstall $PLUGIN
|
||||
dokku_log_info1_quiet "Plugin $PLUGIN uninstalled"
|
||||
}
|
||||
|
||||
|
||||
@@ -55,11 +55,9 @@ case "$1" in
|
||||
;;
|
||||
|
||||
ps:rebuildall)
|
||||
shopt -s nullglob
|
||||
for app in $(dokku_apps); do
|
||||
is_deployed $app && dokku ps:rebuild $app
|
||||
done
|
||||
shopt -u nullglob
|
||||
;;
|
||||
|
||||
ps:restart)
|
||||
@@ -73,15 +71,12 @@ case "$1" in
|
||||
;;
|
||||
|
||||
ps:restartall)
|
||||
shopt -s nullglob
|
||||
for app in $(dokku_apps); do
|
||||
dokku ps:restart $app
|
||||
done
|
||||
shopt -u nullglob
|
||||
;;
|
||||
|
||||
ps:restore)
|
||||
shopt -s nullglob
|
||||
for app in $(dokku_apps); do
|
||||
DOKKU_APP_RESTORE=$(dokku config:get $app DOKKU_APP_RESTORE || true)
|
||||
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
|
||||
@@ -89,7 +84,6 @@ case "$1" in
|
||||
dokku ps:start $app
|
||||
fi
|
||||
done
|
||||
shopt -u nullglob
|
||||
;;
|
||||
|
||||
ps:scale)
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"express": "4.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.12.x",
|
||||
"npm": "2.x"
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"express": "2.5.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "2.7.x"
|
||||
"node": "4.2.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"express": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x"
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"express": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x"
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"express": "~3.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "2.7.x"
|
||||
"node": "4.2.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
ruby '1.9.3'
|
||||
ruby '2.2.4'
|
||||
|
||||
gem 'compass', ">= 1.0.1"
|
||||
gem 'sass-globbing'
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
},
|
||||
"description": "Test application for heroku multi buildpack.",
|
||||
"engines": {
|
||||
"node": "~0.10.30"
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"license": "ISC",
|
||||
"name": "test-buildpack-multi",
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"express": "2.5.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "2.7.x"
|
||||
"node": "4.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node web.js"
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"express": "2.5.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "2.7.x"
|
||||
"node": "4.2.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"name": "node-example",
|
||||
"version": "0.0.1",
|
||||
"engines": {
|
||||
"node": "0.10.x",
|
||||
"npm": "2.7.x"
|
||||
"node": "4.2.x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,14 @@ setup_circle() {
|
||||
sudo -E CI=true make -e install
|
||||
sudo -E make -e setup-deploy-tests
|
||||
make -e ci-dependencies
|
||||
# circleci runs Ubuntu 12.04 and thus a previous version of bash (4.2) than 14.04
|
||||
# sudo apt-get install -y -q "bash=$(apt-cache show bash | egrep "^Version: 4.3" | head -1 | awk -F: '{ print $2 }' | xargs)"
|
||||
bash --version
|
||||
docker version
|
||||
# setup .dokkurc
|
||||
sudo -E mkdir -p /home/dokku/.dokkurc
|
||||
sudo -E chown dokku:ubuntu /home/dokku/.dokkurc
|
||||
sudo -E chmod 775 /home/dokku/.dokkurc
|
||||
}
|
||||
|
||||
if [[ -n "$CIRCLE_NODE_INDEX" ]] && [[ "$MODE" == "setup" ]]; then
|
||||
@@ -51,6 +59,8 @@ case "$CIRCLE_NODE_INDEX" in
|
||||
2)
|
||||
echo "=====> make unit-tests (3/4) on CIRCLE_NODE_INDEX: $CIRCLE_NODE_INDEX"
|
||||
sudo -E UNIT_TEST_BATCH=3 make -e unit-tests
|
||||
echo "=====> make deploy tests"
|
||||
sudo -E make -e deploy-test-checks-root deploy-test-config deploy-test-multi
|
||||
;;
|
||||
|
||||
3)
|
||||
|
||||
@@ -38,6 +38,13 @@ teardown() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(certs) certs:add < tar should ignore OSX hidden files" {
|
||||
run bash -c "dokku certs:add $TEST_APP < $BATS_TEST_DIRNAME/osx_ssl_tarred.tar"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(certs) certs:info" {
|
||||
run bash -c "dokku certs:add $TEST_APP < $BATS_TEST_DIRNAME/server_ssl.tar && dokku certs:info $TEST_APP"
|
||||
echo "output: "$output
|
||||
|
||||
@@ -12,8 +12,13 @@ teardown() {
|
||||
remove_test_plugin || true
|
||||
}
|
||||
|
||||
@test "(plugin) plugin:install, plugin:disable, plugin:uninstall" {
|
||||
run bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO"
|
||||
@test "(plugin) plugin:install, plugin:disable, plugin:update plugin:uninstall" {
|
||||
run bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO --name $TEST_PLUGIN_NAME"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku plugin:update $TEST_PLUGIN_NAME"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
@@ -49,6 +54,33 @@ teardown() {
|
||||
assert_failure
|
||||
}
|
||||
|
||||
@test "(plugin) plugin:install plugin:update (with tag)" {
|
||||
run bash -c "dokku plugin:install $TEST_PLUGIN_GIT_REPO --committish v0.2.0 --name $TEST_PLUGIN_NAME"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.2.0"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku plugin:update $TEST_PLUGIN_NAME v0.3.0"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
|
||||
run bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.2.0"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_failure
|
||||
|
||||
run bash -c "dokku plugin | grep enabled | grep $TEST_PLUGIN_NAME | grep 0.3.0"
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(plugin) plugin:install, plugin:disable, plugin:uninstall as non-root user failure" {
|
||||
run bash -c "sudo -E -u nobody dokku plugin:install $TEST_PLUGIN_GIT_REPO"
|
||||
echo "output: "$output
|
||||
|
||||
BIN
tests/unit/osx_ssl_tarred.tar
Normal file
BIN
tests/unit/osx_ssl_tarred.tar
Normal file
Binary file not shown.
Reference in New Issue
Block a user