21 lines
495 B
Bash
21 lines
495 B
Bash
#!/bin/sh -e
|
|
|
|
# Create required directories with appropriate permissions
|
|
mkdir -p /app/run/caddy /app/run/gunicorn
|
|
|
|
echo "Applying database migrations"
|
|
python -m hub migrate
|
|
|
|
echo "Starting Caddy"
|
|
caddy run --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:/app/run/gunicorn.sock \
|
|
hub.wsgi:application
|