deploy: notesfrais — 2026-04-29 09:57:19
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
services:
|
||||
|
||||
# ── PostgreSQL ──────────────────────────────────────────────
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: notesfrais
|
||||
POSTGRES_USER: notesfrais
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U notesfrais -d notesfrais"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
restart: unless-stopped
|
||||
|
||||
# ── Backend Express ─────────────────────────────────────────
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 3001
|
||||
DATABASE_URL: postgresql://notesfrais:${DB_PASSWORD}@db:5432/notesfrais
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
APP_SECRET: ${APP_SECRET}
|
||||
UPLOADS_DIR: /app/uploads
|
||||
FRONTEND_URL: https://${DOMAIN:-frais.domench.fr}
|
||||
volumes:
|
||||
- uploads:/app/uploads
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
# ── Frontend nginx ──────────────────────────────────────────
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
# Coolify gère le routage HTTPS via Traefik.
|
||||
# Configurer le domaine (frais.domench.fr) dans l'interface Coolify.
|
||||
ports:
|
||||
- "80:80"
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
uploads:
|
||||
Reference in New Issue
Block a user