承接 heroku/heroku-buildpack-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

heroku/heroku-buildpack-php

Composer 安装命令:

composer require heroku/heroku-buildpack-php

包简介

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

README 文档

README

php

This is the official Heroku buildpack for PHP applications.

It uses Composer for dependency management, supports all recent versions of PHP 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.

$ echo '{}' > composer.json
$ git add composer.json
$ git commit -m "add composer.json for PHP app detection"

If you also have files from other frameworks or languages that could trigger another buildpack to detect your application as one of its own, e.g. a package.json which might cause your code to be detected as a Node.js application even if it is a PHP application, then you need to manually set your application to use this buildpack:

$ heroku buildpacks:set heroku/php

This will use the officially published version. To use the default branch from GitHub instead:

$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-php

Please refer to Dev Center for further usage instructions.

Custom Platform Repositories

The buildpack uses Composer repositories to resolve platform (php, ext-something, ...) dependencies.

To use a custom Composer repository with additional or different platform packages, add the URL to its packages.json to the HEROKU_PHP_PLATFORM_REPOSITORIES config var:

$ heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://<your-bucket-name>.s3.<your-bucket-region>.amazonaws.com/heroku-24-amd64/packages.json"

To allow the use of multiple custom repositories, the config var may hold a list of multiple repository URLs, separated by a space character, in ascending order of precedence (meaning the last repository listed is handled first by Composer for package lookups).

Please note that Heroku cannot provide support for issues related to custom platform repositories and packages.

Disabling the Default Repository

If the first entry in the list is "-" instead of a URL, the default platform repository is disabled entirely. This can be useful when testing development repositories, or to forcefully prevent the use of any packages from the default platform repository.

Repository Priorities

It is possible to control Composer Repository Priorities for custom platform repositories: whether Composer should

  • treat a given repository as canonical;
  • exclude specific packages from a repository;
  • only allow specific packages from a repository.

These repository options (canonical, exclude and only) are controlled using the following query strings in the repository URL:

  • composer-repository-canonical (true or false; defaults to true)
  • composer-repository-exclude (comma-separated list of excluded package names)
  • composer-repository-only (comma-separated list of allowed package names)

For example, the following config var will allow only packages ext-igbinary and ext-redis from customrepo.com; all other packages are looked up in the default repository:

$ heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://customrepo.com/packages.json?composer-repository-only=ext-igbinary,ext-redis"

Building Custom Repositories

For instructions on how to build custom platform packages (and a repository to hold them), please refer to the instructions further below.

Development

The following information only applies if you're forking and hacking on this buildpack for your own purposes.

Custom Platform Packages and Repositories

Please refer to the README in support/build/ for instructions.

heroku/heroku-buildpack-php 适用场景与选型建议

heroku/heroku-buildpack-php 是一款 基于 Shell 开发的 Composer 扩展包,目前已累计 1.42M 次下载、GitHub Stars 达 814, 最近一次更新时间为 2014 年 03 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「apache2」 「apache」 「nginx」 「heroku」 「foreman」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 heroku/heroku-buildpack-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 heroku/heroku-buildpack-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 heroku/heroku-buildpack-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.42M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 816
  • 点击次数: 26
  • 依赖项目数: 17
  • 推荐数: 1

GitHub 信息

  • Stars: 814
  • Watchers: 121
  • Forks: 1555
  • 开发语言: Shell

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-03-24