{ if (isOpen) focusFirstInput(); }}> {gitStack ? 'Edit git stack' : 'Deploy from Git'} {gitStack ? 'Update git stack settings' : 'Deploy a compose stack from a Git repository'}
{#if !gitStack}
{#if formRepoMode === 'existing'} { formRepositoryId = v ? parseInt(v) : null; errors.repository = undefined; }} > {#if selectedRepo} {@const repoPath = selectedRepo.url.replace(/^https?:\/\/[^/]+\//, '').replace(/\.git$/, '')}
{#if selectedRepo.url.includes('github.com')} {:else} {/if} {selectedRepo.name}
{:else} Select a repository... {/if}
{#each repositories as repo} {@const repoPath = repo.url.replace(/^https?:\/\/[^/]+\//, '').replace(/\.git$/, '')}
{#if repo.url.includes('github.com')} {:else} {/if} {repo.name} - {repoPath} {repo.branch}
{/each}
{#if errors.repository}

{errors.repository}

{:else if repositories.length === 0}

No repositories configured. Click "Add new" to add one.

{/if} {:else}
errors.repoName = undefined} /> {#if errors.repoName}

{errors.repoName}

{/if}
errors.repoUrl = undefined} /> {#if errors.repoUrl}

{errors.repoUrl}

{/if}
formNewRepoCredentialId = v === 'none' ? null : parseInt(v)} > {@const selectedCred = credentials.find(c => c.id === formNewRepoCredentialId)} {#if selectedCred} {#if selectedCred.authType === 'ssh'} {:else if selectedCred.authType === 'password'} {:else} {/if} {selectedCred.name} ({getAuthLabel(selectedCred.authType)}) {:else} None (public) {/if} None (public) {#each credentials as cred} {#if cred.authType === 'ssh'} {:else if cred.authType === 'password'} {:else} {/if} {cred.name} ({getAuthLabel(cred.authType)}) {/each}
{/if}
{/if}
{ errors.stackName = undefined; formStackNameUserModified = true; }} /> {#if errors.stackName}

{errors.stackName}

{:else}

This will be the name of the deployed stack

{/if}

Path to the compose file within the repository

{#if gitStack && envFiles.length > 0} { formEnvFilePath = v === 'none' ? null : v; if (formEnvFilePath) { loadEnvFileContents(formEnvFilePath); } else { fileEnvVars = {}; } }} > {#if loadingEnvFiles} Loading... {:else if formEnvFilePath} {formEnvFilePath} {:else} None {/if} None {#each envFiles as file} {file} {/each} {:else} {/if}

Path to the .env file within the repository (optional)

Automatically sync repository and redeploy stack if there are changes.

{#if formAutoUpdate} formAutoUpdateCron = cron} /> {/if}

Receive push events from your Git provider to trigger sync and redeploy.

{#if formWebhookEnabled} {#if gitStack}
{/if}
{#if gitStack && formWebhookSecret} {/if}
{#if !gitStack}

The webhook URL will be available after creating the stack.

{:else}

Configure this URL in your Git provider. Secret is used for signature verification.

{/if} {/if}
{#if !gitStack}

Clone and deploy the stack immediately

{/if} {#if formError}

{formError}

{/if}
{#if gitStack} {:else} {/if}