From 2708518798b89f91322d7af2c7aca17e4dfdb60b Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Fri, 25 Aug 2023 20:09:40 +0800 Subject: [PATCH] docker updates rm makefile --- Dockerfile | 4 ++-- Makefile | 12 ------------ docker-compose.yml | 8 +++----- startup_script.sh | 2 +- 4 files changed, 6 insertions(+), 20 deletions(-) delete mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile index 784deee..eb6708c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,12 @@ ADD . /go/src/github.com/vulcanize/eth-statediff-service #RUN git clone https://github.com/vulcanize/eth-statediff-service.git /go/src/github.com/vulcanize/eth-statediff-service WORKDIR /go/src/github.com/vulcanize/eth-statediff-service -RUN GO111MODULE=on GCO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o eth-statediff-service . +RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o eth-statediff-service . # app container FROM alpine -ARG USER="vdm" +ARG USER="vdbm" ARG CONFIG_FILE="./environments/docker.toml" ARG EXPOSE_PORT=8545 diff --git a/Makefile b/Makefile deleted file mode 100644 index 3f479b2..0000000 --- a/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -## Build docker image -.PHONY: docker-build -docker-build: - docker build -t vulcanize/eth-statediff-service . - -.PHONY: test -test: | $(GOOSE) - go test -p 1 ./pkg/... -v - -build: - go fmt ./... - go build diff --git a/docker-compose.yml b/docker-compose.yml index 74f6334..aab5569 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,21 +1,19 @@ -version: '3.2' - services: eth-statediff-service: build: context: ./ cache_from: - alpine:latest - - golang:1.16 + - golang:1.18 dockerfile: ./Dockerfile args: USER: "vdbm" - CONFIG_FILE: ./environments/example.toml + CONFIG_FILE: ./environments/docker.toml EXPOSE_PORT: 8545 environment: - VDB_COMMAND=serve volumes: - - eth-statediff-service-data:/root/.ethereum/ + - eth-statediff-service-data:/vdbm/.ethereum/ ports: - "127.0.0.1:8545:8545" diff --git a/startup_script.sh b/startup_script.sh index cfd63cc..fef6968 100755 --- a/startup_script.sh +++ b/startup_script.sh @@ -17,4 +17,4 @@ mkdir -p /app/geth-rw && \ sudo mount -t overlay overlay -o lowerdir=/app/geth-ro,upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work /app/geth-rw && \ echo "Running the statediff service" && \ -sudo ./eth-statediff-service "$VDB_COMMAND" --config=config.toml +exec sudo ./eth-statediff-service "$VDB_COMMAND" --config=config.toml