mirror of
https://github.com/emo2007/block-accounting.git
synced 2025-04-12 08:56:28 +00:00
75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
version: '3'
|
|
networks:
|
|
blockd-net:
|
|
name: blockd-net
|
|
driver: bridge
|
|
|
|
volumes:
|
|
blockd-data: {}
|
|
prometheus_data: {}
|
|
|
|
services:
|
|
blockd:
|
|
container_name: blockd
|
|
image: blockd:latest
|
|
ports:
|
|
- 8080:8080
|
|
networks:
|
|
- blockd-net
|
|
depends_on:
|
|
blockd-db:
|
|
condition: service_healthy
|
|
profiles: [blockd]
|
|
|
|
blockd-db:
|
|
container_name: blockd-db
|
|
image: postgres:16
|
|
restart: always
|
|
environment:
|
|
- POSTGRES_USER=blockd
|
|
- POSTGRES_PASSWORD=blockd
|
|
- POSTGRES_DB=blockd
|
|
volumes:
|
|
- blockd-data:/var/lib/postgresql/data
|
|
- ./migrations/blockd.sql:/docker-entrypoint-initdb.d/init.sql
|
|
ports:
|
|
- 8432:5432
|
|
networks:
|
|
- blockd-net
|
|
healthcheck:
|
|
test: pg_isready -U blockd -d blockd
|
|
interval: 1s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 5s
|
|
profiles: [blockd, database, noback]
|
|
|
|
prometheus:
|
|
image: prom/prometheus
|
|
container_name: prometheus
|
|
command:
|
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
|
ports:
|
|
- 9090:9090
|
|
restart: unless-stopped
|
|
networks:
|
|
- blockd-net
|
|
volumes:
|
|
- ./prometheus:/etc/prometheus
|
|
- prometheus_data:/prometheus
|
|
profiles: [blockd, metrics, noback]
|
|
|
|
grafana:
|
|
image: grafana/grafana
|
|
container_name: grafana
|
|
ports:
|
|
- 3000:3000
|
|
restart: unless-stopped
|
|
networks:
|
|
- blockd-net
|
|
environment:
|
|
- GF_SECURITY_ADMIN_USER=admin
|
|
- GF_SECURITY_ADMIN_PASSWORD=grafana
|
|
volumes:
|
|
- ./grafana:/etc/grafana/provisioning/datasources
|
|
profiles: [blockd, metrics, noback] |