rebours/docker-compose.yml
ordinarthur a9ebfb7b77 clean
2026-02-24 15:36:30 +01:00

50 lines
1.3 KiB
YAML

services:
# ── API Bun/Elysia — uniquement les routes /api/ ──────────────────────────
app:
build:
context: .
dockerfile: Dockerfile
target: runner
restart: unless-stopped
expose:
- "3000"
environment:
NODE_ENV: production
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
DOMAIN: ${DOMAIN:-http://localhost}
networks:
- rebour-net
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/robots.txt || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
# ── Nginx : sert public/ + proxifie /api/ vers app ────────────────────────
nginx:
image: nginx:1.27-alpine
restart: unless-stopped
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./public:/srv/public:ro
# En prod : décommenter + monter les certificats Let's Encrypt
# - /etc/letsencrypt:/etc/letsencrypt:ro
- nginx-logs:/var/log/nginx
depends_on:
- app
networks:
- rebour-net
networks:
rebour-net:
driver: bridge
volumes:
nginx-logs: