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

Please add docker secrets feature support that loads env falues from files #956

Open
Arkemlar opened this issue Sep 30, 2024 · 0 comments
Open

Comments

@Arkemlar
Copy link

Arkemlar commented Sep 30, 2024

Before:

    mercure:
        image: dunglas/mercure
        environment:
            MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
            MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'

After:

    mercure:
        image: dunglas/mercure
        environment:
            MERCURE_PUBLISHER_JWT_KEY_FILE: /run/secrets/mercure_publisher_key
            MERCURE_SUBSCRIBER_JWT_KEY_FILE: /run/secrets/mercure_subscriber_key
        secrets:
            - source: mercure_publisher_key
            - source: mercure_subscriber_key

secrets:
    mercure_publisher_key:
        file: docker/secrets/mercure_publisher_key
    mercure_subscriber_key:
        file: docker/secrets/mercure_subscriber_key

Image requires entrypoint with file_env() function definition and execution - see example

Currently there is no entrypoint setting for the image, so no conflict arises as for now.
The problem is container doesn't contain bash so it needs more investigetion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant