services:
  ksan-dev:
    build:
      context: .
      args:
        PLANS_PAGES: ${PLANS_PAGES}
    container_name: ksan-dev
    restart: unless-stopped
    env_file:
      - .env
    networks:
      - frontend
    labels:
      - traefik.enable=true
      - traefik.http.routers.ksan-dev-http.rule=Host(`${DOMAIN}`) || Host(`www.${DOMAIN}`)
      - traefik.http.routers.ksan-dev-http.entrypoints=web
      - traefik.http.routers.ksan-dev-https.tls=true
      - traefik.http.routers.ksan-dev-https.tls.certresolver=cloudflare
      - traefik.http.routers.ksan-dev-https.entrypoints=websecure
      - traefik.http.routers.ksan-dev-https.rule=Host(`${DOMAIN}`) || Host(`www.${DOMAIN}`)
      - traefik.http.services.ksan-dev.loadbalancer.server.port=3000

networks:
  frontend:
    external: true
