mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-17 04:59:30 +00:00
feat: able to use $$ in traefik config gen
fix: repman icon
This commit is contained in:
@@ -2,6 +2,7 @@ import { FastifyRequest } from 'fastify';
|
||||
import { errorHandler, getDomain, isDev, prisma, executeCommand } from '../../../lib/common';
|
||||
import { getTemplates } from '../../../lib/services';
|
||||
import { OnlyId } from '../../../types';
|
||||
import { parseAndFindServiceTemplates } from '../../api/v1/services/handlers';
|
||||
|
||||
function generateServices(serviceId, containerId, port, isHttp2 = false, isHttps = false) {
|
||||
if (isHttp2) {
|
||||
@@ -534,11 +535,11 @@ export async function proxyConfiguration(request: FastifyRequest<OnlyId>, remote
|
||||
if (!found) {
|
||||
continue;
|
||||
}
|
||||
found = JSON.parse(JSON.stringify(found).replaceAll('$$id', id));
|
||||
found = await parseAndFindServiceTemplates(service, null, true);
|
||||
for (const oneService of Object.keys(found.services)) {
|
||||
const isDomainConfiguration =
|
||||
found?.services[oneService]?.proxy?.filter((p) => p.domain) ?? [];
|
||||
if (isDomainConfiguration.length > 0) {
|
||||
const isDomainAndProxyConfiguration =
|
||||
found?.services[oneService]?.proxy?.filter((p) => p.domain && p.port) ?? [];
|
||||
if (isDomainAndProxyConfiguration.length > 0) {
|
||||
const { proxy } = found.services[oneService];
|
||||
for (let configuration of proxy) {
|
||||
if (configuration.domain) {
|
||||
|
||||
Reference in New Issue
Block a user