The CMD ran 'python src/webui/app.py' which defaults to --host 127.0.0.1, unreachable from outside the container. Bind 0.0.0.0:5000 explicitly. No --dev flag => PRODUCTION mode (admin routes 404). Deployed at ietf.nennemann.de (see dev-journal).
27 lines
680 B
Docker
27 lines
680 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install build dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copy project metadata and source first for layer caching
|
|
COPY pyproject.toml .
|
|
COPY src/ src/
|
|
|
|
# Install the package and all dependencies (including flask)
|
|
RUN pip install --no-cache-dir .
|
|
|
|
# Copy data directory (DB, config, reports)
|
|
COPY data/ data/
|
|
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
EXPOSE 5000
|
|
|
|
# Bind 0.0.0.0 so the container is reachable from the host/reverse proxy.
|
|
# No --dev flag => PRODUCTION mode (admin routes return 404).
|
|
CMD ["python", "src/webui/app.py", "--host", "0.0.0.0", "--port", "5000"]
|