devinterx/heroku-buildpack-php
Composer 安装命令:
composer require devinterx/heroku-buildpack-php
包简介
Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP/HHVM and Apache2/Nginx as on Heroku
README 文档
README
This is a Heroku buildpack for PHP applications.
It uses Composer for dependency management, supports PHP or HHVM (experimental) as runtimes, and offers a choice of Apache2 or Nginx web servers.
Usage
You'll need to use at least an empty composer.json in your application.
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
echo '{}' > composer.json
git add .
git commit -am "add composer.json for PHP app detection"
Please refer to Dev Center for further usage instructions.
Development
Compiling Binaries
The folder support/build contains Bob build scripts for all binaries and dependencies.
To get started with it, create a Python app (Bob is a Python application) on Heroku inside a clone of this repository, and set your S3 config vars:
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-python
$ heroku ps:scale web=0
$ heroku config:set WORKSPACE_DIR=/app/support/build
$ heroku config:set AWS_ACCESS_KEY_ID=<your_aws_key>
$ heroku config:set AWS_SECRET_ACCESS_KEY=<your_aws_secret>
$ heroku config:set S3_BUCKET=<your_s3_bucket_name>
$ heroku config:set S3_PREFIX=<optional_s3_subfolder_to_upload_to>
Then, shell into an instance and run a build by giving the name of the formula inside support/build:
$ heroku run bash
Running `bash` attached to terminal... up, run.6880
~ $ bob build php-5.5.11RC1
Fetching dependencies... found 2:
- libraries/zlib
- libraries/libmemcached
Building formula php-5.5.11RC1:
=== Building PHP
Fetching PHP v5.5.11RC1 source...
Compiling PHP v5.5.11RC1...
If this works, run bob deploy instead of bob build to have the result uploaded to S3 for you.
To speed things up drastically, it'll usually be a good idea to heroku run bash --size PX instead.
If the dependencies are not yet deployed, you can do so by e.g. running bob deploy libraries/zlib.
Hacking
To work on this buildpack, fork it on Github. You can then use Anvil with a local buildpack to easily iterate on changes without pushing each time.
Alternatively, you may push changes to your fork (ideally in a branch if you'd like to submit pull requests), then create a test app with heroku create --buildpack <your-github-url#branch> and push to it.
devinterx/heroku-buildpack-php 适用场景与选型建议
devinterx/heroku-buildpack-php 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 22 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「apache2」 「apache」 「nginx」 「heroku」 「hhvm」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 devinterx/heroku-buildpack-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 devinterx/heroku-buildpack-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 devinterx/heroku-buildpack-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku
Corley Maintenance Bundle
This package includes a script and fail2ban configuration that allows you to use fail2ban when utilizing AWS elastic load balancer (ELB) and an apache webserver.
Corley Maintenance Bundle
PHP library to parse Apache log files
PHP polyfill for the Apache Functions. The aim is to provides functions as the PHP way in order to get them available even if PHP is not running as an Apache module.
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-19