pif / Dockerfile
pramodmisra's picture
Round 5 pre-launch: 2 new agreement types, NOCEA1 CE, employee list, email + admin fixes
108b32b
Raw
History Blame Contribute Delete
768 Bytes
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /data
# ⚠️ DATA PERSISTENCE — DO NOT CHANGE without reading OPERATIONS.md §2.
# /data MUST stay mounted to the persistent HF bucket `pramodmisra/pif-db`.
# The entire agency DB (logins, submissions, approvals, CE edits) lives at
# /data/app.db. Never bake a DB into the image and never detach the bucket —
# without it, every rebuild wipes /data back to the seed. The COPY above must
# NOT ship a data/ dir (it's gitignored); a fresh container mounts the bucket
# and start.py runs only additive, idempotent migrations on the existing DB.
ENV DATABASE_URL="sqlite:////data/app.db"
EXPOSE 7860
CMD ["python", "start.py"]