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
hm
Andras Bacsai35625b22f5c9
diff --git a/apps/api/src/lib.ts b/apps/api/src/lib.tsindex c519197a53..7bfcfa12ee 100644--- a/apps/api/src/lib.ts+++ b/apps/api/src/lib.ts@@ -13,7 +13,6 @@ export async function migrateServicesToNewTemplate(templates: any) {}let template = templates.find(t => t.name.toLowerCase() === service.type.toLowerCase());if (template) {- console.log(template.variables.find(v => v.name === "_APP_REDIS_HOST"))template = JSON.parse(JSON.stringify(template).replaceAll('$$id', service.id))if (service.type === 'plausibleanalytics' && service.plausibleAnalytics) await plausibleAnalytics(service, template)if (service.type === 'fider' && service.fider) await fider(service, template)diff --git a/apps/api/src/lib/services/handlers.ts b/apps/api/src/lib/services/handlers.tsindex 68092b6d77..674fd46912 100644--- a/apps/api/src/lib/services/handlers.ts+++ b/apps/api/src/lib/services/handlers.ts@@ -700,11 +700,11 @@ export async function startService(request: FastifyRequest<ServiceStartStop>) {const network = destinationDockerId && destinationDocker.network;const config = {};for (const service in template.services) {- let newEnviroments = []+ let newEnvironments = []for (const environment of template.services[service].environment) {const [env, value] = environment.split("=");if (!value.startsWith('$$secret') && value !== '') {- newEnviroments.push(`${env}=${value}`)+ newEnvironments.push(`${env}=${value}`)}}@@ -712,8 +712,8 @@ export async function startService(request: FastifyRequest<ServiceStartStop>) {for (const secret of secrets) {const { name, value } = secretif (value) {- if (template.services[service].environment.find(env => env.startsWith(`${name}=`)) && !newEnviroments.find(env => env.startsWith(`${name}=`))) {- newEnviroments.push(`${name}=${decrypt(value)}`)+ if (template.services[service].environment.find(env => env.startsWith(`${name}=`)) && !newEnvironments.find(env => env.startsWith(`${name}=`))) {+ newEnvironments.push(`${name}=${decrypt(value)}`)}}}@@ -726,7 +726,7 @@ export async function startService(request: FastifyRequest<ServiceStartStop>) {expose: template.services[service].ports,// ...(exposePort ? { ports: [`${exposePort}:${port}`] } : {}),volumes: template.services[service].volumes,- environment: newEnviroments,+ environment: newEnvironments,depends_on: template.services[service]?.depends_on,ulimits: template.services[service]?.ulimits,cap_drop: template.services[service]?.cap_drop,@@ -766,6 +766,7 @@ export async function startService(request: FastifyRequest<ServiceStartStop>) {volumes: volumeMounts}const composeFileDestination = `${workdir}/docker-compose.yaml`;+ console.log(composeFileDestination)await fs.writeFile(composeFileDestination, yaml.dump(composeFile));await startServiceContainers(destinationDocker.id, composeFileDestination)return {}