Hello everbody
I need to publish the Mender server using the port 44344 because there is a traefik for my already existing services on the port 443. I thought that I can make use of traefik behind traefik as shown below:
The steps that I have already followed so far are the following:
- I have changed mender-api-gateway service in prod.yml file inside the directory production/config such that it is now as follows:
…
ports:
“44344:443”
network:
mender
traefik-public
…
…
environment:
ALLOWED_HOSTS: my-domain.com:44344
Note: treafik-public is the network of the services that are routed by my already existing traefik on port 443.
- I have changed the mender-api-gateway service inside docker-compose.yml file, and it is now as follows:
…
…
networks:
- mender
- traefik-public
…
…
labels:
- “traefik.enable=true”
- “traefik.http.routers.mender-api-gateway.rule=Host(my-domain.com
)”
- “traefik.http.services.mender-api.gateway.loadbalancer.server.port=443”
- “traefik.http.routers.mender-api-gateway.entrypoints=websecure”
- “treafik.http.routers.mender-api-gateway.tls=true”
- “traefik.http.routers.mender-api.gateway.tls.certresolver=leresolver”
- “treafik.docker.network=traefik-public”
…
…
…
…
networks:
mender:
traefik-public:
external: true
The things that I have done so far is not sufficient to make the server work. The other things that I have tried with this configuration is that I have both written the port 44344 at the end of the allowed host domain, and not written it. Both cases did not work.
When I go to the the my-domain.com, it says the page is not working.When I go to the my-domain.com:44344 , it says connection is not secure, and I cannot go further from there.
Has anyone accomplished that?
Thanks in advance.