mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Integrate internal database within Docker for simplified setup and deployment
Configures PostgreSQL to run inside Docker, streamlining deployment and simplifying database management using Drizzle ORM. 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
This commit is contained in:
1 parent
e8977554e1
commit
a4c5301d74
7 files changed
+70
-71
No files matched your search
+27
-2
@@ -1,14 +1,37 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# Application RegisFlow seule (base de données externe)
|
||||
# Base de données PostgreSQL
|
||||
regisflow-db:
|
||||
image: postgres:15-alpine
|
||||
container_name: regisflow-db
|
||||
environment:
|
||||
POSTGRES_DB: regisflow
|
||||
POSTGRES_USER: regisflow
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-RegisFlow2024!}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
||||
ports:
|
||||
- "5433:5432"
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U regisflow -d regisflow"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
# Application RegisFlow
|
||||
regisflow:
|
||||
build: .
|
||||
container_name: regisflow-app
|
||||
depends_on:
|
||||
regisflow-db:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
PORT: 5000
|
||||
DATABASE_URL: ${DATABASE_URL}
|
||||
DATABASE_URL: postgresql://regisflow:${POSTGRES_PASSWORD:-RegisFlow2024!}@regisflow-db:5432/regisflow
|
||||
SESSION_SECRET: ${SESSION_SECRET:-your-super-secret-session-key-change-in-production}
|
||||
TZ: Europe/Paris
|
||||
volumes:
|
||||
@@ -24,5 +47,7 @@ services:
|
||||
start_period: 60s
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
backup_data:
|
||||
driver: local
|
||||
Reference in new issue
Block a user