oxyno-zeta / s3-proxy

S3 Reverse Proxy with GET, PUT and DELETE methods and authentication (OpenID Connect and Basic Auth)
https://oxyno-zeta.github.io/s3-proxy/
Apache License 2.0
284 stars 31 forks source link

Template config with ENV variables #461

Open wstarzak opened 1 month ago

wstarzak commented 1 month ago

Hello,

Would there be any possibility of creating ENV templating that overwrites yaml variables? Like:

targets:
  main:
    bucket:
      name: XYZ

Would be able to be overwiritten by setting up: CONFIG_TARGETS_MAIN_BUCKET_NAME variable. As having several yamls where just bucket name varies is making my code messy.

Thank you!

oxyno-zeta commented 1 month ago

Hello @wstarzak ,

Thanks for your issue. For the moment, this isn't supported.

To be honest, I don't know how to do this since target names are totally dynamic.

wstarzak commented 1 month ago

I think if config is mising in yamls, and you put ENV, this should add new value to array - so at the end new dynamic target should be created

github-actions[bot] commented 2 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days