Files
LogiFlow/docker-compose.yml
michaelschal c851aacb28 Fix automatic database backup system for production
Resolves an issue where the automatic backup service was not initialized in the production environment, preventing daily backups. Updates `docker-compose.yml` to include a backup directory and volume, modifies `index.production.ts` to import and initialize the backup service, and enhances `replit.md` with details of the fix. A new verification script `scripts/verify-backup-system.sh` is added to confirm the system's functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cc2d271b-82f0-4d6a-9302-a0b067ffb429
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-18 12:06:40 +00:00

67 lines
1.6 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
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