traefik-forward-auth icon indicating copy to clipboard operation
traefik-forward-auth copied to clipboard

Use docker secrets for environment variables

Open srad opened this issue 2 years ago • 2 comments

Is there a way to use docker secrets for the environment variables?

srad avatar Jan 21 '23 16:01 srad

I did the following

secrets:
  google_oauth:
    file: "./oauth/secrets/google_oauth.secret"

container:
  environment:
    - CONFIG=/config
  secrets:
    - source: google_oauth
      target: /config

google_oauth.secret:

providers.google.client-id=
providers.google.client-secret=
secret=
whitelist=
whitelist=

AnderssonPeter avatar Feb 09 '23 09:02 AnderssonPeter

It seems the whitelist is ignored so I don't know if its supported in the ini files. @thomseddon Did I configure something incorrectly or is whitelist not supported in a config file?? Edit: now it seems to work guessing I had some error in my config file

AnderssonPeter avatar Mar 09 '23 10:03 AnderssonPeter