11# Custom source-to-image builder for static nginx containers
22
33## Overview
4- This repo is source code to ` docker build` an S2I build image for an Nginx server
5- on CentOS7 .
4+ This repo is source code to build and deploy an Nginx server
5+ on OpenShift 3.3+ .
66
77Most people will just need the Basic Usage if you just want NGinx to serve
88HTML/CSS/JS/whatever from it and/or use it as a reverse or forward proxy.
@@ -13,10 +13,48 @@ serve static files.
1313
1414## Basic Usage
1515
16+ ### Step 1: Customizing your Nginx Config and Static Files
17+
18+ Create a separate Git repo or [ fork/clone our example] ( https://github.com/BCDevOps/s2i-nginx-example ) repo.
19+
20+ The directory structure should look like this:
21+
22+ ` /html/ <- your static files here or just empty `
23+
24+ ` /conf.d/ <- your custom NGinx config files `
25+
26+ ` /aux/ <- your custom auxiliary files `
27+
28+ ### Step 2: Building the S2I Image
29+
30+ In basic usage, we let OpenShift build the docker image using a template (now in the global registry!)
31+
32+ 1 . Login to OpenShift web console
33+ 1 . If following conventions, go to your "tools" project
34+ 1 . Add to Project
35+ 1 . Search for ` nginx `
36+ 1 . You should find two templates, we want the ` nginx-reverse-proxy-build `
37+ 1 . You'll need to specify the Git Repository URL, which is the repo you made in Step 1
38+ 1 . If using reverse proxy, you'll need to specify the NGinx Proxy URL
39+ 1 . Create it and let it build the image
40+
41+ ### Step 3: Deploying the Nginx Image
42+
43+ Once you've got an image built, you can deploy it to any environment you like. We've provided you with a template as well!
44+
45+ 1 . Login to OpenShift web console
46+ 1 . If following conventions, go to your "tools" project
47+ 1 . Add to Project
48+ 1 . Search for ` nginx `
49+ 1 . You should find two templates, we want the ` nginx-reverse-proxy-deployment `
50+ 1 . Configure as required and create it!
51+
52+
53+ ## Advanced Usage
54+
1655### Step 1: Building the S2I Image
1756
18- Long term, we should have this s2i image available in the global registry
19- but until then, you'll have to build this custom s2i image. Here's how:
57+ Building the image yourself, here's how:
2058
2159Required tools install:
2260
@@ -120,7 +158,7 @@ This integration with SiteMinder Web SSO only describes only integration path wi
120158Alternative options considered were: a private OpenShift Router, a OpenShift router with the ability firewall.
121159
122160
123- ## Advanced Usage
161+ ### Extra- Advanced Usage
124162
125163Don't like the static HTML folder? Want to remove or add Nginx plugins? A certbot would be handy? Just want to tinker?
126164
0 commit comments