Cartridge to run HHVM on OpenShift
HTML Shell PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
env
hooks
lib
metadata
usr/template
versions/shared
.gitattributes
.gitignore
LICENSE
README.md
openshift-cartridge-nginx-hhvm.spec

README.md

OpenShift HHVM Cartridge

Join the chat at https://gitter.im/tengyifei/openshift-cartridge-nginx-hhvm

Nginx 1.10.0 with HHVM 3.13.1. Built with the shiny GCC 5.2.0.

Partly based on pinodex/openshift-nginx-php-fpm.

Usage

Command line

The www root is located in www folder of your code repository, unless index.php or app.php is detected at the root folder of the repository, in which case the www root will be the root folder.

$ rhc app create appname http://cartreflect-claytondev.rhcloud.com/github/tengyifei/openshift-cartridge-nginx-hhvm
$ cd appname
$ echo '<?php echo "Hello HHVM " . HHVM_VERSION; ?>' > www/index.php
$ git add .
$ git commit -m 'Testing'
$ git push

On the Web

![NGINX+HHVM ON OpenShift](http://launch-shifter.rhcloud.com/launch/NGINX+HHVM ON.svg)

OpenShift also offers a web-based application launcher workflow. PHP project maintainers can build their own launch buttons using this cart, with launch-service

Updating Cartridge

Note: from HHVM version 3.5.0 onwards this cartridge uses INI settings instead of the deprecated HDF. You'll still have to do a manual upgrade to pick up this change.

OpenShift Online has made it next to impossible to update web cartridges unintrusively. Previous methods involved removing the cartridge (therefore the entire app!) and reinstalling it to let OpenShift grab the latest version in the repository. This cartridge now comes with a script to update HHVM and Nginx binaries without reinstalls necessary. To update your cartridge binaries, simply SSH into it and run bin/control update from shell:

rhc ssh hhvmtest
# In SSH
cd nginx-hhvm
bin/control update

HHVM

The HHVM packaged with this cartridge is built directly from the newest released version of HHVM source. Different from the official version, it comes with the experimental Zend Compatibility Layer (enabling many Zend extensions e.g. gettext, oauth) and a GeoIP plug-in.

User-defined configuration

Place your nginx .conf files inside config/nginx.d/. It will be include()ed from "http" scope.

You may edit the config.ini inside config/hhvm.d/. This configuration file will be loaded by HHVM.