# Traefik 동적 설정 파일
# 기존 Traefik Docker 컨테이너의 dynamic config 디렉토리에 배치
# 예: /etc/traefik/dynamic/ 또는 Traefik volume mount 위치

http:
  routers:
    # Frontend (Next.js)
    invyone-frontend:
      rule: "Host(`v1.invyone.com`)"
      entryPoints:
        - web
        - websecure
      service: invyone-frontend
      tls:
        certResolver: le

    # Backend Spring Boot API
    invyone-api:
      rule: "Host(`api.invyone.com`)"
      entryPoints:
        - web
        - websecure
      service: invyone-api
      tls:
        certResolver: le

    # Backend Node.js API (필요시)
    invyone-node-api:
      rule: "Host(`node-api.invyone.com`)"
      entryPoints:
        - web
        - websecure
      service: invyone-node-api
      tls:
        certResolver: le

  services:
    invyone-frontend:
      loadBalancer:
        servers:
          - url: "http://127.0.0.1:30000"

    invyone-api:
      loadBalancer:
        servers:
          - url: "http://127.0.0.1:30081"

    invyone-node-api:
      loadBalancer:
        servers:
          - url: "http://127.0.0.1:30080"
