Dockerize application using docker-compose with PostgreSQL

This commit is contained in:
2026-01-24 13:31:47 +01:00
parent 01ae4a09ff
commit 52b5b301ef
4 changed files with 74 additions and 1 deletions

18
backend/Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for psycopg2
RUN apt-get update && apt-get install -y \
libpq-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]