Traefik + Docker Compose

Flow of an inbound network request
%%{init: {'theme': 'neutral'}}%%
graph LR
	A[Your Browser] -->|HTTPS 443/tcp| Z
	Z["Proxy"] -->|HTTP 80/tcp| C
	C["Single HTTP frontend"]
	H["Prometheus"]
	B["gRPC API"]

	subgraph "OliveTin service"
	C -->|/api/| D[REST API] --> B
	C -->|/| E[webui]
    C -->|/metrics/| H
	end

The following example is known to work well with Traefik and docker-compose.

services:
  olivetin:
    container_name: olivetin
    image: jamesread/olivetin
    volumes:
      - /docker/olivetin:/config # replace host path or volume as needed
    ports:
      - "1337:1337"
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.olivetin.entrypoints=web"
      - "traefik.http.routers.olivetin.rule=Host(`olivetin.example.com`)"

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