Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/.githooks
/.github
!/.github/workflows/staging
/docker
/docs
/.deepsource.toml
/.dockerignore
Expand All @@ -12,5 +13,4 @@
/docker-compose.yml
/Dockerfile
/Dockerfile.staging
/prometheus.yml
/README.md
65 changes: 55 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,60 @@
version: '3.7'
# This docker-compose.yml configuration contains:
# - a Gossamer node on the Kusama chain
# - a Prometheus server scrapping metrics from Gossamer
# - a Grafana server using the Prometheus server as source
#
# Prometheus and Grafana are both provisioned to give you a dashboard to play with.
# They are tailored for local development, and Grafana gives you anonymous admin access.
#
# You can run all of the containers with: `docker-compose up`
# Alternatively, you can run select containers with for example: `docker-compose up gossamer`
#
# To rebuild the Gossamer Docker image: `docker-compose build`

version: '3'

services:
gossamer:
image: chainsafe/gossamer
build: .
volumes:
# Remove with: docker volume rm gossamer
- gossamer:/data/gossamer
command:
- --basepath=/data/gossamer
- --chain=kusama
- --log=info
- --publish-metrics
- --metrics-address=:9876
- --pprofserver
ports:
- 6060:6060/tcp # Pprof server
- 7001:7001/tcp # Network port
- 8545:8545/tcp # RPC HTTP port
- 8546:8546/tcp # RPC Websocket port
expose:
- 9876/tcp # Prometheus metrics for Prometheus server

services:
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
# The following line can be uncommented to persist metrics data.
# - gossamer-prometheus:/prometheus
expose:
- 9090/tcp # Prometheus metrics for Grafana

grafana:
image: grafana/grafana-oss
ports:
- 9090:9090
restart: always
- 3000:3000/tcp # HTTP Web interface at http://localhost:3000/
volumes:
- ./docker/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
# The following line can be uncommented to persist modifications.
# - gossamer-grafana:/var/lib/grafana

volumes:
gossamer:
gossamer-prometheus:
gossamer-grafana:
12 changes: 12 additions & 0 deletions docker/grafana/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See https://github.com/grafana/grafana/blob/main/conf/sample.ini

[dashboards]
min_refresh_interval = 5s
default_home_dashboard_path = /etc/grafana/provisioning/dashboards/gossamer.json

[users]
allow_sign_up = false

[auth.anonymous]
enabled = true
org_role = Admin
Loading