The HOSTNAME environment var only contains the first part of the domain name. Use the fqdn to have it entirely.
21 lines
465 B
Bash
Executable File
21 lines
465 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf
|
|
|
|
echo $(hostname -f) > $DOKKU_ROOT/HOSTNAME
|
|
|
|
|
|
# temporary hack for https://github.com/progrium/dokku/issues/82
|
|
# redeploys all apps after a reboot
|
|
cat<<EOF > /etc/init/dokku-redeploy.conf
|
|
description "Dokku app redeploy service"
|
|
|
|
start on (started docker)
|
|
|
|
script
|
|
sleep 2 # give docker some time
|
|
sudo -i -u dokku /usr/local/bin/dokku deploy:all
|
|
end script
|
|
EOF
|