Add Dockerfile for Coolify deployment

This commit is contained in:
A R R R Associates
2026-06-21 13:21:45 +05:30
parent 5c75eb6bd9
commit 62c9b75e8d
2 changed files with 59 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/data/storage /app/data/year_backups
EXPOSE 8000
CMD ["sh", "-c", "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"]