mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-03 01:24:58 +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"] = {
|
||||
routers: {},
|
||||
services: {},
|
||||
routers: {
|
||||
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: {
|
||||
[middlewareName]: {
|
||||
plugin: {
|
||||
|
@ -46,7 +63,6 @@ export function buildTraefikConfig(
|
|||
},
|
||||
},
|
||||
};
|
||||
|
||||
for (const target of targets) {
|
||||
const routerName = `router-${target.targetId}`;
|
||||
const serviceName = `service-${target.targetId}`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue