Skip to content

Commit 2858c70

Browse files
authored
feat: improve docker compose volume handling (#200)
* feat: improve docker-compose volume handling * pin grafana version
1 parent 749741a commit 2858c70

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,3 @@ target/
2323
.vscode/
2424

2525
.idea/
26-
docker-compose/grafana_data/
27-
docker-compose/l2reth/
28-
docker-compose/prometheus_data/
29-
docker-compose/l1devnet/

docker-compose/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
volumes

docker-compose/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ To stop all services:
6868
docker compose down
6969
```
7070

71+
To reset your current local network, simply remove all persistent volumes:
72+
```sh
73+
rm -rf volumes
74+
```
75+
7176
---
7277

7378
## Troubleshooting

docker-compose/docker-compose.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ services:
1313
- "8543:8545" # JSON-RPC
1414
- "8544:8546" # WebSocket
1515
volumes:
16-
- ./l1devnet:/l1devnet
17-
- ./launch_l1.bash:/launch_l1.bash
16+
- ./launch_l1.bash:/launch_l1.bash:ro
17+
- ./volumes/l1devnet:/l1devnet
1818
networks:
1919
- scroll-network
2020

2121
rollup-node:
2222
image: scrolltech/rollup-node:v0.0.1-rc20
23+
platform: linux/amd64
2324
container_name: rollup-node
2425
entrypoint: ["bash", "/launch_rollup_node.bash"]
2526
env_file:
@@ -31,8 +32,8 @@ services:
3132
- "8546:8546" # WebSocket
3233
- "6060:6060" # Metrics
3334
volumes:
34-
- ./l2reth:/l2reth
35-
- ./launch_rollup_node.bash:/launch_rollup_node.bash
35+
- ./launch_rollup_node.bash:/launch_rollup_node.bash:ro
36+
- ./volumes/l2reth:/l2reth
3637
networks:
3738
- scroll-network
3839

@@ -43,7 +44,7 @@ services:
4344
- "19090:9090" # Prometheus Web UI
4445
volumes:
4546
- ./resource/prometheus.yml:/etc/prometheus/prometheus.yml:ro
46-
- ./prometheus_data:/prometheus
47+
- ./volumes/prometheus:/prometheus
4748
command:
4849
- '--config.file=/etc/prometheus/prometheus.yml'
4950
- '--storage.tsdb.path=/prometheus'
@@ -59,15 +60,15 @@ services:
5960
- rollup-node
6061

6162
grafana:
62-
image: grafana/grafana:latest
63+
image: grafana/grafana:12.0.2
6364
container_name: grafana
6465
ports:
6566
- "13000:3000" # Grafana Web UI
6667
volumes:
6768
- ./resource/grafana-datasource.yml:/config/datasources/datasource.yml:ro
6869
- ./resource/grafana-dashboard-providers.yml:/config/dashboards/dashboard-providers.yml:ro
6970
- ./resource/dashboards:/dashboards:ro
70-
- ./grafana_data:/var/lib/grafana
71+
- ./volumes/grafana:/var/lib/grafana
7172
environment:
7273
- GF_AUTH_ANONYMOUS_ENABLED=true
7374
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin

0 commit comments

Comments
 (0)