This commit is contained in:
liuliu 2025-12-15 13:30:35 +08:00
parent f771369e97
commit c99d5f4c19
2 changed files with 11 additions and 2 deletions

View File

@ -10,5 +10,13 @@ services:
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.wengyeyulu.rule=Host(`${DOMAIN_NAME:-example.com}`)" - "traefik.http.routers.wengyeyulu.rule=Host(`${DOMAIN_NAME:-example.com}`)"
- "traefik.http.routers.wengyeyulu.entrypoints=web" - "traefik.http.routers.wengyeyulu.entrypoints=websecure"
- "traefik.http.routers.wengyeyulu.tls=true"
- "traefik.http.routers.wengyeyulu.tls.certresolver=letsencrypt"
- "traefik.http.services.wengyeyulu.loadbalancer.server.port=3000" - "traefik.http.services.wengyeyulu.loadbalancer.server.port=3000"
networks:
- mynetwork
networks:
mynetwork:
external: true

View File

@ -2,4 +2,5 @@ import { treaty } from '@elysiajs/eden';
import type { App } from '../backend/api'; import type { App } from '../backend/api';
// Create a single client instance // Create a single client instance
export const client = treaty<App>('localhost:3000'); const domain = typeof window !== 'undefined' ? window.location.host : 'localhost:3000';
export const client = treaty<App>(domain);