File size: 768 Bytes
996fcf9
 
 
 
 
 
 
 
 
 
 
108b32b
 
 
 
 
 
 
996fcf9
 
 
 
042d0d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"]