feat: v1
This commit is contained in:
53
docker-compose.local.yml
Normal file
53
docker-compose.local.yml
Normal file
@ -0,0 +1,53 @@
|
||||
# Développement / debug local — construit les images à partir des fichiers locaux.
|
||||
# Usage : docker compose -f docker-compose.local.yml up --build
|
||||
# Les ports backend et db sont exposés pour faciliter le debug.
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-pdfeditor}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-pdfeditor}
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- db-data-local:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER:-pdfeditor} -d $${POSTGRES_DB:-pdfeditor}"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
environment:
|
||||
DATABASE_URL: ${DATABASE_URL:-postgres://pdfeditor:changeme@db:5432/pdfeditor?sslmode=disable}
|
||||
JWT_SECRET: ${JWT_SECRET:-dev-secret-not-for-prod}
|
||||
JWT_ACCESS_TTL: ${JWT_ACCESS_TTL:-15m}
|
||||
JWT_REFRESH_TTL: ${JWT_REFRESH_TTL:-168h}
|
||||
STORAGE_PATH: /data/documents
|
||||
PORT: "8080"
|
||||
CORS_ORIGIN: ${CORS_ORIGIN:-http://localhost:8080}
|
||||
ports:
|
||||
- "8085:8080"
|
||||
volumes:
|
||||
- documents-local:/data/documents
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "${HTTP_PORT:-8090}:80"
|
||||
depends_on:
|
||||
- backend
|
||||
|
||||
volumes:
|
||||
db-data-local:
|
||||
documents-local:
|
||||
Reference in New Issue
Block a user