forked from username/flaskpaste
40 lines
1001 B
YAML
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
|