Aggiorna README.md
Some checks are pending
Update Docker Hub Description / Update Docker Hub Description (push) Waiting to run
Some checks are pending
Update Docker Hub Description / Update Docker Hub Description (push) Waiting to run
This commit is contained in:
parent
1da623019f
commit
23d56b2185
1 changed files with 15 additions and 2 deletions
17
README.md
17
README.md
|
@ -20,7 +20,16 @@ docker run --detach \
|
|||
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
|
||||
nginxproxy/nginx-proxy:1.6
|
||||
```
|
||||
|
||||
```docker-compose
|
||||
services:
|
||||
nginx-proxy:
|
||||
image: nginxproxy/nginx-proxy
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock"
|
||||
```
|
||||
Then start any containers (here an nginx container) you want proxied with an env var `VIRTUAL_HOST=subdomain.yourdomain.com`
|
||||
|
||||
```console
|
||||
|
@ -29,7 +38,11 @@ docker run --detach \
|
|||
--env VIRTUAL_HOST=foo.bar.com \
|
||||
nginx
|
||||
```
|
||||
|
||||
```docker-compose
|
||||
environment:
|
||||
- VIRTUAL_HOST=git.patachina.casacam.net
|
||||
- VIRTUAL_PORT=3000
|
||||
```
|
||||
Provided your DNS is setup to resolve `foo.bar.com` to the host running nginx-proxy, a request to `http://foo.bar.com` will then be routed to a container with the `VIRTUAL_HOST` env var set to `foo.bar.com` (in this case, the **your-proxied-app** container).
|
||||
|
||||
The containers being proxied must :
|
||||
|
|
Loading…
Reference in a new issue