mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
Compare commits
12 commits
3431cce1cd
...
b3d5ad1dfd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3d5ad1dfd | ||
|
|
5b701ebb07 | ||
|
|
01aa534556 | ||
|
|
11007771f0 | ||
|
|
db52a20ed8 | ||
|
|
8dfb393de0 | ||
|
|
80be2628d0 | ||
|
|
92cf88070c | ||
|
|
7c5a6bc96c | ||
|
|
bf6b3b8c71 | ||
|
|
63c5192ff6 | ||
|
|
e180f27441 |
12 changed files with 176 additions and 15 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.',
|
||||
|
|
|
|||
1
public/svgs/jellyseerr.svg
Normal file
1
public/svgs/jellyseerr.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.7 KiB |
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<div class="pb-4">Code source of your application.</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
@if (!$privateKeyId)
|
||||
@if (blank($privateKeyId))
|
||||
<div>Currently connected source: <span
|
||||
class="font-bold text-warning">{{ data_get($application, 'source.name', 'No source connected') }}</span>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@if ($privateKeyId)
|
||||
@if (filled($privateKeyId))
|
||||
<h3 class="pt-4">Deploy Key</h3>
|
||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
||||
class="dark:text-warning">{{ $privateKeyName }}</span>
|
||||
|
|
|
|||
31
templates/compose/jellyseerr.yaml
Normal file
31
templates/compose/jellyseerr.yaml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# documentation: https://docs.seerr.dev/getting-started/docker?docker-methods=docker-compose
|
||||
# slogan: Jellyseerr is a request management and media discovery tool built to work with your existing Jellyfin ecosystem.
|
||||
# category: media
|
||||
# tags: media,request,jellyfin,plex,emby,sonarr,radarr
|
||||
# logo: svgs/jellyseerr.svg
|
||||
# port: 5055
|
||||
|
||||
services:
|
||||
jellyseerr:
|
||||
image: ghcr.io/fallenbagel/jellyseerr:latest
|
||||
environment:
|
||||
- SERVICE_URL_JELLYSEERR_5055
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=${TZ:-America/Toronto}
|
||||
volumes:
|
||||
- jellyseerr-config:/app/config
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD",
|
||||
"wget",
|
||||
"--tries",
|
||||
"1",
|
||||
"--no-verbose",
|
||||
"--spider",
|
||||
"http://localhost:5055/api/v1/status",
|
||||
]
|
||||
interval: 2s
|
||||
timeout: 10s
|
||||
retries: 15
|
||||
|
|
@ -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}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
59
tests/Feature/ApplicationSourceLocalhostKeyTest.php
Normal file
59
tests/Feature/ApplicationSourceLocalhostKeyTest.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
use App\Livewire\Project\Application\Source;
|
||||
use App\Models\Application;
|
||||
use App\Models\Environment;
|
||||
use App\Models\PrivateKey;
|
||||
use App\Models\Project;
|
||||
use App\Models\Team;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Livewire\Livewire;
|
||||
|
||||
uses(RefreshDatabase::class);
|
||||
|
||||
beforeEach(function () {
|
||||
$this->team = Team::factory()->create();
|
||||
$this->user = User::factory()->create();
|
||||
$this->team->members()->attach($this->user->id, ['role' => 'owner']);
|
||||
|
||||
$this->actingAs($this->user);
|
||||
session(['currentTeam' => $this->team]);
|
||||
|
||||
$this->project = Project::factory()->create(['team_id' => $this->team->id]);
|
||||
$this->environment = Environment::factory()->create(['project_id' => $this->project->id]);
|
||||
});
|
||||
|
||||
describe('Application Source with localhost key (id=0)', function () {
|
||||
test('renders deploy key section when private_key_id is 0', function () {
|
||||
$privateKey = PrivateKey::create([
|
||||
'id' => 0,
|
||||
'name' => 'localhost',
|
||||
'private_key' => 'test-key-content',
|
||||
'team_id' => $this->team->id,
|
||||
]);
|
||||
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
'private_key_id' => 0,
|
||||
]);
|
||||
|
||||
Livewire::test(Source::class, ['application' => $application])
|
||||
->assertSuccessful()
|
||||
->assertSet('privateKeyId', 0)
|
||||
->assertSee('Deploy Key');
|
||||
});
|
||||
|
||||
test('shows no source connected section when private_key_id is null', function () {
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
'private_key_id' => null,
|
||||
]);
|
||||
|
||||
Livewire::test(Source::class, ['application' => $application])
|
||||
->assertSuccessful()
|
||||
->assertSet('privateKeyId', null)
|
||||
->assertDontSee('Deploy Key')
|
||||
->assertSee('No source connected');
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue