tacticalrmm/docker/docker-compose.yml

186 lines
4.2 KiB
YAML
Raw Normal View History

version: "3.7"
2020-11-14 21:54:29 +00:00
# networks
networks:
proxy:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
2020-11-14 21:54:29 +00:00
api-db:
redis:
2020-11-14 21:54:29 +00:00
mesh-db:
2020-11-14 21:54:29 +00:00
# docker managed persistent volumes
volumes:
2020-11-14 21:54:29 +00:00
tactical_data:
postgres_data:
2020-09-18 16:16:58 +00:00
mongo_data:
2020-11-20 00:03:44 +00:00
mesh_data:
services:
2020-11-14 21:54:29 +00:00
# postgres database for api service
tactical-postgres:
image: postgres:13-alpine
2020-11-20 00:03:44 +00:00
restart: always
environment:
POSTGRES_DB: tacticalrmm
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}
2020-09-15 17:36:47 +00:00
volumes:
2020-11-14 21:54:29 +00:00
- postgres_data:/var/lib/postgresql/data
networks:
2020-11-14 21:54:29 +00:00
- api-db
2020-11-14 21:54:29 +00:00
# redis container for celery tasks
tactical-redis:
image: redis:6.0-alpine
2020-11-20 00:03:44 +00:00
restart: always
networks:
- redis
2020-11-17 02:22:28 +00:00
# used to initialize the docker environment
2020-11-14 21:54:29 +00:00
tactical-init:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
2020-11-14 21:54:29 +00:00
restart: on-failure
command: ["tactical-init"]
environment:
POSTGRES_USER: ${POSTGRES_USER}
2020-11-16 19:28:10 +00:00
POSTGRES_PASS: ${POSTGRES_PASS}
2020-11-14 21:54:29 +00:00
APP_HOST: ${APP_HOST}
API_HOST: ${API_HOST}
2020-11-28 02:08:20 +00:00
MESH_USER: ${MESH_USER}
2020-11-14 21:54:29 +00:00
MESH_HOST: ${MESH_HOST}
2020-11-18 03:55:13 +00:00
TRMM_USER: ${TRMM_USER}
TRMM_PASS: ${TRMM_PASS}
2020-11-14 21:54:29 +00:00
depends_on:
- tactical-postgres
- tactical-meshcentral
networks:
- api-db
- proxy
volumes:
2020-11-16 19:28:10 +00:00
- tactical_data:/opt/tactical
2020-11-22 17:03:40 +00:00
# nats
tactical-nats:
image: ${IMAGE_REPO}tactical-nats:${VERSION}
restart: always
2021-01-16 02:25:32 +00:00
environment:
API_HOST: ${API_HOST}
2020-11-22 17:03:40 +00:00
ports:
- "4222:4222"
volumes:
- tactical_data:/opt/tactical
networks:
2020-11-24 22:58:28 +00:00
proxy:
aliases:
- ${API_HOST}
2020-11-16 19:28:10 +00:00
# meshcentral container
2020-11-14 21:54:29 +00:00
tactical-meshcentral:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-meshcentral:${VERSION}
2020-11-14 21:54:29 +00:00
restart: always
2020-11-16 19:28:10 +00:00
environment:
MESH_HOST: ${MESH_HOST}
MESH_USER: ${MESH_USER}
MESH_PASS: ${MESH_PASS}
MONGODB_USER: ${MONGODB_USER}
MONGODB_PASSWORD: ${MONGODB_PASSWORD}
networks:
proxy:
aliases:
- ${MESH_HOST}
2020-11-29 19:24:32 +00:00
mesh-db:
volumes:
2020-11-16 19:28:10 +00:00
- tactical_data:/opt/tactical
2020-11-20 00:03:44 +00:00
- mesh_data:/home/node/app/meshcentral-data
depends_on:
2020-11-14 21:54:29 +00:00
- tactical-mongodb
2020-11-24 22:58:28 +00:00
# mongodb container for meshcentral
2020-11-14 21:54:29 +00:00
tactical-mongodb:
image: mongo:4.4
2020-11-20 00:03:44 +00:00
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
MONGO_INITDB_DATABASE: meshcentral
networks:
2020-11-14 21:54:29 +00:00
- mesh-db
2020-09-18 16:16:58 +00:00
volumes:
2020-11-24 22:58:28 +00:00
- mongo_data:/data/db
2020-11-24 22:58:28 +00:00
# container that hosts vue frontend
2020-11-14 21:54:29 +00:00
tactical-frontend:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-frontend:${VERSION}
2020-11-14 21:54:29 +00:00
restart: always
2020-11-17 02:22:28 +00:00
networks:
- proxy
2020-11-14 21:54:29 +00:00
environment:
2020-11-18 03:55:13 +00:00
API_HOST: ${API_HOST}
2020-11-14 21:54:29 +00:00
2020-11-16 19:28:10 +00:00
# container for django backend
2020-11-14 21:54:29 +00:00
tactical-backend:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
2020-11-14 21:54:29 +00:00
command: ["tactical-backend"]
restart: always
networks:
- proxy
- api-db
- redis
2020-11-14 21:54:29 +00:00
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
tactical-nginx:
2020-11-16 19:28:10 +00:00
# container for tactical reverse proxy
image: ${IMAGE_REPO}tactical-nginx:${VERSION}
2020-11-14 21:54:29 +00:00
restart: always
environment:
2020-11-18 03:55:13 +00:00
APP_HOST: ${APP_HOST}
API_HOST: ${API_HOST}
MESH_HOST: ${MESH_HOST}
2020-11-20 14:45:18 +00:00
CERT_PUB_KEY: ${CERT_PUB_KEY}
CERT_PRIV_KEY: ${CERT_PRIV_KEY}
2020-11-14 21:54:29 +00:00
networks:
2020-11-16 19:28:10 +00:00
proxy:
ipv4_address: 172.20.0.20
ports:
- "80:80"
- "443:443"
2020-11-14 21:54:29 +00:00
volumes:
- tactical_data:/opt/tactical
# container for celery worker service
tactical-celery:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
2020-11-14 21:54:29 +00:00
command: ["tactical-celery"]
restart: always
networks:
- redis
- proxy
- api-db
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
- tactical-redis
# container for celery beat service
tactical-celerybeat:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
2020-11-14 21:54:29 +00:00
command: ["tactical-celerybeat"]
restart: always
networks:
2020-11-16 19:28:10 +00:00
- proxy
2020-11-14 21:54:29 +00:00
- redis
- api-db
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
- tactical-redis