mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
fix(compose): warn when the Compose file is in a subdirectory of the base directory
Closes #9525 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a05fe524f8
commit
fc027be248
8 files changed
+32
-6
No files matched your search
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
- Add an opt-in setting to also stop an older webhook deployment that is still building when a newer push arrives. A deployment that already started to replace containers always finishes. The applications API sets it with `is_auto_cancel_building_deployments_enabled`
|
||||
- Add `cancel_previous` (`none`, `queued`, or `building`) to `/api/v1/deploy` and the MCP `deploy` tool, so a deployment from the API or MCP can cancel the older webhook, API, and MCP deployments of the same application, pull request, and server. The default is `none`. Manual, restart, and rollback deployments are never cancelled
|
||||
- Show "Not used" on the TLS certificates of the Traefik proxy page when no route and no resource on the server uses the domain, and add a **Delete unused** button that deletes all of them in one step. Traefik renews every certificate in `acme.json`, also after you delete the resource, until you delete the certificate and restart the proxy ([#12447](https://github.com/coollabsio/coolify/issues/12447))
|
||||
- Show a warning when the Docker Compose file of an application is in a subdirectory of the base directory. Coolify runs Docker Compose in the base directory, so relative paths in the file, such as `build.context: ..`, resolve from the base directory and not from the directory of the file. A button moves the directory of the file into the base directory, for example base directory `/docker` and Compose location `/docker-compose.yml` ([#9525](https://github.com/coollabsio/coolify/issues/9525))
|
||||
- Add a **Skip TLS certificate verification** setting to S3 storages, for endpoints with a self-signed or private CA certificate, for example a MinIO server on an internal network. Before, the connection test failed with "cURL error 60", because the Coolify container and the backup helper do not use the CA certificates of the host. The setting applies to the connection test, backups, restores, and the deletion of old backups. The S3 storages API sets it with `skip_tls_verification`. Browsers that download files from the storage must still trust the certificate ([#9762](https://github.com/coollabsio/coolify/issues/9762), [#4402](https://github.com/coollabsio/coolify/issues/4402))
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
'file' => null,
|
||||
'fileLabel' => null,
|
||||
'defaultFile' => null,
|
||||
'compose' => false,
|
||||
'disabled' => 'false',
|
||||
])
|
||||
|
||||
@@ -25,6 +26,17 @@
|
||||
get suggestion() {
|
||||
return this.location.slice(this.directory.length);
|
||||
},
|
||||
get fileDirectory() {
|
||||
return this.location.slice(0, this.location.lastIndexOf('/'));
|
||||
},
|
||||
get composeInSubdirectory() {
|
||||
return this.fileDirectory !== '' && !this.repeatsBase;
|
||||
},
|
||||
useFileDirectoryAsBase() {
|
||||
const fileDirectory = this.fileDirectory;
|
||||
this.file = this.location.slice(fileDirectory.length);
|
||||
this.base = this.directory + fileDirectory;
|
||||
},
|
||||
}">
|
||||
<x-forms.input label="Base directory" placeholder="/"
|
||||
helper="Repository directory used as the build root. Useful for monorepos." x-model="base"
|
||||
@@ -42,6 +54,19 @@
|
||||
<button type="button" class="font-medium underline" x-show="!({{ $disabled }})"
|
||||
@click="file = suggestion">Use <span x-text="suggestion"></span></button>
|
||||
</x-callout>
|
||||
@if ($compose)
|
||||
<x-callout class="col-span-full" x-cloak x-show="composeInSubdirectory"
|
||||
title="Relative paths resolve from the base directory">
|
||||
Docker Compose runs in the base directory
|
||||
<code class="rounded bg-black/10 px-1 dark:bg-white/10" x-text="directory || '/'"></code>,
|
||||
not in the directory of the Compose file. Relative paths in the file, such as a build context of
|
||||
<code class="rounded bg-black/10 px-1 dark:bg-white/10">..</code>, resolve from the base directory.
|
||||
If these paths are relative to the Compose file, set the base directory to
|
||||
<code class="rounded bg-black/10 px-1 dark:bg-white/10" x-text="directory + fileDirectory"></code>.
|
||||
<button type="button" class="font-medium underline" x-show="!({{ $disabled }})"
|
||||
@click="useFileDirectoryAsBase()">Use <span x-text="directory + fileDirectory"></span> as base directory</button>
|
||||
</x-callout>
|
||||
@endif
|
||||
@endif
|
||||
{{ $slot }}
|
||||
</div>
|
||||
@@ -215,7 +215,7 @@
|
||||
@if ($buildPack === 'dockercompose')
|
||||
<div class="flex flex-col gap-2">
|
||||
<x-forms.repository-paths class="lg:grid-cols-2" base="baseDirectory"
|
||||
file="dockerComposeLocation" fileLabel="Docker compose location"
|
||||
file="dockerComposeLocation" fileLabel="Docker compose location" compose
|
||||
defaultFile="/docker-compose.yaml" disabled="shouldDisable()" />
|
||||
<div class="w-full sm:w-96">
|
||||
<x-forms.checkbox instantSave id="isPreserveRepositoryEnabled"
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
@if ($build_pack === 'dockercompose')
|
||||
<x-forms.repository-paths class="sm:grid-cols-2" base="base_directory"
|
||||
file="docker_compose_location" fileLabel="Compose file"
|
||||
file="docker_compose_location" fileLabel="Compose file" compose
|
||||
defaultFile="/docker-compose.yaml" />
|
||||
@else
|
||||
<x-forms.input id="base_directory" label="Base directory" placeholder="/"
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
@if ($build_pack === 'dockercompose')
|
||||
<x-forms.repository-paths class="sm:grid-cols-2" base="base_directory"
|
||||
file="docker_compose_location" fileLabel="Compose file"
|
||||
file="docker_compose_location" fileLabel="Compose file" compose
|
||||
defaultFile="/docker-compose.yaml" />
|
||||
@else
|
||||
<x-forms.input id="base_directory" label="Base directory" placeholder="/"
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
@if ($build_pack === 'dockercompose')
|
||||
<x-forms.repository-paths class="sm:grid-cols-2" base="base_directory"
|
||||
file="docker_compose_location" fileLabel="Compose file"
|
||||
file="docker_compose_location" fileLabel="Compose file" compose
|
||||
defaultFile="/docker-compose.yaml" />
|
||||
@else
|
||||
<x-forms.input id="base_directory" label="Base directory" placeholder="/"
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
@if ($build_pack === 'dockercompose')
|
||||
<x-forms.repository-paths class="sm:grid-cols-2" base="base_directory"
|
||||
file="docker_compose_location" fileLabel="Compose file"
|
||||
file="docker_compose_location" fileLabel="Compose file" compose
|
||||
defaultFile="/docker-compose.yaml" />
|
||||
@else
|
||||
<x-forms.input id="base_directory" label="Base directory" placeholder="/"
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
@if ($build_pack === 'dockercompose')
|
||||
<x-forms.repository-paths class="sm:grid-cols-2" base="base_directory"
|
||||
file="docker_compose_location" fileLabel="Compose file"
|
||||
file="docker_compose_location" fileLabel="Compose file" compose
|
||||
defaultFile="/docker-compose.yaml" />
|
||||
@else
|
||||
<x-forms.input id="base_directory" label="Base directory" placeholder="/"
|
||||
|
||||
Reference in new issue
Block a user