forked from dunglas/mercure
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dunglas#209 from dunglas/docker
Fix Docker image
- Loading branch information
Showing
3 changed files
with
13 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,5 @@ | ||
# First stage: build the app | ||
FROM golang:1 as build | ||
|
||
ENV GO111MODULE on | ||
WORKDIR /go/src/app | ||
|
||
# Copy go mod and sum files | ||
COPY go.mod go.sum ./ | ||
|
||
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed | ||
RUN go mod download | ||
|
||
COPY ./ . | ||
|
||
RUN go get -v | ||
RUN CGO_ENABLED=0 GOOS=linux go build -v -a -ldflags '-extldflags "-static"' . | ||
RUN chmod +x ./mercure | ||
|
||
# Build the actual image | ||
FROM scratch | ||
COPY --from=build /go/src/app/mercure . | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
COPY public ./public/ | ||
CMD ["./mercure"] | ||
FROM gcr.io/distroless/static | ||
COPY mercure / | ||
COPY public /public/ | ||
CMD ["/mercure"] | ||
EXPOSE 80 443 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Upgrade | ||
|
||
## 0.8 | ||
|
||
* According to the new version of the spec, the URL of the Hub changed moved from `/hub` to `/.well-known/mercure` | ||
* `HISTORY_CLEANUP_FREQUENCY` and `DB_PATH` environment variables have been replaced by the new `TRANSPORT_URL` environment variable | ||
* Lists in `ACME_HOSTS`, `CORS_ALLOWED_ORIGINS`, `PUBLISH_ALLOWED_ORIGINS` must now be space separated | ||
* The public API of the Go library has been totally revamped |