services:
  site:
    build: .
    container_name: site
    restart: unless-stopped
    networks:
      - traefik-proxy
    volumes:
      - ./sws.config.toml:/config.toml
    environment:
      - SERVER_CONFIG_FILE=/config.toml
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.site.rule=Host(`fiatcode.dev`) || Host(`www.fiatcode.dev`)"
      - "traefik.http.routers.site.entrypoints=web-secure"
      - "traefik.http.routers.site.tls.certresolver=defaultResolver"
      - "traefik.http.routers.site.middlewares=strip-www@file"
      - "traefik.http.services.site.loadbalancer.server.port=80"

networks:
  traefik-proxy:
    external: true
