Files
seismo-relay/Dockerfile
T
serversdownandClaude Opus 5.5 a7f9f66da1 build: bridges/ leaves the production image
The bench and lab tools (MITM proxy, the old ACH servers, probes, link
simulator) were copied into the SFM image and installed as a package,
though SFM imports nothing from them (ADR 0003: lab tools leave the
image).  Dockerfile and the package list now carry minimateplus,
micromate, sfm and scripts only; the backfills still run in the
container.  Checked: the image builds, sfm.server and the backfill /
import scripts import inside it.  Tests that use bridges/ run from a
checkout, unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
2026-11-20 13:39:23 -05:00

33 lines
1.2 KiB
Docker

FROM python:3.11-slim
WORKDIR /app
# tzdata is required for the TZ env var to take effect (python:slim
# omits the timezone database). Without it, datetime.now() / logging
# / matplotlib all stay in UTC regardless of TZ. Default zone gets
# set further down via ENV; users override per-deployment via the
# `TZ` env var in docker-compose.
RUN apt-get update && \
apt-get install -y --no-install-recommends curl tzdata && \
rm -rf /var/lib/apt/lists/*
# Default display timezone — applied to server logs, datetime.now(),
# matplotlib rendered timestamps, and any naïve-vs-aware datetime
# conversions in the PDF renderer. Override via TZ env var in
# docker-compose; storage in the DB is always UTC regardless.
ENV TZ=America/New_York
# The product and its maintenance scripts (the backfills run in this
# container). The bench and lab tools -- bridges/, scratch/, seismo_lab.py --
# stay out of the image (ADR 0003; SFM imports nothing from them).
COPY pyproject.toml requirements.txt ./
COPY minimateplus ./minimateplus
COPY micromate ./micromate
COPY sfm ./sfm
COPY scripts ./scripts
RUN pip install --no-cache-dir -e .
EXPOSE 8200
CMD ["python", "-m", "uvicorn", "sfm.server:app", "--host", "0.0.0.0", "--port", "8200"]