Files
qgreper/forum/docker-entrypoint.sh

22 lines
462 B
Bash
Executable File

#!/bin/sh
PYTHON=python3
SQLITE=sqlite3
export DB="/app/forum.db"
export CONF="/app/forum.config"
export SERVER=gunicorn
export PID="forum.pid"
export WORKERS=4
if [[ $( stat -c %u /app ) -ne $( id -u ) ]]; then
echo User id and /app folder owner do not match
printf 'UID: %s\nFolder: %s\n' $( id -u ) $( stat -c %u /app )
exit 1
fi
set -eu
. /opt/venv/bin/activate
sh ./init_forum.sh
exec "$SERVER" -w $WORKERS 'main:app' --pid="$PID" -b 0.0.0.0:5000