mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-20 21:59:05 +02:00
Simplify installation by removing network configuration and IP presets
Refactors Docker Compose files and installation scripts to use default Docker network and remove IP pre-configurations for easier setup. 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/b677ee4d-d452-4e7b-9ac9-ca1e468cd60b.jpg
This commit is contained in:
1 parent
5bf67982b9
commit
b2acb20aa6
8 files changed
+380
-180
No files matched your search
+79
-33
@@ -1,61 +1,107 @@
|
||||
# Configuration Docker Compose spécifique PRODUCTION
|
||||
# Usage: docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||
|
||||
version: '3.8'
|
||||
|
||||
# Configuration Docker Compose PRODUCTION pour RegisFlow
|
||||
# Avec optimisations et sécurité renforcée
|
||||
services:
|
||||
# Base de données PostgreSQL (Production)
|
||||
regisflow-db:
|
||||
# Configuration production PostgreSQL
|
||||
command: postgres -c config_file=/etc/postgresql/postgresql.conf
|
||||
image: postgres:15-alpine
|
||||
container_name: regisflow-db
|
||||
environment:
|
||||
# Variables supplémentaires pour production
|
||||
POSTGRES_SHARED_PRELOAD_LIBRARIES: "pg_stat_statements"
|
||||
POSTGRES_DB: regisflow
|
||||
POSTGRES_USER: regisflow
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
# Optimisations PostgreSQL pour production
|
||||
POSTGRES_INITDB_ARGS: "--auth-host=md5 --auth-local=peer"
|
||||
volumes:
|
||||
# Logs PostgreSQL
|
||||
- postgres_logs:/var/log/postgresql
|
||||
# Limites strictes en production
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||
- ./postgres-prod.conf:/etc/postgresql/postgresql.conf:ro
|
||||
ports:
|
||||
- "5433:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U regisflow -d regisflow"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
# Limites de ressources pour production
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 512M
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
memory: 256M
|
||||
# Politique de redémarrage agressive
|
||||
restart: always
|
||||
|
||||
# Application RegisFlow (Production)
|
||||
regisflow:
|
||||
# Configuration production application
|
||||
build:
|
||||
context: .
|
||||
target: production
|
||||
container_name: regisflow-app
|
||||
depends_on:
|
||||
regisflow-db:
|
||||
condition: service_healthy
|
||||
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
|
||||
PORT: 5000
|
||||
DATABASE_URL: postgresql://regisflow:${POSTGRES_PASSWORD}@regisflow-db:5432/regisflow
|
||||
SESSION_SECRET: ${SESSION_SECRET}
|
||||
TZ: ${TZ:-Europe/Paris}
|
||||
# Configuration sécurité production
|
||||
SECURE_COOKIES: ${SECURE_COOKIES:-true}
|
||||
DATA_RETENTION_MONTHS: ${DATA_RETENTION_MONTHS:-19}
|
||||
BACKUP_RETENTION_DAYS: ${BACKUP_RETENTION_DAYS:-90}
|
||||
MAX_BACKUP_COUNT: ${MAX_BACKUP_COUNT:-20}
|
||||
volumes:
|
||||
- backup_data:/app/backups
|
||||
- logs_data:/app/logs
|
||||
ports:
|
||||
- "5000:5000"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:5000/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 15s
|
||||
retries: 3
|
||||
start_period: 90s
|
||||
# Limites de ressources pour 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
|
||||
# Sécurité container
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
read_only: false
|
||||
tmpfs:
|
||||
- /tmp
|
||||
|
||||
# Volumes persistants pour production
|
||||
volumes:
|
||||
postgres_logs:
|
||||
postgres_data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ${PWD}/data/postgres-logs
|
||||
device: ${PWD}/data/postgres
|
||||
backup_data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ${PWD}/data/backups
|
||||
logs_data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ${PWD}/data/logs
|
||||
|
||||
# Réseau par défaut (pas de configuration IP)
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
Reference in new issue
Block a user