2020-04-06 18:21:52 +00:00
|
|
|
# FOR DEV
|
|
|
|
version: '3.7'
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
# Container that hosts Vue frontend
|
|
|
|
app:
|
|
|
|
image: node:12
|
2020-06-10 16:43:12 +00:00
|
|
|
command: /bin/bash -c "npm install && npm run serve -- --host 0.0.0.0 --port 80 --public ${APP_HOST}"
|
2020-04-06 18:21:52 +00:00
|
|
|
working_dir: /home/node
|
|
|
|
volumes:
|
|
|
|
- ../web:/home/node
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
|
|
|
|
# Builds Python Virtual Env to share between containers
|
|
|
|
venv:
|
|
|
|
image: python:3.7
|
|
|
|
command: /bin/bash -c "pip install virtualenv && python -m virtualenv env && ./env/bin/pip install -r requirements.txt"
|
|
|
|
working_dir: /app
|
|
|
|
volumes:
|
|
|
|
- ../api/tacticalrmm:/app
|
|
|
|
|
|
|
|
# Container for Django backend
|
|
|
|
api:
|
|
|
|
image: python:3.7
|
2020-04-16 14:56:52 +00:00
|
|
|
command: /bin/bash -c "python manage.py collectstatic --clear --no-input && python manage.py migrate && python manage.py initial_db_setup && python manage.py load_chocos && python manage.py runserver 0.0.0.0:80"
|
2020-04-06 18:21:52 +00:00
|
|
|
working_dir: /app
|
|
|
|
environment:
|
|
|
|
VIRTUAL_ENV: /env
|
|
|
|
PATH: /app/env/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
networks:
|
|
|
|
- proxy
|
|
|
|
- database
|
|
|
|
- redis
|
|
|
|
volumes:
|
|
|
|
- scripts:/srv
|
|
|
|
- ../api/tacticalrmm:/app
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- venv
|
|
|
|
|
|
|
|
# Container for Celery worker service
|
|
|
|
celery-service:
|
|
|
|
image: python:3.7
|
2020-04-16 14:56:52 +00:00
|
|
|
command: celery -A tacticalrmm worker -l debug
|
2020-04-06 18:21:52 +00:00
|
|
|
working_dir: /app
|
|
|
|
environment:
|
|
|
|
VIRTUAL_ENV: /env
|
|
|
|
PATH: /app/env/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
volumes:
|
|
|
|
- ../api/tacticalrmm:/app
|
|
|
|
networks:
|
|
|
|
- redis
|
|
|
|
- proxy
|
|
|
|
- database
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- venv
|
|
|
|
|
|
|
|
# Container for Celery beat service
|
|
|
|
celery-beat:
|
|
|
|
image: python:3.7
|
2020-04-16 14:56:52 +00:00
|
|
|
command: celery -A tacticalrmm beat -l debug
|
2020-04-06 18:21:52 +00:00
|
|
|
working_dir: /app
|
|
|
|
environment:
|
|
|
|
VIRTUAL_ENV: /env
|
|
|
|
PATH: /app/env/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
volumes:
|
|
|
|
- ../api/tacticalrmm:/app
|
|
|
|
networks:
|
|
|
|
- redis
|
|
|
|
- proxy
|
|
|
|
- database
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- venv
|
|
|
|
|
|
|
|
# Container for Celery Winupdate tasks
|
|
|
|
celery-winupdate:
|
|
|
|
image: python:3.7
|
2020-04-16 14:56:52 +00:00
|
|
|
command: celery -A tacticalrmm worker -Q wupdate -l debug
|
2020-04-06 18:21:52 +00:00
|
|
|
working_dir: /app
|
|
|
|
environment:
|
|
|
|
VIRTUAL_ENV: /env
|
|
|
|
PATH: /app/env/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
|
|
volumes:
|
|
|
|
- ../api/tacticalrmm:/app
|
|
|
|
networks:
|
|
|
|
- redis
|
|
|
|
- proxy
|
|
|
|
- database
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
|
|
|
- venv
|