initial docker setup
This commit is contained in:
12
backend/.dockerignore
Normal file
12
backend/.dockerignore
Normal file
@@ -0,0 +1,12 @@
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.Python
|
||||
.pytest_cache
|
||||
.mypy_cache
|
||||
.ruff_cache
|
||||
.venv
|
||||
venv
|
||||
.env
|
||||
*.log
|
||||
@@ -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
15
backend/Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user