block-accounting/backend/docker-compose.yaml

124 lines
2.5 KiB
YAML
Raw Normal View History

2024-05-24 17:44:24 +00:00
networks:
blockd-net:
name: blockd-net
driver: bridge
2024-05-24 23:39:32 +00:00
syslog:
name: syslog
driver: bridge
2024-05-24 17:44:24 +00:00
volumes:
blockd-data: {}
prometheus_data: {}
services:
blockd:
container_name: blockd
2024-05-24 23:39:32 +00:00
build:
context: .
dockerfile: ./Dockerfile
2024-05-24 17:44:24 +00:00
ports:
2024-05-26 00:30:35 +00:00
- 8081:8080
2024-05-24 17:44:24 +00:00
networks:
- blockd-net
2024-05-24 23:39:32 +00:00
- syslog
2024-05-24 17:44:24 +00:00
depends_on:
blockd-db:
condition: service_healthy
2024-05-28 20:26:35 +00:00
chain-api:
condition: service_started
2024-05-24 17:44:24 +00:00
profiles: [blockd]
2024-05-28 20:26:35 +00:00
chain-api:
container_name: chain-api
build:
context: ../chain-api
dockerfile: ../chain-api/Dockerfile
networks:
- blockd-net
- syslog
2024-05-24 17:44:24 +00:00
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]
blockd-cache:
container_name: blockd-cache
image: redis:7.2.4
restart: always
networks:
- blockd-net
ports:
- 6379:6379
profiles: [blockd, database, noback]
2024-05-26 00:30:35 +00:00
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9091:9090
restart: unless-stopped
networks:
- blockd-net
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
profiles: [metrics]
2024-05-24 17:44:24 +00:00
2024-05-26 00:30:35 +00:00
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3112: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: [metrics]
2024-05-24 23:39:32 +00:00
2024-05-26 00:30:35 +00:00
syslog:
image: linuxserver/syslog-ng:3.36.1
container_name: syslog-ng
environment:
- PUID=0
- PGID=0
- TZ=UTC
volumes:
- /srv/syslog/config:/config
- /srv/syslog/logs:/var/log
ports:
- 514:5514/udp
- 601:6601/tcp
- 6514:6514/tcp
restart: unless-stopped
networks:
- syslog
logging:
driver: "json-file"
profiles: [metrics]
2024-05-28 20:26:35 +00:00