Files
periodic-table/backend/Dockerfile
2025-11-28 12:33:37 -03:00

26 lines
541 B
Docker

FROM python:3.12-slim
ENV POETRY_VERSION=1.6.1 \
POETRY_NO_INTERACTION=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update \
&& apt-get install -y curl build-essential \
&& apt-get clean
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
WORKDIR /app
COPY pyproject.toml ./
RUN poetry lock --no-update && poetry install --no-root
COPY . .
EXPOSE 8080
CMD ["poetry", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080", "--reload"]