#!/bin/bash set -e up () { docker network create pew-net || true docker run \ --detach \ --restart unless-stopped \ --name unifi \ --env PUID=1000 \ --env PGID=1000 \ --env TZ=Etc/UTC \ --env MONGO_USER=unifi \ --env MONGO_PASS=unifi \ --env MONGO_HOST=unifi-db \ --env MONGO_PORT=27017 \ --env MONGO_DBNAME=unifi \ --publish 3478:3478/udp \ --publish 10001:10001/udp \ --publish 8080:8080 \ --volume /bigdata/unifi/data:/config:rw \ --network pew-net \ lscr.io/linuxserver/unifi-network-application:latest docker run \ --detach \ --name unifi-db \ --restart unless-stopped \ --volume /bigdata/unifi/db/data:/data/db:rw \ --volume /bigdata/unifi/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro \ --network pew-net \ docker.io/mongo:4.4 } down () { docker stop unifi || true docker rm unifi || true docker stop unifi-db || true docker rm unifi-db || true } $@