i am trying to expose my docker container to a public url (eg https://example.com/dashboard) using traefik but i am not sure why my url is hitting a 404 not found error. i am using a Dockerfile to create my docker image, and most of the stuff online is only for docker-compose files, so i am having much difficulties finding help is this area.
here is my traefik.toml
################################################################
# Global configuration
################################################################
[global]
checkNewVersion = false
sendAnonymousUsage = false
################################################################
# Entrypoints configuration
################################################################
# Entrypoints definition
[entryPoints]
# Dashboard and API
[entryPoints.traefik]
address = ":8080"
[entryPoints.traefik.http.tls]
[entryPoints.ping]
address = ":8082"
[entryPoints.web-secure]
address = ":443"
# TLS is enabled by having this empty option
[entryPoints.web-secure.http.tls]
################################################################
# API and dashboard configuration
################################################################
# Enable API and dashboard
[api]
dashboard = true
debug = true
################################################################
# File-Based Configuration Backend
################################################################
[providers]
[providers.file]
directory = "/config"
watch = true
and here is my Dockerfile
FROM docker.odyssey.rowini.net/traefik:2.10.1
COPY traefik.toml /traefik.toml
COPY tls.toml /config/tls.toml
COPY certs /certs
EXPOSE 8080 443 8082
LABEL traefik.enable="true"
LABEL traefik.http.routers.example.rule="Host(`example.com`)"
LABEL traefik.http.routers.example.entrypoints="web-secure"
LABEL traefik.http.routers.example.service="api@internal"
LABEL traefik.http.services.unodux-service.loadbalancer.server.port="443"
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
and this is the config file for the /dashboard route
[http.routers]
[http.routers.traefik]
rule = "Host(`example.com`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
middlewares = []
service = "api@internal"
entryPoints = ["web-secure"]
[http.routers.traefik.tls]
options = "default"
im very new to traefik, so i am not very sure how to use traefik on the docker container using Dockerfiles, and not very sure if i am configuring it correctly as well. any help or some explanation would be greatly appreciated