Add Traefik proxy support and cleanup ports

This commit is contained in:
Kris Lamoureux 2024-12-30 20:51:16 -05:00
parent 03c9d835dc
commit d09d2d1d8f
Signed by: kris
GPG Key ID: 3EDA9C3441EDA925

View File

@ -1,3 +1,11 @@
volumes:
db:
app:
networks:
traefik:
external: true
services:
app:
image: ${UNIFI_IMAGE:-linuxserver/unifi-network-application}:${UNIFI_VERSION:?}
@ -11,13 +19,21 @@ services:
MONGO_DBNAME: ${MONGO_DBNAME:-unifi}
MONGO_USER: ${MONGO_USER:-unifi}
MONGO_PASS: ${MONGO_PASS:?}
networks:
- traefik
volumes:
- app:/config
ports:
- 8443:8443
- 3478:3478/udp
- 10001:10001/udp
- 8080:8080
labels:
traefik.http.routers.unifi.rule: Host(`${DOMAIN:-unifi.local.krislamo.org}`)
traefik.http.routers.unifi.entrypoints: ${ENTRYPOINT:-web}
traefik.http.services.unifi.loadbalancer.server.port: 8443
traefik.http.services.unifi.loadbalancer.server.scheme: https
traefik.http.services.unifi.loadbalancer.serverstransport.insecureskipverify: "true"
traefik.docker.network: traefik
traefik.enable: true
db:
image: ${MONGO_IMAGE:-mongo}:${MONGO_VERSION:?}
@ -25,7 +41,3 @@ services:
volumes:
- db:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
volumes:
db:
app: