# uj-mastering-master — web UI
#
# The web UI is a static site: decoding and every metric run in the visitor's
# browser (web/dsp.js inside a Web Worker). This image only serves files — no
# application server, no upload endpoint, nothing written anywhere — so it runs
# read-only as nginx's unprivileged user. See deploy/nginx.conf for the CSP that
# stops the page from making network requests at all.
#
# The desktop app (PyQt5) is unaffected and not part of this image.

FROM nginxinc/nginx-unprivileged:stable-alpine

COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
COPY web/ /usr/share/nginx/html/

EXPOSE 8080

HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD wget -q -O /dev/null http://127.0.0.1:8080/ || exit 1
