version: '3' services: unifi-network-application: image: lscr.io/linuxserver/unifi-network-application:${unifi_version:-latest} container_name: unifi-network-application restart: unless-stopped environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC - MONGO_USER=unifi - MONGO_PASS=unifi - MONGO_HOST=unifi - MONGO_PORT=27017 - MONGO_DBNAME=unifi - MONGO_AUTHSOURCE=admin volumes: - unifi_data:/config networks: - unifi_db ports: - 8443:8443 - 3478:3478/udp - 10001:10001/udp - 8080:8080 unifi-db: image: docker.io/mongo:${mongo_version:-4.4} container_name: unifi-db environment: - MONGO_INITDB_ROOT_USERNAME=root - MONGO_INITDB_ROOT_PASSWORD=root - MONGO_USER=unifi - MONGO_PASS=unifi - MONGO_DBNAME=unifi - MONGO_AUTHSOURCE=admin volumes: - mongo_data:/data/db - /path/to/init-mongo.sh:/docker-entrypoint-initdb.d/init-mongo.sh:ro networks: - unifi_db restart: unless-stopped volumes: unifi_data: mongo_data: networks: unifi_db: