commit
f0a52b2ef4
9
.gitpod.yml
Normal file
9
.gitpod.yml
Normal file
@ -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
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "coolify",
|
"name": "coolify",
|
||||||
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
"description": "An open-source & self-hostable Heroku / Netlify alternative.",
|
||||||
"version": "2.9.8",
|
"version": "2.9.9",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0",
|
"dev": "docker-compose -f docker-compose-dev.yaml up -d && cross-env NODE_ENV=development & svelte-kit dev --host 0.0.0.0",
|
||||||
|
@ -34,6 +34,8 @@ const createDockerfile = async (data, image): Promise<void> => {
|
|||||||
}
|
}
|
||||||
if (pythonWSGI?.toLowerCase() === 'gunicorn') {
|
if (pythonWSGI?.toLowerCase() === 'gunicorn') {
|
||||||
Dockerfile.push(`RUN pip install gunicorn`);
|
Dockerfile.push(`RUN pip install gunicorn`);
|
||||||
|
} else if (pythonWSGI?.toLowerCase() === 'uvicorn') {
|
||||||
|
Dockerfile.push(`RUN pip install uvicorn`);
|
||||||
} else if (pythonWSGI?.toLowerCase() === 'uwsgi') {
|
} else if (pythonWSGI?.toLowerCase() === 'uwsgi') {
|
||||||
Dockerfile.push(`RUN apk add --no-cache uwsgi-python3`);
|
Dockerfile.push(`RUN apk add --no-cache uwsgi-python3`);
|
||||||
// Dockerfile.push(`RUN pip install --no-cache-dir uwsgi`)
|
// Dockerfile.push(`RUN pip install --no-cache-dir uwsgi`)
|
||||||
@ -50,6 +52,8 @@ const createDockerfile = async (data, image): Promise<void> => {
|
|||||||
Dockerfile.push(`EXPOSE ${port}`);
|
Dockerfile.push(`EXPOSE ${port}`);
|
||||||
if (pythonWSGI?.toLowerCase() === 'gunicorn') {
|
if (pythonWSGI?.toLowerCase() === 'gunicorn') {
|
||||||
Dockerfile.push(`CMD gunicorn -w=4 -b=0.0.0.0:8000 ${pythonModule}:${pythonVariable}`);
|
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') {
|
} else if (pythonWSGI?.toLowerCase() === 'uwsgi') {
|
||||||
Dockerfile.push(
|
Dockerfile.push(
|
||||||
`CMD uwsgi --master -p 4 --http-socket 0.0.0.0:8000 --uid uwsgi --plugins python3 --protocol uwsgi --wsgi ${pythonModule}:${pythonVariable}`
|
`CMD uwsgi --master -p 4 --http-socket 0.0.0.0:8000 --uid uwsgi --plugins python3 --protocol uwsgi --wsgi ${pythonModule}:${pythonVariable}`
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
}
|
}
|
||||||
const endpoint = `/applications/${params.id}.json`;
|
const endpoint = `/applications/${params.id}.json`;
|
||||||
const res = await fetch(endpoint);
|
const res = await fetch(endpoint);
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
@ -18,7 +17,6 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status: res.status,
|
status: res.status,
|
||||||
error: new Error(`Could not load ${endpoint}`)
|
error: new Error(`Could not load ${endpoint}`)
|
||||||
@ -39,7 +37,6 @@
|
|||||||
import { errorNotification } from '$lib/form';
|
import { errorNotification } from '$lib/form';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import Select from 'svelte-select';
|
import Select from 'svelte-select';
|
||||||
|
|
||||||
import Explainer from '$lib/components/Explainer.svelte';
|
import Explainer from '$lib/components/Explainer.svelte';
|
||||||
import Setting from '$lib/components/Setting.svelte';
|
import Setting from '$lib/components/Setting.svelte';
|
||||||
import type Prisma from '@prisma/client';
|
import type Prisma from '@prisma/client';
|
||||||
@ -51,9 +48,7 @@
|
|||||||
import { disabledButton, status } from '$lib/store';
|
import { disabledButton, status } from '$lib/store';
|
||||||
import { t } from '$lib/translations';
|
import { t } from '$lib/translations';
|
||||||
const { id } = $page.params;
|
const { id } = $page.params;
|
||||||
|
|
||||||
let domainEl: HTMLInputElement;
|
let domainEl: HTMLInputElement;
|
||||||
|
|
||||||
let loading = false;
|
let loading = false;
|
||||||
|
|
||||||
let usageLoading = false;
|
let usageLoading = false;
|
||||||
@ -69,12 +64,12 @@
|
|||||||
let previews = application.settings.previews;
|
let previews = application.settings.previews;
|
||||||
let dualCerts = application.settings.dualCerts;
|
let dualCerts = application.settings.dualCerts;
|
||||||
let autodeploy = application.settings.autodeploy;
|
let autodeploy = application.settings.autodeploy;
|
||||||
|
|
||||||
let nonWWWDomain = application.fqdn && getDomain(application.fqdn).replace(/^www\./, '');
|
let nonWWWDomain = application.fqdn && getDomain(application.fqdn).replace(/^www\./, '');
|
||||||
let isNonWWWDomainOK = false;
|
let isNonWWWDomainOK = false;
|
||||||
let isWWWDomainOK = false;
|
let isWWWDomainOK = false;
|
||||||
|
|
||||||
$: isDisabled = !$session.isAdmin || $status.application.isRunning;
|
$: isDisabled = !$session.isAdmin || $status.application.isRunning;
|
||||||
|
|
||||||
let wsgis = [
|
let wsgis = [
|
||||||
{
|
{
|
||||||
value: 'None',
|
value: 'None',
|
||||||
@ -83,6 +78,10 @@
|
|||||||
{
|
{
|
||||||
value: 'Gunicorn',
|
value: 'Gunicorn',
|
||||||
label: 'Gunicorn'
|
label: 'Gunicorn'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'Uvicorn',
|
||||||
|
label: 'Uvicorn'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
function containerClass() {
|
function containerClass() {
|
||||||
@ -110,7 +109,6 @@
|
|||||||
await getUsage();
|
await getUsage();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function changeSettings(name) {
|
async function changeSettings(name) {
|
||||||
if (name === 'debug') {
|
if (name === 'debug') {
|
||||||
debug = !debug;
|
debug = !debug;
|
||||||
@ -196,7 +194,6 @@
|
|||||||
application.baseBuildImage = event.detail.value;
|
application.baseBuildImage = event.detail.value;
|
||||||
await handleSubmit();
|
await handleSubmit();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function isDNSValid(domain, isWWW) {
|
async function isDNSValid(domain, isWWW) {
|
||||||
try {
|
try {
|
||||||
await get(`/applications/${id}/check.json?domain=${domain}`);
|
await get(`/applications/${id}/check.json?domain=${domain}`);
|
||||||
@ -218,7 +215,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<span class="text-xs">{application.name} </span>
|
<span class="text-xs">{application.name} </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if application.fqdn}
|
{#if application.fqdn}
|
||||||
<a
|
<a
|
||||||
href={application.fqdn}
|
href={application.fqdn}
|
||||||
@ -433,7 +429,6 @@
|
|||||||
<label for="baseBuildImage" class="text-base font-bold text-stone-100"
|
<label for="baseBuildImage" class="text-base font-bold text-stone-100"
|
||||||
>{$t('application.base_build_image')}</label
|
>{$t('application.base_build_image')}</label
|
||||||
>
|
>
|
||||||
|
|
||||||
<div class="custom-select-wrapper">
|
<div class="custom-select-wrapper">
|
||||||
<Select
|
<Select
|
||||||
{isDisabled}
|
{isDisabled}
|
||||||
@ -530,12 +525,11 @@
|
|||||||
</div>
|
</div>
|
||||||
{#if application.buildPack === 'python'}
|
{#if application.buildPack === 'python'}
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<label for="pythonModule" class="text-base font-bold text-stone-100">WSGI</label>
|
<label for="pythonModule" class="text-base font-bold text-stone-100">WSGI / ASGI</label>
|
||||||
<div class="custom-select-wrapper">
|
<div class="custom-select-wrapper">
|
||||||
<Select id="wsgi" items={wsgis} on:select={selectWSGI} value={application.pythonWSGI} />
|
<Select id="wsgi" items={wsgis} on:select={selectWSGI} value={application.pythonWSGI} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
<label for="pythonModule" class="text-base font-bold text-stone-100">Module</label>
|
<label for="pythonModule" class="text-base font-bold text-stone-100">Module</label>
|
||||||
<input
|
<input
|
||||||
@ -544,7 +538,7 @@
|
|||||||
id="pythonModule"
|
id="pythonModule"
|
||||||
required
|
required
|
||||||
bind:value={application.pythonModule}
|
bind:value={application.pythonModule}
|
||||||
placeholder={application.pythonWSGI?.toLowerCase() !== 'gunicorn' ? 'main.py' : 'main'}
|
placeholder={application.pythonWSGI?.toLowerCase() !== 'none' ? 'main' : 'main.py'}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if application.pythonWSGI?.toLowerCase() === 'gunicorn'}
|
{#if application.pythonWSGI?.toLowerCase() === 'gunicorn'}
|
||||||
@ -560,6 +554,19 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
{#if application.pythonWSGI?.toLowerCase() === 'uvicorn'}
|
||||||
|
<div class="grid grid-cols-2 items-center">
|
||||||
|
<label for="pythonVariable" class="text-base font-bold text-stone-100">Variable</label>
|
||||||
|
<input
|
||||||
|
readonly={!$session.isAdmin}
|
||||||
|
name="pythonVariable"
|
||||||
|
id="pythonVariable"
|
||||||
|
required
|
||||||
|
bind:value={application.pythonVariable}
|
||||||
|
placeholder="default: app"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{#if !staticDeployments.includes(application.buildPack)}
|
{#if !staticDeployments.includes(application.buildPack)}
|
||||||
<div class="grid grid-cols-2 items-center">
|
<div class="grid grid-cols-2 items-center">
|
||||||
@ -694,7 +701,6 @@
|
|||||||
>
|
>
|
||||||
<Explainer text={$t('application.publish_directory_explainer')} />
|
<Explainer text={$t('application.publish_directory_explainer')} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
readonly={!$session.isAdmin}
|
readonly={!$session.isAdmin}
|
||||||
name="publishDirectory"
|
name="publishDirectory"
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
{:else}
|
{:else}
|
||||||
<div class="flex-col">
|
<div class="flex-col">
|
||||||
<div class="text-center font-bold text-xl">
|
<div class="text-center text-xl font-bold">
|
||||||
{$t('application.preview.no_previews_available')}
|
{$t('application.preview.no_previews_available')}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user