Files
postbot/docker/Dockerfile.base
2025-08-17 11:44:54 +09:00

28 lines
934 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM python:3.12-slim AS base
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# Системные зависимости (MariaDB client headers для asyncmy/pymysql)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libmariadb-dev \
mariadb-client \
&& rm -rf /var/lib/apt/lists/*
# Устанавливаем зависимости проекта
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
# Копируем исходники
COPY . .
RUN apt-get update && apt-get install -y --no-install-recommends bash && rm -rf /var/lib/apt/lists/*
RUN sed -i 's/\r$//' docker/entrypoint.sh && chmod +x docker/entrypoint.sh
# В рантайме передаются переменные окружения из compose/.env
ENV TZ=Asia/Seoul
ENV DATABASE_URL=""
ENV DATABASE_URL_SYNC=""
ENV CELERY_BROKER_URL=""
ENV CELERY_RESULT_BACKEND=""