Dispatcharr/docker/docker-compose.dev.yml
SergeantPanda 955a16da62 feat(setup): Implement IP-based restrictions for superuser initialization
This commit introduces a mechanism to restrict the first-time web setup of superusers to local/private networks by default. A new environment variable, DISPATCHARR_SETUP_ALLOWED_IP, allows specific public IPs to bypass this restriction. The changes include updates to the API views for handling setup requests, utility functions for IP validation, and enhancements to the frontend to inform users about setup restrictions. Additionally, tests have been added to ensure correct behavior under various scenarios, including IP validation and environment variable overrides.
2026-07-24 20:50:51 +00:00

60 lines
1.9 KiB
YAML

services:
dispatcharr:
# build:
# context: ..
# dockerfile: docker/Dockerfile.dev
image: ghcr.io/dispatcharr/dispatcharr:base
container_name: dispatcharr_dev
restart: unless-stopped
ports:
- 5656:5656
- 9191:9191
- 8001:8001
volumes:
- ../:/app
- ./data:/data
environment:
- DISPATCHARR_ENV=dev
- REDIS_HOST=localhost
- CELERY_BROKER_URL=redis://localhost:6379/0
- DISPATCHARR_LOG_LEVEL=debug
# First-time web setup from a public IP (optional). When unset, only
# local/private networks may POST to initialize-superuser.
#- DISPATCHARR_SETUP_ALLOWED_IP=203.0.113.50
# Legacy CPU Support (Optional)
# Uncomment to enable legacy NumPy build for older CPUs (circa 2009)
# that lack support for newer baseline CPU features
#- USE_LEGACY_NUMPY=true
# Process Priority Configuration (Optional)
# Lower values = higher priority. Range: -20 (highest) to 19 (lowest)
# Negative values require cap_add: SYS_NICE (uncomment below)
#- UWSGI_NICE_LEVEL=-5 # uWSGI/FFmpeg/Streaming (default: 0, recommended: -5 for high priority)
#- CELERY_NICE_LEVEL=5 # Celery/EPG/Background tasks (default: 5, low priority)
#
# Uncomment to enable high priority for streaming (required if UWSGI_NICE_LEVEL < 0)
#cap_add:
# - SYS_NICE
pgadmin:
image: dpage/pgadmin4
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: admin
volumes:
- dispatcharr_dev_pgadmin:/var/lib/pgadmin
ports:
- 8082:80
redis-commander:
image: rediscommander/redis-commander:latest
restart: unless-stopped
environment:
- REDIS_HOSTS=dispatcharr:dispatcharr:6379:0
- TRUST_PROXY=true
- ADDRESS=0.0.0.0
ports:
- 8081:8081
volumes:
dispatcharr_dev_pgadmin: