- compose-files/network-services/unifi: Full stack (MongoDB + Unifi app) - compose-files/databases/mongodb: Deprecated, kept for reference - playbooks/deploy-unifi-local.yml: Local deployment with resource limits - playbooks/migrate-unifi.yml: Original migration playbook (deprecated) Stack runs locally on network-services (.121) with: - unifi-db: MongoDB 4.4.29 (512M/1CPU) - unifi: Network Application (1G/1CPU) - Proper labels for autoheal and watchtower
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
services:
|
|
unifi-db:
|
|
image: docker.io/mongo:4.4.29
|
|
container_name: unifi-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- MONGO_INITDB_ROOT_USERNAME=root
|
|
- MONGO_INITDB_ROOT_PASSWORD=rootpassword
|
|
- MONGO_INITDB_DATABASE=unifi
|
|
volumes:
|
|
- /mnt/nas/docker/unifi/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
|
|
- /mnt/nas/docker/unifi/db:/data/db
|
|
networks:
|
|
- unifi-network
|
|
labels:
|
|
- "autoheal=true"
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512M
|
|
cpus: '1.0'
|
|
|
|
unifi:
|
|
image: lscr.io/linuxserver/unifi-network-application:latest
|
|
container_name: unifi
|
|
restart: unless-stopped
|
|
environment:
|
|
- PUID=1000
|
|
- PGID=1000
|
|
- TZ=America/New_York
|
|
- MONGO_USER=unifi
|
|
- MONGO_PASS=unifipwd
|
|
- MONGO_HOST=unifi-db
|
|
- MONGO_PORT=27017
|
|
- MONGO_DBNAME=unifi
|
|
- MONGO_AUTHSOURCE=admin
|
|
- MEM_LIMIT=1024
|
|
- MEM_STARTUP=1024
|
|
volumes:
|
|
- /mnt/nas/docker/unifi/config:/config
|
|
ports:
|
|
- "8080:8080"
|
|
- "8443:8443"
|
|
- "3478:3478/udp"
|
|
- "10001:10001/udp"
|
|
- "8880:8880"
|
|
- "6790:6789"
|
|
- "5514:5514/udp"
|
|
depends_on:
|
|
- unifi-db
|
|
networks:
|
|
- unifi-network
|
|
labels:
|
|
- "autoheal=true"
|
|
- "com.centurylinklabs.watchtower.enable=true"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1G
|
|
cpus: '1.0'
|
|
|
|
networks:
|
|
unifi-network:
|
|
driver: bridge
|