fix: ftp connection

This commit is contained in:
Andras Bacsai 2022-05-31 12:02:09 +02:00
parent a1a9f1531e
commit b032da798b
2 changed files with 3 additions and 2 deletions

View File

@ -161,7 +161,7 @@ export async function startTraefikTCPProxy(
image: 'traefik:v2.6', image: 'traefik:v2.6',
command: [ command: [
`--entrypoints.tcp.address=:${publicPort}`, `--entrypoints.tcp.address=:${publicPort}`,
`--providers.http.endpoint=${otherTraefikEndpoint}?id=${id}&privatePort=${privatePort}&publicPort=${publicPort}&type=tcp`, `--providers.http.endpoint=${otherTraefikEndpoint}?id=${id}&privatePort=${privatePort}&publicPort=${publicPort}&type=tcp&address=${dependentId}`,
'--providers.http.pollTimeout=2s', '--providers.http.pollTimeout=2s',
'--log.level=error' '--log.level=error'
], ],

View File

@ -9,6 +9,7 @@ export const get: RequestHandler = async (event) => {
const privatePort = event.url.searchParams.get('privatePort'); const privatePort = event.url.searchParams.get('privatePort');
const publicPort = event.url.searchParams.get('publicPort'); const publicPort = event.url.searchParams.get('publicPort');
const type = event.url.searchParams.get('type'); const type = event.url.searchParams.get('type');
const address = event.url.searchParams.get('address') || id;
let traefik = {}; let traefik = {};
if (publicPort && type && privatePort) { if (publicPort && type && privatePort) {
if (type === 'tcp') { if (type === 'tcp') {
@ -24,7 +25,7 @@ export const get: RequestHandler = async (event) => {
services: { services: {
[id]: { [id]: {
loadbalancer: { loadbalancer: {
servers: [{ address: `${id}:${privatePort}` }] servers: [{ address: `${address}:${privatePort}` }]
} }
} }
} }