mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Configures application for production with enhanced security, performance optimizations, and automated deployment scripts. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/6e755801-08e8-4492-805e-ac3610de5a2a.jpg
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
# Configuration Docker Compose spécifique PRODUCTION
|
|
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
regisflow-db:
|
|
# Configuration production PostgreSQL
|
|
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
|
environment:
|
|
# Variables supplémentaires pour production
|
|
POSTGRES_SHARED_PRELOAD_LIBRARIES: "pg_stat_statements"
|
|
volumes:
|
|
# Logs PostgreSQL
|
|
- postgres_logs:/var/log/postgresql
|
|
# Limites strictes en production
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1.0'
|
|
memory: 512M
|
|
reservations:
|
|
cpus: '0.5'
|
|
memory: 256M
|
|
# Politique de redémarrage agressive
|
|
restart: always
|
|
|
|
regisflow:
|
|
# Configuration production application
|
|
environment:
|
|
# Mode strict en production
|
|
NODE_ENV: production
|
|
# Optimisations Node.js
|
|
NODE_OPTIONS: "--max-old-space-size=512 --unhandled-rejections=strict"
|
|
# Logs structurés
|
|
LOG_LEVEL: info
|
|
LOG_FORMAT: json
|
|
# Limites strictes en production
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '2.0'
|
|
memory: 1G
|
|
reservations:
|
|
cpus: '1.0'
|
|
memory: 512M
|
|
# Politique de redémarrage agressive
|
|
restart: always
|
|
# Configuration ulimits pour production
|
|
ulimits:
|
|
nofile:
|
|
soft: 65536
|
|
hard: 65536
|
|
|
|
volumes:
|
|
postgres_logs:
|
|
driver: local
|
|
driver_opts:
|
|
type: none
|
|
o: bind
|
|
device: ${PWD}/data/postgres-logs |