prometheus-with-blackbox/docker-compose.yml
Eliezer Croitoru 6a00cf0fa6 2
2024-06-18 19:04:26 +03:00

57 lines
1.2 KiB
YAML

services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: always
ports:
- 9090:9090
volumes:
- ./etc:/etc/prometheus
- prometheus-data:/prometheus
command: --web.enable-lifecycle --config.file=/etc/prometheus/prometheus.yml
web:
image: nginx:latest
container_name: web
ports:
- 8080:80
volumes:
- /var/www/html:/usr/share/nginx/html
blackbox:
image: prom/blackbox-exporter:latest
container_name: blackbox
restart: always
ports:
- 9115:9115
volumes:
- ./etc/blackbox.yml:/etc/blackbox_exporter/config.yml:ro
db:
image: mariadb:lts
container_name: db
restart: always
environment:
MARIADB_ROOT_PASSWORD: example
MARIADB_DATABASE: registry
MARIADB_USER: prom
MARIADB_PASSWORD: prom
ports:
- 3306:3306
volumes:
- ./mysql:/var/lib/mysql
- ./registry-dump.sql:/docker-entrypoint-initdb.d/dump.sql
cron:
image: mycron
container_name: cron
build:
context: ./cron
dockerfile: Dockerfile
volumes:
- /var/www/html:/var/www/html
volumes:
prometheus-data: