Problem from nginx-proxy/nginx-proxy#59, you cannot setup multiple backend for one container.
The solution here, is to use socat as an HTTP proxy.
My use case is "I setup a Apache Spark cluster, I want to access to web UI of master and worker".
Problem from nginx-proxy/nginx-proxy#59, you cannot setup multiple backend for one container.
The solution here, is to use socat as an HTTP proxy.
My use case is "I setup a Apache Spark cluster, I want to access to web UI of master and worker".
version: "2" | |
services: | |
front: | |
image: jwilder/nginx-proxy | |
ports: | |
- 80:80 | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
spark-master: | |
image: qwant/djobi-spark | |
build: devops/services/spark | |
environment: | |
SPARK_MASTER_IP: "spark-master" | |
DJOBI_ROOT_PATH: "/opt/qwant/djobi" | |
VIRTUAL_HOST: "spark.*" | |
VIRTUAL_PORT: "8080" | |
volumes: | |
- .:/opt/qwant/djobi | |
- ./devops/users/hdfs/.ssh:/home/hdfs/.ssh:ro | |
spark-worker-proxy: | |
image: alpine/socat | |
command: "TCP-LISTEN:80,reuseaddr,fork,su=nobody TCP:spark-master:8081 " | |
environment: | |
VIRTUAL_HOST: "spark-worker.*" | |
VIRTUAL_PORT: "80" |