FROM python:3.12-slim

WORKDIR /app

# Installer system-dependencies
RUN apt-get update && apt-get install -y \
    default-libmysqlclient-dev \
    gcc \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Installer Python-pakker
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Kopier kode
COPY . .

# Vent på DB og start server
COPY start.sh .
RUN chmod +x start.sh
CMD ["./start.sh"]
