https-portal icon indicating copy to clipboard operation
https-portal copied to clipboard

Multiple Apps support

Open DilLip-Chowdary-Codes opened this issue 2 years ago • 3 comments

@SteveLTN

Can we add more containers in the same host, something like modifying the ports (9443 instead of 443, 9080 instead of 80)

Like below:

Default Container:

version: '3'

services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
     - '80:80'
     - '443:443'
    environment:
      DOMAINS: 'test.domain.in -> 10.20.3.1:8111'
      STAGE: 'staging' # Don't use production until staging works
      WEBSOCKET: 'true'
    volumes:
      - https-portal-data:/var/lib/https-portal

volumes:
    https-portal-data: {}# Recommended, to avoid re-signing when upgrading HTTPS-PORTAL

Additional Container:

version: '3'

services:
  https-portal:
    image: steveltn/https-portal:1
    ports:
     - '9080:80'
     - '9443:443'
    environment:
      DOMAINS: 'test.domain.in -> 10.20.3.1:8222'
      STAGE: 'staging' # Don't use production until staging works
      WEBSOCKET: 'true'
    volumes:
      - https-portal-data:/var/lib/https-portal

volumes:
    https-portal-data: {}# Recommended, to avoid re-signing when upgrading HTTPS-PORTAL

is this ok, or we will face any issues in the future while updating the certs, etc?

DilLip-Chowdary-Codes avatar Feb 23 '23 10:02 DilLip-Chowdary-Codes

Hey, where you able to solve this issue? I'm facing the same and didn't realize how to use https-portal for several containers, even using reverse-proxy it's failing.

Any hint? Thanks in advance.

oscarmoraog avatar Mar 10 '24 04:03 oscarmoraog

Can we add more containers in the same host, something like modifying the ports (9443 instead of 443, 9080 instead of 80)

No. Let's Encrypt (where we get the HTTPS certificate from demands the port to be 80 and 443). But you can use two different domains, both listening on 80 and 443. For example:

    environment:
      DOMAINS: 'test.domain.in -> 10.20.3.1:8222, test2.domain.in -> 10.20.1.2:8333'

SteveLTN avatar Mar 10 '24 04:03 SteveLTN

Nice, I tried to run an isolated https-portal per docker-compose file, now I've deployed a separated container only for ssl + reverse proxy for all my apps and worked pefectly. I guess it was the expected way to use but wasn't very clear for me.

So many thanks.

oscarmoraog avatar Mar 10 '24 05:03 oscarmoraog