cloudfoundry / nginx-buildpack

Cloud Foundry buildpack that provides NGINX
Apache License 2.0
30 stars 66 forks source link

Problem with environment variables in nginx.conf #6

Closed fljmayer closed 6 years ago

fljmayer commented 6 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? "min_cli_version": "6.23.0", "min_recommended_cli_version": "6.23.0", "api_version": "2.98.0", cf version 6.33.1+c77e55743.2017-12-15

What version of the buildpack you are using? Nginx Buildpack version 1.0.0

If you were attempting to accomplish a task, what was it you were attempting to do? Tried to create a generic nginx.conf that does a proxy_pass depending on the environment.

We know that this works in nginx.conf:

        location /api {
            proxy_pass https://delivery-tracker-service-dev.apps-np.homedepot.com;
        }

Based on the documentation we expected this to work:

        location /api {
            proxy_pass https://delivery-tracker-service{{env "SPACE"}}.apps{{env "ZONE"}}.homedepot.com;
        }

with that in the manifest.yml:

  env:
    ZONE: -np
    SPACE: -dev

However, we just got an error message when doing a cf push:

-----> Download go 1.9.1
Failed to compile droplet: Failed to run all supply scripts: exit status 56
Exit status 223
cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/159365043

The labels on this github issue will be updated when the story is started.

fljmayer commented 6 years ago

It worked on the next day after I deleted the app from PCF.