mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-06 10:46:38 +00:00
add main router and service in traefik config
This commit is contained in:
@@ -31,8 +31,25 @@ export function buildTraefikConfig(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const http: DynamicTraefikConfig["http"] = {
|
const http: DynamicTraefikConfig["http"] = {
|
||||||
routers: {},
|
routers: {
|
||||||
services: {},
|
main: {
|
||||||
|
entryPoints: ["https"],
|
||||||
|
middlewares: [],
|
||||||
|
service: "service-main",
|
||||||
|
rule: "Host(`fossorial.io`)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
services: {
|
||||||
|
"service-main": {
|
||||||
|
loadBalancer: {
|
||||||
|
servers: [
|
||||||
|
{
|
||||||
|
url: `http://${config.server.internal_hostname}:${config.server.internal_port}`,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
middlewares: {
|
middlewares: {
|
||||||
[middlewareName]: {
|
[middlewareName]: {
|
||||||
plugin: {
|
plugin: {
|
||||||
@@ -46,7 +63,6 @@ export function buildTraefikConfig(
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const target of targets) {
|
for (const target of targets) {
|
||||||
const routerName = `router-${target.targetId}`;
|
const routerName = `router-${target.targetId}`;
|
||||||
const serviceName = `service-${target.targetId}`;
|
const serviceName = `service-${target.targetId}`;
|
||||||
|
|||||||
Reference in New Issue
Block a user