Skip to content

Commit

Permalink
add geth docker
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying-peng committed Oct 18, 2022
1 parent 5fe93a7 commit 576defd
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
18 changes: 18 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Geth Action'
description: 'Private chain of Ethereum for test using geth'
outputs:
rpc_url:
description: "url of JSON RPC"
value: http://localhost:8546
network_id:
description: "network id"
value: "10412"
chain_id:
description: "chain id"
value: "10412"
runs:
using: "composite"
steps:
- id: run
run: cd ${{ github.action_path }}; docker-compose up -d
shell: bash
30 changes: 30 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2022 Coinbase, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '3'

services:
geth-ethereum-mainnet:
image: ethereum/client-go:v1.10.23
environment:
- DEVMODE=true
command: [ "--dev", "--dev.period", "0",
"--http", "--http.api",
"personal,eth,net,web3,debug",
"--http.addr", "0.0.0.0",
"--datadir", "./data", "--http.vhosts=*"]
volumes:
- ".docker/geth:/root"
ports:
- "8546:8545"

0 comments on commit 576defd

Please sign in to comment.