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

Environment variables ignored #10425

Closed
amzon-ex opened this issue Nov 8, 2022 · 2 comments
Closed

Environment variables ignored #10425

amzon-ex opened this issue Nov 8, 2022 · 2 comments

Comments

@amzon-ex
Copy link

amzon-ex commented Nov 8, 2022

What version of Hugo are you using (hugo version)?

0.105.0 (latest)

When I use the (cross-platform) binary in hugo_extended_0.105.0_linux-amd64.tar.gz, it doesn't seem to accept environment variables of the form HUGO_BIND=0.0.0.0. It does however accept variables like HUGO_ENV=production. Why is this the case?

@jmooring
Copy link
Member

jmooring commented Jul 24, 2023

There is not a 1:1:1 relationship between CLI flags, configuration settings, and environment variables.

I think you can use an environment variable to set every configuration value, but the inverse is not true. For example, you can not use a configuration setting to define HUGO_NUMWORKERMULTIPLIER or DART_SASS_BINARY.

With all the work bep did for v0.112.0, I think we have a pretty good handle on the API from the standpoint of CLI flags and configuration settings.

What we do not have is a list of the available environment variables.

Having said all that:

  1. I'd like to be able to use HUGO_SERVERPORT and HUGO_SERVERINTERFACE instead of specifying the --port and --bind flags on the command line. I'll create a separate issue.
  2. We need to document the env vars somewhere. I'll create an issue in the docs repository.

See:

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants