heroku / buildpacks-php

Heroku's Cloud Native Buildpack for PHP applications.
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Buildpack hardcodes client_body_temp_path to a .heroku path #73

Open jose-fully-ported opened 7 months ago

jose-fully-ported commented 7 months ago

Hi! I was messing around with the CNB buildpack (to compare it with the v2a-one, featureset-wise) and it seems that building the default heroku/php-getting-started app fails with nginx.

Change the Procfile to this:

web: heroku-php-nginx web/

Then run the following in that repo:

pack build myapp:latest --path .

Finally, run the container:

docker run --rm -it myapp:latest

Here is the output:

Assuming 512MB of RAM
PHP memory_limit is 128M Bytes
Starting php-fpm with 4 workers...
Starting nginx...
nginx: [emerg] mkdir() "/app/.heroku/php/var/run/nginx/client_body_temp" failed (2: No such file or directory)
Process exited unexpectedly: nginx, shutting down...
Stopping php-fpm gracefully...
Shutdown complete.
kotapeter commented 4 months ago

Temp solution until there is no fix.

web: mkdir -p /app/.heroku/php/var/run/nginx/client_body_temp && heroku-php-nginx web/