docker updates
rm makefile
This commit is contained in:
parent
90f64c2a94
commit
07614a8719
@ -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
|
||||
|
||||
|
12
Makefile
12
Makefile
@ -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
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user