initial docker setup

This commit is contained in:
2026-03-16 11:05:44 +05:30
parent 8bea06be5e
commit 3a096bbc37
8 changed files with 355 additions and 0 deletions

12
backend/.dockerignore Normal file
View File

@@ -0,0 +1,12 @@
__pycache__
*.pyc
*.pyo
*.pyd
.Python
.pytest_cache
.mypy_cache
.ruff_cache
.venv
venv
.env
*.log

View File

@@ -4,3 +4,7 @@ API_PORT=8001
ENVIRONMENT=development
FRONTEND_URL=http://localhost:8000
# Docker Compose values:
# MONGODB_URI=mongodb://mongo:27017
# ENVIRONMENT=production

15
backend/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM python:3.12-slim
WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8001
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001"]