Issue Parsing Environment Variables in Config File #104

Closed
opened 2025-12-29 09:23:10 +01:00 by adam · 1 comment
Owner

Originally created by @jakes44 on GitHub (Sep 9, 2025).

I was trying to pass in my porkbun api credentials to the config.yml file as environment variables, but i kept getting invalid API key, and eventually had to copy them in directly surrounded by quotes.

I.e. This does not work

autocert:
  provider: porkbun
  email: my_email@gmail.com
  domains:
    - "*.int.my_domain.com"
  options:
    api_key: $MY_API_KEY
    secret_api_key: MY_SECRET_KEY

but this does

autocert:
  provider: porkbun
  email: my_email@gmail.com
  domains:
    - "*.int.my_domain.com"
  options:
    api_key: "api_key_string"
    secret_api_key: "api_secret_key_string"

Something I'm missing here? I'd like to keep my porkbun API secrets out of version control (where I manage my stacks) if possible.

Originally created by @jakes44 on GitHub (Sep 9, 2025). I was trying to pass in my porkbun api credentials to the `config.yml` file as environment variables, but i kept getting invalid API key, and eventually had to copy them in directly surrounded by quotes. I.e. This does not work ``` autocert: provider: porkbun email: my_email@gmail.com domains: - "*.int.my_domain.com" options: api_key: $MY_API_KEY secret_api_key: MY_SECRET_KEY ``` but this does ``` autocert: provider: porkbun email: my_email@gmail.com domains: - "*.int.my_domain.com" options: api_key: "api_key_string" secret_api_key: "api_secret_key_string" ``` Something I'm missing here? I'd like to keep my porkbun API secrets out of version control (where I manage my stacks) if possible.
adam closed this issue 2025-12-29 09:23:10 +01:00
Author
Owner

@yusing commented on GitHub (Sep 9, 2025):

Just added ${VAR_NAME} support (brackets required) in config.yml in bab9471, please pull the image again.

@yusing commented on GitHub (Sep 9, 2025): Just added `${VAR_NAME}` support **(brackets required)** in `config.yml` in bab9471, please pull the image again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/godoxy#104