| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- services:
- spacedrive:
- build:
- context: .
- dockerfile: Dockerfile
- container_name: spacedrive-server
- restart: unless-stopped
- # Ports
- ports:
- - "8080:8080" # HTTP server
- - "7373:7373" # P2P networking
- # Volumes
- volumes:
- - spacedrive-data:/data
- # - /mnt/pshare:/storage/pshare:ro
- - /mnt/gshare/Users:/storage:ro
- # Environment variables
- environment:
- # Data directory (inside container)
- - DATA_DIR=/data
- # HTTP server port
- - PORT=8080
- # Authentication (REQUIRED for security!)
- # Format: "username:password,username2:password2"
- # Or set to "disabled" to disable auth (NOT RECOMMENDED)
- - SD_AUTH=${SD_AUTH:-admin:changeme}
- # Enable P2P networking
- - SD_P2P=true
- # Logging
- - RUST_LOG=info,sd_core=debug
- # Timezone
- - TZ=UTC
- # Health check
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 40s
- # Resource limits (adjust as needed)
- deploy:
- resources:
- limits:
- memory: 4G
- reservations:
- memory: 512M
- volumes:
- spacedrive-data:
- driver: local
|