FROM python:3.12 AS builder ENV POETRY_HOME="/opt/poetry" ENV PATH="$POETRY_HOME/bin:$PATH" WORKDIR /app RUN curl -sSL https://install.python-poetry.org | python3 - COPY pyproject.toml poetry.lock ./ RUN poetry config virtualenvs.in-project true RUN poetry install --with app FROM python:3.12-slim ENV PATH="/app/.venv/bin:$PATH" WORKDIR /app RUN apt update && \ apt install -y locales && \ sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales ENV LANG=ru_RU.UTF-8 ENV LC_ALL=ru_RU.UTF-8 ENV TZ="Europe/Moscow" COPY --from=builder /app ./ COPY gismeteo gismeteo/ COPY weather weather/ CMD ["uvicorn", "weather.main:app", "--host", "0.0.0.0", "--port", "80", "--log-config", "weather/logging.yaml"]