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

Enable configuration through environment variables by disabling php-fpm/clear_env #85

Merged
merged 1 commit into from
Mar 29, 2024

Commits on Mar 29, 2024

  1. Make php-fpm forward environment variables

    By default php-fpm has `clear_env` option activated.
    
    This means that environment variables never will be passed on from the
    system environment to the actual worker process for a given request.
    
    This also means that Grocy will not be configureable via Environment
    variables. Which is very common behaviour.
    
    We can fix this by disabling the `clear_env`.
    
    You can test that it works by for example changing the currency via an
    environment variable:
    
      docker run -e GROCY_CURRENCY=NOK -p 8080:80 linuxserver/grocy:latest
    
    Then opening:
    
      http://localhost:8080/stockoverview
    
    And verifying that the app allows you to change the setting. There's
    more info on how Grocy handles configuration, here:
    
      https://github.com/grocy/grocy/blob/master/config-dist.php#L3
    benedicteb committed Mar 29, 2024
    Configuration menu
    Copy the full SHA
    b0f407b View commit details
    Browse the repository at this point in the history