Skip to content

Could CADDY_MERCURE_JWT_SECRET be a runtime env var? #702

Closed
@norkunas

Description

@norkunas

I build the end docker image in the github actions. It is working properly, but I was disabled mercure.
Now after enabling it, i get:

php-1  | Error: loading initial config: loading new config: loading http app module: provision http: server srv0: setting up route handlers: route 0: loading handler modules: position 0: loading module 'subroute': provision http.handlers.subroute: setting up subroutes: route 2: loading handler modules: position 1: loading module 'mercure': provision http.handlers.mercure: a JWT key or the URL of a JWK Set for publishers must be provided

But I always provide it:

SERVER_NAME=... \
CADDY_MERCURE_JWT_SECRET=... \
docker compose ... up -d

For some reason I was getting this even before enabling mercure: WARN[0000] The "CADDY_MERCURE_JWT_SECRET" variable is not set. Defaulting to a blank string.

Now I have tried to add ARG CADDY_MERCURE_JWT_SECRET and ENV CADDY_MERCURE_JWT_SECRET=$CADDY_MERCURE_JWT_SECRET to Dockerfile and then to the github action (set also the secret for repo):

          build-args: |
            CADDY_MERCURE_JWT_SECRET=${{ secrets.CADDY_MERCURE_JWT_SECRET }}

but that didn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportSupport requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions