diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..ea449728d --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) +# and commit this file to your remote git repository to share the goodness with others. + +tasks: + - init: npm install && npm run build + command: npm run start + + diff --git a/package.json b/package.json index 5dbad34ca..735c5272e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.9.8", + "version": "2.9.9", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0", diff --git a/src/lib/buildPacks/python.ts b/src/lib/buildPacks/python.ts index fc5e8738b..cd42d6fd6 100644 --- a/src/lib/buildPacks/python.ts +++ b/src/lib/buildPacks/python.ts @@ -34,6 +34,8 @@ const createDockerfile = async (data, image): Promise => { } if (pythonWSGI?.toLowerCase() === 'gunicorn') { Dockerfile.push(`RUN pip install gunicorn`); + } else if (pythonWSGI?.toLowerCase() === 'uvicorn') { + Dockerfile.push(`RUN pip install uvicorn`); } else if (pythonWSGI?.toLowerCase() === 'uwsgi') { Dockerfile.push(`RUN apk add --no-cache uwsgi-python3`); // Dockerfile.push(`RUN pip install --no-cache-dir uwsgi`) @@ -50,6 +52,8 @@ const createDockerfile = async (data, image): Promise => { Dockerfile.push(`EXPOSE ${port}`); if (pythonWSGI?.toLowerCase() === 'gunicorn') { Dockerfile.push(`CMD gunicorn -w=4 -b=0.0.0.0:8000 ${pythonModule}:${pythonVariable}`); + } else if (pythonWSGI?.toLowerCase() === 'uvicorn') { + Dockerfile.push(`CMD uvicorn ${pythonModule}:${pythonVariable} --port ${port} --host 0.0.0.0`); } else if (pythonWSGI?.toLowerCase() === 'uwsgi') { Dockerfile.push( `CMD uwsgi --master -p 4 --http-socket 0.0.0.0:8000 --uid uwsgi --plugins python3 --protocol uwsgi --wsgi ${pythonModule}:${pythonVariable}` diff --git a/src/routes/applications/[id]/index.svelte b/src/routes/applications/[id]/index.svelte index a00f08d2f..9c7c86435 100644 --- a/src/routes/applications/[id]/index.svelte +++ b/src/routes/applications/[id]/index.svelte @@ -10,7 +10,6 @@ } const endpoint = `/applications/${params.id}.json`; const res = await fetch(endpoint); - if (res.ok) { return { props: { @@ -18,7 +17,6 @@ } }; } - return { status: res.status, error: new Error(`Could not load ${endpoint}`) @@ -39,7 +37,6 @@ import { errorNotification } from '$lib/form'; import { onDestroy, onMount } from 'svelte'; import Select from 'svelte-select'; - import Explainer from '$lib/components/Explainer.svelte'; import Setting from '$lib/components/Setting.svelte'; import type Prisma from '@prisma/client'; @@ -51,9 +48,7 @@ import { disabledButton, status } from '$lib/store'; import { t } from '$lib/translations'; const { id } = $page.params; - let domainEl: HTMLInputElement; - let loading = false; let usageLoading = false; @@ -69,12 +64,12 @@ let previews = application.settings.previews; let dualCerts = application.settings.dualCerts; let autodeploy = application.settings.autodeploy; - let nonWWWDomain = application.fqdn && getDomain(application.fqdn).replace(/^www\./, ''); let isNonWWWDomainOK = false; let isWWWDomainOK = false; $: isDisabled = !$session.isAdmin || $status.application.isRunning; + let wsgis = [ { value: 'None', @@ -83,6 +78,10 @@ { value: 'Gunicorn', label: 'Gunicorn' + }, + { + value: 'Uvicorn', + label: 'Uvicorn' } ]; function containerClass() { @@ -110,7 +109,6 @@ await getUsage(); }, 1000); }); - async function changeSettings(name) { if (name === 'debug') { debug = !debug; @@ -196,7 +194,6 @@ application.baseBuildImage = event.detail.value; await handleSubmit(); } - async function isDNSValid(domain, isWWW) { try { await get(`/applications/${id}/check.json?domain=${domain}`); @@ -218,7 +215,6 @@ {application.name} - {#if application.fqdn} {$t('application.base_build_image')} -
-
{#if application.pythonWSGI?.toLowerCase() === 'gunicorn'} @@ -560,6 +554,19 @@ /> {/if} + {#if application.pythonWSGI?.toLowerCase() === 'uvicorn'} +
+ + +
+ {/if} {/if} {#if !staticDeployments.includes(application.buildPack)}
@@ -694,7 +701,6 @@ >
- -
+
{$t('application.preview.no_previews_available')}