58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
#version: '3.8'
|
|
|
|
services:
|
|
digiserver:
|
|
build: .
|
|
container_name: digiserver-v2
|
|
ports:
|
|
- "8080:5000" # Expose for nginx reverse proxy
|
|
volumes:
|
|
- ./instance:/app/instance
|
|
- ./app/static/uploads:/app/app/static/uploads
|
|
environment:
|
|
- FLASK_ENV=production
|
|
- SECRET_KEY=${SECRET_KEY:-your-secret-key-change-this}
|
|
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
|
|
- ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin123}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/').read()"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
# Commented out network when using external nginx proxy
|
|
# networks:
|
|
# - digiserver-network
|
|
|
|
# Caddy reverse proxy (commented out when using external nginx)
|
|
# Uncomment the section below if you want standalone deployment with automatic HTTPS
|
|
# caddy:
|
|
# image: caddy:2-alpine
|
|
# container_name: digiserver-caddy
|
|
# ports:
|
|
# - "80:80"
|
|
# - "443:443"
|
|
# - "443:443/udp" # HTTP/3
|
|
# volumes:
|
|
# - ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
# - caddy-data:/data
|
|
# - caddy-config:/config
|
|
# environment:
|
|
# - DOMAIN=${DOMAIN:-localhost}
|
|
# - EMAIL=${EMAIL:-admin@localhost}
|
|
# depends_on:
|
|
# - digiserver
|
|
# restart: unless-stopped
|
|
# networks:
|
|
# - digiserver-network
|
|
|
|
# Commented out when using external nginx proxy
|
|
# networks:
|
|
# digiserver-network:
|
|
# driver: bridge
|
|
|
|
# volumes:
|
|
# caddy-data:
|
|
# caddy-config:
|