Giter VIP home page Giter VIP logo

tough-rain / php-buildpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cloudfoundry-attic/php-buildpack-legacy

0.0 2.0 0.0 35.74 MB

Cloud Foundry buildpack for PHP, Symfony and Wordpress

Home Page: http://docs.cloudfoundry.org/buildpacks/

License: MIT License

Shell 0.28% Python 49.54% C 1.37% C++ 0.04% Visual Basic 0.01% PHP 48.36% CSS 0.25% Perl 0.07% JavaScript 0.07% Ruby 0.02%

php-buildpack's Introduction

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/cf-buildpack-php.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

There are Machete based integration tests available in cf_spec.

The test script is included in machete and can be run as follows:

BUNDLE_GEMFILE=cf.Gemfile bundle install
git submodule update --init
`BUNDLE_GEMFILE=cf.Gemfile bundle show machete`/scripts/buildpack-build [mode]

buildpack-build will create a buildpack in one of two modes and upload it to your local bosh-lite based Cloud Foundry installations.

Valid modes:

online : Dependencies can be fetched from the internet.

offline : System dependencies, such as python, are installed from a cache included in the buildpack.

The tests expect two Cloud Foundry installations to be present, an online one at 10.244.0.34 and an offline one at 10.245.0.34.

We use bosh-lite for the online instance and bosh-lite-2nd-instance for the offline instance.

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

php-buildpack's People

Contributors

dzuelke avatar tmaher avatar ryanbrainard avatar technomancy avatar buddhistpirate avatar fdr avatar jordinl avatar tough-rain avatar ddollar avatar mmcgrana avatar martijngastkemper avatar mdz avatar md-5 avatar ptarjan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.