Dockerized everything and added CI/CD deployment

This commit is contained in:
c-d-p
2025-04-22 22:54:31 +02:00
parent bf147af3ef
commit 02d191853b
17 changed files with 434 additions and 71 deletions

19
backend/Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
# backend/Dockerfile
FROM python:3.12-slim
WORKDIR /app
# Set environment variables to prevent buffering issues with logs
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install dependencies
COPY ./requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code (AFTER installing dependencies for better caching)
COPY . /app/
RUN adduser --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser