Skip to content

Fix envsubst issues #1462

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

Merged
merged 1 commit into from
Sep 12, 2023
Merged

Fix envsubst issues #1462

merged 1 commit into from
Sep 12, 2023

Conversation

Lagoja
Copy link
Contributor

@Lagoja Lagoja commented Sep 7, 2023

Summary

Ugh.

Fixes a few envsubst related issues in the Nginx plugin:

  1. The envsubst package seemed to have a different version of envsubst than what I expected. I replaced this package with gettext to get the GNU version
  2. envsubst was replacing all the nginx variables with blanks if they weren't included in the environment, which caused Drupal and PHP related examples to stop working. This update uses gawk to get a list of all the current environment variables and pass them as arguments to envsubst, which will make envsubst skip any unset variables.
  3. Fixed Drupal and LEPP examples to use the plugin correctly

How was it tested?

Ran runtest for the examples, verified that the generated nginx.conf matched previous versions.

@Lagoja Lagoja requested a review from mikeland73 September 7, 2023 23:42
@Lagoja Lagoja merged commit 7d25f3b into main Sep 12, 2023
@Lagoja Lagoja deleted the jl/nginx-envsubst-filter branch September 12, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants