Files
LogiFlow/docker-compose.yml
T
MichaelandClaude Opus 5.5 6f1a39e4b2 feat(api): API externe de rapprochement BL / factures
Nouvelle API sous /api/ext/v1, authentifiée par clé (EXTERNAL_API_KEYS,
en-tête X-API-Key ou Authorization: Bearer), pour qu'un outil tiers
lise magasins, fournisseurs et livraisons livrées (n° BL) puis écrive
la référence, les montants et l'échéance de la facture, avec
validation/dévalidation optionnelle du rapprochement.

- normalizeDateString extrait dans server/dateUtils.ts pour être partagé
- /api/ext/ exempté du CSRF (pas de cookie de session)
- EXTERNAL_API_KEYS ajouté à .env.example et docker-compose.yml
- documentation : docs/API-RAPPROCHEMENT.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 15:14:45 +02:00

69 lines
1.8 KiB
YAML

version: '3.8'
services:
logiflow:
build:
context: .
dockerfile: Dockerfile
target: production
restart: unless-stopped
environment:
NODE_ENV: production
DATABASE_URL: postgresql://logiflow_admin:LogiFlow2025!@logiflow-db:5432/logiflow_db
SESSION_SECRET: LogiFlow_Super_Secret_Session_Key_2025_Production
PORT: 3000
USE_LOCAL_AUTH: "true"
POSTGRES_USER: logiflow_admin
POSTGRES_PASSWORD: LogiFlow2025!
POSTGRES_DB: logiflow_db
BACKUP_DIR: /app/backups
# Clé(s) de l'API externe de rapprochement, lues depuis le .env de l'hôte (vide = API désactivée)
EXTERNAL_API_KEYS: ${EXTERNAL_API_KEYS:-}
ports:
- "3000:3000"
networks:
- nginx_default
depends_on:
logiflow-db:
condition: service_healthy
volumes:
- ./migrations:/app/migrations
- backup_data:/app/backups
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
logiflow-db:
image: postgres:15-alpine
restart: unless-stopped
environment:
POSTGRES_DB: logiflow_db
POSTGRES_USER: logiflow_admin
POSTGRES_PASSWORD: LogiFlow2025!
ports:
- "5434:5432"
networks:
- nginx_default
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql
- ./migrations:/migrations
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 15s
timeout: 10s
retries: 10
start_period: 60s
volumes:
postgres_data:
driver: local
backup_data:
driver: local
networks:
nginx_default:
external: true