tacticalrmm/docker/docker-compose.yml

98 lines
1.9 KiB
YAML
Raw Normal View History

2020-06-23 04:41:45 +00:00
version: "3.7"
2020-02-12 16:18:43 +00:00
# Userdefined Networks
2020-06-23 04:41:45 +00:00
networks:
2020-02-12 16:18:43 +00:00
proxy:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.20.0.0/24
database:
redis:
mesh-mongodb:
2020-02-12 16:18:43 +00:00
# Docker managed persistent volumes
volumes:
# Volume for userdefined scripts
scripts:
mesh_token:
2020-02-12 16:18:43 +00:00
services:
# Postgres Database for API service
2020-02-12 16:18:43 +00:00
db:
2020-06-23 04:41:45 +00:00
image: postgres:12
environment:
2020-04-06 18:21:52 +00:00
POSTGRES_DB: tacticalrmm
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASS}
2020-06-23 04:41:45 +00:00
networks:
2020-02-12 16:18:43 +00:00
- database
2020-06-23 04:41:45 +00:00
2020-04-06 18:21:52 +00:00
# Redis Container for Celery tasks
redis:
image: redis
networks:
- redis
# Salt Master and API
2020-02-12 16:18:43 +00:00
salt:
2020-06-23 04:41:45 +00:00
build:
context: ..
dockerfile: ./docker/salt/dockerfile
args:
- SALT_USER=${SALT_USER}
- SALT_PASS=${SALT_PASS}
2020-02-12 16:18:43 +00:00
ports:
- "4505:4505"
- "4506:4506"
volumes:
2020-04-06 18:21:52 +00:00
- scripts:/srv
networks:
- proxy
2020-06-23 04:41:45 +00:00
# MeshCentral Container
2020-02-12 16:18:43 +00:00
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}
2020-02-12 16:18:43 +00:00
networks:
- proxy
- mesh-mongodb
volumes:
- mesh_token:/token
2020-06-23 04:41:45 +00:00
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
# Nginx Container Reverse Proxy that handles all http/https traffic
2020-02-12 16:18:43 +00:00
nginx-proxy:
2020-06-23 04:41:45 +00:00
build:
2020-02-12 16:18:43 +00:00
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