Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM golang as build_base
- # 這裡一定得是本機資料夾
- WORKDIR /go/src/moony/unicorn-go
- FROM build_base AS server_builder
- COPY . .
- ENV GOOS=linux
- ENV GOARCH=amd64
- RUN go build -o /buildSrc -tags netgo -ldflags '-w -extldflags "-static"' .
- FROM heroku/heroku:16
- COPY --from=server_builder /buildSrc /uploadSrc
- COPY ./wait-for-it.sh /
- # ENTRYPOINT ["sh /wait-for-it.sh -t=10 mysql:3306 ","&&","/uploadSrc", "db:seed"]
- # ENTRYPOINT sleep 10 && /uploadSrc db:reset && sleep 20 && /uploadSrc db:seed && sleep 20 && /uploadSrc http:demo
- ENTRYPOINT sleep 10 && /uploadSrc db:reset && sleep 20 && /uploadSrc http:demo
- # ENTRYPOINT sh /wait-for-it.sh -t=10 mysql:3306; && /uploadSrc db:reset && sleep 20 && /uploadSrc db:seed
- # RUN ["/uploadSrc","db:seed"]
- CMD ["/uploadSrc","http:demo"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement