30 lines
787 B
Docker
30 lines
787 B
Docker
FROM python:3.12-slim-bookworm
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONPATH=/app
|
|
|
|
WORKDIR /app
|
|
|
|
RUN sed -i 's|http://deb.debian.org|https://deb.debian.org|g' /etc/apt/sources.list.d/debian.sources \
|
|
&& 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=8200
|
|
|
|
EXPOSE 8200
|
|
|
|
HEALTHCHECK --interval=10s --timeout=5s --retries=5 --start-period=15s \
|
|
CMD curl -f http://127.0.0.1:8200/health || exit 1
|
|
|
|
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8200"]
|