feat: add docker compose

This commit is contained in:
Moreti Georgiev 2025-03-05 00:18:17 +02:00
parent aedd76b75d
commit 536f0f5f31
No known key found for this signature in database
GPG key ID: 08C2C7BF6630F4CE
3 changed files with 23 additions and 50 deletions

View file

@ -36,5 +36,3 @@ jobs:
push: true
tags: ${{ env.REPO_URL }}/limechain/geth:latest
- name: Test Docker image
run: docker run --rm ethereum/client-go:latest version

View file

@ -1,48 +0,0 @@
name: i386 linux tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
lint:
name: Lint
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
# Cache build tools to avoid downloading them each time
- uses: actions/cache@v4
with:
path: build/cache
key: ${{ runner.os }}-build-tools-cache-${{ hashFiles('build/checksums.txt') }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.0
cache: false
- name: Run linters
run: |
go run build/ci.go lint
go run build/ci.go check_generate
go run build/ci.go check_baddeps
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24.0
cache: false
- name: Run tests
run: go test -short ./...
env:
GOOS: linux
GOARCH: 386

23
docker-compose.yml Normal file
View file

@ -0,0 +1,23 @@
version: '3.8'
services:
geth:
build:
context: .
dockerfile: Dockerfile
image: limechain-geth:latest
ports:
- "8545:8545" # JSON-RPC HTTP
- "8546:8546" # WebSocket
- "30303:30303" # P2P
- "30303:30303/udp" # P2P discovery
volumes:
- geth-data:/root/.ethereum
command: >
--dev --http --http.addr=0.0.0.0 --http.api=eth,net,web3,personal,miner,debug,txpool --http.corsdomain="*" --ws --ws.addr=0.0.0.0 --ws.api=eth,net,web3 --ws.origins="*" --allow-insecure-unlock --mine --networkid=1337
restart: unless-stopped
volumes:
geth-data: