Update docker-compose.yml

This commit is contained in:
2025-06-08 13:55:57 +02:00
parent 9194b48eb8
commit 3288824383

View File

@@ -1,5 +1,10 @@
version: '3.8' version: '3.8'
networks:
docupulse_${PORT:-10335}_network:
name: docupulse_${PORT:-10335}_network
driver: bridge
services: services:
web: web:
build: build:
@@ -10,9 +15,9 @@ services:
environment: environment:
- FLASK_APP=app.py - FLASK_APP=app.py
- FLASK_ENV=production - FLASK_ENV=production
- DATABASE_URL=postgresql://postgres:postgres@db:5432/docupulse_${PORT:-10335} - DATABASE_URL=postgresql://docupulse_${PORT:-10335}:docupulse_${PORT:-10335}@db:5432/docupulse_${PORT:-10335}
- POSTGRES_USER=postgres - POSTGRES_USER=docupulse_${PORT:-10335}
- POSTGRES_PASSWORD=postgres - POSTGRES_PASSWORD=docupulse_${PORT:-10335}
- POSTGRES_DB=docupulse_${PORT:-10335} - POSTGRES_DB=docupulse_${PORT:-10335}
- MASTER=${ISMASTER:-false} - MASTER=${ISMASTER:-false}
volumes: volumes:
@@ -31,21 +36,25 @@ services:
limits: limits:
cpus: '1' cpus: '1'
memory: 1G memory: 1G
networks:
- docupulse_${PORT:-10335}_network
db: db:
image: postgres:13 image: postgres:13
environment: environment:
- POSTGRES_USER=postgres - POSTGRES_USER=docupulse_${PORT:-10335}
- POSTGRES_PASSWORD=postgres - POSTGRES_PASSWORD=docupulse_${PORT:-10335}
- POSTGRES_DB=docupulse_${PORT:-10335} - POSTGRES_DB=docupulse_${PORT:-10335}
volumes: volumes:
- docupulse_postgres_data:/var/lib/postgresql/data - docupulse_postgres_data:/var/lib/postgresql/data
restart: unless-stopped restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U docupulse_${PORT:-10335}"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
networks:
- docupulse_${PORT:-10335}_network
volumes: volumes:
docupulse_postgres_data: docupulse_postgres_data: