Skip to content

Instantly share code, notes, and snippets.

@nflaig
Last active March 26, 2023 11:48
Show Gist options
  • Save nflaig/944acdf4e40fd6e34d9eb06a97d95ca1 to your computer and use it in GitHub Desktop.
Save nflaig/944acdf4e40fd6e34d9eb06a97d95ca1 to your computer and use it in GitHub Desktop.
docker-compose.yml for comprehensive guide v3
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 40c5d9c8ad..c5366bd908 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -2,38 +2,49 @@ version: "3.4"
services:
geth_docker:
image: ethereum/client-go:stable
- restart: always
+ restart: unless-stopped
volumes:
- geth_docker:/data
- "./jwtsecret:/data/jwtsecret"
+ ports:
+ - 30303:30303/tcp
+ - 30303:30303/udp
command: --mainnet --datadir /data --authrpc.jwtsecret /data/jwtsecret --http --http.corsdomain "*" --authrpc.vhosts "*" --authrpc.addr 0.0.0.0 --authrpc.vhosts "*" --authrpc.port=8551
- network_mode: host
- container_name: geth_docker
beacon_node:
image: chainsafe/lodestar:latest
- restart: always
+ restart: unless-stopped
volumes:
- beacon_node:/data
- logs:/logs
- "./jwtsecret:/jwtsecret"
+ ports:
+ - 9000:9000/tcp
+ - 9000:9000/udp
env_file: .env
- network_mode: host
- command: beacon --dataDir /data --rest --execution.urls http://127.0.0.1:8551 --rest.address 0.0.0.0 --rest.namespace '*' --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 --jwt-secret /jwtsecret
+ command: beacon --dataDir /data --rest --execution.urls http://geth_docker:8551 --rest.address 0.0.0.0 --rest.namespace '*' --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 --jwt-secret /jwtsecret
environment:
NODE_OPTIONS: --max-old-space-size=4096
prometheus:
image: chainsafe/lodestar-prometheus:next
- restart: always
- network_mode: host
+ restart: unless-stopped
+ volumes:
+ - prometheus:/prometheus
+ ports:
+ - 9090:9090
grafana:
image: chainsafe/lodestar-grafana:next
- restart: always
- network_mode: host
+ restart: unless-stopped
+ volumes:
+ - grafana:/var/lib/grafana
+ ports:
+ - 3000:3000
volumes:
geth_docker:
beacon_node:
logs:
+ prometheus:
+ grafana:
version: "3.4"
services:
geth_docker:
image: ethereum/client-go:stable
restart: unless-stopped
volumes:
- geth_docker:/data
- "./jwtsecret:/data/jwtsecret"
ports:
- 30303:30303/tcp
- 30303:30303/udp
command: --mainnet --datadir /data --authrpc.jwtsecret /data/jwtsecret --http --http.corsdomain "*" --authrpc.vhosts "*" --authrpc.addr 0.0.0.0 --authrpc.vhosts "*" --authrpc.port=8551
beacon_node:
image: chainsafe/lodestar:latest
restart: unless-stopped
volumes:
- beacon_node:/data
- logs:/logs
- "./jwtsecret:/jwtsecret"
ports:
- 9000:9000/tcp
- 9000:9000/udp
env_file: .env
command: beacon --dataDir /data --rest --execution.urls http://geth_docker:8551 --rest.address 0.0.0.0 --rest.namespace '*' --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 --jwt-secret /jwtsecret
environment:
NODE_OPTIONS: --max-old-space-size=4096
prometheus:
image: chainsafe/lodestar-prometheus:next
restart: unless-stopped
volumes:
- prometheus:/prometheus
ports:
- 9090:9090
grafana:
image: chainsafe/lodestar-grafana:next
restart: unless-stopped
volumes:
- grafana:/var/lib/grafana
ports:
- 3000:3000
volumes:
geth_docker:
beacon_node:
logs:
prometheus:
grafana:
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 40c5d9c8ad..f7f948d5fc 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -2,17 +2,16 @@ version: "3.4"
services:
geth_docker:
image: ethereum/client-go:stable
- restart: always
+ restart: unless-stopped
volumes:
- geth_docker:/data
- "./jwtsecret:/data/jwtsecret"
command: --mainnet --datadir /data --authrpc.jwtsecret /data/jwtsecret --http --http.corsdomain "*" --authrpc.vhosts "*" --authrpc.addr 0.0.0.0 --authrpc.vhosts "*" --authrpc.port=8551
network_mode: host
- container_name: geth_docker
beacon_node:
image: chainsafe/lodestar:latest
- restart: always
+ restart: unless-stopped
volumes:
- beacon_node:/data
- logs:/logs
@@ -25,15 +24,26 @@ services:
prometheus:
image: chainsafe/lodestar-prometheus:next
- restart: always
+ restart: unless-stopped
+ volumes:
+ - prometheus:/prometheus
+ environment:
+ BEACON_URL: localhost:8008
+ VC_URL: localhost:5064
network_mode: host
grafana:
image: chainsafe/lodestar-grafana:next
- restart: always
+ restart: unless-stopped
+ volumes:
+ - grafana:/var/lib/grafana
+ environment:
+ PROMETHEUS_URL: http://localhost:9090
network_mode: host
volumes:
geth_docker:
beacon_node:
logs:
+ prometheus:
+ grafana:
version: "3.4"
services:
geth_docker:
image: ethereum/client-go:stable
restart: unless-stopped
volumes:
- geth_docker:/data
- "./jwtsecret:/data/jwtsecret"
command: --mainnet --datadir /data --authrpc.jwtsecret /data/jwtsecret --http --http.corsdomain "*" --authrpc.vhosts "*" --authrpc.addr 0.0.0.0 --authrpc.vhosts "*" --authrpc.port=8551
network_mode: host
beacon_node:
image: chainsafe/lodestar:latest
restart: unless-stopped
volumes:
- beacon_node:/data
- logs:/logs
- "./jwtsecret:/jwtsecret"
env_file: .env
network_mode: host
command: beacon --dataDir /data --rest --execution.urls http://127.0.0.1:8551 --rest.address 0.0.0.0 --rest.namespace '*' --metrics --logFile /logs/beacon.log --logFileLevel debug --logFileDailyRotate 5 --jwt-secret /jwtsecret
environment:
NODE_OPTIONS: --max-old-space-size=4096
prometheus:
image: chainsafe/lodestar-prometheus:next
restart: unless-stopped
volumes:
- prometheus:/prometheus
environment:
BEACON_URL: localhost:8008
VC_URL: localhost:5064
network_mode: host
grafana:
image: chainsafe/lodestar-grafana:next
restart: unless-stopped
volumes:
- grafana:/var/lib/grafana
environment:
PROMETHEUS_URL: http://localhost:9090
network_mode: host
volumes:
geth_docker:
beacon_node:
logs:
prometheus:
grafana:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment