Version 1.1

This commit is contained in:
2026-01-28 15:31:49 +01:00
parent b5b11b5826
commit 105bcc8d7a
10 changed files with 553 additions and 4 deletions

35
docker-compose.yml Normal file
View File

@@ -0,0 +1,35 @@
services:
web:
build:
context: .
container_name: psalmbordonline-web
ports:
# Host:Container
- "${WEB_PORT:-5000}:5000"
environment:
# Flask
- FLASK_ENV=${FLASK_ENV:-production}
# The app reads these from env (with sensible defaults in app.py)
- SECRET_KEY=${SECRET_KEY:-change-me}
# Use an absolute path inside the container. Note the 4 slashes for sqlite.
- SQLALCHEMY_DATABASE_URI=${SQLALCHEMY_DATABASE_URI:-sqlite:////instance/liturgie.db}
# Default admin bootstrap (only created if not existing)
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin}
command:
# Ensure the SQLite DB + tables exist when running under gunicorn (the __main__
# block in app.py does not run under gunicorn).
- sh
- -c
- "python init_db.py && gunicorn wsgi:app -b 0.0.0.0:5000"
volumes:
# Persist SQLite DB (stored under Flask's instance folder)
- ./instance:/instance
# Persist uploaded images/backgrounds
- ./static/uploads:/static/uploads
restart: unless-stopped