tacticalrmm/docker/docker-compose.yml

189 lines
4.3 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:
salt_data:
2020-11-14 21:54:29 +00:00
postgres_data:
2020-09-18 16:16:58 +00:00
mongo_data:
services:
2020-11-14 21:54:29 +00:00
# postgres database for api service
tactical-postgres:
2020-10-25 22:15:41 +00:00
image: postgres:13
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
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}
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-14 21:54:29 +00:00
# salt master and api
tactical-salt:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical-salt:${VERSION}
2020-11-14 21:54:29 +00:00
restart: always
ports:
- "4505:4505"
- "4506:4506"
volumes:
2020-11-16 19:28:10 +00:00
- tactical_data:/opt/tactical
2020-09-18 16:16:58 +00:00
- salt_data:/etc/salt
networks:
- proxy
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
2020-11-14 21:54:29 +00:00
- mesh-db
volumes:
2020-11-16 19:28:10 +00:00
- tactical_data:/opt/tactical
depends_on:
2020-11-14 21:54:29 +00:00
- tactical-mongodb
2020-11-16 19:28:10 +00:00
# mongodb container for meshCentral
2020-11-14 21:54:29 +00:00
tactical-mongodb:
image: mongo
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:
- mongo_data:/data
2020-11-16 19:28:10 +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
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-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
# container for celery winupdate tasks
tactical-celerywinupdate:
2020-11-16 19:28:10 +00:00
image: ${IMAGE_REPO}tactical:${VERSION}
2020-11-14 21:54:29 +00:00
command: ["tactical-celerywinupdate"]
restart: always
networks:
- redis
- proxy
- api-db
volumes:
- tactical_data:/opt/tactical
depends_on:
- tactical-postgres
- tactical-redis