Dockerize: self-contained stack + B2 backup sidecar

This commit is contained in:
Bonna
2026-06-06 14:25:45 -05:00
parent fa3c030b36
commit 7f2057f139
9 changed files with 173 additions and 3 deletions

19
entrypoint.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
# Runs before the app starts. Ensures the data dir exists and runs DB
# migrations if the app uses them. Uncomment the lines that apply.
set -e
mkdir -p /data/uploads/suggestions
# --- Database migrations (pick what the app uses, leave the rest commented) ---
# Flask-Migrate / Alembic via Flask:
# flask db upgrade
# Raw Alembic:
# alembic upgrade head
# Django:
# python manage.py migrate --noinput
# python manage.py collectstatic --noinput
# Plain SQLite with a schema file (only first run):
# [ -f /data/app.db ] || sqlite3 /data/app.db < schema.sql
exec "$@"