15 lines
366 B
TypeScript
15 lines
366 B
TypeScript
import type { ServiceWidget } from "@/lib/config/schema";
|
|||
|
|
|
||
|
|
const SERVICE_PORTS: Record<ServiceWidget["service"], number> = {
|
||
|
|
gitea: 3000,
|
||
|
|
coolify: 8080,
|
||
|
|
immich: 2283,
|
||
|
|
n8n: 5678,
|
||
|
|
umami: 3000,
|
||
|
|
headscale: 8080,
|
||
|
|
};
|
||
|
|
|
||
|
|
export function serviceBaseUrl(widget: ServiceWidget): string {
|
||
|
|
return `http://${widget.containerName}:${SERVICE_PORTS[widget.service]}`;
|
||
|
|
}
|