This commit is contained in:
Eric Meehan -X (ermeehan - ACTALENT SERVICES LLC at Cisco)
2026-10-18 14:03:00 -04:00
parent fb7a34a95e
commit 15094a3f2d
4 changed files with 140 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
BUTTON_HOST=0.0.0.0 \
BUTTON_PORT=8000 \
BUTTON_DATA_FILE=/data/data.json \
BUTTON_MAILING_LIST_FILE=/data/mailing_list.csv
RUN useradd --system --uid 10001 --no-create-home button \
&& mkdir /data && chown button /data
WORKDIR /app
COPY server.py ./
COPY static ./static
USER button
VOLUME /data
EXPOSE 8000
# Python as PID 1 ignores SIGTERM; SIGINT raises KeyboardInterrupt for a clean exit.
STOPSIGNAL SIGINT
CMD ["python", "server.py"]