Use a specific tag while building migration tool (#101)
This commit is contained in:
parent
b59505eab2
commit
be345e0733
@ -6,7 +6,8 @@ ADD . /go/src/github.com/vulcanize/ipld-eth-db
|
|||||||
|
|
||||||
# Build migration tool
|
# Build migration tool
|
||||||
WORKDIR /go/src/github.com/pressly
|
WORKDIR /go/src/github.com/pressly
|
||||||
RUN git clone https://github.com/pressly/goose.git
|
ARG GOOSE_VER="v3.6.1"
|
||||||
|
RUN git clone --depth 1 --branch ${GOOSE_VER} https://github.com/pressly/goose.git
|
||||||
WORKDIR /go/src/github.com/pressly/goose/cmd/goose
|
WORKDIR /go/src/github.com/pressly/goose/cmd/goose
|
||||||
RUN GCO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -tags='no_sqlite3' -o goose .
|
RUN GCO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -tags='no_sqlite3' -o goose .
|
||||||
|
|
||||||
|
8
Makefile
8
Makefile
@ -117,10 +117,10 @@ import:
|
|||||||
docker-build:
|
docker-build:
|
||||||
docker-compose -f docker-compose.test.yml build
|
docker-compose -f docker-compose.test.yml build
|
||||||
|
|
||||||
## Build docker image for migration
|
# ## Build docker image for migration
|
||||||
.PHONY: docker-concise-migration-build
|
# .PHONY: docker-concise-migration-build
|
||||||
docker-concise-migration-build:
|
# docker-concise-migration-build:
|
||||||
docker build -t vulcanize/concise-migration-build -f ./db/Dockerfile .
|
# docker build -t vulcanize/concise-migration-build -f ./db/Dockerfile .
|
||||||
|
|
||||||
.PHONY: test-migrations
|
.PHONY: test-migrations
|
||||||
test-migrations: $(GOOSE)
|
test-migrations: $(GOOSE)
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
FROM golang:1.18-alpine as builder
|
|
||||||
|
|
||||||
RUN apk --update --no-cache add make git g++ linux-headers
|
|
||||||
|
|
||||||
ADD . /go/src/github.com/vulcanize/ipld-eth-db
|
|
||||||
|
|
||||||
# Build migration tool
|
|
||||||
WORKDIR /go/src/github.com/pressly
|
|
||||||
RUN git clone https://github.com/pressly/goose.git
|
|
||||||
WORKDIR /go/src/github.com/pressly/goose/cmd/goose
|
|
||||||
RUN GCO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -tags='no_sqlite3' -o goose .
|
|
||||||
|
|
||||||
# app container
|
|
||||||
FROM alpine
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-db/scripts/startup_script.sh .
|
|
||||||
|
|
||||||
COPY --from=builder /go/src/github.com/pressly/goose/cmd/goose/goose goose
|
|
||||||
COPY --from=builder /go/src/github.com/vulcanize/ipld-eth-db/db/migrations migrations/vulcanizedb
|
|
||||||
|
|
||||||
ENTRYPOINT ["/app/startup_script.sh"]
|
|
@ -6,7 +6,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- ipld-eth-db
|
- ipld-eth-db
|
||||||
# Use an existing image
|
# Use an existing image
|
||||||
image: vulcanize/ipld-eth-db:v4.1.4-alpha
|
image: vulcanize/ipld-eth-db:v4.2.1-alpha
|
||||||
environment:
|
environment:
|
||||||
DATABASE_USER: "vdbm"
|
DATABASE_USER: "vdbm"
|
||||||
DATABASE_NAME: "vulcanize_testing"
|
DATABASE_NAME: "vulcanize_testing"
|
||||||
|
Loading…
Reference in New Issue
Block a user