Anterior-IaC/uisp/docker-compose.yml
2025-03-02 00:53:37 -06:00

249 lines
6.0 KiB
YAML

networks:
public:
ipam:
config:
- subnet: "172.18.251.0/25"
internal:
internal: true
ipam:
config:
- subnet: "172.18.251.128/25"
services:
fluentd:
container_name: unms-fluentd
image: ubnt/unms-fluentd:2.4.188
restart: always
networks:
- public
ports:
- 127.0.0.1:24224:24224
volumes:
- /home/unms/data/logs:/fluentd/log
environment:
- FLUENTD_UID=1001
siridb:
container_name: unms-siridb
image: ubnt/unms-siridb:2.4.188
restart: always
depends_on:
- fluentd
networks:
- internal
volumes:
- /home/unms/data/siridb:/var/lib/siridb
- /home/unms/data/siridb-cores:/cores
logging:
driver: fluentd
options:
tag: siridb
fluentd-async-connect: "true"
# Allow debugger
cap_add:
- SYS_PTRACE
environment:
- SIRIDB_UID=1001
postgres:
container_name: unms-postgres
image: ubnt/unms-postgres:2.4.188
command: postgres -c deadlock_timeout=5000 -c max_connections=570
restart: always
depends_on:
- fluentd
networks:
- internal
volumes:
- /home/unms/data/postgres:/var/lib/postgresql/data/pgdata
logging:
driver: fluentd
options:
tag: postgres
fluentd-async-connect: "true"
environment:
- POSTGRES_UID=1001
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=1B0Ux1wJIDbo7NTQy1Arxp4sx8BCx9AQq7U2RGTygw7QjqZL
- UNMS_POSTGRES_DB=unms
- UNMS_POSTGRES_SCHEMA=unms
- UNMS_POSTGRES_USER=unms
- UNMS_POSTGRES_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
- UCRM_POSTGRES_DB=unms
- UCRM_POSTGRES_SCHEMA=ucrm
- UCRM_POSTGRES_USER=ucrm
- UCRM_POSTGRES_PASSWORD=d9NZxDpRHnUTmcwjdF3f2UYth9BeYXIkfkVzFxnO6kepuCfU
- PGDATA=/var/lib/postgresql/data/pgdata
rabbitmq:
container_name: unms-rabbitmq
image: rabbitmq:3.7.28-alpine
user: "1001"
restart: always
depends_on:
- fluentd
networks:
- internal
hostname: rabbitmq
volumes:
- /home/unms/data/rabbitmq:/var/lib/rabbitmq
logging:
driver: fluentd
options:
tag: rabbitmq
fluentd-async-connect: "true"
environment:
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit channel_max 4096
unms:
container_name: unms
image: ubnt/unms:2.4.188
restart: always
depends_on:
- fluentd
- siridb
- postgres
- rabbitmq
- nginx
- ucrm
networks:
- public
- internal
volumes:
- /home/unms/data:/home/app/unms/data
logging:
driver: fluentd
options:
tag: unms
fluentd-async-connect: "true"
environment:
- UNMS_USER_ID=1001
- DEMO=false
- NODE_ENV=production
- HTTP_PORT=8081
- WS_PORT=8082
- WS_SHELL_PORT=8083
- UNMS_WS_API_PORT=8084
- UNMS_NETFLOW_PORT=2055
- PUBLIC_HTTPS_PORT=443
- NGINX_HTTPS_PORT=443
- SUSPEND_PORT=81
- BRANCH=master
- SECURE_LINK_SECRET=IdNMEEUnBadoA0dRr6e7t76798JLBZLVQ0FPGAtqiz31lYMxeuLYefkfPkZepsGM2WoomGFPolv5u5Ld74e2XVRt0rTlsZo9j0eh
- CLUSTER_SIZE=auto
- UNMS_PG_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
- UNMS_PG_USER=unms
- UNMS_PG_DB=unms
- UNMS_PG_SCHEMA=unms
- UNMS_TOKEN=NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK
- UNMS_CLI_TOKEN=HDDwClgKV9HqPx9Ck47Kg8EE0neW0L4mzuG60XgI9VXZERT5
- USE_LOCAL_DISCOVERY=true
- USE_ALTERNATIVE_CERT_DIR=false
cap_add:
- NET_ADMIN
ucrm:
container_name: ucrm
image: ubnt/unms-crm:4.4.30
restart: always
volumes:
- /home/unms/data/ucrm:/data
command: server_with_migrate
depends_on:
- fluentd
- postgres
- rabbitmq
- nginx
networks:
- public
- internal
logging:
driver: fluentd
options:
tag: ucrm
fluentd-async-connect: "true"
environment:
- POSTGRES_HOST=unms-postgres
- POSTGRES_PASSWORD=d9NZxDpRHnUTmcwjdF3f2UYth9BeYXIkfkVzFxnO6kepuCfU
- POSTGRES_SCHEMA=ucrm
- POSTGRES_USER=ucrm
- POSTGRES_DB=unms
- MAILER_ADDRESS=127.1.0.1
- MAILER_ADDRESS_USERNAME=username
- MAILER_ADDRESS_PASSWORD=password
- SECRET=q9i5rV7NTNQf8qSPQIONCFWGjDNbm4K83APtscfnuvJc7DAN
- SUSPEND_PORT=81
- PUBLIC_HTTPS_PORT=443
- UCRM_USER=unms
- UNMS_VERSION=2.4.188
- UNMS_HOST=unms
- UNMS_PORT=8081
- UNMS_TOKEN=NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK
- UNMS_BASE_URL=/v2.1
- UNMS_POSTGRES_SCHEMA=unms
nginx:
image: ubnt/unms-nginx:2.4.188
container_name: unms-nginx
restart: always
ports:
- 80:80
- 443:443
- 81:81
- 8089:8089
networks:
- public
- internal
volumes:
- /home/unms/data/cert:/cert
- /home/unms/data/firmwares:/www/firmwares
depends_on:
- fluentd
logging:
driver: fluentd
options:
tag: nginx
fluentd-async-connect: "true"
environment:
- NGINX_UID=1001
- HTTP_PORT=80
- HTTPS_PORT=443
- SUSPEND_PORT=81
- UNMS_HTTP_PORT=8081
- UNMS_WS_PORT=8082
- UNMS_WS_SHELL_PORT=8083
- UNMS_WS_API_PORT=8084
- PUBLIC_HTTPS_PORT=443
- SECURE_LINK_SECRET=IdNMEEUnBadoA0dRr6e7t76798JLBZLVQ0FPGAtqiz31lYMxeuLYefkfPkZepsGM2WoomGFPolv5u5Ld74e2XVRt0rTlsZo9j0eh
netflow:
image: ubnt/unms-netflow:2.4.188
container_name: unms-netflow
user: "1001"
restart: always
ports:
- 2055:2055/udp
networks:
- internal
- public
depends_on:
- fluentd
- postgres
- rabbitmq
logging:
driver: fluentd
options:
tag: netflow
fluentd-async-connect: "true"
environment:
- UNMS_NETFLOW_PORT=2055
- UNMS_PG_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
- UNMS_PG_USER=unms
- UNMS_PG_DB=unms
- UNMS_PG_SCHEMA=unms