These are the things that you need to follow
Add this to your docker-compose.yml
networks:
proxy:
name: web
external: true
services:
myApp:
image: ..
.
.
.
networks:
- proxy
All it needs is a docker label
services:
app:
image: ...
.
.
.
labels:
- traefik.enable=true # Enable traefik discovery
- traefik.http.routers.<app>.rule=Host(`example.com`) # replace <app> with service name
- traefik.http.routers.<app>.entrypoints=websecure # For HTTPS
- traefik.http.routers.<app>.tls=true
- traefik.http.services.<app>.loadbalancer.server.port=80 # PORT on which app is running
#- traefik.http.routers.my-app.middlewares=auth # For Auth Middleware, You can use Authelia or something similar
#- traefik.http.middlewares.auth.basicauth.users=test:xxx