Commit 76285a05 authored by BAIRE Anthony's avatar BAIRE Anthony
Browse files

run prepare-allgo before every container script

(because rails requires these files/directories all the time)
parent 1676238d
#!/bin/sh
set -e
prepare-allgo
# purge old jobs
exec rake allgo:clean_jobs
#!/bin/sh
set -e
prepare-allgo
# regenerate session key every month
generate-secret
......@@ -8,4 +8,6 @@ fi
set -e -x
prepare-allgo
rake db:migrate
#!/bin/sh
set -e
mkdir -p \
/vol/rw/datastore \
/vol/rw/app \
/vol/rw/system \
/vol/log/nginx \
/vol/log/rails \
/vol/log/redis \
/vol/log/sidekiq \
/vol/log/supervisor \
/vol/log/unicorn \
/vol/cache/redis \
/vol/cache/nginx \
[ -f /vol/cache/secret_key_base ] || generate-secret
......@@ -2,20 +2,7 @@
set -e
mkdir -p \
/vol/rw/datastore \
/vol/rw/app \
/vol/rw/system \
/vol/log/nginx \
/vol/log/rails \
/vol/log/redis \
/vol/log/sidekiq \
/vol/log/supervisor \
/vol/log/unicorn \
/vol/cache/redis \
/vol/cache/nginx \
[ -f /vol/cache/secret_key_base ] || generate-secret
prepare-allgo
# wait until the mysql server is ready
# (otherwise rails is unable to start)
......
......@@ -15,7 +15,7 @@ chmod -R og+rwX /run
# scripts
ln -s "$SETUP/run-allgo" "$SETUP/generate-secret" /usr/local/bin/
ln -s "$SETUP/run-allgo" "$SETUP/prepare-allgo" "$SETUP/generate-secret" /usr/local/bin/
# precompile assets
cd /opt/allgo
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment