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
10 changed files
with
131 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,6 +97,7 @@ dockers: | |
extra_files: | ||
- public/ | ||
- Caddyfile | ||
- Caddyfile.dev | ||
- binaries: | ||
- mercure | ||
builds: | ||
|
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,34 @@ | ||
# Learn how to configure the Mercure.rocks Hub on https://mercure.rocks/docs/hub/config | ||
{ | ||
# Debug mode (disable it in production!) | ||
{$DEBUG:debug} | ||
# HTTP/3 support | ||
experimental_http3 | ||
} | ||
|
||
{$SERVER_NAME:localhost} | ||
|
||
log | ||
|
||
route { | ||
redir / /.well-known/mercure/ui/ | ||
encode zstd gzip | ||
|
||
mercure { | ||
# Transport to use (default to Bolt) | ||
{$MERCURE_TRANSPORT_URL:bolt://mercure.db} | ||
# Publisher JWT key | ||
publisher_jwt {$MERCURE_PUBLISHER_JWT_KEY:!ChangeMe!} {$MERCURE_PUBLISHER_JWT_ALG:HS256} | ||
# Subscriber JWT key | ||
subscriber_jwt {$MERCURE_SUBSCRIBER_JWT_KEY:!ChangeMe!} {$MERCURE_SUBSCRIBER_JWT_ALG:HS256} | ||
# Permissive configuration for the development environment | ||
cors_origins * | ||
demo | ||
anonymous | ||
subscriptions | ||
# Extra directives | ||
{$MERCURE_EXTRA_DIRECTIVES} | ||
} | ||
|
||
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 |
---|---|---|
@@ -1,5 +1,8 @@ | ||
FROM caddy:2-alpine | ||
|
||
ENV MERCURE_TRANSPORT_URL=bolt:///data/mercure.db | ||
|
||
COPY mercure /usr/bin/caddy | ||
COPY Caddyfile /etc/caddy/Caddyfile | ||
RUN sed -i 's/#transport_url/transport_url/' /etc/caddy/Caddyfile | ||
COPY Caddyfile.dev /etc/caddy/Caddyfile.dev | ||
COPY public 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
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
Oops, something went wrong.