1
1
# Custom source-to-image builder for static nginx containers
2
2
3
3
## 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+ .
6
6
7
7
Most people will just need the Basic Usage if you just want NGinx to serve
8
8
HTML/CSS/JS/whatever from it and/or use it as a reverse or forward proxy.
@@ -13,10 +13,48 @@ serve static files.
13
13
14
14
## Basic Usage
15
15
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
+
16
55
### Step 1: Building the S2I Image
17
56
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:
20
58
21
59
Required tools install:
22
60
@@ -120,7 +158,7 @@ This integration with SiteMinder Web SSO only describes only integration path wi
120
158
Alternative options considered were: a private OpenShift Router, a OpenShift router with the ability firewall.
121
159
122
160
123
- ## Advanced Usage
161
+ ### Extra- Advanced Usage
124
162
125
163
Don't like the static HTML folder? Want to remove or add Nginx plugins? A certbot would be handy? Just want to tinker?
126
164
0 commit comments