Skip to content

cicsoft/php-buildpack-legacy

 
 

Repository files navigation

Deprecation Notice

This repo is no longer maintained and supported as the official PHP buildpack for Cloud Foundry.

The official one can be found here.

Cloud Foundry buildpack: PHP

A Cloud Foundry buildpack for PHP based apps.

This is based on the Heroku buildpack.

Additional documentation can be found at CloudFoundry.org.

Usage

This buildpack will be used if there is a composer.json or index.php file in the root directory of your project.

cf push my_app -b https://github.com/cloudfoundry/php-buildpack-legacy.git

Cloud Foundry Extensions - Offline Mode

The primary purpose of extending the heroku buildpack is to cache system dependencies for firewalled or other non-internet accessible environments. This is called 'offline' mode.

'offline' buildpacks can be used in any environment where you would prefer the dependencies to be cached instead of fetched from the internet.

The list of what is cached is maintained in bin/package.

Using cached system dependencies is accomplished by overriding curl during staging. See bin/compile

App Dependencies in Offline Mode

Offline mode expects each app to use composer to manage dependencies. Use composer install to vendor your dependencies into /vendor.

No Dependencies

There are three supported behaviors if the app has no dependencies:

  1. If index.php exists, the app does not need a composer.json file.

  2. The app can have an empty composer.json file:

    touch composer.json

  3. The app can explicitly disable the default Packagist repository:

    echo '{"repositories":[{"packagist":false}]}' > composer.json

Building

  1. Make sure you have fetched submodules
git submodule update --init
  1. Build the buildpack
bin/package [ online | offline ]
  1. Use in Cloud Foundry

    Upload the buildpack to your Cloud Foundry and optionally specify it by name

    cf create-buildpack custom_php_buildpack php_buildpack-offline-custom.zip 1
    cf push my_app -b custom_php_buildpack

Contributing

Run the tests

See the Machete CF buildpack test framework for more information.

Pull Requests

  1. Fork the project
  2. Submit a pull request

Reporting Issues

Open an issue on this project

Active Development

The project backlog is on Pivotal Tracker

About

Cloud Foundry buildpack for PHP, Symfony and Wordpress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 49.1%
  • PHP 48.0%
  • C 1.4%
  • HTML 0.4%
  • Shell 0.3%
  • CSS 0.3%
  • Other 0.5%