2023-10-31 20:37:15 +01:00
|
|
|
---
|
|
|
|
services:
|
|
|
|
unifi-network-application:
|
2024-02-06 20:46:14 +01:00
|
|
|
image: "lscr.io/linuxserver/unifi-network-application:8.0.28-ls27"
|
2023-10-31 20:37:15 +01:00
|
|
|
container_name: unifi-network-application
|
|
|
|
environment:
|
|
|
|
PUID: 1000
|
|
|
|
PGID: 1000
|
|
|
|
TZ: Etc/UTC
|
|
|
|
MONGO_USER: unifiuser
|
2024-07-09 17:35:56 +02:00
|
|
|
MONGO_PASS: "{{ lookup('viczem.keepass.keepass', 'unifi-mongodb-pass', 'password') }}"
|
2023-10-31 20:37:15 +01:00
|
|
|
MONGO_HOST: unifi-db
|
|
|
|
MONGO_PORT: 27017
|
|
|
|
MONGO_DBNAME: unifidb
|
|
|
|
MEM_LIMIT: 1024 #optional
|
|
|
|
MEM_STARTUP: 1024 #optional
|
|
|
|
volumes:
|
|
|
|
- unifi-data:/config
|
|
|
|
ports:
|
|
|
|
- 8443:8443
|
|
|
|
- 3478:3478/udp
|
|
|
|
- 10001:10001/udp
|
|
|
|
- 8080:8080
|
|
|
|
- 1900:1900/udp #optional
|
|
|
|
- 8843:8843 #optional
|
|
|
|
- 8880:8880 #optional
|
|
|
|
- 6789:6789 #optional
|
|
|
|
- 5514:5514/udp #optional
|
|
|
|
restart: always
|
|
|
|
networks:
|
2024-07-30 23:05:24 +02:00
|
|
|
- postfix
|
2023-10-31 20:37:15 +01:00
|
|
|
- unifi-internal
|
2024-02-01 21:23:44 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "--insecure", "https://localhost:8443"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2024-03-20 09:34:58 +01:00
|
|
|
depends_on:
|
|
|
|
- unifi-db
|
2023-10-31 20:37:15 +01:00
|
|
|
|
|
|
|
unifi-db:
|
|
|
|
# Starte Container OHNE init-script
|
2024-02-01 20:49:07 +01:00
|
|
|
# In Container
|
|
|
|
# 1. mongosh
|
2023-10-31 20:37:15 +01:00
|
|
|
# 2. db.getSiblingDB("unifidb").createUser({user: "unifiuser", pwd: "GEHEIM", roles: [{role: "dbOwner", db: "unifidb"}, {role: "dbOwner", db: "unifidb_stat"}]});
|
|
|
|
# https://discourse.linuxserver.io/t/cant-connect-to-mongodb-for-unifi-network-application/8166
|
2024-09-23 15:30:33 +02:00
|
|
|
image: "docker.io/mongo:8.0.0"
|
2023-10-31 20:37:15 +01:00
|
|
|
container_name: unifi-db
|
|
|
|
volumes:
|
|
|
|
- db-data:/data/db
|
|
|
|
restart: always
|
2024-02-01 20:49:07 +01:00
|
|
|
environment:
|
|
|
|
MARIADB_AUTO_UPGRADE: "1"
|
2023-10-31 20:37:15 +01:00
|
|
|
networks:
|
|
|
|
- unifi-internal
|
2024-02-01 21:23:44 +01:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "mongosh", "--eval", "db.stats().ok"]
|
|
|
|
interval: 30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
2023-10-31 20:37:15 +01:00
|
|
|
|
|
|
|
######## Volumes ########
|
|
|
|
volumes:
|
|
|
|
db-data:
|
|
|
|
unifi-data:
|
|
|
|
######## Networks ########
|
|
|
|
networks:
|
2024-07-30 23:05:24 +02:00
|
|
|
postfix:
|
2023-10-31 20:37:15 +01:00
|
|
|
external: true
|
|
|
|
unifi-internal:
|
|
|
|
driver: bridge
|