Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
- Remove COPY static/ (runtime uploads live in DATA_DIR/uploads) - Add /health endpoint - Read PORT from env (NOMAD_PORT_http in production, 9756 local) - citti.nomad: dynamic port, canary deploy, Consul/Traefik, health check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
618 B
Docker
34 lines
618 B
Docker
FROM python:3.12-slim
|
|
|
|
ARG BUILD_VERSION=unknown
|
|
ARG BUILD_TIME=unknown
|
|
ARG GIT_COMMIT=unknown
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1 \
|
|
FLASK_APP=app.py \
|
|
FLASK_ENV=production \
|
|
BUILD_VERSION=${BUILD_VERSION} \
|
|
BUILD_TIME=${BUILD_TIME} \
|
|
GIT_COMMIT=${GIT_COMMIT}
|
|
|
|
WORKDIR /app
|
|
|
|
RUN pip install --upgrade --no-cache-dir pip
|
|
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY app.py .
|
|
COPY templates/ templates/
|
|
|
|
ENV DATA_DIR=/app/instance \
|
|
PORT=9756 \
|
|
HOST=0.0.0.0
|
|
|
|
RUN mkdir -p /app/instance
|
|
|
|
EXPOSE 9756
|
|
|
|
CMD ["sh", "-c", "python app.py"]
|