Add Minimal Dockerfile

This commit is contained in:
2022-07-14 15:04:09 -07:00
parent 5002ca093e
commit a871562a47
12 changed files with 227 additions and 68 deletions

25
docker/docker-entry.sh Normal file
View 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 "$@"