Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
155f4e9aba | ||
|
|
1bfbdb449b | ||
|
|
b3ca3368e8 | ||
|
|
04921d6876 | ||
|
|
a915b8888f | ||
|
|
129a5fd33d | ||
|
|
e567ce1a90 | ||
|
|
489f131ffc | ||
|
|
45ec8df7be | ||
|
|
469d1e3f49 | ||
|
|
7ca2f49d78 | ||
|
|
69176d2d9a | ||
|
|
ad030b21d4 | ||
|
|
8c8f5e17f1 | ||
|
|
e0b994c415 | ||
|
|
a12b1e2b56 | ||
|
|
590c5fc017 | ||
|
|
ee5c35dd9d | ||
|
|
42a1363996 | ||
|
|
4ae8cf8180 | ||
|
|
aef3a68d2b | ||
|
|
58ca13e838 | ||
|
|
7c2f21fd2a | ||
|
|
887637fb6b | ||
|
|
c706344a94 | ||
|
|
a1bbc1ec4d | ||
|
|
793f1b6058 | ||
|
|
20977fc2a2 | ||
|
|
407436b4cc | ||
|
|
04dbe31919 | ||
|
|
56185fc1c2 | ||
|
|
303bd77226 | ||
|
|
c6e39c08f0 | ||
|
|
12194e2cc8 | ||
|
|
a3b3a6a12a |
@@ -4,3 +4,8 @@ root = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
insert_final_newline = true
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
23
HISTORY.md
23
HISTORY.md
@@ -1,5 +1,28 @@
|
||||
# History
|
||||
|
||||
## 0.3.8
|
||||
|
||||
- #796: @josegonzalez Better vagrant documentation
|
||||
- #801: @joelvh Point users to upgrade guides
|
||||
- #805: @ademuk Fixed import-ssl server.crt/key check
|
||||
- #806: @josegonzalez Dokku pushes now happen as the dokku user, not git. Refs #796
|
||||
- #807: @josegonzalez Write proper nginx conf upon installation. Closes #799
|
||||
- #808: @josegonzalez Ensure makefiles are properly formatted
|
||||
|
||||
## 0.3.7
|
||||
|
||||
- #788: @mmerickel fix apps plugin issues in 0.3.6
|
||||
- #789: @mmerickel do not output message when creating ENV file
|
||||
|
||||
## 0.3.6
|
||||
|
||||
- #782: @josegonzalez Simplified config checking
|
||||
- #785: @lsde fix missing semicolon in nginx config
|
||||
|
||||
## 0.3.5
|
||||
|
||||
- #784: @josegonzalez Fix NO_VHOST check
|
||||
|
||||
## 0.3.4
|
||||
|
||||
- #780: @josegonzalez Output error message when a command is not found. Closes #778
|
||||
|
||||
1
Makefile
1
Makefile
@@ -91,6 +91,7 @@ count:
|
||||
@find tests -type f | xargs cat | wc -l
|
||||
|
||||
dokku-installer:
|
||||
apt-get install -qq -y ruby
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install rack -v 1.5.2 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install rack-protection -v 1.5.3 --no-rdoc --no-ri
|
||||
test -f /var/lib/dokku/.dokku-installer-created || gem install sinatra -v 1.4.5 --no-rdoc --no-ri
|
||||
|
||||
@@ -10,7 +10,11 @@ Docker powered mini-Heroku. The smallest PaaS implementation you've ever seen. S
|
||||
|
||||
To install the latest stable version of dokku, you can run the following bootstrapper command:
|
||||
|
||||
$ wget -qO- https://raw.github.com/progrium/dokku/v0.3.4/bootstrap.sh | sudo DOKKU_TAG=v0.3.4 bash
|
||||
$ wget -qO- https://raw.github.com/progrium/dokku/v0.3.8/bootstrap.sh | sudo DOKKU_TAG=v0.3.8 bash
|
||||
|
||||
### Upgrading
|
||||
|
||||
[View the docs for upgrading](http://progrium.viewdocs.io/dokku/upgrading) from an older version of Dokku.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ if ARGV[0] == "onboot"
|
||||
exit
|
||||
end
|
||||
|
||||
version = "v0.3.4"
|
||||
version = "v0.3.8"
|
||||
dokku_root = ENV["DOKKU_ROOT"] || "/home/dokku"
|
||||
admin_key = `cat /root/.ssh/authorized_keys`.split("\n").first
|
||||
hostname = `bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || curl icanhazip.com'`.strip
|
||||
|
||||
@@ -4,8 +4,8 @@ Now you can deploy apps on your Dokku. Let's deploy the [Heroku Node.js sample a
|
||||
|
||||
```
|
||||
$ cd node-js-sample
|
||||
$ git remote add progrium dokku@progriumapp.com:node-js-app
|
||||
$ git push progrium master
|
||||
$ git remote add dokku dokku@dokku.me:node-js-app
|
||||
$ git push dokku master
|
||||
Counting objects: 296, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (254/254), done.
|
||||
@@ -18,12 +18,12 @@ Total 296 (delta 25), reused 276 (delta 13)
|
||||
... blah blah blah ...
|
||||
|
||||
-----> Application deployed:
|
||||
http://node-js-app.progriumapp.com
|
||||
http://node-js-app.dokku.me
|
||||
```
|
||||
|
||||
You're done!
|
||||
|
||||
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push progrium <local branch>:master```
|
||||
Dokku only supports deploying from its master branch, so if you'd like to deploy a different local branch use: ```git push dokku <local branch>:master```
|
||||
|
||||
Right now Buildstep supports buildpacks for Node.js, Ruby, Python, [and more](https://github.com/progrium/buildstep#supported-buildpacks). It's not hard to add more, [go add more](https://github.com/progrium/buildstep#adding-buildpacks)!
|
||||
Please check the documentation for your particular build pack as you may need to include configuration files (such as a Procfile) in your project root.
|
||||
@@ -53,33 +53,33 @@ Alternatively, you may push an app to your dokku host with a name like "00-defau
|
||||
|
||||
The name of remote repository is used as the name of application to be deployed, as for example above:
|
||||
|
||||
$ git remote add progrium git@progriumapp.com:node-js-app
|
||||
$ git push progrium master
|
||||
$ git remote add dokku dokku@dokku.me:node-js-app
|
||||
$ git push dokku master
|
||||
|
||||
Is deployed to,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://node-js-app.progriumapp.com
|
||||
remote: http://node-js-app.dokku.me
|
||||
|
||||
You can also specify fully qualified names, say `app.progrium.com`, as
|
||||
You can also specify fully qualified names, say `app.dokku.me`, as
|
||||
|
||||
$ git remote add progrium git@progriumapp.com:app.progrium.com
|
||||
$ git push progrium master
|
||||
$ git remote add dokku dokku@dokku.me:app.dokku.me
|
||||
$ git push dokku master
|
||||
|
||||
So, after deployment the application will be available at,
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://app.progrium.com
|
||||
remote: http://app.dokku.me
|
||||
|
||||
This is in particular useful, then you want to deploy to root domain, as
|
||||
|
||||
$ git remote add progrium git@progriumapp.com:progrium.com
|
||||
$ git push progrium master
|
||||
$ git remote add dokku dokku@dokku.me:dokku.me
|
||||
$ git push dokku master
|
||||
|
||||
... deployment ...
|
||||
|
||||
remote: -----> Application deployed:
|
||||
remote: http://progrium.com
|
||||
remote: http://dokku.me
|
||||
|
||||
# Removing a deployed app
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Ubuntu 14.04 x64 x64. Ideally have a domain ready to point to your host. It's de
|
||||
To install the latest stable version of dokku, you can run the following bootstrapper command:
|
||||
|
||||
```bash
|
||||
wget -qO- https://raw.github.com/progrium/dokku/v0.3.4/bootstrap.sh | sudo DOKKU_TAG=v0.3.4 bash
|
||||
wget -qO- https://raw.github.com/progrium/dokku/v0.3.8/bootstrap.sh | sudo DOKKU_TAG=v0.3.8 bash
|
||||
```
|
||||
|
||||
## Configuring
|
||||
@@ -20,7 +20,7 @@ Set up a domain and a wildcard domain pointing to that host. Make sure `/home/do
|
||||
|
||||
You'll have to add a public key associated with a username by doing something like this from your local machine:
|
||||
|
||||
$ cat ~/.ssh/id_rsa.pub | ssh progriumapp.com "sudo sshcommand acl-add dokku progrium"
|
||||
$ cat ~/.ssh/id_rsa.pub | ssh dokku.me "sudo sshcommand acl-add dokku $USER"
|
||||
|
||||
That's it!
|
||||
|
||||
@@ -110,6 +110,7 @@ sudo BUILD_STACK=true make install
|
||||
# - `BOX_MEMORY`
|
||||
# - `DOKKU_DOMAIN`
|
||||
# - `DOKKU_IP`.
|
||||
cd path/to/dokku
|
||||
vagrant up
|
||||
```
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
case "$1" in
|
||||
hello)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$APP" ]] && echo "App $APP does not exist" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2";
|
||||
|
||||
echo "Hello $APP"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Remote commands
|
||||
|
||||
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@progriumapp.com <command>`
|
||||
Dokku commands can be run over ssh. Anywhere you would run `dokku <command>`, just run `ssh -t dokku@dokku.me <command>`
|
||||
The `-t` is used to request a pty. It is highly recommended to do so.
|
||||
To avoid the need to type the `-t` option each time, simply create/modify a section in the `.ssh/config` on the client side, as follows:
|
||||
|
||||
```
|
||||
Host progriumapp.com
|
||||
Host dokku.me
|
||||
RequestTTY yes
|
||||
```
|
||||
|
||||
|
||||
@@ -7,15 +7,9 @@ case "$1" in
|
||||
;;
|
||||
|
||||
logs)
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Please specify an app to run the command on"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2";
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]]; then
|
||||
CONTAINER=$(<$DOKKU_ROOT/$APP/CONTAINER)
|
||||
@@ -30,15 +24,10 @@ case "$1" in
|
||||
;;
|
||||
|
||||
run)
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Please specify an app to run the command on"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2"; IMAGE="dokku/$APP"
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
shift 2
|
||||
|
||||
DOCKER_ARGS=$(: | pluginhook docker-args $APP)
|
||||
@@ -46,11 +35,9 @@ case "$1" in
|
||||
;;
|
||||
|
||||
url)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2";
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/$APP/URL" ]]; then
|
||||
echo $(< "$DOKKU_ROOT/$APP/URL")
|
||||
|
||||
@@ -4,39 +4,23 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
case "$1" in
|
||||
apps)
|
||||
echo "=== My Apps"
|
||||
find $DOKKU_ROOT -maxdepth 1 -type d \( ! -iname ".*" \) -not -path $DOKKU_ROOT/tls | sed 's|^\./||g' | sed 's|'$DOKKU_ROOT'\/||' | tail -n +2 | sort
|
||||
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
|
||||
;;
|
||||
|
||||
apps:create)
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Please specify an app to create"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ -d "$DOKKU_ROOT/$2" ]] && echo " ! Name is already taken" && exit 1
|
||||
APP="$2"
|
||||
if [[ -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo " ! Name is already taken"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$DOKKU_ROOT/$APP"
|
||||
echo "Creating $APP... done"
|
||||
;;
|
||||
|
||||
apps:destroy)
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Please specify an app to delete"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
[[ "$2" == "tls" ]] && echo "Unable to destroy tls directory" && exit 1
|
||||
APP="$2"; IMAGE="dokku/$APP";
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$APP" == "tls" ]]; then
|
||||
echo "Unable to destroy tls directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo " ! WARNING: Potentially Destructive Action"
|
||||
echo " ! This command will destroy $APP (including all add-ons)."
|
||||
|
||||
@@ -1,28 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
# Check if name is specified
|
||||
if [[ $1 == config ]] || [[ $1 == config:* ]]; then
|
||||
if [[ -z $2 ]]; then
|
||||
echo "You must specify an app name"
|
||||
exit 1
|
||||
else
|
||||
APP="$2"
|
||||
ENV_FILE="$DOKKU_ROOT/$APP/ENV"
|
||||
ENV_FILE_TEMP="$DOKKU_ROOT/$APP/ENV.tmp"
|
||||
|
||||
# Check if app exists with the same name
|
||||
if [ ! -d "$DOKKU_ROOT/$APP" ]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -f $ENV_FILE ] || {
|
||||
echo "-----> Creating $ENV_FILE"
|
||||
touch $ENV_FILE
|
||||
}
|
||||
fi
|
||||
fi
|
||||
ENV_FILE="$DOKKU_ROOT/$2/ENV"
|
||||
ENV_FILE_TEMP="$DOKKU_ROOT/$2/ENV.tmp"
|
||||
config_create () {
|
||||
[ -f $ENV_FILE ] || {
|
||||
touch $ENV_FILE
|
||||
}
|
||||
}
|
||||
|
||||
config_styled_hash () {
|
||||
vars="$1"
|
||||
@@ -76,12 +61,12 @@ config_write() {
|
||||
|
||||
case "$1" in
|
||||
config)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2"
|
||||
|
||||
if [ ! -f $ENV_FILE ] || [ ! -s $ENV_FILE ] ; then
|
||||
echo "$APP has no config vars"
|
||||
exit 1
|
||||
fi
|
||||
config_create
|
||||
[[ ! -s $ENV_FILE ]] && echo "$APP has no config vars" && exit 1
|
||||
|
||||
VARS=`cat $ENV_FILE | grep -Eo "export ([a-zA-Z_][a-zA-Z0-9_]*=.*)" | cut -d" " -f2-`
|
||||
|
||||
@@ -97,14 +82,19 @@ case "$1" in
|
||||
;;
|
||||
|
||||
config:get)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2"
|
||||
|
||||
if [[ -z $3 ]]; then
|
||||
echo "Usage: dokku config:get APP KEY"
|
||||
echo "Must specify KEY."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f $ENV_FILE ] || [ ! -s $ENV_FILE ] ; then
|
||||
exit 1
|
||||
config_create
|
||||
if [[ ! -s $ENV_FILE ]] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
KEY="$3"
|
||||
@@ -113,13 +103,17 @@ case "$1" in
|
||||
;;
|
||||
|
||||
config:set)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2"
|
||||
|
||||
if [[ -z "${*:3}" ]]; then
|
||||
echo "Usage: dokku config:set APP KEY1=VALUE1 [KEY2=VALUE2 ...]"
|
||||
echo "Must specify KEY and VALUE to set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APP="$2"; APP_DIR="$DOKKU_ROOT/$APP"
|
||||
config_create
|
||||
ENV_ADD=""
|
||||
ENV_TEMP=`cat "${ENV_FILE}"`
|
||||
RESTART_APP=false
|
||||
@@ -157,13 +151,17 @@ ${var}"
|
||||
;;
|
||||
|
||||
config:unset)
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
APP="$2"
|
||||
|
||||
if [[ -z $3 ]]; then
|
||||
echo "Usage: dokku config:unset APP KEY1 [KEY2 ...]"
|
||||
echo "Must specify KEY to unset."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APP="$2"; APP_DIR="$DOKKU_ROOT/$APP"
|
||||
config_create
|
||||
ENV_TEMP=`cat "${ENV_FILE}"`
|
||||
VARS="${*:3}"
|
||||
|
||||
|
||||
@@ -3,31 +3,16 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
nginx:import-ssl)
|
||||
if [[ -z $2 ]]; then
|
||||
echo "Please specify an app to create"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ ! -d "$DOKKU_ROOT/$2" ]] && echo "App $2 does not exist" && exit 1
|
||||
[[ -t 0 ]] && echo "Tar archive containing server.crt and server.key expected on stdin" && exit 1
|
||||
APP="$2"
|
||||
if [[ ! -d "$DOKKU_ROOT/$APP" ]]; then
|
||||
echo "App $APP does not exist"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -t 0 ]]; then
|
||||
echo "Tar archive containing server.crt and server.key expected on stdin"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
TEMP_DIR=`mktemp -d`
|
||||
cd $TEMP_DIR
|
||||
tar xvf - <&0
|
||||
if [[ -f "$TEMP_DIR/server.crt" ]]; then
|
||||
echo "Tar archive missing server.crt"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -f "$TEMP_DIR/server.key" ]]; then
|
||||
echo "Tar archive missing server.key"
|
||||
exit 1
|
||||
fi
|
||||
[[ ! -f "$TEMP_DIR/server.crt" ]] && echo "Tar archive missing server.crt" && exit 1
|
||||
[[ ! -f "$TEMP_DIR/server.key" ]] && echo "Tar archive missing server.key" && exit 1
|
||||
|
||||
mkdir -p "$DOKKU_ROOT/$APP/tls"
|
||||
mv "$TEMP_DIR/server.crt" "$DOKKU_ROOT/$APP/tls/server.crt"
|
||||
|
||||
@@ -32,7 +32,37 @@ ssl_prefer_server_ciphers on;
|
||||
EOF
|
||||
fi
|
||||
|
||||
echo 'server_names_hash_bucket_size 64' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf
|
||||
cat<<EOF > /etc/nginx/nginx.conf
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 768;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
include /etc/nginx/sites-enabled/*;
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
echo 'server_names_hash_bucket_size 64;' >| /etc/nginx/conf.d/server_names_hash_bucket_size.conf
|
||||
|
||||
if [[ ! -f "$DOKKU_ROOT/VHOST" ]]; then
|
||||
[[ $(dig +short $(< "$DOKKU_ROOT/HOSTNAME")) ]] && cp "$DOKKU_ROOT/HOSTNAME" "$DOKKU_ROOT/VHOST"
|
||||
|
||||
@@ -9,11 +9,11 @@ set +e
|
||||
NO_VHOST=$(dokku config:get $APP NO_VHOST)
|
||||
set -e
|
||||
|
||||
if [[ -z "$NO_VHOST" ]]; then
|
||||
if [[ -n "$NO_VHOST" ]]; then
|
||||
echo "-----> NO_VHOST config detected"
|
||||
fi
|
||||
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" && ! -z "$NO_VHOST" ]]; then
|
||||
if [[ -f "$DOKKU_ROOT/VHOST" && ! -n "$NO_VHOST" ]]; then
|
||||
VHOST=$(< "$DOKKU_ROOT/VHOST")
|
||||
SUBDOMAIN=${APP/%\.${VHOST}/}
|
||||
hostname=$(: | pluginhook nginx-hostname $APP $SUBDOMAIN $VHOST)
|
||||
|
||||
Reference in New Issue
Block a user