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

[Enhancement] Using environment variables for config #1195

Open
ToshY opened this issue Dec 27, 2024 · 0 comments
Open

[Enhancement] Using environment variables for config #1195

ToshY opened this issue Dec 27, 2024 · 0 comments

Comments

@ToshY
Copy link

ToshY commented Dec 27, 2024

Current situation

I'm trying to use Warpgate with Docker, and I notice that I'm missing a setup where I can spin-up a container, without existing config yet, and have a working Warpgate instance. It currently requires to either supply a config file, use setup, or use unattended-setup, all of which require an initial docker compose run before having a running Warpgate instance.

I would love to just be able to execute a single docker run or docker compose up command while supplying environment variables and let Warpgate figure out that it needs to create a config with the given values, or use an existing one.

Another alternative is allow the config to have environment variables, so Warpgate can interpret the given values. Currently the config would contain sensitive secrets , which is a big reason for me not using it (I rather avoid having hardcoded secret values in config files). Allowing environment variables in the config would already make it a lot more flexible (and safer to share through version control), so I wouldn't mind having to create a config just once if Warpgate will able to interpret the environment variables in the config.

Example:

/data/warpgate.yaml

external_host: ${EXTERNAL_HOST}
sso_providers:
- name: ${SSO_PROVIDERS_ACME_NAME}
  label: ${SSO_PROVIDERS_ACME_LABEL}
  provider:
    type: ${SSO_PROVIDERS_ACME_PROVIDER_TYPE}
    client_id: ${SSO_PROVIDERS_ACME_PROVIDER_CLIENT_ID}
    client_secret: ${SSO_PROVIDERS_ACME_PROVIDER_CLIENT_SECRET}
    issuer_url: ${SSO_PROVIDERS_ACME_PROVIDER_ISSUER_URL}
    scopes: [${SSO_PROVIDERS_ACME_PROVIDER_ISSUER_SCOPES}]
recordings:
  enable: ${RECORDINGS_ENABLE}
  path: ${RECORDINGS_PATH}
database_url: ${DATABASE_URL}
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