Multi-stage Dockerfile: node:22.13.1-alpine3.21 builds the Vite bundle, nginx:1.27.4-alpine3.21-slim serves dist/ on container :80. Compose maps host :4422 to container :80 with a wget healthcheck and unless-stopped restart policy. nginx.conf serves Vite's content-addressed /assets/ as immutable, caches images for 30d, falls back to index.html for SPA routes, and sets X-Frame-Options / X-Content-Type-Options / Referrer-Policy / Permissions-Policy headers. Server tokens off. .dockerignore keeps the build context lean (no node_modules, dist, .git, archive, or compose files). Pin to image digests in Portainer's stack editor for full lock. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
12 lines
98 B
Plaintext
12 lines
98 B
Plaintext
node_modules
|
|
dist
|
|
.git
|
|
.gitignore
|
|
.DS_Store
|
|
*.log
|
|
.vite
|
|
index.original.html
|
|
.claude
|
|
.vscode
|
|
.idea
|