Add Minimal Dockerfile
This commit is contained in:
25
docker/docker-entry.sh
Normal file
25
docker/docker-entry.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export FLASK_APP=sigl.factory
|
||||
export FLASK_ENV=production
|
||||
export SIGL_CONFIG=${SIGL_CONFIG:-/home/sigl/config.py}
|
||||
export SIGL_PORT=${SIGL_PORT:-5151}
|
||||
|
||||
source venv/bin/activate
|
||||
|
||||
if [ "$1" = 'sigl' ]; then
|
||||
exec gunicorn -k eventlet -b :${SIGL_PORT} --access-logfile - --error-logfile - sigl.wsgi:app
|
||||
fi
|
||||
|
||||
if [ "$1" = 'db' ]; then
|
||||
if [ "$2" = 'downgrade' ]; then
|
||||
exec flask db downgrade
|
||||
else
|
||||
exec flask db upgrade
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user