Created
December 4, 2023 17:39
-
-
Save nathansgreen/f50a2f59e18b1f83aa306ab28221e585 to your computer and use it in GitHub Desktop.
UniFi Network Application with FerretDB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.8" | |
services: | |
unifi-controller: | |
image: lscr.io/linuxserver/unifi-network-application:7.5.187 | |
restart: unless-stopped | |
depends_on: | |
- ferretdb | |
environment: | |
PUID: 1000 | |
PGID: 1000 | |
TZ: US/Central | |
MEM_LIMIT: 1024 # optional | |
MEM_STARTUP: 1024 # optional | |
MONGO_USER: postgres | |
MONGO_PASS: password | |
MONGO_HOST: ferretdb | |
MONGO_PORT: 27017 | |
MONGO_DBNAME: unifi | |
MONGO_TLS: false | |
MONGO_AUTHSOURCE: "unifi\\&authMechanism\\=PLAIN" | |
volumes: | |
- ./unifi:/config | |
ports: | |
- "8443:8443" | |
- "3478:3478/udp" | |
- "10001:10001/udp" | |
- "8080:8080" | |
ferretdb: | |
image: ghcr.io/ferretdb/ferretdb | |
restart: on-failure | |
depends_on: | |
postgres16: | |
condition: service_healthy | |
ports: | |
- "27017" | |
# - "8080:8080" # debug port | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: unifi | |
FERRETDB_POSTGRESQL_URL: "postgres://postgres:password@postgres16:5432/unifi" | |
FERRETDB_LOG_LEVEL: info | |
FERRETDB_LOG_UUID: false | |
postgres16: | |
image: postgres:16 | |
deploy: | |
restart_policy: | |
condition: any | |
window: 5s | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: unifi | |
ports: | |
- "5432" | |
volumes: | |
- ./pgdata:/var/lib/postgresql/data | |
healthcheck: | |
test: [ CMD, sh, -c, "echo select 1 | psql --tuples-only -U postgres" ] | |
interval: 10s | |
timeout: 2s | |
retries: 3 | |
start_period: 7s | |
start_interval: 7s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment