feat: specific git commit deployment
feat: revert to specific image fix: no system wide docker registries
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
</script>
|
||||
|
||||
<ul class="menu border bg-coolgray-100 border-coolgray-200 rounded p-2 space-y-2">
|
||||
<li class="menu-title">
|
||||
<span>General</span>
|
||||
</li>
|
||||
{#if $appSession.teamId === '0'}
|
||||
<li class="menu-title">
|
||||
<span>General</span>
|
||||
</li>
|
||||
<li class="rounded" class:bg-coollabs={$page.url.pathname === `/settings/coolify`}>
|
||||
<a href={`/settings/coolify`} class="no-underline w-full"
|
||||
><svg
|
||||
@@ -27,35 +27,35 @@
|
||||
</svg>Coolify Settings</a
|
||||
>
|
||||
</li>
|
||||
|
||||
<li class="rounded" class:bg-coollabs={$page.url.pathname === `/settings/docker`}>
|
||||
<a href={`/settings/docker`} class="no-underline w-full">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="w-6 h-6"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M22 12.54c-1.804 -.345 -2.701 -1.08 -3.523 -2.94c-.487 .696 -1.102 1.568 -.92 2.4c.028 .238 -.32 1.002 -.557 1h-14c0 5.208 3.164 7 6.196 7c4.124 .022 7.828 -1.376 9.854 -5c1.146 -.101 2.296 -1.505 2.95 -2.46z"
|
||||
/>
|
||||
<path d="M5 10h3v3h-3z" />
|
||||
<path d="M8 10h3v3h-3z" />
|
||||
<path d="M11 10h3v3h-3z" />
|
||||
<path d="M8 7h3v3h-3z" />
|
||||
<path d="M11 7h3v3h-3z" />
|
||||
<path d="M11 4h3v3h-3z" />
|
||||
<path d="M4.571 18c1.5 0 2.047 -.074 2.958 -.78" />
|
||||
<line x1="10" y1="16" x2="10" y2="16.01" />
|
||||
</svg>Docker Registries</a
|
||||
>
|
||||
</li>
|
||||
{/if}
|
||||
<li class="rounded" class:bg-coollabs={$page.url.pathname === `/settings/docker`}>
|
||||
<a href={`/settings/docker`} class="no-underline w-full">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="w-6 h-6"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
fill="none"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M22 12.54c-1.804 -.345 -2.701 -1.08 -3.523 -2.94c-.487 .696 -1.102 1.568 -.92 2.4c.028 .238 -.32 1.002 -.557 1h-14c0 5.208 3.164 7 6.196 7c4.124 .022 7.828 -1.376 9.854 -5c1.146 -.101 2.296 -1.505 2.95 -2.46z"
|
||||
/>
|
||||
<path d="M5 10h3v3h-3z" />
|
||||
<path d="M8 10h3v3h-3z" />
|
||||
<path d="M11 10h3v3h-3z" />
|
||||
<path d="M8 7h3v3h-3z" />
|
||||
<path d="M11 7h3v3h-3z" />
|
||||
<path d="M11 4h3v3h-3z" />
|
||||
<path d="M4.571 18c1.5 0 2.047 -.074 2.958 -.78" />
|
||||
<line x1="10" y1="16" x2="10" y2="16.01" />
|
||||
</svg>Docker Registries</a
|
||||
>
|
||||
</li>
|
||||
|
||||
<li class="menu-title">
|
||||
<span>Keys & Certificates</span>
|
||||
</li>
|
||||
|
||||
@@ -22,17 +22,13 @@
|
||||
import { errorNotification } from '$lib/common';
|
||||
import CopyPasswordField from '$lib/components/CopyPasswordField.svelte';
|
||||
import { addToast } from '$lib/store';
|
||||
const publicRegistries = registries.public;
|
||||
const privateRegistries = registries.private;
|
||||
|
||||
let isModalActive = false;
|
||||
|
||||
let newRegistry = {
|
||||
name: '',
|
||||
username: '',
|
||||
password: '',
|
||||
url: '',
|
||||
isSystemWide: false
|
||||
url: ''
|
||||
};
|
||||
|
||||
async function handleSubmit() {
|
||||
@@ -71,6 +67,37 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
async function addRegistry(type: string) {
|
||||
switch (type) {
|
||||
case 'dockerhub':
|
||||
newRegistry = {
|
||||
name: 'Docker Hub',
|
||||
username: '',
|
||||
password: '',
|
||||
url: 'https://index.docker.io/v1/'
|
||||
};
|
||||
await handleSubmit();
|
||||
break;
|
||||
case 'gcrio':
|
||||
newRegistry = {
|
||||
name: 'Google Container Registry',
|
||||
username: '',
|
||||
password: '',
|
||||
url: 'https://gcr.io'
|
||||
};
|
||||
await handleSubmit();
|
||||
break;
|
||||
case 'github':
|
||||
newRegistry = {
|
||||
name: 'GitHub Container Registry',
|
||||
username: '',
|
||||
password: '',
|
||||
url: 'https://ghcr.io'
|
||||
};
|
||||
await handleSubmit();
|
||||
break;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="w-full">
|
||||
@@ -81,57 +108,34 @@
|
||||
>Add Docker Registry</label
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center pb-4 gap-2">
|
||||
<div class="text-xs">Quick Action</div>
|
||||
<button class="btn btn-sm text-xs" on:click={() => addRegistry('dockerhub')}>DockerHub</button>
|
||||
<button class="btn btn-sm text-xs" on:click={() => addRegistry('gcrio')}
|
||||
>Google Container Registry (gcr.io)</button
|
||||
>
|
||||
<button class="btn btn-sm text-xs" on:click={() => addRegistry('github')}
|
||||
>GitHub Container Registry (ghcr.io)</button
|
||||
>
|
||||
</div>
|
||||
{#if registries.length > 0}
|
||||
<div class="mx-auto w-full">
|
||||
<table class="table w-full">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>SystemWide</th>
|
||||
<th>Username</th>
|
||||
<th>Password</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#each publicRegistries as registry}
|
||||
{#each registries as registry}
|
||||
<tr>
|
||||
<td>{registry.name}<div class="text-xs">{registry.url}</div></td>
|
||||
<td>{(registry.isSystemWide && 'Yes') || 'No'}</td>
|
||||
<td>
|
||||
<CopyPasswordField
|
||||
name="username"
|
||||
id="Username"
|
||||
bind:value={registry.username}
|
||||
placeholder="Username"
|
||||
/></td
|
||||
>
|
||||
<td
|
||||
><CopyPasswordField
|
||||
isPasswordField={true}
|
||||
name="Password"
|
||||
id="Password"
|
||||
bind:value={registry.password}
|
||||
placeholder="Password"
|
||||
/></td
|
||||
>{registry.name}
|
||||
<div class="text-xs">{registry.url}</div></td
|
||||
>
|
||||
<td>
|
||||
<button on:click={() => setRegistry(registry)} class="btn btn-sm btn-primary"
|
||||
>Set</button
|
||||
>
|
||||
{#if registry.id !== '0'}
|
||||
<button
|
||||
on:click={() => deleteDockerRegistry(registry.id)}
|
||||
class="btn btn-sm btn-error">Delete</button
|
||||
>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/each}
|
||||
{#each privateRegistries as registry}
|
||||
<tr>
|
||||
<td>{registry.name} <div class="text-xs">{registry.url}</div></td>
|
||||
<td>{(registry.isSystemWide && 'Yes') || 'No'}</td>
|
||||
<td>
|
||||
<CopyPasswordField
|
||||
name="username"
|
||||
@@ -166,6 +170,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if isModalActive}
|
||||
|
||||
Reference in New Issue
Block a user