43 lines
991 B
YAML
43 lines
991 B
YAML
version: '3.7'
|
|
services:
|
|
|
|
mongodb:
|
|
restart: always
|
|
build:
|
|
context: ./mongodb/
|
|
dockerfile: Dockerfile
|
|
container_name: devmongo
|
|
ports:
|
|
- "27017:27017"
|
|
volumes:
|
|
- ./mongodb/data:/data/db
|
|
- ./mongodb/init:/docker-entrypoint-initdb.d
|
|
command: --bind_ip_all
|
|
networks:
|
|
- logging
|
|
|
|
fluentd:
|
|
image: fluent/fluentd:edge-debian
|
|
container_name: devfluentd
|
|
restart: always
|
|
user: root
|
|
command: >
|
|
/bin/sh -c "
|
|
apt-get update &&
|
|
apt-get install -y build-essential ruby-dev &&
|
|
gem install fluent-plugin-mongo --no-document &&
|
|
apt-get remove -y build-essential ruby-dev &&
|
|
apt-get autoremove -y &&
|
|
exec fluentd -c /fluentd/etc/fluent.conf"
|
|
volumes:
|
|
- ./fluentd/conf:/fluentd/etc
|
|
- ../../bin/Debug/logs/archive/business:/fluentd/businesslogs
|
|
depends_on:
|
|
- mongodb
|
|
networks:
|
|
- logging
|
|
|
|
|
|
networks:
|
|
logging:
|
|
driver: bridge |