Skip to content
This repository has been archived by the owner. It is now read-only.
DISCONTINUED (see https://blog.openshift.com/migrate-to-v3-v2-eol/). OpenShift Cartridge for Nginx and PHP 7.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
env
etc
hooks
lib
metadata
template
usr
LICENSE
README.md

README.md

OpenShift Nginx PHP 7 Cartridge

Nginx 1.9 with PHP 7.0 on OpenShift.

  • Nginx: 1.11.6
  • PHP: 7.0.13
  • Composer: 1.2.4

Installation

Web Console

Run+PHP+7+on+OpenShift

Alternatively, you can use this cartridge definition on application creation page.

Command Line

rhc app create appname http://cartreflect-claytondev.rhcloud.com/github/pinodex/openshift-cartridge-nginx-php7

Updates

You can update the binaries from the cartridge without reinstalling. To check for updates, SSH to your app and run this command:

update

Make sure to have your backup just in case some things went wrong.

Composer

This cartridge supports Composer right out of the box.

To enable composer install on deploy, uncomment this line from .openshift/action_hooks/deploy:

#cd $OPENSHIFT_REPO_DIR; composer install

Configuration

Nginx

Nginx will automatically include config/nginx.d/*.conf files. .conf.erb files will be parsed and included also.

PHP-FPM

PHP-FPM will automatically load config/php.d/*.ini files. .ini.erb files will be parsed and included also.

Website

The web root directory is www/. Make changes to your website there, then commit and push.

Scripts

This cartridge comes with different scripts for easy management of your app inside SSH.

  • version - Get the version of the cartridge and the binaries.
  • service - A psuedo /usr/sbin/service to start and stop services. Example:
    • service php-fpm stop
    • service nginx stop
    • service nginx configtest
  • build_config - Parses config templates to actual config file. Can be used after editing *.erb config files.
  • update - Allows automatic update of the cartridge binaries.
    • update check - Check for updates
    • update install - Install updates
    • update rollback - Rollback to previous version after update`
You can’t perform that action at this time.