Files
forwarder/Dockerfile
1sonhador df016a1e34 fix(deploy): use repo deploy script + expose git_sha in health
Webhook now runs /opt/forwarder/deploy/deploy-pull.sh from git (not stale
image copy). Rolling rebuild api then web; health reports FORWARDER_GIT_SHA.
2026-07-01 01:40:43 +01:00

27 lines
568 B
Docker

FROM python:3.12-slim
ARG FORWARDER_GIT_SHA=unknown
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
default-libmysqlclient-dev \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml README.md ./
COPY src ./src
COPY alembic.ini ./
COPY migrations ./migrations
RUN pip install --no-cache-dir -e .
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app/src
ENV FORWARDER_GIT_SHA=$FORWARDER_GIT_SHA
EXPOSE 8000
CMD ["uvicorn", "forwarder.api.app:app", "--host", "0.0.0.0", "--port", "8000", "--app-dir", "src"]