mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Compare commits
9 commits
a7ebd5e9cf
...
2b6f63ad6f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b6f63ad6f | ||
|
|
11007771f0 | ||
|
|
db52a20ed8 | ||
|
|
8dfb393de0 | ||
|
|
80be2628d0 | ||
|
|
92cf88070c | ||
|
|
7c5a6bc96c | ||
|
|
bf6b3b8c71 | ||
|
|
9595d8d9c6 |
7 changed files with 52 additions and 19 deletions
|
|
@ -1095,6 +1095,17 @@ class ApplicationsController extends Controller
|
|||
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
||||
}
|
||||
$destination = $destinations->first();
|
||||
if ($destinations->count() > 1 && $request->has('destination_uuid')) {
|
||||
$destination = $destinations->where('uuid', $request->destination_uuid)->first();
|
||||
if (! $destination) {
|
||||
return response()->json([
|
||||
'message' => 'Validation failed.',
|
||||
'errors' => [
|
||||
'destination_uuid' => 'Provided destination_uuid does not belong to the specified server.',
|
||||
],
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
if ($type === 'public') {
|
||||
$validationRules = [
|
||||
'git_repository' => ['string', 'required', new ValidGitRepositoryUrl],
|
||||
|
|
|
|||
|
|
@ -377,6 +377,17 @@ class ServicesController extends Controller
|
|||
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
||||
}
|
||||
$destination = $destinations->first();
|
||||
if ($destinations->count() > 1 && $request->has('destination_uuid')) {
|
||||
$destination = $destinations->where('uuid', $request->destination_uuid)->first();
|
||||
if (! $destination) {
|
||||
return response()->json([
|
||||
'message' => 'Validation failed.',
|
||||
'errors' => [
|
||||
'destination_uuid' => 'Provided destination_uuid does not belong to the specified server.',
|
||||
],
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
$services = get_service_templates();
|
||||
$serviceKeys = $services->keys();
|
||||
if ($serviceKeys->contains($request->type)) {
|
||||
|
|
@ -543,6 +554,17 @@ class ServicesController extends Controller
|
|||
return response()->json(['message' => 'Server has multiple destinations and you do not set destination_uuid.'], 400);
|
||||
}
|
||||
$destination = $destinations->first();
|
||||
if ($destinations->count() > 1 && $request->has('destination_uuid')) {
|
||||
$destination = $destinations->where('uuid', $request->destination_uuid)->first();
|
||||
if (! $destination) {
|
||||
return response()->json([
|
||||
'message' => 'Validation failed.',
|
||||
'errors' => [
|
||||
'destination_uuid' => 'Provided destination_uuid does not belong to the specified server.',
|
||||
],
|
||||
], 422);
|
||||
}
|
||||
}
|
||||
if (! isBase64Encoded($request->docker_compose_raw)) {
|
||||
return response()->json([
|
||||
'message' => 'Validation failed.',
|
||||
|
|
|
|||
|
|
@ -1305,19 +1305,18 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int
|
|||
}
|
||||
if (! $isDatabase && $fqdns instanceof Collection && $fqdns->count() > 0) {
|
||||
$shouldGenerateLabelsExactly = $resource->destination->server->settings->generate_exact_labels;
|
||||
$uuid = $resource->uuid;
|
||||
$network = data_get($resource, 'destination.network');
|
||||
// Use local variable to avoid mutating $uuid which is used for volume paths
|
||||
$labelUuid = $resource->uuid;
|
||||
$labelNetwork = data_get($resource, 'destination.network');
|
||||
if ($isPullRequest) {
|
||||
$uuid = "{$resource->uuid}-{$pullRequestId}";
|
||||
}
|
||||
if ($isPullRequest) {
|
||||
$network = "{$resource->destination->network}-{$pullRequestId}";
|
||||
$labelUuid = "{$resource->uuid}-{$pullRequestId}";
|
||||
$labelNetwork = "{$resource->destination->network}-{$pullRequestId}";
|
||||
}
|
||||
if ($shouldGenerateLabelsExactly) {
|
||||
switch ($server->proxyType()) {
|
||||
case ProxyTypes::TRAEFIK->value:
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
||||
uuid: $uuid,
|
||||
uuid: $labelUuid,
|
||||
domains: $fqdns,
|
||||
is_force_https_enabled: $originalResource->isForceHttpsEnabled(),
|
||||
serviceLabels: $serviceLabels,
|
||||
|
|
@ -1329,8 +1328,8 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int
|
|||
break;
|
||||
case ProxyTypes::CADDY->value:
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
||||
network: $network,
|
||||
uuid: $uuid,
|
||||
network: $labelNetwork,
|
||||
uuid: $labelUuid,
|
||||
domains: $fqdns,
|
||||
is_force_https_enabled: $originalResource->isForceHttpsEnabled(),
|
||||
serviceLabels: $serviceLabels,
|
||||
|
|
@ -1344,7 +1343,7 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int
|
|||
}
|
||||
} else {
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForTraefik(
|
||||
uuid: $uuid,
|
||||
uuid: $labelUuid,
|
||||
domains: $fqdns,
|
||||
is_force_https_enabled: $originalResource->isForceHttpsEnabled(),
|
||||
serviceLabels: $serviceLabels,
|
||||
|
|
@ -1354,8 +1353,8 @@ function applicationParser(Application $resource, int $pull_request_id = 0, ?int
|
|||
image: $image
|
||||
));
|
||||
$serviceLabels = $serviceLabels->merge(fqdnLabelsForCaddy(
|
||||
network: $network,
|
||||
uuid: $uuid,
|
||||
network: $labelNetwork,
|
||||
uuid: $labelUuid,
|
||||
domains: $fqdns,
|
||||
is_force_https_enabled: $originalResource->isForceHttpsEnabled(),
|
||||
serviceLabels: $serviceLabels,
|
||||
|
|
|
|||
|
|
@ -527,6 +527,7 @@
|
|||
@endif
|
||||
</div>
|
||||
|
||||
<h3 class="pt-8">Labels</h3>
|
||||
@if ($application->settings->is_container_label_readonly_enabled)
|
||||
<x-forms.textarea readonly disabled label="Container Labels" rows="15" id="customLabels"
|
||||
monacoEditorLanguage="ini" useMonacoEditor x-bind:disabled="!canUpdate"></x-forms.textarea>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
services:
|
||||
n8n:
|
||||
image: n8nio/n8n:2.1.5
|
||||
image: n8nio/n8n:2.10.2
|
||||
environment:
|
||||
- SERVICE_URL_N8N_5678
|
||||
- N8N_EDITOR_BASE_URL=${SERVICE_URL_N8N}
|
||||
|
|
@ -54,7 +54,7 @@ services:
|
|||
retries: 10
|
||||
|
||||
n8n-worker:
|
||||
image: n8nio/n8n:2.1.5
|
||||
image: n8nio/n8n:2.10.2
|
||||
command: worker
|
||||
environment:
|
||||
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-UTC}
|
||||
|
|
@ -122,7 +122,7 @@ services:
|
|||
retries: 10
|
||||
|
||||
task-runners:
|
||||
image: n8nio/runners:2.1.5
|
||||
image: n8nio/runners:2.10.2
|
||||
environment:
|
||||
- N8N_RUNNERS_TASK_BROKER_URI=${N8N_RUNNERS_TASK_BROKER_URI:-http://n8n-worker:5679}
|
||||
- N8N_RUNNERS_AUTH_TOKEN=$SERVICE_PASSWORD_N8N
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
services:
|
||||
n8n:
|
||||
image: n8nio/n8n:2.1.5
|
||||
image: n8nio/n8n:2.10.2
|
||||
environment:
|
||||
- SERVICE_URL_N8N_5678
|
||||
- N8N_EDITOR_BASE_URL=${SERVICE_URL_N8N}
|
||||
|
|
@ -47,7 +47,7 @@ services:
|
|||
retries: 10
|
||||
|
||||
task-runners:
|
||||
image: n8nio/runners:2.1.5
|
||||
image: n8nio/runners:2.10.2
|
||||
environment:
|
||||
- N8N_RUNNERS_TASK_BROKER_URI=${N8N_RUNNERS_TASK_BROKER_URI:-http://n8n:5679}
|
||||
- N8N_RUNNERS_AUTH_TOKEN=$SERVICE_PASSWORD_N8N
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
services:
|
||||
n8n:
|
||||
image: n8nio/n8n:2.1.5
|
||||
image: n8nio/n8n:2.10.2
|
||||
environment:
|
||||
- SERVICE_URL_N8N_5678
|
||||
- N8N_EDITOR_BASE_URL=${SERVICE_URL_N8N}
|
||||
|
|
@ -38,7 +38,7 @@ services:
|
|||
retries: 10
|
||||
|
||||
task-runners:
|
||||
image: n8nio/runners:2.1.5
|
||||
image: n8nio/runners:2.10.2
|
||||
environment:
|
||||
- N8N_RUNNERS_TASK_BROKER_URI=${N8N_RUNNERS_TASK_BROKER_URI:-http://n8n:5679}
|
||||
- N8N_RUNNERS_AUTH_TOKEN=${SERVICE_PASSWORD_N8N}
|
||||
|
|
|
|||
Loading…
Reference in a new issue