My problem is similar to this one, which is apparently unsolved to this day :/ I was following this tutorial to setup my Theia IDE, the IDE is working but I want my 8080 port to be open for testing out the node.js backend I host on the Theia IDE using the terminal. Here are my docker-compose files I used for setting up the open ports and etc:
version: '2.2'
services:
eclipse-theia:
restart: always
image: theiaide/theia:latest
init: true
environment:
- VIRTUAL_HOST=mydomainhere.com
- LETSENCRYPT_HOST=mydomainhere.com
version: '2'
services:
nginx-proxy:
restart: always
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "/etc/nginx/htpasswd:/etc/nginx/htpasswd"
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/etc/nginx/certs"
letsencrypt-nginx-proxy-companion:
restart: always
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
volumes_from:
- "nginx-proxy"
If I add expose: - "8080"
to the eclipse-theia docker-compose file I get a 502 error returned...
So that's not the way to go I guess. I also tried running netcat to check whether the port 8080 was open and it was.
UPDATE
I get the following error in the logs when I get the 502 error:
[error] 136#136: *21 no live upstreams while connecting to upstream
If I add ports: - "8080"
instead I get a HSTS error..
UPDATE 2
I tried the following config following the advice from the answer below:
version: '2.2'
services:
eclipse-theia:
restart: always
image: theiaide/theia:latest
init: true
environment:
- VIRTUAL_HOST=mysubdomain1.domain.com,mysubdomain2.domain.com
- VIRTUAL_PORT=80,8080
- LETSENCRYPT_HOST=mysubdomain1.domain.com,mysubdomain2.domain.com
- LETSENCRYPT_EMAIL=mymail@domain.com
But this appears to not work either, Port 8080 seems to simply not work. I also tried specifying port 8080
on the nginx-proxy config, it does not work :/