29 lines
672 B
Docker
29 lines
672 B
Docker
FROM python:3.12-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONPATH=/app
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt /app/requirements.txt
|
|
RUN pip install --no-cache-dir -r /app/requirements.txt
|
|
|
|
COPY domain /app/domain
|
|
COPY infrastructure /app/infrastructure
|
|
COPY api /app/api
|
|
|
|
ENV BOT_API_HOST=0.0.0.0
|
|
ENV BOT_API_PORT=8210
|
|
|
|
EXPOSE 8210
|
|
|
|
HEALTHCHECK --interval=10s --timeout=5s --retries=5 --start-period=15s \
|
|
CMD curl -f http://127.0.0.1:8210/health || exit 1
|
|
|
|
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8210"]
|