Angular's server build needs Node loader hooks that Bun does not apply, and every route is client-rendered, so Angular now builds a client-only bundle and a small Bun.serve server delivers it: hashed assets with the one-year cache, index.html revalidated, extension-less routes falling back to index.html, missing assets 404, traversal and malformed paths rejected, and other methods 405. Express, @angular/ssr and the unused hydration provider are removed. Both Docker stages use the pinned oven/bun:1.4.3-alpine image without Node, and the health checks use Bun's fetch. Refs #292 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
services:
|
|
vac-optimizer:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
image: vac-optimizer:latest
|
|
container_name: vac-optimizer-prod
|
|
restart: always
|
|
ports:
|
|
- '80:4000'
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=4000
|
|
healthcheck:
|
|
test:
|
|
[
|
|
'CMD',
|
|
'bun',
|
|
'-e',
|
|
"fetch('http://localhost:4000/').then(r => process.exit(r.ok ? 0 : 1), () => process.exit(1))",
|
|
]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 256M
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
logging:
|
|
driver: 'json-file'
|
|
options:
|
|
max-size: '10m'
|
|
max-file: '3'
|
|
networks:
|
|
- vac-optimizer-network
|
|
|
|
networks:
|
|
vac-optimizer-network:
|
|
driver: bridge
|