FROM docker.m.daocloud.io/library/python:3.12-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV APP_CONFIG_FILE=/app/config/app_settings.json

WORKDIR /app

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY main.py .
COPY config ./config
COPY financial_system ./financial_system
COPY static ./static

RUN mkdir -p logs uploads outputs static/uploads/avatars

EXPOSE 8000

CMD ["python", "main.py"]
