FROM python:3.12-slim-bookworm

# set work directory
WORKDIR /app

# install dependencies
COPY pyproject.toml .
COPY poetry.lock .
RUN pip install poetry
RUN poetry config virtualenvs.create false --local
RUN poetry install

COPY app.py .
COPY accounts.py .
COPY files.py .
COPY passwords.py .
COPY util ./util

CMD ["gunicorn"  , "-b", "0.0.0.0:8000", "app:app"]
