tacticalrmm/docker/docker-compose.yml

110 lines
2.4 KiB
YAML

version: "3.7"
# Userdefined Networks
networks:
proxy:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
database:
redis:
mesh-mongodb:
# Docker managed persistent volumes
volumes:
# Volume for userdefined scripts
scripts:
# Volume for mesh token initial setup
mesh_token:
# Used to make the salt data persistent
salt_data:
# Makes Postgres data persistent
postgres_data:
# Makes mesh central data persistent
mongo_data:
services:
# Postgres Database for API service
db:
image: postgres:12
environment:
POSTGRES_DB: tacticalrmm
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- database
# Redis Container for Celery tasks
redis:
image: redis
networks:
- redis
# Salt Master and API
salt:
build:
context: ..
dockerfile: ./docker/salt/dockerfile
args:
- SALT_USER=${SALT_USER}
- SALT_PASS=${SALT_PASS}
ports:
- "4505:4505"
- "4506:4506"
volumes:
- scripts:/srv
- salt_data:/etc/salt
networks:
- proxy
# MeshCentral Container
meshcentral:
build:
context: ./meshcentral
args:
- MESH_HOST=${MESH_HOST}
- MESH_USER=${MESH_USER}
- MESH_PASS=${MESH_PASS}
- EMAIL_USER=${EMAIL_USER}
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASSWORD=${MONGODB_PASSWORD}
networks:
- proxy
- mesh-mongodb
volumes:
- mesh_token:/token
depends_on:
- mesh-mongodb
- nginx-proxy
# MongoDB Container for MeshCentral
mesh-mongodb:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
MONGO_INITDB_DATABASE: meshcentral
networks:
- mesh-mongodb
volumes:
- mongo_data:/data
# Nginx Container Reverse Proxy that handles all http/https traffic
nginx-proxy:
build:
context: ./nginx-proxy
args:
- APP_HOST=${APP_HOST}
- API_HOST=${API_HOST}
- MESH_HOST=${MESH_HOST}
ports:
- "80:80"
- "443:443"
networks:
proxy:
ipv4_address: 172.20.0.20