An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
updates
Andras Bacsai111bd29cc837
diff --git a/apps/api/devTemplates.yaml b/apps/api/devTemplates.yamlindex e77a578393..505abfb601 100644--- a/apps/api/devTemplates.yaml+++ b/apps/api/devTemplates.yaml@@ -1892,8 +1892,8 @@- '9001'proxy:- port: '9000'- - port: '9001'domain: $$coolify_fqdn_minio_console+ - port: '9001'variables:- id: $$coolify_fqdn_minio_consolename: MINIO_SERVER_URLdiff --git a/apps/api/src/routes/api/v1/handlers.ts b/apps/api/src/routes/api/v1/handlers.tsindex adfad042ac..e99cb3f614 100644--- a/apps/api/src/routes/api/v1/handlers.ts+++ b/apps/api/src/routes/api/v1/handlers.ts@@ -41,10 +41,14 @@ export async function cleanupManually(request: FastifyRequest) {export async function refreshTemplates() {try {const { default: got } = await import('got')- let templates = {}try {- const response = await got.get('https://get.coollabs.io/coolify/service-templates.yaml').text()- templates = yaml.load(response)+ if (isDev) {+ const response = await fs.readFile('./devTemplates.yaml', 'utf8')+ await fs.writeFile('./template.json', JSON.stringify(yaml.load(response), null, 2))+ } else {+ const response = await got.get('https://get.coollabs.io/coolify/service-templates.yaml').text()+ await fs.writeFile('/app/template.json', JSON.stringify(yaml.load(response), null, 2))+ }} catch (error) {throw {status: 500,@@ -52,11 +56,6 @@ export async function refreshTemplates() {};}- if (isDev) {- await fs.writeFile('./template.json', JSON.stringify(templates, null, 2))- } else {- await fs.writeFile('/app/template.json', JSON.stringify(templates, null, 2))- }return {};} catch ({ status, message }) {return errorHandler({ status, message });diff --git a/apps/api/src/routes/webhooks/traefik/handlers.ts b/apps/api/src/routes/webhooks/traefik/handlers.tsindex 5dac66235b..58e45e416e 100644--- a/apps/api/src/routes/webhooks/traefik/handlers.ts+++ b/apps/api/src/routes/webhooks/traefik/handlers.ts@@ -20,7 +20,7 @@ function generateLoadBalancerService(id, port) {function generateHttpRouter(id, nakedDomain, pathPrefix) {return {entrypoints: ['web'],- rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`)) && PathPrefix(\`${pathPrefix}\`)`,+ rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`))${pathPrefix ? `&& PathPrefix(\`${pathPrefix}\`)` : ''}`,service: `${id}`,middlewares: []}@@ -29,7 +29,7 @@ function generateProtocolRedirectRouter(id, nakedDomain, pathPrefix, fromTo) {if (fromTo === 'https-to-http') {return {entrypoints: ['websecure'],- rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`)) && PathPrefix(\`${pathPrefix}\`)`,+ rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`))${pathPrefix ? `&& PathPrefix(\`${pathPrefix}\`)` : ''}`,service: `${id}`,tls: {domains: {@@ -41,7 +41,7 @@ function generateProtocolRedirectRouter(id, nakedDomain, pathPrefix, fromTo) {} else if (fromTo === 'http-to-https') {return {entrypoints: ['web'],- rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`)) && PathPrefix(\`${pathPrefix}\`)`,+ rule: `(Host(\`${nakedDomain}\`) || Host(\`www.${nakedDomain}\`))${pathPrefix ? `&& PathPrefix(\`${pathPrefix}\`)` : ''}`,service: `${id}`,middlewares: ['redirect-to-https']};@@ -409,7 +409,7 @@ export async function traefikConfiguration(request, reply) {}}for (const service of data.services) {- let { id, fqdn, dualCerts, configuration: { port, pathPrefix = '/', domain: customDomain }, isCustomSSL = false } = service+ let { id, fqdn, dualCerts, configuration: { port, pathPrefix, domain: customDomain }, isCustomSSL = false } = serviceif (customDomain) {fqdn = customDomain}