• 0 Posts
  • 1 Comment
Joined 1 year ago
cake
Cake day: October 21st, 2023

help-circle
  • here is my docker compose. change env as needed. I used mongo express.

    unifi:
    image: lscr.io/linuxserver/unifi-network-application:latest
    container_name: unifi
    depends_on:
    - mongo
    #- mongo-express
    environment:
    - PUID=1000
    - PGID=1000
    - TZ=Etc/UTC
    - MONGO_USER=${POSTGRES_USER}
    - MONGO_PASS=${POSTGRES_PASSWORD}
    - MONGO_HOST=mongo
    - MONGO_PORT=27017
    - MONGO_DBNAME=unifi
    - MEM_LIMIT=1024 #optional
    - MEM_STARTUP=1024 #optional
    volumes:
    - /docker/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: unless-stopped
    ##############################################################
    mongo:
    container_name: mongo
    image: mongo
    restart: unless-stopped
    #environment:
    #- MONGO_INITDB_ROOT_USERNAME:${POSTGRES_USER}
    #- MONGO_INITDB_ROOT_PASSWORD:${POSTGRES_PASSWORD}
    volumes:
    - /docker/mongo/data:/data/db
    - /docker/mongo/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro