Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #31, #32 #36

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
FROM golang:latest as builder
FROM golang:1.13-alpine as builder
COPY ./ /go/src/github.com/PasteUs/PasteMeGoBackend
ENV GOPROXY=https://goproxy.io \
GO111MODULE=on
WORKDIR /go/src/github.com/PasteUs/PasteMeGoBackend
RUN bash dep.sh
RUN CGO_ENABLED=0 GOOS=linux go build main.go

FROM alpine:latest
FROM alpine:3
LABEL maintainer="Lucien Shui" \
email="[email protected]"
WORKDIR /root/
COPY --from=builder /go/src/github.com/PasteUs/PasteMeGoBackend/main ./app
ENV PASTEMED_DB_USERNAME=username \
PASTEMED_DB_PASSWORD=password \
PASTEMED_DB_SERVER=pasteme-mysql \
PASTEMED_DB_PORT=3306 \
PASTEMED_DB_DATABASE=pasteme
CMD ["./app"]
RUN echo '{"address":"0.0.0.0","port":8000,"debug":false,"database":{"type":"mysql","username":"username","password":"password","server":"pasteme-mysql","port":3306,"database":"pasteme"}}' > /config.json
CMD ["./app -c /config.json"]