Added migrations

This commit is contained in:
PB
2022-12-17 06:31:35 +01:00
parent 78418b230d
commit 0a684d45f9
9 changed files with 280 additions and 37 deletions

View File

@@ -3,13 +3,15 @@ FROM golang:alpine
ARG BIN_OUTPUT=/go/bin
ARG GO_SERVER=cmd/server/main.go
ARG GO_MIGRATE=cmd/migrate/main.go
# ARG GO_WORKER=cmd/worker/main.go
WORKDIR /go/src/app
COPY src ./
RUN export CGO_ENABLED=0 ; export GOOS=linux ; export GOARCH=amd64 && \
go build -ldflags="-w -s" -o "$BIN_OUTPUT/server" $GO_SERVER
go build -ldflags="-w -s" -o "$BIN_OUTPUT/server" $GO_SERVER && \
go build -ldflags="-w -s" -o "$BIN_OUTPUT/migrate" $GO_MIGRATE
# && \
# go build -ldflags="-w -s" -o "$BIN_OUTPUT/worker" $GO_WORKER