CI / test-and-package (push) Successful in 33s
- meal-cron now runs send_reminders_cron.sh (simple wget loop, no DB mount) - New /api/cron-tick endpoint handles all timezone logic server-side - base_url captured from request.host_url when user saves ntfy settings, stored per-user — no APP_BASE_URL env var needed - Cron endpoint protected by CRON_SECRET shared env var - Removed send_reminders_cron.py, DB volume from cron container - tests: 3 new cron-tick + base_url capture tests (69 total)
25 lines
625 B
Docker
25 lines
625 B
Docker
FROM python:3.13-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application
|
|
COPY app.py models.py auth.py meals.py i18n.py ntfy.py send_reminders_cron.sh ./
|
|
COPY templates/ templates/
|
|
COPY static/ static/
|
|
|
|
# Create persistent data directory
|
|
RUN mkdir -p /data
|
|
ENV DB_PATH=/data/meals.db
|
|
|
|
EXPOSE 5000
|
|
|
|
# Generate a default secret key at build time (override in prod)
|
|
ENV SECRET_KEY=change-me-in-production
|
|
|
|
# Run in production mode (no debug, use a WSGI server)
|
|
CMD ["flask", "--app", "app:create_app()", "run", "--host=0.0.0.0", "--port=5000"]
|