This commit is contained in:
Jon Moroney 2019-01-28 14:51:31 -08:00
Родитель d9a6ec17c9
Коммит 64586ac1ae
1 изменённых файлов: 16 добавлений и 273 удалений

Просмотреть файл

@ -2,311 +2,54 @@
version: '3.7'
services:
nginx:
image: mozdef/mozdef_nginx
build:
context: ../../
dockerfile: docker/compose/nginx/Dockerfile
cache_from:
- mozdef/mozdef_nginx
- mozdef_nginx:latest
restart: always
command: /usr/sbin/nginx
depends_on:
- kibana
- meteor
ports:
- 80:80
- 8080:8080
- 9090:9090
# - 8081:8081
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
mongodb:
image: mozdef/mozdef_mongodb
build:
context: ../../
dockerfile: docker/compose/mongodb/Dockerfile
cache_from:
- mozdef/mozdef_mongodb
- mozdef_mongodb:latest
restart: always
command: /usr/bin/mongod --smallfiles --config /etc/mongod.conf
volumes:
- mongodb:/var/lib/mongo
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
kibana:
image: mozdef/mozdef_kibana
build:
context: ../../
dockerfile: docker/compose/kibana/Dockerfile
cache_from:
- mozdef/mozdef_kibana
- mozdef_kibana:latest
restart: always
command: bin/kibana --elasticsearch=http://elasticsearch:9200
depends_on:
- elasticsearch
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
elasticsearch:
image: mozdef/mozdef_elasticsearch
build:
context: ../../
dockerfile: docker/compose/elasticsearch/Dockerfile
cache_from:
- mozdef/mozdef_elasticsearch
- mozdef_elasticsearch:latest
command: bin/elasticsearch
restart: always
volumes:
- elasticsearch:/var/lib/elasticsearch
# ports:
# - 9200:9200
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
rabbitmq:
image: mozdef/mozdef_rabbitmq
build:
context: ../../
dockerfile: docker/compose/rabbitmq/Dockerfile
cache_from:
- mozdef/mozdef_rabbitmq
- mozdef_rabbitmq:latest
restart: always
command: rabbitmq-server
volumes:
- rabbitmq:/var/lib/rabbitmq
# ports:
# - 5672:5672
# - 15672:15672 # Admin interface
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
# MozDef Specific Containers
base:
image: mozdef/mozdef_base
build:
context: ../../
dockerfile: docker/compose/mozdef_base/Dockerfile
cache_from:
- mozdef/mozdef_base
- mozdef_base:latest
command: bash -c 'su - mozdef -c /opt/mozdef/envs/mozdef/cron/update_geolite_db.sh'
volumes:
- geolite_db:/opt/mozdef/envs/mozdef/data
env_file:
- user_input.env
- $ENV_FILE
bootstrap:
image: mozdef/mozdef_bootstrap
build:
context: ../../
dockerfile: docker/compose/mozdef_bootstrap/Dockerfile
cache_from:
- mozdef/mozdef_bootstrap
- mozdef_bootstrap:latest
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && python initial_setup.py http://elasticsearch:9200 cron/defaultMappingTemplate.json cron/backup.conf'
depends_on:
- base
- elasticsearch
environment:
- ES_URL=http://localhost:9200
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
alertplugins:
image: mozdef/mozdef_alertplugins
build:
context: ../../
dockerfile: docker/compose/mozdef_alertplugins/Dockerfile
cache_from:
- mozdef/mozdef_alertplugins
- mozdef_alertplugins:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && python alert_worker.py -c alert_worker.conf'
depends_on:
- base
- elasticsearch
- rabbitmq
- alerts
- bootstrap
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
alerts:
image: mozdef/mozdef_alerts
build:
context: ../../
dockerfile: docker/compose/mozdef_alerts/Dockerfile
cache_from:
- mozdef/mozdef_alerts
- mozdef_alerts:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && celery -A celeryconfig worker --loglevel=info --beat'
depends_on:
- base
- elasticsearch
- rabbitmq
- bootstrap
networks:
- default
env_file:
- user_input.env
# bot:
# restart: always
# command: bash -c 'sleep 90 && source /opt/mozdef/envs/python/bin/activate && python mozdefbot.py -c mozdefbot.conf'
# depends_on:
# - base
# - rabbitmq
# - alerts
# - bootstrap
# networks:
# - default
# volumes:
# - geolite_db:/opt/mozdef/envs/mozdef/data/
- $ENV_FILE
cron:
image: mozdef/mozdef_cron
build:
context: ../../
dockerfile: docker/compose/mozdef_cron/Dockerfile
cache_from:
- mozdef/mozdef_cron
- mozdef_cron:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && crond -n'
volumes:
- cron:/opt/mozdef/envs/mozdef/cron
- geolite_db:/opt/mozdef/envs/mozdef/data/
depends_on:
- base
- rabbitmq
- elasticsearch
- mongodb
- bootstrap
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
loginput:
image: mozdef/mozdef_loginput
build:
context: ../../
dockerfile: docker/compose/mozdef_loginput/Dockerfile
cache_from:
- mozdef/mozdef_loginput
- mozdef_loginput:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && python index.py -c index.conf'
depends_on:
- base
- elasticsearch
- rabbitmq
- bootstrap
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
mq_worker:
image: mozdef/mozdef_mq_worker
build:
context: ../../
dockerfile: docker/compose/mozdef_mq_worker/Dockerfile
cache_from:
- mozdef/mozdef_mq_worker
- mozdef_mq_worker:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && python esworker_eventtask.py -c esworker_eventtask.conf'
depends_on:
- base
- rabbitmq
- elasticsearch
- loginput
- bootstrap
networks:
- default
volumes:
- geolite_db:/opt/mozdef/envs/mozdef/data/
env_file:
- user_input.env
- $ENV_FILE
meteor:
image: mozdef/mozdef_meteor
build:
context: ../../
dockerfile: docker/compose/mozdef_meteor/Dockerfile
cache_from:
- mozdef/mozdef_meteor
- mozdef_meteor:latest
restart: always
command: bash -c 'node bundle/main.js'
depends_on:
- mongodb
- rest
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
rest:
image: mozdef/mozdef_rest
build:
context: ../../
dockerfile: docker/compose/mozdef_rest/Dockerfile
cache_from:
- mozdef/mozdef_rest
- mozdef_rest:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/elasticsearch/9200";do sleep 1;done && source /opt/mozdef/envs/python/bin/activate && python index.py -c index.conf'
depends_on:
- base
- elasticsearch
- mongodb
- bootstrap
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
syslog:
image: mozdef/mozdef_syslog
build:
context: ../../
dockerfile: docker/compose/mozdef_syslog/Dockerfile
cache_from:
- mozdef/mozdef_syslog
- mozdef_syslog:latest
restart: always
command: bash -c 'while ! timeout 1 bash -c "echo > /dev/tcp/rabbitmq/5672";do sleep 1;done && /usr/sbin/syslog-ng --no-caps -F'
depends_on:
- loginput
- mq_worker
ports:
- 514:514/udp
- 514:514
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
tester:
image: mozdef/mozdef_tester
build:
context: ../../
dockerfile: docker/compose/tester/Dockerfile
cache_from:
- mozdef/mozdef_tester
- mozdef_tester:latest
networks:
- default
env_file:
- user_input.env
- $ENV_FILE
volumes:
elasticsearch: