version: '3.8'
# ============================================================================
# WebDAV Server - Docker Compose Configuration
# ============================================================================
services:
# --------------------------------------------------------------------------
# WebDAV Server
# --------------------------------------------------------------------------
webdav:
build:
context: .
dockerfile: Dockerfile
container_name: webdav-server
restart: unless-stopped
ports:
- "8597:8597"
volumes:
# Persistent storage for user files
- ./webdav:/app/webdav
# Database persistence
- ./webdav.db:/app/webdav.db
# Logs
- ./logs:/app/logs
# Backups
- ./backups:/app/backups
# Configuration (optional - uncomment to override)
# - ./.env:/app/.env:ro
environment:
# Server Configuration
- HOST=0.0.0.0
- PORT=8597
# Database
- DB_PATH=/app/webdav.db
# WebDAV Root
- WEBDAV_ROOT=/app/webdav
# Authentication
- AUTH_METHODS=basic,digest
- SESSION_TIMEOUT=3600
# Performance
- MAX_CONNECTIONS=1000
- WORKERS=4
# Logging
- LOG_LEVEL=INFO
- LOG_FILE=/app/logs/webdav.log
networks:
- webdav-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8597/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# --------------------------------------------------------------------------
# Redis Cache (Optional but recommended for production)
# --------------------------------------------------------------------------
# ============================================================================
# Networks
# ============================================================================
networks:
webdav-network:
driver: bridge