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
vscode
Andras Bacsai8b83c3812705
diff --git a/apps/api/src/lib.ts b/apps/api/src/lib.tsindex 01bdfd2a90..796146c669 100644--- a/apps/api/src/lib.ts+++ b/apps/api/src/lib.ts@@ -10,7 +10,7 @@ export async function migrateServicesToNewTemplate() {if (service.type === 'plausibleanalytics' && service.plausibleAnalytics) await plausibleAnalytics(service)if (service.type === 'fider' && service.fider) await fider(service)if (service.type === 'minio' && service.minio) await minio(service)- if (service.type === 'vscode' && service.vscodeserver) await vscodeserver(service)+ if (service.type === 'vscodeserver' && service.vscodeserver) await vscodeserver(service)}} catch (error) {console.log(error)@@ -19,7 +19,7 @@ export async function migrateServicesToNewTemplate() {}async function vscodeserver(service: any) {- const { password } = service.minio+ const { password } = service.vscodeserverconst secrets = [`PASSWORD@@@${password}`,diff --git a/apps/api/src/lib/templates.ts b/apps/api/src/lib/templates.tsindex 51084662e5..2a842bf025 100644--- a/apps/api/src/lib/templates.ts+++ b/apps/api/src/lib/templates.ts@@ -2,12 +2,12 @@ export default [{"templateVersion": "1.0.0","serviceDefaultVersion": "4.7.1",- "name": "codeserver",- "displayName": "Code Server",- "description": "code-server by Coder is VS Code running on a remote server, accessible through the browser.",+ "name": "vscodeserver",+ "displayName": "VSCode Server",+ "description": "vscode-server by Coder is VS Code running on a remote server, accessible through the browser.","services": {"$$id": {- "name": "Code Server",+ "name": "VSCode Server","documentation": "Taken from https://github.com/coder/code-server/. ","depends_on": [],"image": "codercom/code-server:$$core_version",@@ -32,7 +32,10 @@ export default ["name": "PASSWORD","label": "Password","defaultValue": "$$generate_password",- "description": ""+ "description": "",+ "extras": {+ "isVisibleOnUI": true,+ }}]},diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.tsindex e65c4cb5c2..903f48c527 100644--- a/apps/api/src/routes/api/v1/services/handlers.ts+++ b/apps/api/src/routes/api/v1/services/handlers.ts@@ -129,7 +129,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strinconst description = foundTemplate.variables.find(v => v.name === envKey)?.descriptionconst defaultValue = foundTemplate.variables.find(v => v.name === envKey)?.defaultValueconst extras = foundTemplate.variables.find(v => v.name === envKey)?.extras- if (envValue.startsWith('$$config')) {+ if (envValue.startsWith('$$config') || extras?.isVisibleOnUI) {parsedTemplate[realKey].environment.push({ name: envKey, value: envValue, label, description, defaultValue, extras })diff --git a/apps/ui/src/routes/services/[id]/__layout.svelte b/apps/ui/src/routes/services/[id]/__layout.svelteindex b57dafdafb..944f3f9c23 100644--- a/apps/ui/src/routes/services/[id]/__layout.svelte+++ b/apps/ui/src/routes/services/[id]/__layout.svelte@@ -323,11 +323,10 @@{:else if $status.service.overallStatus === 'stopped'}<buttonclass="btn btn-sm gap-2"- class:btn-primary={$status.application.overallStatus !== 'degraded'}disabled={!$isDeploymentEnabled}on:click={() => startService()}>- {#if $status.application.overallStatus !== 'degraded'}+ {#if $status.application.overallStatus === 'degraded'}<svgxmlns="http://www.w3.org/2000/svg"class="w-6 h-6"@@ -339,12 +338,16 @@stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path d="M7 4v16l13 -8z" />+ <path+ d="M16.3 5h.7a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h5l-2.82 -2.82m0 5.64l2.82 -2.82"+ transform="rotate(-45 12 12)"+ /></svg>- {:else}+ {$status.application.statuses.length === 1 ? 'Force Redeploy' : 'Redeploy Stack'}+ {:else if $status.application.overallStatus === 'stopped'}<svgxmlns="http://www.w3.org/2000/svg"- class="w-6 h-6"+ class="w-6 h-6 text-pink-500"viewBox="0 0 24 24"stroke-width="1.5"stroke="currentColor"@@ -353,17 +356,10 @@stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" />- <path- d="M16.3 5h.7a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-10a2 2 0 0 1 2 -2h5l-2.82 -2.82m0 5.64l2.82 -2.82"- transform="rotate(-45 12 12)"- />+ <path d="M7 4v16l13 -8z" /></svg>+ Deploy{/if}- {$status.application.overallStatus === 'degraded'- ? $status.application.statuses.length === 1- ? 'Force Redeploy'- : 'Redeploy Stack'- : 'Deploy'}</button>{/if}</div>