Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- networks:
- mcu-network:
- driver: bridge
- services:
- plugind:
- build:
- context: .
- dockerfile: Dockerfile.services
- command: ["/opt/mcu/plugind"]
- networks:
- - mcu-network
- ports:
- - '8080:8080'
- restart: on-failure
- depends_on:
- - db
- - prometheusd
- - alertmanagerd
- environment:
- - PLUGIN_DAEMON_MODE
- - PLUGIN_DAEMON_PORT
- - MYSQL_DSN=mcu:password@tcp(db:3306)/MCU?parseTime=true&multiStatements=true
- - CONFIG_REMOTE
- - CONFIG_DEPLOY_KEY
- - CONFIG_DIRECTORY
- - READ_TIMEOUT
- - WRITE_TIMEOUT
- - SHUTDOWN_TIMEOUT
- prometheusd:
- build:
- context: .
- dockerfile: Dockerfile.services
- command: ["/opt/mcu/prometheusd"]
- networks:
- - mcu-network
- depends_on:
- - prometheus
- volumes:
- - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
- ports:
- - '3000:3000'
- expose:
- - '3000'
- restart: on-failure
- environment:
- - PROM_DAEMON_PORT
- - PROM_HOST=prometheus
- - PROM_PORT=9090
- - PROM_RULES
- - PROM_CONFIG
- - READ_TIMEOUT
- - WRITE_TIMEOUT
- - SHUTDOWN_TIMEOUT
- alertmanagerd:
- build:
- context: .
- dockerfile: Dockerfile.services
- command: ["/opt/mcu/alertmanagerd"]
- networks:
- - mcu-network
- depends_on:
- - alertmanager
- volumes:
- - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
- ports:
- - '3001:3001'
- expose:
- - '3001'
- restart: on-failure
- environment:
- - ALERT_DAEMON_PORT
- - ALERT_HOST=alertmanager
- - ALERT_PORT=9093
- - ALERT_CONFIG_PATH
- - READ_TIMEOUT
- - WRITE_TIMEOUT
- - SHUTDOWN_TIMEOUT
- prometheusd2: #runs on 3003
- build:
- context: .
- dockerfile: Dockerfile.services
- command: ["/opt/mcu/prometheusd"]
- networks:
- - mcu-network
- depends_on:
- - prometheus
- volumes:
- - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
- ports:
- - '3003:3000'
- expose:
- - '3003'
- restart: on-failure
- environment:
- - PROM_DAEMON_PORT=3003
- - PROM_HOST=prometheus2
- - PROM_PORT=9091
- - PROM_RULES
- - PROM_CONFIG
- - READ_TIMEOUT
- - WRITE_TIMEOUT
- - SHUTDOWN_TIMEOUT
- alertmanagerd2: #runs on 3004
- build:
- context: .
- dockerfile: Dockerfile.services
- command: ["/opt/mcu/alertmanagerd"]
- networks:
- - mcu-network
- depends_on:
- - alertmanager
- volumes:
- - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
- ports:
- - '3004:3001'
- expose:
- - '3004'
- restart: on-failure
- environment:
- - ALERT_DAEMON_PORT=3004
- - ALERT_HOST=alertmanager2
- - ALERT_PORT=9092
- - ALERT_CONFIG_PATH
- - READ_TIMEOUT
- - WRITE_TIMEOUT
- - SHUTDOWN_TIMEOUT
- prometheus: #runs on port 9090 on the host machine
- image: 'prom/prometheus'
- command:
- - '--config.file=/etc/prometheus/prometheus.yml'
- - '--storage.tsdb.path=/prometheus'
- - '--web.enable-lifecycle'
- networks:
- - mcu-network
- ports:
- - '9090:9090'
- expose:
- - '9090'
- volumes:
- - ./dev/agents/devProm/:/etc/prometheus/ # Config/Rules Files
- restart: on-failure
- alertmanager: #runs on port 9093 on the host machine
- image: 'prom/alertmanager'
- command:
- - '--config.file=/etc/alertmanager/alertmanager.yml'
- - '--cluster.advertise-address=172.18.0.2:9094'
- networks:
- - mcu-network
- ports:
- - '9093:9093'
- expose:
- - '9093'
- volumes:
- - ./dev/agents/devAlert/:/etc/alertmanager/ # Config File
- restart: on-failure
- prometheus2: #runs on port 9091 on the host machine
- image: 'prom/prometheus'
- command:
- - '--config.file=/etc/prometheus/prometheus.yml'
- - '--storage.tsdb.path=/prometheus'
- - '--web.enable-lifecycle'
- networks:
- - mcu-network
- ports:
- - '9091:9090'
- expose:
- - '9091'
- volumes:
- - ./dev/agents/devProm2/:/etc/prometheus/ # Config/Rules Files
- restart: on-failure
- alertmanager2: #runs on port 9092 on the host machine
- image: 'prom/alertmanager'
- command:
- - '--config.file=/etc/alertmanager/alertmanager.yml'
- - '--cluster.advertise-address=172.18.0.2:9095'
- networks:
- - mcu-network
- ports:
- - '9092:9093'
- expose:
- - '9092'
- volumes:
- - ./dev/agents/devAlert2/:/etc/alertmanager/ # Config File
- restart: on-failure
- db: # Database that plugind uses
- image: percona:5.7.23-stretch
- networks:
- - mcu-network
- ports:
- - '3306:3306'
- expose:
- - '3306'
- environment:
- MYSQL_USER: "mcu"
- MYSQL_PASSWORD: "password"
- MYSQL_DATABASE: "MCU"
- MYSQL_ROOT_PASSWORD: "password"
- MYSQL_ALLOW_EMPTY_PASSWORD: "true"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement