Add 'Non-Docker Host' section to README
This commit is contained in:
parent
4fe821db4d
commit
409f524558
1 changed files with 16 additions and 0 deletions
16
README.md
16
README.md
|
|
@ -144,6 +144,22 @@ To set the default host for nginx use the env var `DEFAULT_HOST=foo.bar.com` for
|
|||
$ docker run -d -p 80:80 -e DEFAULT_HOST=foo.bar.com -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
|
||||
|
||||
|
||||
### Non-Docker Host
|
||||
|
||||
If you want to proxy a web server that is not a docker conatiner but still want the benefit of [jwilder/docker-gen](https://index.docker.io/u/jwilder/docker-gen/) and [letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion) you can use a dummy container that just provideds the necessary upstream address to generate the nginx config.
|
||||
|
||||
Start a [dummy container](https://hub.docker.com/r/cwempe/docker-dummy/) and define `VIRTUAL_HOST`, `UPSTREAM_NAME` (and `VIRTUAL_PORT` if the port is not 80) with the address of your web server.
|
||||
Make sure nginx is able to connect to the web server.
|
||||
|
||||
```console
|
||||
$ docker run -d \
|
||||
-e VIRTUAL_HOST=foo.bar.com \
|
||||
-e VIRTUAL_PORT=8080 \
|
||||
-e UPSTREAM_NAME=webserver.local \
|
||||
--rm \
|
||||
cwempe/docker-dummy:latest
|
||||
```
|
||||
|
||||
### Separate Containers
|
||||
|
||||
nginx-proxy can also be run as two separate containers using the [jwilder/docker-gen](https://index.docker.io/u/jwilder/docker-gen/)
|
||||
|
|
|
|||
Loading…
Reference in a new issue