Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:nginx into ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master

Proposed by Sergio Durigan Junior
Status: Merged
Merge reported by: Sergio Durigan Junior
Merged at revision: ecd80e1b67afad405afba6cadce52f42ede1626d
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:nginx
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/templates:master
Diff against target: 138 lines (+126/-0)
2 files modified
data/nginx.yaml (+45/-0)
out/nginx.md (+81/-0)
Reviewer Review Type Date Requested Status
Valentin Viennot (community) Approve
Richard Harding Pending
Lucas Kanashiro Pending
Canonical Server Pending
Review via email: mp+394273@code.launchpad.net

Description of the change

Nginx data (needed to generate the README file) and the corresponding nginx.md (generated from the data).

To post a comment you must log in.
Revision history for this message
Valentin Viennot (valentinviennot) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/data/nginx.yaml b/data/nginx.yaml
2new file mode 100644
3index 0000000..d025965
4--- /dev/null
5+++ b/data/nginx.yaml
6@@ -0,0 +1,45 @@
7+application: Nginx
8+repo: nginx
9+description: >
10+ Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. Read more on the [nginx website](https://www.nginx.com/).
11+version: 1.18.0
12+base: Ubuntu 20.04 LTS
13+architectures:
14+ - amd64
15+ - arm64
16+ - ppc64el
17+ - s390x
18+docker:
19+ parameters:
20+ - -p 8080:80
21+ access: Access your Nginx server at `http://localhost:8080`.
22+parameters:
23+ - type: -e
24+ value: TZ=UTC
25+ description: Timezone.
26+ - type: -p
27+ value: 8080:80
28+ description: Expose Nginx on `localhost:8080`.
29+ - type: -v
30+ value: /local/path/to/website:/var/www/html
31+ description: Mount and serve a local website.
32+ - type: -v
33+ value: /path/to/conf.template:/etc/nginx/templates/conf.template
34+ description: Mount template files inside `/etc/nginx/templates`. They will be processed and the results will be placed at `/etc/nginx/conf.d`. (e.g. `listen ${NGINX_PORT};` will generate `listen 80;`).
35+ - type: -v
36+ value: /path/to/nginx.conf:/etc/nginx/nginx.conf
37+ description: Local [configuration file](https://nginx.org/en/docs/) `nginx.conf` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/nginx.conf)).
38+debug:
39+ - nothing
40+microk8s:
41+ configmap:
42+ files:
43+ - key: nginx
44+ name: nginx.conf
45+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/nginx.conf
46+ - key: nginx-site
47+ name: index.html
48+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/html/index.html
49+ deploy:
50+ link: https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/nginx-deployment.yml
51+ access: You will now be able to connect to the nginx server on `http://localhost:31080`.
52diff --git a/out/nginx.md b/out/nginx.md
53new file mode 100644
54index 0000000..b21248b
55--- /dev/null
56+++ b/out/nginx.md
57@@ -0,0 +1,81 @@
58+# Nginx | Ubuntu
59+
60+
61+## About Nginx
62+
63+Nginx ("engine X") is a high-performance web and reverse proxy server created by Igor Sysoev. It can be used both as a standalone web server and as a proxy to reduce the load on back-end HTTP or mail servers. Read more on the [nginx website](https://www.nginx.com/).
64+
65+
66+## Tags and Architectures
67+
68+
69+| Tag | Currently | Architectures |
70+|---|---|---|
71+| `1.x`    ![BETA](https://assets.ubuntu.com/v1/e8ac33d1-header-beta-flag.svg) | Nginx 1.18.0 on Ubuntu 20.04 LTS | `amd64`, `arm64`, `ppc64el`, `s390x` |
72+
73+## Usage
74+
75+Launch this image locally:
76+
77+```sh
78+docker run -d --name nginx-container -e TZ=UTC -p 8080:80 ubuntu/nginx:1.x
79+```
80+
81+Access your Nginx server at `http://localhost:8080`.
82+
83+#### Parameters
84+
85+| Parameter | Description |
86+|---|---|
87+| `-e TZ=UTC` | Timezone. |
88+| `-p 8080:80` | Expose Nginx on `localhost:8080`. |
89+| `-v /local/path/to/website:/var/www/html` | Mount and serve a local website. |
90+| `-v /path/to/conf.template:/etc/nginx/templates/conf.template` | Mount template files inside `/etc/nginx/templates`. They will be processed and the results will be placed at `/etc/nginx/conf.d`. (e.g. `listen ${NGINX_PORT};` will generate `listen 80;`). |
91+| `-v /path/to/nginx.conf:/etc/nginx/nginx.conf` | Local [configuration file](https://nginx.org/en/docs/) `nginx.conf` (try [this example](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/nginx.conf)). |
92+
93+
94+#### Testing/Debugging
95+
96+To debug the container:
97+
98+```sh
99+$ docker logs -f nginx-container
100+```
101+
102+To get an interactive shell:
103+
104+```sh
105+$ docker exec -it nginx-container /bin/bash
106+```
107+
108+
109+## Deploy with Kubernetes
110+
111+
112+
113+Works with any Kubernetes; if you don't have one, we recommend you [install MicroK8s](https://microk8s.io/) and `microk8s enable dns storage` then alias `kubectl` to `microk8s.kubectl`.
114+
115+Download
116+[nginx.conf](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/nginx.conf), [index.html](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/config/html/index.html), and
117+[nginx-deployment.yml](https://git.launchpad.net/~canonical-server/ubuntu-docker-images/+git/nginx/plain/examples/nginx-deployment.yml). Then:
118+
119+```sh
120+$ kubectl create configmap nginx-config --from-file=nginx=nginx.conf --from-file=nginx-site=index.html
121+$ kubectl apply -f nginx-deployment.yml
122+```
123+
124+You will now be able to connect to the nginx server on `http://localhost:31080`.
125+
126+## Bugs and feature requests
127+
128+If you find a bug in our image or want to request a specific feature, please file a bug here:
129+
130+[https://bugs.launchpad.net/ubuntu-docker-images/+filebug](https://bugs.launchpad.net/ubuntu-docker-images/+filebug)
131+
132+Please title the bug "`nginx: <reason>`".
133+
134+Make sure to include the digest of the image you are using, from:
135+```sh
136+$ docker images --no-trunc --quiet ubuntu/nginx:<tag>
137+```
138+

Subscribers

People subscribed via source and target branches

to all changes: