prometheus-with-blackbox/docker-compose.yml

57 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-06-18 18:53:38 +03:00
services:
prometheus:
image: prom/prometheus:latest
2024-06-18 19:04:26 +03:00
container_name: prometheus
2024-06-18 18:53:38 +03:00
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
2024-06-18 19:04:26 +03:00
container_name: web
2024-06-18 18:53:38 +03:00
ports:
- 8080:80
volumes:
- /var/www/html:/usr/share/nginx/html
blackbox:
image: prom/blackbox-exporter:latest
2024-06-18 19:04:26 +03:00
container_name: blackbox
2024-06-18 18:53:38 +03:00
restart: always
ports:
- 9115:9115
volumes:
- ./etc/blackbox.yml:/etc/blackbox_exporter/config.yml:ro
db:
image: mariadb:lts
2024-06-18 19:04:26 +03:00
container_name: db
2024-06-18 18:53:38 +03:00
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
2024-06-18 19:04:26 +03:00
container_name: cron
2024-06-18 18:53:38 +03:00
build:
context: ./cron
dockerfile: Dockerfile
volumes:
- /var/www/html:/var/www/html
volumes:
prometheus-data: