tacticalrmm/docker/docker-compose.yml

232 lines
5.5 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
2021-11-21 02:02:29 +00:00
api-db: null
redis: null
2022-04-02 01:11:10 +00:00
mesh-db: null
2022-04-02 01:11:10 +00:00
# docker managed persistent volumes
volumes:
2021-11-21 02:02:29 +00:00
tactical_data: null
postgres_data: null
mongo_data: null
mesh_data: null
2022-04-02 12:29:18 +00:00
redis_data: null
services:
2020-11-14 21:54:29 +00:00
# postgres database for api service
tactical-postgres:
container_name: trmm-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:
container_name: trmm-redis
image: redis:6.0-alpine
2022-01-17 23:18:21 +00:00
user: 1000:1000
2022-04-02 12:29:18 +00:00
command: redis-server
2020-11-20 00:03:44 +00:00
restart: always
2022-04-02 12:29:18 +00:00
volumes:
- redis_data:/data
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:
container_name: trmm-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
2021-11-21 02:02:29 +00:00
command: [ "tactical-init" ]
2020-11-14 21:54:29 +00:00
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
2021-11-21 02:02:29 +00:00
- tactical-meshcentral
2020-11-14 21:54:29 +00:00
networks:
- api-db
- proxy
volumes:
2020-11-16 19:28:10 +00:00
- tactical_data:/opt/tactical
- mesh_data:/meshcentral-data
- mongo_data:/mongo/data/db
2022-04-02 12:29:18 +00:00
- redis_data:/redis/data
2021-11-21 02:02:29 +00:00
2020-11-22 17:03:40 +00:00
# nats
tactical-nats:
container_name: trmm-nats
2020-11-22 17:03:40 +00:00
image: ${IMAGE_REPO}tactical-nats:${VERSION}
user: 1000:1000
2020-11-22 17:03:40 +00:00
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:
2021-11-21 02:02:29 +00:00
api-db: null
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:
container_name: trmm-meshcentral
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-meshcentral:${VERSION}
user: 1000:1000
2020-11-14 21:54:29 +00:00
restart: always
2021-11-21 02:02:29 +00:00
environment:
2020-11-16 19:28:10 +00:00
MESH_HOST: ${MESH_HOST}
MESH_USER: ${MESH_USER}
MESH_PASS: ${MESH_PASS}
MONGODB_USER: ${MONGODB_USER}
MONGODB_PASSWORD: ${MONGODB_PASSWORD}
MESH_PERSISTENT_CONFIG: ${MESH_PERSISTENT_CONFIG}
networks:
proxy:
aliases:
- ${MESH_HOST}
2021-11-21 02:02:29 +00:00
mesh-db: null
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:
container_name: trmm-mongodb
image: mongo:4.4
user: 1000:1000
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:
container_name: trmm-frontend
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-frontend:${VERSION}
user: 1000:1000
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:
container_name: trmm-backend
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
user: 1000:1000
2021-11-21 02:02:29 +00:00
command: [ "tactical-backend" ]
2020-11-14 21:54:29 +00:00
restart: always
networks:
- proxy
- api-db
- redis
2020-11-14 21:54:29 +00:00
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
# container for django websockets connections
tactical-websockets:
container_name: trmm-websockets
image: ${IMAGE_REPO}tactical:${VERSION}
user: 1000:1000
2021-11-21 02:02:29 +00:00
command: [ "tactical-websockets" ]
restart: always
networks:
- proxy
- api-db
- redis
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
- tactical-backend
2020-11-16 19:28:10 +00:00
# container for tactical reverse proxy
tactical-nginx:
container_name: trmm-nginx
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-nginx:${VERSION}
user: 1000:1000
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:8080"
- "443:4443"
2020-11-14 21:54:29 +00:00
volumes:
- tactical_data:/opt/tactical
# container for celery worker service
tactical-celery:
container_name: trmm-celery
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
user: 1000:1000
2021-11-21 02:02:29 +00:00
command: [ "tactical-celery" ]
2020-11-14 21:54:29 +00:00
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:
container_name: trmm-celerybeat
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
user: 1000:1000
2021-11-21 02:02:29 +00:00
command: [ "tactical-celerybeat" ]
2020-11-14 21:54:29 +00:00
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