feat: add Portainer deployment via Docker Compose on port 4422
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>
This commit is contained in:
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
services:
|
||||
kammergut:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: kammergut:0.1.0
|
||||
container_name: kammergut
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "4422:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1/"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
Reference in New Issue
Block a user