mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2025-04-08 16:49:09 +02:00
This is to prevent the below error with docker-compose v1: ERROR: for nginx-proxy "host" network_mode is incompatible with port_bindings
26 lines
576 B
YAML
26 lines
576 B
YAML
services:
|
|
nginx-proxy:
|
|
image: nginxproxy/nginx-proxy:test
|
|
container_name: nginx-proxy
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
environment:
|
|
HTTP_PORT: 8888
|
|
network_mode: host
|
|
|
|
host-network-1:
|
|
image: web
|
|
environment:
|
|
WEB_PORTS: "8080"
|
|
VIRTUAL_HOST: "host-network-1.nginx-proxy.tld"
|
|
VIRTUAL_PORT: "8080"
|
|
network_mode: host
|
|
|
|
host-network-2:
|
|
image: web
|
|
environment:
|
|
WEB_PORTS: "8181"
|
|
VIRTUAL_HOST: "host-network-2.nginx-proxy.tld"
|
|
VIRTUAL_PORT: "8181"
|
|
network_mode: host
|