40 lines
1006 B
YAML
40 lines
1006 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
web:
|
|
build: .
|
|
ports:
|
|
- "10335:5000"
|
|
environment:
|
|
- FLASK_APP=app.py
|
|
- FLASK_ENV=production
|
|
- DATABASE_URL=postgresql://postgres:postgres@db:5432/docupulse
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=docupulse
|
|
volumes:
|
|
- uploads_${COMPOSE_PROJECT_NAME:-default}:/app/uploads
|
|
depends_on:
|
|
- db
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: '1'
|
|
memory: 1G
|
|
|
|
db:
|
|
image: postgres:13
|
|
environment:
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=postgres
|
|
- POSTGRES_DB=docupulse
|
|
volumes:
|
|
- postgres_data_${COMPOSE_PROJECT_NAME:-default}:/var/lib/postgresql/data
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data_${COMPOSE_PROJECT_NAME:-default}:
|
|
name: postgres_data_${COMPOSE_PROJECT_NAME:-default}
|
|
uploads_${COMPOSE_PROJECT_NAME:-default}:
|
|
name: uploads_${COMPOSE_PROJECT_NAME:-default} |