Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boekkooi/openshift-cartridge-nginx


https://github.com/boekkooi/openshift-cartridge-nginx

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

# Openshift Nginx Cartridge
Welcome to a life where [nginx](http://nginx.org/) is possible on [openshift](https://www.openshift.com/).

This cartridge allow you to create a scalable nginx application, defaulting to using nginx version 1.9.12.
Combine this with the [boekkooi PHP cartridge](https://github.com/boekkooi/openshift-cartridge-php) and you have a scalable application using the latest versions.

Just create your app using:
```BASH
rhc create-app myapp http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-nginx
```

If you want to install a specific nginx version you can add `--env OPENSHIFT_NGINX_VERSION=` to the command.
For example to install nginx 1.8.0 you can use:
```BASH
rhc create-app myapp --env OPENSHIFT_NGINX_VERSION=1.8.0 http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-nginx
```

## Versions
Currently this cartridge has the following versions:

- 1.11.1
- 1.10.1
- 1.9.12
- 1.9.9
- 1.8.0
- 1.7.10
- 1.6.2

If you need another version you can compile it yourself and submit a PR to get it integrated.

### Compiling a new version
To compile a new version you will first need a openshift application.
```BASH
rhc create-app nginx http://cartreflect-claytondev.rhcloud.com/github/boekkooi/openshift-cartridge-nginx
```

Now clone the repository and create a `nginx` folder. Now copy the `usr/compile` directory from [this](https://github.com/boekkooi/openshift-cartridge-nginx) repository.
Now set the versions you need to compile in the `nginx/compile/versions` file. Commit and push the application repository.

SSH into you app and go to the compile folder (`cd ${OPENSHIFT_REPO_DIR}/nginx/compile`) and start compiling by running the following command:
```BASH
./all
```
Once compiling is done you can download the `nginx-{version}.tar.gz` from you application.
Place the archive into the `openshift-cartridge-nginx/usr` folder.
Last but not least edit the `openshift-cartridge-nginx/manifest.yml` and add the versions.

(Make sure you have [Git LFS](https://git-lfs.github.com/) installed.)
Now commit and push to your `openshift-cartridge-nginx` repo and create a [PR](https://github.com/boekkooi/openshift-cartridge-nginx/pulls).

To use your own fork make sure you change `LFS_ENDPOINT` in `openshift-cartridge-php/bin/setup` and use:
```BASH
rhc cartridge add -a myapp http://cartreflect-claytondev.rhcloud.com/github//openshift-cartridge-nginx
```