Skip to content

How to configure acme-companion for path based routing #1132

Answered by sid203
sid203 asked this question in Q&A
Discussion options

You must be logged in to vote

Alright so I kind of figured it out. For my case all the services will be using a common virtual host i.e. staging.dev.it/app1, staging.dev.it/app2 and so on, thus an SSL certificate should be issued only for this domain. This can be done by setting the LETSENCRYPT_HOST variable only on one of the services and omitting from all other services.

The updated docker compose file is as follows:

whoami:
    image: jwilder/whoami
    networks:
      - reverse_proxy_network
    environment:
      - VIRTUAL_HOST=staging.dev.it
      - VIRTUAL_PORT=8000
      - VIRTUAL_PATH=/whoami/
    deploy:
      mode: replicated
      replicas: 1

  portainer:
    image: portainer/portainer-ce:2.20.3
    comma…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sid203
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant