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
I wish using the worker name in an environment variable used to configure the Nginx server. Hence I need to use the hostname of the service running my php fpm instance ...
The {{.cds.worker}} is not replaced with the worker hostname thus resulting in an error in the nginx configuration.
Edit:
I made some more tests and I found out that some variables are expanded (e.g. {{.cds.env.VAR}}). It looks like only the {{.cds.worker}} variable is not expanded or not with the expected value...
I am still investigating to find out what is happening with this variable!
Edit:
After some more investigation, I do confirm that the {{.cds.worker}} variable is not expanded in the services options!. When I dump the environment of my nginx service I got:
Note the NGINX_PHP_UPSTREAM_COMMENT comment that is not expanded... whereas the test in NGINX_PHP_UPSTREAM_HOST is the expansion of {{.cds.env.APP_ENV}}
The text was updated successfully, but these errors were encountered:
b2p-fred
changed the title
Services options : variable expansion does not work
Services options : variable expansion does not work for {{.cds.worker}}
Oct 27, 2021
When defining some options for a service, the CDS variables are not expanded. As an example:
I wish using the worker name in an environment variable used to configure the Nginx server. Hence I need to use the hostname of the service running my php fpm instance ...
The
{{.cds.worker}}
is not replaced with the worker hostname thus resulting in an error in the nginx configuration.Edit:
I made some more tests and I found out that some variables are expanded (e.g. {{.cds.env.VAR}}). It looks like only the
{{.cds.worker}}
variable is not expanded or not with the expected value...I am still investigating to find out what is happening with this variable!
Edit:
After some more investigation, I do confirm that the
{{.cds.worker}}
variable is not expanded in the services options!. When I dump the environment of my nginx service I got:Note the
NGINX_PHP_UPSTREAM_COMMENT
comment that is not expanded... whereas thetest
inNGINX_PHP_UPSTREAM_HOST
is the expansion of{{.cds.env.APP_ENV}}
The text was updated successfully, but these errors were encountered: