mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-14 22:53:45 +02:00
add main router and service in traefik config
This commit is contained in:
parent
002614499b
commit
a5df7b881a
1 changed files with 19 additions and 3 deletions
|
@ -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}`;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue