mirror of
https://github.com/wahyd4/home-docker.git
synced 2026-08-09 04:15:52 +10:00
- New _db.py module with sqlite3-based persistence - Auto-migrate from sites.json on first run - All writes now use _db.insert/update/delete directly - Sites default to draft (published: false) on creation The sites.json file is kept as .json.migrated for safety
15 lines
376 B
Docker
15 lines
376 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN pip install --no-cache-dir fastapi uvicorn python-multipart httpx
|
|
|
|
# Note: python:3.12-slim includes sqlite3 by default
|
|
COPY service.py _config.py _loaders.py _db.py error-page.html admin-ui.html /app/
|
|
|
|
RUN mkdir -p /data/demos
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["uvicorn", "service:app", "--host", "0.0.0.0", "--port", "3000", "--log-level", "info"]
|