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