Improve Docker setup (PR #497)

This commit is contained in:
wvengen 2017-10-01 13:57:36 +02:00 committed by GitHub
parent 01950b48a1
commit 0363f2dadc
13 changed files with 236 additions and 108 deletions

View file

@ -1,19 +1,7 @@
#!/bin/sh
set -e
CRONTAB="$(crontab -l)"
CRONTAB_ENV=""
if test -n "$BUNDLE_APP_CONFIG"; then
CRONTAB_ENV="${CRONTAB_ENV}BUNDLE_APP_CONFIG=$BUNDLE_APP_CONFIG\n"
fi
if test -n "$DATABASE_URL"; then
CRONTAB_ENV="${CRONTAB_ENV}DATABASE_URL=$DATABASE_URL\n"
fi
echo "$CRONTAB_ENV$CRONTAB" | crontab -
# allow re-using the instance - https://stackoverflow.com/a/38732187/2866660
if [ -f tmp/pids/server.pid ]; then
rm tmp/pids/server.pid
fi