Files
bible/Dockerfile
2026-09-19 13:10:34 -04:00

26 lines
719 B
Docker

# Stdlib-only static server, so no build step and no dependencies to install.
FROM python:3.13-alpine
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
SITE_ROOTS=/srv/assets:/srv/bible \
PORT=8080
WORKDIR /srv
# Baked in so the image runs standalone; compose bind-mounts over all of them
# for live edits without a rebuild.
COPY server.py worker.py /srv/
COPY assets/ /srv/assets/
COPY bible/ /srv/bible/
RUN adduser -S -u 10001 bible
USER 10001
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
CMD python3 -c "import urllib.request as u,sys; \
sys.exit(0 if u.urlopen('http://127.0.0.1:8080/',timeout=3).status==200 else 1)"
CMD ["python3", "/srv/server.py"]