add dockerfile and prep for prod

This commit is contained in:
Tobias Brunner 2025-01-30 15:12:50 +01:00
parent 8c9671602b
commit 9aeab6ee3b
No known key found for this signature in database
5 changed files with 94 additions and 1 deletions

18
docker/run.sh Normal file
View file

@ -0,0 +1,18 @@
#!/bin/sh -e
echo "Applying database migrations"
python -m hub migrate
echo "Starting Caddy"
caddy start --config /etc/caddy/Caddyfile
echo "Starting Gunicorn"
exec \
gunicorn \
-w 4 \
--access-logfile None \
--error-log - \
--capture-output \
--pythonpath /app/.venv/lib/python3.13/site-packages/ \
--bind unix:/run/gunicorn.sock \
hub.wsgi:application