-
-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
203 additions
and
27 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
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,108 @@ | ||
before: | ||
hooks: | ||
# Create a Caddy skeleton containing the module | ||
- make prepare | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
release: | ||
prerelease: auto | ||
env: | ||
- CGO_ENABLED=0 | ||
builds: | ||
- id: caddy | ||
dir: caddy/buildenv | ||
binary: mercure | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
# 32 bits architectures aren't supported by dgraph-io/badger yet: | ||
# https://github.com/dgraph-io/badger/issues/1385 | ||
#- 386 | ||
- amd64 | ||
#- arm | ||
- arm64 | ||
goarm: | ||
- 5 | ||
- 6 | ||
- 7 | ||
# Legacy build | ||
- id: legacy | ||
dir: cmd/mercure | ||
ldflags: | ||
- -s -w -X github.com/dunglas/mercure/common.version={{ .Version }} -X github.com/dunglas/mercure/common.commit={{ .ShortCommit }} -X github.com/dunglas/mercure/common.buildDate={{ .Date }} | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- 386 | ||
- amd64 | ||
- arm | ||
- arm64 | ||
archives: | ||
- builds: | ||
- caddy | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
files: | ||
- COPYRIGHT | ||
- LICENSE | ||
- README.md | ||
- public/* | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
- id: legacy | ||
builds: | ||
- legacy | ||
name_template: "{{ .ProjectName }}-legacy_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}" | ||
replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
files: | ||
- COPYRIGHT | ||
- LICENSE | ||
- README.md | ||
- public/* | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
dockers: | ||
- builds: | ||
- caddy | ||
dockerfile: Dockerfile # See https://github.com/goreleaser/goreleaser/issues/1916 | ||
image_templates: | ||
- 'dunglas/mercure:{{ .Tag }}' | ||
- 'dunglas/mercure:v{{ .Major }}' | ||
- 'dunglas/mercure:v{{ .Major }}.{{ .Minor }}' | ||
- 'dunglas/mercure:latest' | ||
extra_files: | ||
- public/ | ||
- Caddyfile | ||
- builds: | ||
- legacy | ||
dockerfile: Dockerfile.legacy | ||
image_templates: | ||
- 'dunglas/mercure:legacy-{{ .Tag }}' | ||
- 'dunglas/mercure:legacy-v{{ .Major }}' | ||
- 'dunglas/mercure:legacy-v{{ .Major }}.{{ .Minor }}' | ||
- 'dunglas/mercure:legacy-latest' | ||
extra_files: | ||
- public/ |
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,30 @@ | ||
{ | ||
# Debug mode (disable it in production!) | ||
debug | ||
# HTTP/3 support | ||
experimental_http3 | ||
} | ||
|
||
:80 | ||
|
||
log | ||
|
||
route { | ||
redir / /.well-known/mercure/ui/ | ||
encode gzip | ||
|
||
mercure { | ||
# Enable the demo endpoint (disable it in production!) | ||
demo | ||
# Publisher JWT key | ||
publisher_jwt !ChangeMe! | ||
# Subscriber JWT key | ||
subscriber_jwt !ChangeMe! | ||
# Allow anonymous subscribers (double-check that it's what you want) | ||
anonymous | ||
# Enable the subscription API (double-check that it's what you want) | ||
subscriptions | ||
} | ||
|
||
respond "Not Found" 404 | ||
} |
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,4 @@ | ||
FROM caddy:2-alpine | ||
COPY mercure /usr/bin/caddy | ||
COPY Caddyfile /etc/caddy/Caddyfile | ||
COPY public public/ |
File renamed without changes.
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,12 @@ | ||
.PHONY: build | ||
build: | ||
goreleaser --snapshot --rm-dist | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -Rf dist caddy/buildenv* | ||
|
||
.PHONY: prepare | ||
prepare: clean | ||
cd caddy && XCADDY_SKIP_CLEANUP=1 xcaddy build --with github.com/dunglas/mercure=../../ --with github.com/dunglas/mercure/caddy=../ | ||
mv caddy/buildenv_* caddy/buildenv |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.