2021-01-02 05:05:37 +00:00
|
|
|
version: '3.4'
|
|
|
|
|
|
|
|
services:
|
|
|
|
api-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-api-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: api-dev
|
2021-02-09 03:17:06 +00:00
|
|
|
restart: always
|
2021-01-02 05:05:37 +00:00
|
|
|
build:
|
2021-08-31 02:17:21 +00:00
|
|
|
context: ..
|
|
|
|
dockerfile: .devcontainer/api.dockerfile
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-api" ]
|
2021-01-16 16:20:24 +00:00
|
|
|
environment:
|
|
|
|
API_PORT: ${API_PORT}
|
2021-01-02 05:05:37 +00:00
|
|
|
ports:
|
2021-01-16 16:20:24 +00:00
|
|
|
- "8000:${API_PORT}"
|
2021-01-02 05:05:37 +00:00
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- ..:/workspace:cached
|
|
|
|
networks:
|
|
|
|
dev:
|
2022-01-06 02:17:21 +00:00
|
|
|
aliases:
|
2021-01-02 05:05:37 +00:00
|
|
|
- tactical-backend
|
|
|
|
|
|
|
|
app-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-app-dev
|
2021-03-25 22:07:41 +00:00
|
|
|
image: node:14-alpine
|
2021-02-09 03:17:06 +00:00
|
|
|
restart: always
|
2022-01-06 02:17:21 +00:00
|
|
|
command: /bin/sh -c "npm install npm@latest -g && npm install && npm run serve
|
|
|
|
-- --host 0.0.0.0 --port ${APP_PORT}"
|
2021-01-02 05:05:37 +00:00
|
|
|
working_dir: /workspace/web
|
|
|
|
volumes:
|
|
|
|
- ..:/workspace:cached
|
2021-01-16 16:20:24 +00:00
|
|
|
ports:
|
|
|
|
- "8080:${APP_PORT}"
|
2021-01-02 05:05:37 +00:00
|
|
|
networks:
|
|
|
|
dev:
|
2022-01-06 02:17:21 +00:00
|
|
|
aliases:
|
2021-01-02 05:05:37 +00:00
|
|
|
- tactical-frontend
|
|
|
|
|
|
|
|
# nats
|
|
|
|
nats-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-nats-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: ${IMAGE_REPO}tactical-nats:${VERSION}
|
|
|
|
restart: always
|
2021-01-16 02:25:32 +00:00
|
|
|
environment:
|
|
|
|
API_HOST: ${API_HOST}
|
2021-01-16 16:20:24 +00:00
|
|
|
API_PORT: ${API_PORT}
|
2021-01-16 02:05:49 +00:00
|
|
|
DEV: 1
|
2021-01-02 05:05:37 +00:00
|
|
|
ports:
|
2021-06-13 03:49:10 +00:00
|
|
|
- "${NATS_PORTS}"
|
2021-01-02 05:05:37 +00:00
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
2021-01-16 02:05:49 +00:00
|
|
|
- ..:/workspace:cached
|
2021-01-02 05:05:37 +00:00
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- ${API_HOST}
|
|
|
|
- tactical-nats
|
|
|
|
|
|
|
|
# meshcentral container
|
|
|
|
meshcentral-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-meshcentral-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: ${IMAGE_REPO}tactical-meshcentral:${VERSION}
|
|
|
|
restart: always
|
2022-01-06 02:17:21 +00:00
|
|
|
environment:
|
2021-01-02 05:05:37 +00:00
|
|
|
MESH_HOST: ${MESH_HOST}
|
|
|
|
MESH_USER: ${MESH_USER}
|
|
|
|
MESH_PASS: ${MESH_PASS}
|
|
|
|
MONGODB_USER: ${MONGODB_USER}
|
|
|
|
MONGODB_PASSWORD: ${MONGODB_PASSWORD}
|
2021-06-13 03:49:10 +00:00
|
|
|
NGINX_HOST_IP: ${DOCKER_NGINX_IP}
|
2021-01-02 05:05:37 +00:00
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- tactical-meshcentral
|
|
|
|
- ${MESH_HOST}
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- mesh-data-dev:/home/node/app/meshcentral-data
|
|
|
|
depends_on:
|
|
|
|
- mongodb-dev
|
|
|
|
|
|
|
|
# mongodb container for meshcentral
|
|
|
|
mongodb-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-mongodb-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: mongo:4.4
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER}
|
|
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
|
|
|
|
MONGO_INITDB_DATABASE: meshcentral
|
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- tactical-mongodb
|
|
|
|
volumes:
|
|
|
|
- mongo-dev-data:/data/db
|
|
|
|
|
|
|
|
# postgres database for api service
|
|
|
|
postgres-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-postgres-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: postgres:13-alpine
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: tacticalrmm
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASS}
|
|
|
|
volumes:
|
|
|
|
- postgres-data-dev:/var/lib/postgresql/data
|
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- tactical-postgres
|
|
|
|
|
|
|
|
# redis container for celery tasks
|
|
|
|
redis-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-redis-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
restart: always
|
2021-06-07 02:54:52 +00:00
|
|
|
command: redis-server --appendonly yes
|
2021-01-02 05:05:37 +00:00
|
|
|
image: redis:6.0-alpine
|
2022-01-06 02:17:21 +00:00
|
|
|
volumes:
|
2021-06-07 02:54:52 +00:00
|
|
|
- redis-data-dev:/data
|
2021-01-02 05:05:37 +00:00
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- tactical-redis
|
|
|
|
|
|
|
|
init-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-init-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: api-dev
|
|
|
|
restart: on-failure
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-init-dev" ]
|
2021-01-02 05:05:37 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASS: ${POSTGRES_PASS}
|
|
|
|
APP_HOST: ${APP_HOST}
|
|
|
|
API_HOST: ${API_HOST}
|
|
|
|
MESH_HOST: ${MESH_HOST}
|
2021-01-03 20:15:43 +00:00
|
|
|
MESH_USER: ${MESH_USER}
|
2021-01-02 05:05:37 +00:00
|
|
|
TRMM_USER: ${TRMM_USER}
|
|
|
|
TRMM_PASS: ${TRMM_PASS}
|
2021-01-16 16:20:24 +00:00
|
|
|
HTTP_PROTOCOL: ${HTTP_PROTOCOL}
|
|
|
|
APP_PORT: ${APP_PORT}
|
2021-01-02 05:05:37 +00:00
|
|
|
depends_on:
|
|
|
|
- postgres-dev
|
|
|
|
- meshcentral-dev
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- ..:/workspace:cached
|
|
|
|
|
|
|
|
# container for celery worker service
|
|
|
|
celery-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-celery-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: api-dev
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-celery-dev" ]
|
2021-01-02 05:05:37 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- ..:/workspace:cached
|
|
|
|
depends_on:
|
|
|
|
- postgres-dev
|
|
|
|
- redis-dev
|
|
|
|
|
|
|
|
# container for celery beat service
|
|
|
|
celerybeat-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-celerybeat-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: api-dev
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-celerybeat-dev" ]
|
2021-01-02 05:05:37 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- ..:/workspace:cached
|
|
|
|
depends_on:
|
|
|
|
- postgres-dev
|
|
|
|
- redis-dev
|
|
|
|
|
2021-04-07 14:54:00 +00:00
|
|
|
# container for websockets communication
|
2021-04-03 21:50:18 +00:00
|
|
|
websockets-dev:
|
2021-04-07 14:54:00 +00:00
|
|
|
container_name: trmm-websockets-dev
|
2021-04-03 21:50:18 +00:00
|
|
|
image: api-dev
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-websockets-dev" ]
|
2021-04-03 21:50:18 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
aliases:
|
|
|
|
- tactical-websockets
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
- ..:/workspace:cached
|
|
|
|
depends_on:
|
|
|
|
- postgres-dev
|
|
|
|
- redis-dev
|
|
|
|
|
2021-01-02 05:05:37 +00:00
|
|
|
# container for tactical reverse proxy
|
2021-04-07 14:54:00 +00:00
|
|
|
nginx-dev:
|
|
|
|
container_name: trmm-nginx-dev
|
2021-01-02 05:05:37 +00:00
|
|
|
image: ${IMAGE_REPO}tactical-nginx:${VERSION}
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
APP_HOST: ${APP_HOST}
|
|
|
|
API_HOST: ${API_HOST}
|
|
|
|
MESH_HOST: ${MESH_HOST}
|
|
|
|
CERT_PUB_KEY: ${CERT_PUB_KEY}
|
|
|
|
CERT_PRIV_KEY: ${CERT_PRIV_KEY}
|
2021-01-16 16:20:24 +00:00
|
|
|
APP_PORT: ${APP_PORT}
|
|
|
|
API_PORT: ${API_PORT}
|
2021-09-06 16:54:37 +00:00
|
|
|
DEV: 1
|
2021-01-02 05:05:37 +00:00
|
|
|
networks:
|
|
|
|
dev:
|
2021-06-13 03:49:10 +00:00
|
|
|
ipv4_address: ${DOCKER_NGINX_IP}
|
2021-01-02 05:05:37 +00:00
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
volumes:
|
|
|
|
- tactical-data-dev:/opt/tactical
|
|
|
|
|
2021-04-26 02:17:43 +00:00
|
|
|
mkdocs-dev:
|
|
|
|
container_name: trmm-mkdocs-dev
|
|
|
|
image: api-dev
|
|
|
|
restart: always
|
2022-01-06 02:17:21 +00:00
|
|
|
command: [ "tactical-mkdocs-dev" ]
|
2021-04-26 02:17:43 +00:00
|
|
|
ports:
|
|
|
|
- "8005:8005"
|
|
|
|
volumes:
|
|
|
|
- ..:/workspace:cached
|
|
|
|
networks:
|
|
|
|
- dev
|
|
|
|
|
2021-01-02 05:05:37 +00:00
|
|
|
volumes:
|
2022-01-06 02:17:21 +00:00
|
|
|
tactical-data-dev: null
|
|
|
|
postgres-data-dev: null
|
|
|
|
mongo-dev-data: null
|
|
|
|
mesh-data-dev: null
|
|
|
|
redis-data-dev: null
|
2021-01-02 05:05:37 +00:00
|
|
|
|
|
|
|
networks:
|
|
|
|
dev:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
driver: default
|
|
|
|
config:
|
2021-06-13 03:49:10 +00:00
|
|
|
- subnet: ${DOCKER_NETWORK}
|