version: '3.9' services: web: build: . container_name: apcups-dashboard ports: - "10280:8000" environment: - REDIS_URL=redis://redis:6379/0 depends_on: - redis restart: always redis: image: redis:7-alpine container_name: redis restart: always # Enable persistence so UPS configuration stored in Redis survives restarts. # Using both RDB snapshots (default schedule) and AOF for durability. command: ["redis-server", "--appendonly", "yes", "--appendfsync", "everysec"] volumes: - redis-data:/data volumes: redis-data: