docker-portainer/install-unifi-network-appli.../docker-compose-unifi.yml

45 lines
2.0 KiB
YAML
Raw Normal View History

version: "2.1" # Docker Compose file version
services: # Define the services to run
unifi-db:
image: mongo:6.0.11
container_name: unifi-db
volumes:
- /DATA/AppData/unifi-network-application/db/data:/data/db # MongoDB data persistence
- /DATA/AppData/unifi-network-application/db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
ports:
- 27017:27017 # MongoDB default port
restart: unless-stopped # Restart policy
unifi-network-application: # Name of the service
image: lscr.io/linuxserver/unifi-network-application:latest # Docker image to use
container_name: unifi-network-application # Name for the created container
environment: # Environmental variables for the container
- PUID=1000 # User ID
- PGID=1000 # Group ID
- TZ=Etc/UTC # Timezone
- MONGO_HOST=unifi-db # MongoDB host
- MONGO_USER=unifi # MongoDB username
- MONGO_PASS=unifi_password # MongoDB password
- MONGO_PORT=27017 # MongoDB port
- MONGO_DBNAME=unifi # MongoDB database name
- MEM_LIMIT=1024 #optional # Memory limit for the container
- MEM_STARTUP=1024 #optional # Memory to allocate on container startup
- MONGO_TLS= #optional # MongoDB TLS setting
- MONGO_AUTHSOURCE= #optional # MongoDB authentication source
volumes: # Volumes to mount in the container
- /DATA/AppData/unifi-network-application/config:/config # Map host directory to container directory
ports: # Ports to expose and forward
- 8443:8443 # HTTPS portal
- 3478:3478/udp # STUN service
- 10001:10001/udp # UniFi AP discovery
- 8080:8080 # HTTP portal
- 1900:1900/udp #optional # For DLNA
- 8843:8843 #optional # HTTPS guest portal
- 8880:8880 #optional # HTTP guest portal
- 6789:6789 #optional # Mobile speed test port
- 5514:5514/udp #optional # Remote syslog port
restart: unless-stopped # Restart policy for the container
depends_on:
- unifi-db