Files
flaskpaste/compose.yaml
Username 4f0b33fd7b
Some checks failed
CI / Lint & Format (push) Successful in 16s
CI / Security Scan (push) Failing after 19s
CI / Tests (push) Successful in 34s
compose: set URL_PREFIX for HAProxy deployment
2025-12-20 20:25:09 +01:00

40 lines
1001 B
YAML

# FlaskPaste Container Compose
# Usage: podman-compose up -d
# Or: podman compose up -d
services:
flaskpaste:
build:
context: .
dockerfile: Containerfile
container_name: flaskpaste
restart: unless-stopped
ports:
- "5001:5000"
volumes:
- flaskpaste-data:/app/data
environment:
- FLASK_ENV=production
- FLASKPASTE_URL_PREFIX=/paste # HAProxy strips this before forwarding
- FLASKPASTE_EXPIRY=432000 # 5 days
- FLASKPASTE_MAX_ANON=3145728 # 3 MiB
- FLASKPASTE_MAX_AUTH=52428800 # 50 MiB
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
deploy:
resources:
limits:
cpus: '1.0'
memory: 256M
reservations:
cpus: '0.25'
memory: 64M
volumes:
flaskpaste-data:
driver: local