items
This commit is contained in:
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Minimal tooling for healthcheck
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application
|
||||
COPY app ./app
|
||||
COPY static ./static
|
||||
COPY delphi-logo.webp ./delphi-logo.webp
|
||||
COPY old-csv ./old-csv
|
||||
COPY old-database ./old-database
|
||||
COPY data-import ./data-import
|
||||
|
||||
ENV DATABASE_URL=sqlite:///./delphi.db
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD curl -fsS http://localhost:8000/health || exit 1
|
||||
|
||||
CMD ["uvicorn","app.main:app","--host","0.0.0.0","--port","8000"]
|
||||
|
||||
Reference in New Issue
Block a user