Skip to content

Heroku's Cloud Native Buildpack for PHP applications.

License

Notifications You must be signed in to change notification settings

heroku/buildpacks-php

Heroku Cloud Native Buildpack: PHP

Cloud Native Buildpacks Registry: heroku/php CI on Github Actions: heroku/php

Heroku Cloud Native Buildpack: heroku/php

heroku/php is the Heroku Cloud Native Buildpack for PHP applications. It builds PHP application source code into application images with minimal configuration.

Important

This is a Cloud Native Buildpack, and is a component of the Heroku Cloud Native Buildpacks project, which is in preview. If you are instead looking for the Heroku Classic Buildpack for PHP (for use on the Heroku platform), you may find it here.

Usage

Note

Before getting started, ensure you have the pack CLI installed. Installation instructions are available here.

To build a PHP application codebase into a production image:

$ cd ~/workdir/sample-php-app
$ pack build sample-app --builder heroku/builder:22

Then run the image:

docker run --rm -it -e "PORT=8080" -p 8080:8080 sample-app

Contributing

Issues and pull requests are welcome. See our contributing guidelines if you would like to help.