Skip to content

Commit

Permalink
Add build and docker compose setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Vui-Chee committed Nov 20, 2024
1 parent 2d3547a commit 7bc218c
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ build-go:
build-docker: ## Builds a docker image with the cdk binary
docker build -t cdk -f ./Dockerfile .

.PHONY: build-mock-signer
build-mock-signer-docker:
docker build --progress=plain -t xlayer-signer -f ./signer/Dockerfile .

.PHONY: build-docker-nc
build-docker-nc: ## Builds a docker image with the cdk binary - but without build cache
docker build --no-cache=true -t cdk -f ./Dockerfile .
Expand Down
45 changes: 45 additions & 0 deletions test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,48 @@ services:
- "postgres"
- "-N"
- "500"

xlayer-mock-l1-network:
container_name: xlayer-mock-l1-network
image: zjg555543/geth:fork13-v0.0.3
ports:
- 8545:8545
- 8546:8546
command:
- "--http"
- "--http.api"
- "admin,eth,debug,miner,net,txpool,personal,web3"
- "--http.addr"
- "0.0.0.0"
- "--http.corsdomain"
- "*"
- "--http.vhosts"
- "*"
- "--ws"
- "--ws.origins"
- "*"
- "--ws.addr"
- "0.0.0.0"
- "--dev"
- "--dev.period"
- "1"
- "--datadir"
- "/geth_data"
- "--syncmode"
- "full"
- "--rpc.allow-unprotected-txs"

xlayer-signer:
container_name: xlayer-signer
restart: unless-stopped
image: xlayer-signer:latest # assuming you build docker image using `make build-mock-signer-docker`
ports:
- 7001:7001
volumes:
- ../signer/signer.config.toml:/app/config.toml
- ./sequencer.keystore:/pk/sequencer.keystore
- ./aggregator.keystore:/pk/aggregator.keystore
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-signer http -cfg /app/config.toml"

0 comments on commit 7bc218c

Please sign in to comment.