diff --git a/src/lib/haproxy/index.ts b/src/lib/haproxy/index.ts index b9a8e9581..3f1176432 100644 --- a/src/lib/haproxy/index.ts +++ b/src/lib/haproxy/index.ts @@ -161,7 +161,7 @@ export async function startTraefikTCPProxy( image: 'traefik:v2.6', command: [ `--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', '--log.level=error' ], diff --git a/src/lib/importers/github.ts b/src/lib/importers/github.ts index a08fb87b4..7229cd1c4 100644 --- a/src/lib/importers/github.ts +++ b/src/lib/importers/github.ts @@ -49,7 +49,7 @@ export default async function ({ applicationId }); await asyncExecShell( - `git clone -q -b ${branch} https://x-access-token:${token}@${url}/${repository}.git ${workdir}/ && cd ${workdir} && git submodule update --init --recursive && git lfs pull && cd .. ` + `GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git clone -q -b ${branch} https://x-access-token:${token}@${url}/${repository}.git ${workdir}/ && cd ${workdir} && git submodule update --init --recursive && git lfs pull && cd .. ` ); const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`); return commit.replace('\n', ''); diff --git a/src/lib/importers/gitlab.ts b/src/lib/importers/gitlab.ts index 966b22c96..9e2181b20 100644 --- a/src/lib/importers/gitlab.ts +++ b/src/lib/importers/gitlab.ts @@ -31,7 +31,7 @@ export default async function ({ }); await asyncExecShell( - `git clone -q -b ${branch} git@${url}:${repository}.git --config core.sshCommand="ssh -q -i ${repodir}id.rsa -o StrictHostKeyChecking=no" ${workdir}/ && cd ${workdir}/ && git submodule update --init --recursive && git lfs pull && cd .. ` + `GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no' git clone -q -b ${branch} git@${url}:${repository}.git --config core.sshCommand="ssh -q -i ${repodir}id.rsa -o StrictHostKeyChecking=no" ${workdir}/ && cd ${workdir}/ && git submodule update --init --recursive && git lfs pull && cd .. ` ); const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`); return commit.replace('\n', ''); diff --git a/src/routes/services/[id]/_Services/_Services.svelte b/src/routes/services/[id]/_Services/_Services.svelte index d1d638bb4..062292c4d 100644 --- a/src/routes/services/[id]/_Services/_Services.svelte +++ b/src/routes/services/[id]/_Services/_Services.svelte @@ -38,7 +38,7 @@ try { await post(`/services/${id}/check.json`, { fqdn: service.fqdn, - otherFqdns: [service.minio.apiFqdn], + otherFqdns: service.minio?.apiFqdn ? [service.minio?.apiFqdn] : [], exposePort: service.exposePort }); await post(`/services/${id}/${service.type}.json`, { ...service }); diff --git a/src/routes/services/[id]/check.json.ts b/src/routes/services/[id]/check.json.ts index 4b8557c66..4201e94da 100644 --- a/src/routes/services/[id]/check.json.ts +++ b/src/routes/services/[id]/check.json.ts @@ -13,7 +13,7 @@ export const post: RequestHandler = async (event) => { let { fqdn, exposePort, otherFqdns } = await event.request.json(); if (fqdn) fqdn = fqdn.toLowerCase(); - if (otherFqdns) otherFqdns = otherFqdns.map((fqdn) => fqdn.toLowerCase()); + if (otherFqdns && otherFqdns.length > 0) otherFqdns = otherFqdns.map((f) => f.toLowerCase()); if (exposePort) exposePort = Number(exposePort); try { @@ -25,7 +25,7 @@ export const post: RequestHandler = async (event) => { }) }; } - if (otherFqdns) { + if (otherFqdns && otherFqdns.length > 0) { for (const ofqdn of otherFqdns) { const domain = getDomain(ofqdn); const nakedDomain = domain.replace('www.', ''); diff --git a/src/routes/webhooks/traefik/other.json.ts b/src/routes/webhooks/traefik/other.json.ts index a1c357878..3dc4d0e59 100644 --- a/src/routes/webhooks/traefik/other.json.ts +++ b/src/routes/webhooks/traefik/other.json.ts @@ -9,6 +9,7 @@ export const get: RequestHandler = async (event) => { const privatePort = event.url.searchParams.get('privatePort'); const publicPort = event.url.searchParams.get('publicPort'); const type = event.url.searchParams.get('type'); + const address = event.url.searchParams.get('address') || id; let traefik = {}; if (publicPort && type && privatePort) { if (type === 'tcp') { @@ -24,7 +25,7 @@ export const get: RequestHandler = async (event) => { services: { [id]: { loadbalancer: { - servers: [{ address: `${id}:${privatePort}` }] + servers: [{ address: `${address}:${privatePort}` }] } } }