Skip to content

Commit 1c10a43

Browse files
committed
fix: new resource selection view
fix: new services
1 parent 370a0b1 commit 1c10a43

File tree

13 files changed

+200
-158
lines changed

13 files changed

+200
-158
lines changed

app/Console/Commands/ServicesGenerate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private function process_file($file)
7878
if ($logo->count() > 0) {
7979
$logo = str($logo[0])->after('# logo:')->trim()->value();
8080
} else {
81-
$logo = 'svgs/unknown.svg';
81+
$logo = 'svgs/coolify.png';
8282
}
8383
$minversion = collect(preg_grep('/^# minversion:/', explode("\n", $content)))->values();
8484
if ($minversion->count() > 0) {

app/Livewire/Project/New/Select.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ public function loadServices2()
9494
{
9595
$services = get_service_templates(true);
9696
$services = collect($services)->map(function ($service, $key) {
97-
return array_merge($service, [
97+
return [
9898
'name' => str($key)->headline(),
99-
'logo' => asset($service['logo']),
100-
]);
99+
'logo' => asset(data_get($service, 'logo', 'svgs/unknown.svg')),
100+
] + (array) $service;
101101
})->all();
102102
$gitBasedApplications = [
103103
[
@@ -256,6 +256,7 @@ public function instantSave()
256256

257257
public function setType(string $type)
258258
{
259+
$type = str($type)->lower()->value();
259260
if ($this->loading) {
260261
return;
261262
}

app/Models/Service.php

Lines changed: 116 additions & 59 deletions
Large diffs are not rendered by default.

public/svgs/coolify.png

4.14 KB
Loading

public/svgs/tolgee.svg

Lines changed: 5 additions & 0 deletions
Loading

resources/views/components/resource-view.blade.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
'hover:border-l-red-500 cursor-not-allowed' => $upgrade,
55
])>
66
<div class="flex items-center">
7-
87
{{ $logo }}
98
<div class="flex flex-col pl-2 ">
109
<div class="dark:text-white text-md">
@@ -19,4 +18,8 @@
1918
@endif
2019
</div>
2120
</div>
21+
@isset($documentation)
22+
<div class="flex-1"></div>
23+
{{ $documentation }}
24+
@endisset
2225
</div>

resources/views/livewire/project/new/select.blade.php

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class="w-[4.5rem]
4848
</div>
4949
</template>
5050
</div>
51-
5251
<h2 x-show="filteredDatabases.length > 0" class="py-4"> Databases </h2>
5352
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-2">
5453
<template x-for="database in filteredDatabases" :key="database.id">
@@ -78,41 +77,44 @@ class="dark:text-white underline" target="_blank"
7877

7978
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-2">
8079
<template x-for="service in filteredServices" :key="service.name">
81-
<x-resource-view @click="setType('one-click-service-' + service.name)">
82-
<x-slot:title>
83-
<template x-if="service.name">
84-
<span x-text="service.name"></span>
85-
</template>
86-
</x-slot>
87-
<x-slot:description>
88-
<template x-if="service.slogan">
89-
<span x-text="service.slogan"></span>
90-
</template>
91-
</x-slot>
92-
<x-slot:logo>
93-
<template x-if="service.logo">
94-
<img class="w-[4.5rem] aspect-square h-[4.5rem] p-2 transition-all duration-200 opacity-30 grayscale group-hover:grayscale-0 group-hover:opacity-100"
95-
:src='service.logo'>
96-
</template>
97-
</x-slot:logo>
98-
<x-slot:documentation>
99-
<template x-show="service.documentation">
100-
<div>
101-
<div class="flex-1"></div>
102-
<div class="flex items-center px-2 " title="Read the documentation.">
80+
<div x-on:click="setType('one-click-service-' + service.name)">
81+
<x-resource-view>
82+
<x-slot:title>
83+
<template x-if="service.name">
84+
<span x-text="service.name"></span>
85+
</template>
86+
</x-slot>
87+
<x-slot:description>
88+
<template x-if="service.slogan">
89+
<span x-text="service.slogan"></span>
90+
</template>
91+
</x-slot>
92+
<x-slot:logo>
93+
<template x-if="service.logo">
94+
<img class="w-[4.5rem] aspect-square h-[4.5rem] p-2 transition-all duration-200 opacity-30 grayscale group-hover:grayscale-0 group-hover:opacity-100"
95+
:src='service.logo'>
96+
</template>
97+
</x-slot:logo>
98+
<x-slot:documentation>
99+
<template x-if="service.documentation">
100+
<div class="flex items-center px-2" title="Read the documentation.">
103101
<a class="p-2 rounded hover:bg-coolgray-200 hover:no-underline group-hover:dark:text-white text-neutral-600"
104102
onclick="event.stopPropagation()" :href="service.documentation"
105103
target="_blank">
106104
Docs
107105
</a>
108106
</div>
109-
</div>
110-
</template>
111-
</x-slot:documentation>
112-
</x-resource-view>
107+
</template>
108+
</x-slot:documentation>
109+
</x-resource-view>
110+
</div>
113111
</template>
114112
</div>
115113
</div>
114+
<div
115+
x-show="filteredGitBasedApplications.length === 0 && filteredDockerBasedApplications.length === 0 && filteredDatabases.length === 0 && filteredServices.length === 0 && loading === false">
116+
<div>No resources found.</div>
117+
</div>
116118
<script>
117119
function sortFn(a, b) {
118120
return a.name.localeCompare(b.name)

templates/compose/langfuse.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@
44
# logo: svgs/langfuse.png
55
# port: 3000
66

7-
version: "3"
8-
9-
volumes:
10-
pg_data: null
11-
127
services:
138
langfuse:
149
image: langfuse/langfuse:2
15-
restart: always
1610
environment:
1711
- SERVICE_FQDN_LANGFUSE_3000
1812
- DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-langfuse}
@@ -23,7 +17,14 @@ services:
2317
- NEXTAUTH_SECRET=${SERVICE_BASE64_64_NEXTAUTHSECRET}
2418
- TELEMETRY_ENABLED=${TELEMETRY_ENABLED:-false}
2519
- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}
26-
- HOSTNAME=0.0.0.0
20+
- HOSTNAME=${HOSTNAME:-0.0.0.0}
21+
- LANGFUSE_INIT_USER_NAME=${LANGFUSE_INIT_USER_NAME:-Admin}
22+
- LANGFUSE_INIT_USER_EMAIL=${LANGFUSE_INIT_USER_EMAIL:[email protected]}
23+
- LANGFUSE_INIT_USER_PASSWORD=${SERVICE_PASSWORD_LANGFUSE}
24+
- LANGFUSE_INIT_ORG_ID=${LANGFUSE_INIT_ORG_ID:-my-org}
25+
- LANGFUSE_INIT_ORG_NAME=${LANGFUSE_INIT_ORG_NAME:-My Org}
26+
- LANGFUSE_INIT_PROJECT_ID=${LANGFUSE_INIT_PROJECT_ID:-my-project}
27+
- LANGFUSE_INIT_PROJECT_NAME=${LANGFUSE_INIT_PROJECT_NAME:-My Project}
2728
healthcheck:
2829
test:
2930
- CMD
@@ -44,7 +45,7 @@ services:
4445
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
4546
- POSTGRES_USER=$SERVICE_USER_POSTGRES
4647
volumes:
47-
- "pg_data:/var/lib/postgresql/data"
48+
- "pg-data:/var/lib/postgresql/data"
4849
healthcheck:
4950
test:
5051
- CMD-SHELL

templates/compose/litellm.yaml

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,33 @@
44
# logo: svgs/litellm.svg
55
# port: 4000
66

7-
version: "3"
8-
9-
volumes:
10-
pg_data: null
11-
redis_data: null
12-
137
services:
148
litellm:
159
image: "ghcr.io/berriai/litellm-database:main-stable"
16-
restart: always
1710
depends_on:
1811
postgres:
1912
condition: service_healthy
2013
redis:
2114
condition: service_healthy
2215
environment:
2316
- SERVICE_FQDN_LITELLM_4000
24-
- LITELLM_LOG=ERROR
25-
- LITELLM_MODE=PRODUCTION
26-
- "LITELLM_MASTER_KEY=${SERVICE_PASSWORD_MASTERKEY}"
27-
- "UI_USERNAME=${SERVICE_USER_UI}"
28-
- "UI_PASSWORD=${SERVICE_PASSWORD_UI}"
29-
- "DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-litellm}"
30-
- REDIS_HOST=redis
31-
- REDIS_PORT=6379
32-
- "POSTGRES_USER=${SERVICE_USER_POSTGRES}"
33-
- "POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}"
34-
- "POSTGRES_DB=${POSTGRES_DB:-litellm}"
35-
- "OPENAI_API_KEY=${OPENAI_API_KEY}"
36-
- "OPENAI_API_BASE=${OPENAI_API_BASE}"
37-
- "ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}"
38-
- "ANTHROPIC_API_BASE=${ANTHROPIC_API_BASE}"
39-
- "VOYAGE_API_KEY=${VOYAGE_API_KEY}"
40-
- "VOYAGE_API_BASE=${VOYAGE_API_BASE}"
17+
- LITELLM_LOG=${LITELLM_LOG:-ERROR}
18+
- LITELLM_MODE=${LITELLM_MODE:-PRODUCTION}
19+
- LITELLM_MASTER_KEY=${SERVICE_PASSWORD_MASTERKEY}
20+
- UI_USERNAME=${SERVICE_USER_UI}
21+
- UI_PASSWORD=${SERVICE_PASSWORD_UI}
22+
- DATABASE_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgres:5432/${POSTGRES_DB:-litellm}
23+
- REDIS_HOST=${REDIS_HOST:-redis}
24+
- REDIS_PORT=${REDIS_PORT:-6379}
25+
- POSTGRES_USER=${SERVICE_USER_POSTGRES}
26+
- POSTGRES_PASSWORD=${SERVICE_PASSWORD_POSTGRES}
27+
- POSTGRES_DB=${POSTGRES_DB:-litellm}
28+
- OPENAI_API_KEY=${OPENAI_API_KEY}
29+
- OPENAI_API_BASE=${OPENAI_API_BASE}
30+
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
31+
- ANTHROPIC_API_BASE=${ANTHROPIC_API_BASE}
32+
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
33+
- VOYAGE_API_BASE=${VOYAGE_API_BASE}
4134
volumes:
4235
- type: bind
4336
source: ./litellm-config.yaml
@@ -154,7 +147,7 @@ services:
154147
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
155148
- POSTGRES_USER=$SERVICE_USER_POSTGRES
156149
volumes:
157-
- "pg_data:/var/lib/postgresql/data"
150+
- "pg-data:/var/lib/postgresql/data"
158151
healthcheck:
159152
test:
160153
- CMD-SHELL
@@ -166,7 +159,7 @@ services:
166159
image: redis:7-alpine
167160
command: redis-server --appendonly yes
168161
volumes:
169-
- redis_data:/data
162+
- redis-data:/data
170163
healthcheck:
171164
test: ["CMD", "redis-cli", "ping"]
172165
interval: 5s

templates/compose/prefect.yaml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,19 @@
44
# logo: svgs/prefect.png
55
# port: 4200
66

7-
version: "3"
8-
9-
volumes:
10-
pg_data:
11-
127
services:
138
prefect:
149
image: "prefecthq/prefect:3-latest"
15-
restart: always
1610
depends_on:
1711
postgresql:
1812
condition: service_healthy
1913
environment:
2014
- SERVICE_FQDN_PREFECT_4200
2115
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@postgresql:5432/${POSTGRES_DB:-prefect}
2216
- PREFECT_API_KEY=${SERVICE_PASSWORD_APIKEY}
23-
- PREFECT_EXPERIMENTAL_WARN=true
24-
- PREFECT_EXPERIMENTAL_ENABLE_SCHEDULE_CONCURRENCY=true
25-
- PREFECT_RUNNER_SERVER_ENABLE=true
17+
- PREFECT_EXPERIMENTAL_WARN=${PREFECT_EXPERIMENTAL_WARN:-false}
18+
- PREFECT_EXPERIMENTAL_ENABLE_SCHEDULE_CONCURRENCY=${PREFECT_EXPERIMENTAL_ENABLE_SCHEDULE_CONCURRENCY:-false}
19+
- PREFECT_RUNNER_SERVER_ENABLE=${PREFECT_RUNNER_SERVER_ENABLE:-false}
2620
- PREFECT_DEFAULT_WORK_POOL_NAME=${DEFAULT_POOL_NAME:-default}
2721
command:
2822
- prefect
@@ -43,9 +37,8 @@ services:
4337
retries: 3
4438
postgresql:
4539
image: "postgres:16-alpine"
46-
restart: always
4740
volumes:
48-
- "pg_data:/var/lib/postgresql/data"
41+
- "pg-data:/var/lib/postgresql/data"
4942
environment:
5043
- POSTGRES_USER=$SERVICE_USER_POSTGRES
5144
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
@@ -59,7 +52,6 @@ services:
5952
retries: 3
6053
agent:
6154
image: "prefecthq/prefect:3-python3.12"
62-
restart: always
6355
depends_on:
6456
prefect:
6557
condition: service_healthy
@@ -68,10 +60,10 @@ services:
6860
- prefect
6961
- worker
7062
- start
71-
- "--pool=$${DEFAULT_POOL_NAME}"
72-
- "--with-healthcheck"
73-
- "--name=$${DEFAULT_WORKER_NAME}"
74-
- "--limit=$${DEFAULT_POOL_LIMIT}"
63+
- --pool=${DEFAULT_POOL_NAME}
64+
- --with-healthcheck
65+
- --name=${DEFAULT_WORKER_NAME}
66+
- --limit=${DEFAULT_POOL_LIMIT}
7567
environment:
7668
- PREFECT_API_URL=http://prefect:4200/api
7769
- PREFECT_API_KEY=${SERVICE_PASSWORD_APIKEY}

0 commit comments

Comments
 (0)