# Ultimate Tic-Tac-Toe — static site served by nginx.
# No build step: copy the static assets into the nginx web root.
FROM nginx:1.27-alpine

# Tuned server config (gzip, cache + security headers, SPA-safe fallback).
COPY nginx.conf /etc/nginx/conf.d/default.conf

# Static assets.
COPY index.html style.css script.js /usr/share/nginx/html/

EXPOSE 80

# Liveness probe for `docker ps` / orchestration.
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD wget -q -O /dev/null http://localhost/ || exit 1

CMD ["nginx", "-g", "daemon off;"]
