Files
support-fins/docker-compose.yml
kodin00 b401a656d1 docker: add compose + nginx image for one-command local deploy
The web app is a buildless static SPA (three.js is vendored in web/), so the
deploy image is just nginx serving web/ on :80. This adds:

- Dockerfile: nginx:stable-alpine, copies web/ + LICENSE, OCI labels.
- nginx.conf: port 80 site config that mirrors web/_redirects
  (/index.html and /index 301 -> /) via a $request_uri guard that cannot
  loop with the `index` directive's internal redirect; cache policy mirrors
  dev-server.py (no-store on the app's own JS/CSS/HTML) while long-caching
  the vendored three.js tree (immutable per image tag); absolute_redirect
  off so the redirect stays relative behind a reverse proxy.
- docker-compose.yml: one `web` service, host 8731:80 so the URL matches
  `python3 dev-server.py`, with a wget healthcheck.
- .dockerignore: excludes prototype/, plugin/, tests/, docs/, the dev
  servers and model files so the build context is just the web artifact.
- README: "Run with Docker" block pointing at the new files.

Validated: image builds, `nginx -t` passes, GET / -> 200 no-store,
GET /index.html|/index -> 301 relative /, GET /vendor/... -> immutable
long-cache, no redirect loop on /.
2026-09-21 20:29:14 +07:00

28 lines
833 B
YAML

# Run the Support Fins web app in a container.
#
# docker compose up --build
# # -> http://localhost:8731/
#
# The app is a buildless static SPA (three.js is vendored under web/vendor/),
# so the image is just nginx serving web/ on :80. Host port 8731 matches
# `python3 dev-server.py` so the URL is identical between dev and container.
services:
web:
image: support-fins
container_name: support-fins
build:
context: .
dockerfile: Dockerfile
ports:
- "8731:80"
restart: unless-stopped
healthcheck:
# nginx:alpine ships busybox wget. Confirms nginx is actually serving /,
# not just that the master process is alive.
test: ["CMD-SHELL", "wget -q -O /dev/null http://127.0.0.1/ || exit 1"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s