Files
BDFR_Web/docker-compose.yml
2025-10-15 13:31:18 +13:00

62 lines
1.8 KiB
YAML

version: '3.8'
services:
bdfr-web:
build:
context: .
dockerfile: Dockerfile
container_name: bdfr-web-interface
# Note: user directive removed - container runs as user specified by orchestrator
# For TrueNAS: Set 'Custom User' in container settings
# For docker-compose: Uncomment and set user: "UID:GID" if needed
# user: "${PUID:-1000}:${PGID:-1000}"
ports:
- "8000:8000"
volumes:
# Downloads directory - all Reddit content goes here
- ./downloads:/app/downloads
# Database persistence - SQLite databases, scheduled tasks, and BDFR config
- ./data:/app/data
environment:
# Reddit OAuth Configuration
# IMPORTANT: Set these in a .env file or directly here
- BDFR_CLIENT_ID=${BDFR_CLIENT_ID:-}
- BDFR_CLIENT_SECRET=${BDFR_CLIENT_SECRET:-}
- BDFR_REDIRECT_URI=${BDFR_REDIRECT_URI:-http://localhost:8000/auth/callback}
# Server Configuration
- HOST=${HOST:-0.0.0.0}
- PORT=${PORT:-8000}
- DEBUG=${DEBUG:-false}
# Download Configuration (using /app/downloads for simplicity)
- BDFR_DOWNLOAD_DIR=/app/downloads
- BDFR_DATA_DIR=/app/data
# BDFR Configuration - stored in mounted data directory
- BDFR_CONFIG_DIR=/app/data/bdfr-config
- APPDATA=/app/data/bdfr-config
- XDG_CONFIG_HOME=/app/data/bdfr-config
# Python Configuration
- PYTHONUNBUFFERED=1
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- bdfr-network
networks:
bdfr-network:
driver: bridge
# Named volumes configuration (optional)
# Uncomment to use named volumes instead of bind mounts
# volumes:
# downloads:
# data: