This is a sample repository to get nginx + php fpm running on openshift.
More information about openshift: https://openshift.redhat.com/
The .openshift/action_hooks scripts:
- build:
- Build the versions of nginx, php and nodejs that are needed
- build_*
- The functions used for checking the versions and installing
- deploy
- This will render copy the nginx and php conf files
- Copy the .bash_profile if there is none
- common
- A common include script for the action hooks (just setting some path's)
- start
- Starts Nginx and php-fpm
- stop
- Stops Nginx and php-fpm
The .openshift/tmpl templates:
Here are the templates used by the build and deploy scripts. Just customize away.
The web/ nginx web folder:
The web folder currently used. You can change this in .openshift/tmpl/nginx.conf.tmpl.
To get PHP 5.4 working at OpenShift, you have to do the following:
- Create a new Openshift "Do-It-Yourself" application
- Clone this repository
- Add a new remote "openshift" (You can find the URL to your git repository on the Openshift application page)
- Run
git push --force "openshift" master:master - SSH into your gear
- Wait for build to finish (This may take at least an hour)
- Open http://appname-namespace.rhcloud.com/ to verify
When using the action hooks within you own project by copy-paste method don't forget todo git update-index --chmod=+x -- $(git ls-files .openshift/action_hooks/*).
Currently nodejs will only be build when the version is not the same a the one installed by default, it will just create a proxy for npm so it can be used with less problems.
Thanks to the following people:
This is stuff which needs to be done right now. Feel free to do a pull request!
- Get php --with-mcrypt to compile
- Test update functionality more thoroughly
- Test with Jenkins (http://jenkins-ci.org/) builds
- Get a cup of coffee