Commit 3e1ae787 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

docker/…/uwsgi-entrypoint.sh: Put DB initialization first

This gives more chance to have enough time for initializing the DB (for CI review environment) before another process accesses it
parent 5d797b9f
......@@ -11,15 +11,12 @@ if [[ -n "$WEB2PY_ADMIN_PASSWORD" ]]; then
python -c "from gluon.main import save_password; save_password('${WEB2PY_ADMIN_PASSWORD}', 443)"
fi
/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini &
if [ "$1" == "--ci" ]; then
cd /usr/share/vidjil/server/web2py/applications/vidjil/scripts
sleep 20
echo "Loading SQL"
/usr/local/bin/gosu $user bash launch_python_script.sh load-sql.py -n /usr/share/vidjil/docker/ci/ci.sql
echo "SQL loaded"
python /usr/share/vidjil/tools/fuse.py --output /mnt/result/results/fused.vidjil /usr/share/vidjil/doc/analysis-example.vidjil /usr/share/vidjil/doc/analysis-example.vidjil /usr/share/vidjil/doc/analysis-example.vidjil
fi
wait
/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini
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