Problems Getting Discourse and Traefik connected

I used this post as a guide for setting up Discourse to work withTraefik. I have traefik working with another web app.

When I visit the forum.mydomain.com , I get a “404 page not found” error.

Something seems to be working, because I in the Traefik dashboard in the services tab, I can see a discourse@docker and discourse_secure@docker

However, there is nothing for discourse in the routers tab.

The changes I have made to app.yml are here, largely based on the post linked above. I added an an exposed port on the docker arguments at the bottom which seemed to open up the services mentioned above. I’d appreciate any help!

labels:
  app_name:                                                                     discourse

  #----Traefik lables------------------------
  traefik.enable:                                                               true
  traefik.docker.network:                                                       web

   #---HTTP ROUTER SECTION-------------------
  traefik.http.routers.discourse.rule:                                          Host(`forum.example.com`)
    #--HTTP SECTION--------------------------
  traefik.http.routers.discourse.entrypoints:                                   web
  traefik.http.routers.discourse.middlewares:                                   discourse_redirect2https         
  traefik.http.services.discourse.loadbalancer.server.port:                     80  

   #---HTTPS ROUTER SECTION
  traefik.http.routers.discourse_secure.rule:                                   Host(`forum.example.com`)
    #--HTTPS SECTION
  traefik.http.routers.discourse_secure.entrypoints:                            web-secured
  traefik.http.services.discourse_secure.loadbalancer.server.port:              80
    #--TLS SECTION
  traefik.http.routers.discourse_secure.tls.certresolver:                       tlsChallenge_letsencrypt

   #---MIDDLEWARE SECTION redirect http to https
  traefik.http.middlewares.discourse_redirect2https.redirectscheme.scheme:      https

docker_args:
  - "--network=web"
  - "--expose=80"

Good Morning,

it is quite challenging to help you troubleshooting when the traefik static cofnig file is missing.
Would mind sharing that as well?
Why you don’t continue in Discourse with Traefik 2.0? That is the right topic for this scenario. In addition, it makes things easier in regard of config compare.

is not necessary as you do

1 Like

I mistakenly thought the topic was closed. I have replied there with more details.

1 Like

I reopen it more or less :slight_smile: