You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
NGINX does not support using environment variables in it's configuration
file, which makes it difficult for our plugin to configure NGINX to run
in a local devbox shell.
This update to the NGINX plugin installs envsubst, and then uses it to
generate a valid `nginx.conf` from an `nginx.template` file. Developers
can further customize their nginx.conf by adding environment variables
to the `nginx.template` file.
Envsubst will generate the nginx.conf whenever `devbox services up` or
`devbox service start` is run.
## How was it tested?
Using the nginx example:
1. Change the NGINX_WEB_PORT variable
2. Run `devbox services up`
3. NGINX should generate a valid nginx.conf in the `devbox.d/nginx`
folder, and run on the NGINX_WEB_PORT
Copy file name to clipboardExpand all lines: plugins/nginx.json
+10-4Lines changed: 10 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,21 @@
1
1
{
2
2
"name": "nginx",
3
-
"version": "0.0.2",
4
-
"readme": "nginx can be configured with env variables\n\nTo customize:\n* Use $NGINX_CONFDIR to change the configuration directory\n* Use $NGINX_LOGDIR to change the log directory\n* Use $NGINX_PIDDIR to change the pid directory\n* Use $NGINX_RUNDIR to change the run directory\n* Use $NGINX_SITESDIR to change the sites directory\n* Use $NGINX_TMPDIR to change the tmp directory. Use $NGINX_USER to change the user\n* Use $NGINX_GROUP to customize.",
3
+
"version": "0.0.3",
4
+
"readme": "nginx can be configured with env variables\n\nTo customize:\n* Use $NGINX_CONFDIR to change the configuration directory\n* Use $NGINX_TMPDIR to change the tmp directory. Use $NGINX_USER to change the user\n* Use $NGINX_WEB_PORT to change the port NGINX runs on. \n Note: This plugin uses envsubst when running `devbox services` to generate the nginx.conf file from the nginx.template file. To customize the nginx.conf file, edit the nginx.template file.\n",
0 commit comments