Add custom TLS per service

Hi,

I have the following docker-compose file

version: "3.3"

services:

  traefik:
    image: "traefik:v3.0"
    container_name: "traefik"
    command:
      #- "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entryPoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
    ports:
      - "80:80"
      - "443:443"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  starthome:
    image: "ghcr.io/gethomepage/homepage:latest"
    container_name: "homepage"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.starthome.rule=Host(`home.dev.local`)"
      - "traefik.http.routers.starthome.tls=true"
      - "traefik.http.routers.starthome.entrypoints=websecure"
    ports:
      - 3000:6543
    volumes:
      - /path/to/config:/app/config # Make sure your local config directory exists
      - /var/run/docker.sock:/var/run/docker.sock:ro # optional, for docker integrations
    restart: unless-stopped

Everything works so far.
Now I have 2 files for the TLS connection:

certFile: /path/to/tls/home.dev.local.crt
keyFile: /path/to/tls/home.dev.local.key

Now I am trying to add these files to starthome service but thats easy said then done.
I read different ways to implement this like a dynamic configuration, but no luck so far.

Is it possible to add those TLS files straight into my docker compose yml file?

No, you can't define custom TLS certs in compose file. You need an extra file.

You need to define the custom TLS certs in a dynamic config file (doc) and load it with providers.file in static config (doc).