A subdomain means a separate origin, so a staging run can no longer overwrite the localStorage the testteam is playing on. That makes the /staging alias pointless, so the Dockerfile goes back to exactly what is deployed today. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
10 lines
902 B
Docker
10 lines
902 B
Docker
FROM nginx:alpine
|
|
# no-cache => browsers revalidate every request (ETag 304s are cheap), so a new
|
|
# deploy is picked up on plain reload. ponytail: switch to hashed filenames if traffic ever matters.
|
|
# The exact-match location gives the manifest its own MIME type — nginx's default map has no
|
|
# .webmanifest entry and Chrome refuses to install a homescreen app served as octet-stream.
|
|
# (a bare `types {}` block would have REPLACED the whole map and broken .js/.png too.)
|
|
RUN printf 'server {\n listen 80;\n root /usr/share/nginx/html;\n etag on;\n location = /manifest.webmanifest { default_type application/manifest+json; add_header Cache-Control "no-cache, must-revalidate"; }\n location / { add_header Cache-Control "no-cache, must-revalidate"; }\n}\n' > /etc/nginx/conf.d/default.conf
|
|
COPY index.html manifest.webmanifest *.js /usr/share/nginx/html/
|
|
COPY assets /usr/share/nginx/html/assets
|