Skip to content

Commit 565cb54

Browse files
authored
Merge branch 'coollabsio:main' into service-getoutline
2 parents eb57659 + 435c0ba commit 565cb54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1435
-490
lines changed

.env.development.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ DB_PASSWORD=password
2121
DB_HOST=host.docker.internal
2222
DB_PORT=5432
2323

24-
#Set custom ray port
24+
# Ray Configuration
25+
# Set to true to enable Ray
26+
RAY_ENABLED=false
27+
# Set custom ray port
2528
RAY_PORT=
2629

2730
# Special Keys for Andras

.github/workflows/coolify-helper-next.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
registry: ${{ env.REGISTRY }}
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
28+
- name: Get Version
29+
id: version
30+
run: |
31+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
2832
- name: Build image and push to registry
2933
uses: docker/build-push-action@v5
3034
with:
@@ -33,7 +37,7 @@ jobs:
3337
file: docker/coolify-helper/Dockerfile
3438
platforms: linux/amd64
3539
push: true
36-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next
3741
aarch64:
3842
runs-on: [ self-hosted, arm64 ]
3943
permissions:
@@ -47,6 +51,10 @@ jobs:
4751
registry: ${{ env.REGISTRY }}
4852
username: ${{ github.actor }}
4953
password: ${{ secrets.GITHUB_TOKEN }}
54+
- name: Get Version
55+
id: version
56+
run: |
57+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
5058
- name: Build image and push to registry
5159
uses: docker/build-push-action@v5
5260
with:
@@ -55,7 +63,7 @@ jobs:
5563
file: docker/coolify-helper/Dockerfile
5664
platforms: linux/aarch64
5765
push: true
58-
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-aarch64
66+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next-aarch64
5967
merge-manifest:
6068
runs-on: ubuntu-latest
6169
permissions:
@@ -75,9 +83,13 @@ jobs:
7583
registry: ${{ env.REGISTRY }}
7684
username: ${{ github.actor }}
7785
password: ${{ secrets.GITHUB_TOKEN }}
86+
- name: Get Version
87+
id: version
88+
run: |
89+
echo "VERSION=$(docker run --rm -v "$(pwd):/app" -w /app ghcr.io/jqlang/jq:latest '.coolify.helper.version' versions.json)"|xargs >> $GITHUB_OUTPUT
7890
- name: Create & publish manifest
7991
run: |
80-
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next
92+
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:next
8193
- uses: sarisia/actions-status-discord@v1
8294
if: always()
8395
with:

.github/workflows/production-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches: ["main"]
66
paths-ignore:
7+
- .github/workflows/coolify-helper.yml
8+
- docker/coolify-helper/Dockerfile
79
- templates/service-templates.json
810

911
env:

README.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,27 @@ Special thanks to our biggest sponsors!
3939

4040
![image](https://github.com/user-attachments/assets/c95a07df-7c5a-4e77-a35a-81f25fcbece1)
4141

42-
* [CCCareers](https://cccareers.org/) - A career development platform for coding bootcamp graduates.
43-
* [Hetzner](http://htznr.li/CoolifyXHetzner) - A German web hosting company offering dedicated servers and cloud services.
44-
* [Logto](https://logto.io/?ref=coolify) - An open-source authentication and authorization platform.
45-
* [BC Direct](https://bc.direct/?ref=coolify.io) - A digital marketing agency specializing in e-commerce solutions.
46-
* [QuantCDN](https://www.quantcdn.io/?ref=coolify.io) - A content delivery network (CDN) for fast content delivery.
47-
* [Arcjet](https://arcjet.com/?ref=coolify.io) - A cloud-based platform for data analytics and visualization.
48-
* [SupaGuide](https://supa.guide/?ref=coolify.io) - A platform offering guides and resources for web development and design.
49-
* [Tigris](https://tigrisdata.com/?ref=coolify.io) - A data integration platform for connecting and managing data sources.
50-
* [Fractal Networks](https://fractalnetworks.co/?ref=coolify.io) - A decentralized network infrastructure for secure data exchange.
51-
* [Advin](https://coolify.ad.vin/?ref=coolify.io) - A digital advertising agency specializing in programmatic advertising.
52-
* [Treive](https://trieve.ai/?ref=coolify.io) - An AI-powered data analytics platform for business insights.
53-
* [Blacksmith](https://blacksmith.sh/?ref=coolify.io) - A cloud-based platform for automating DevOps and infrastructure management.
54-
* [Latitude](https://latitude.sh/?ref=coolify.io) - A platform offering location-based services and geospatial data.
55-
* [Brand Dev](https://brand.dev/?ref=coolify.io) - A web development agency specializing in brand identity and digital presence.
56-
* [Jobscollider](https://jobscollider.com/remote-jobs?ref=coolify.io) - A job search platform specializing in remote and flexible work opportunities.
57-
* [Hostinger](https://hostinger.com?ref=coolify.io) - A web hosting company offering shared, VPS, and cloud hosting services.
58-
* [Glueops](https://www.glueops.dev/?ref=coolify.io) - A DevOps and cloud consulting company offering infrastructure automation services.
59-
* [Ubicloud](https://ubicloud.com/?ref=coolify.io) - A cloud-based platform for IoT device management and data analytics.
60-
* [Juxtdigital](https://juxtdigital.dev/?ref=coolify.io) - A digital agency offering web development, design, and marketing services.
61-
* [Saasykit](https://saasykit.com/?ref=coolify.io) - SaaSykit is a Laravel-based boilerplate with everything you need to build an awesome SaaS.
62-
* [Massivegrid](https://massivegrid.com/?ref=coolify.io) - A cloud-based platform for data storage and processing.
42+
* [CCCareers](https://cccareers.org/) - A career development platform connecting coding bootcamp graduates with job opportunities in the tech industry.
43+
* [Hetzner](http://htznr.li/CoolifyXHetzner) - A German web hosting company offering affordable dedicated servers, cloud services, and web hosting solutions.
44+
* [Logto](https://logto.io/?ref=coolify) - An open-source authentication and authorization solution for building secure login systems and managing user identities.
45+
* [BC Direct](https://bc.direct/?ref=coolify.io) - A digital marketing agency specializing in e-commerce solutions and online business growth strategies.
46+
* [QuantCDN](https://www.quantcdn.io/?ref=coolify.io) - A content delivery network (CDN) optimizing website performance through global content distribution.
47+
* [Arcjet](https://arcjet.com/?ref=coolify.io) - A cloud-based platform providing real-time protection against API abuse and bot attacks.
48+
* [SupaGuide](https://supa.guide/?ref=coolify.io) - A comprehensive resource hub offering guides and tutorials for web development using Supabase.
49+
* [Tigris](https://tigrisdata.com/?ref=coolify.io) - A fully managed serverless object storage service compatible with Amazon S3 API. Offers high performance, scalability, and built-in search capabilities for efficient data management.
50+
* [Fractal Networks](https://fractalnetworks.co/?ref=coolify.io) - A decentralized network infrastructure company focusing on secure and private communication solutions.
51+
* [Advin](https://coolify.ad.vin/?ref=coolify.io) - A digital advertising agency specializing in programmatic advertising and data-driven marketing strategies.
52+
* [Treive](https://trieve.ai/?ref=coolify.io) - An AI-powered search and discovery platform for enhancing information retrieval in large datasets.
53+
* [Blacksmith](https://blacksmith.sh/?ref=coolify.io) - A cloud-native platform for automating infrastructure provisioning and management across multiple cloud providers.
54+
* [Latitude](https://latitude.sh/?ref=coolify.io) - A cloud computing platform offering bare metal servers and cloud instances for developers and businesses.
55+
* [Brand Dev](https://brand.dev/?ref=coolify.io) - A web development agency specializing in creating custom digital experiences and brand identities.
56+
* [Jobscollider](https://jobscollider.com/remote-jobs?ref=coolify.io) - A job search platform connecting professionals with remote work opportunities across various industries.
57+
* [Hostinger](https://hostinger.com?ref=coolify.io) - A web hosting provider offering affordable hosting solutions, domain registration, and website building tools.
58+
* [Glueops](https://www.glueops.dev/?ref=coolify.io) - A DevOps consulting company providing infrastructure automation and cloud optimization services.
59+
* [Ubicloud](https://ubicloud.com/?ref=coolify.io) - An open-source alternative to hyperscale cloud providers, offering high-performance cloud computing services.
60+
* [Juxtdigital](https://juxtdigital.dev/?ref=coolify.io) - A digital agency offering web development, design, and digital marketing services for businesses.
61+
* [Saasykit](https://saasykit.com/?ref=coolify.io) - A Laravel-based boilerplate providing essential components and features for building SaaS applications quickly.
62+
* [Massivegrid](https://massivegrid.com/?ref=coolify.io) - A cloud hosting provider offering scalable infrastructure solutions for businesses of all sizes.
6363

6464

6565
## Github Sponsors ($40+)

app/Actions/Server/UpdateCoolify.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use App\Models\InstanceSettings;
66
use App\Models\Server;
7-
use Illuminate\Support\Facades\File;
8-
use Illuminate\Support\Facades\Http;
97
use Lorisleiva\Actions\Concerns\AsAction;
108

119
class UpdateCoolify
@@ -27,11 +25,6 @@ public function handle($manual_update = false)
2725
return;
2826
}
2927
CleanupDocker::dispatch($this->server)->onQueue('high');
30-
$response = Http::retry(3, 1000)->get('https://cdn.coollabs.io/coolify/versions.json');
31-
if ($response->successful()) {
32-
$versions = $response->json();
33-
File::put(base_path('versions.json'), json_encode($versions, JSON_PRETTY_PRINT));
34-
}
3528
$this->latestVersion = get_latest_version_of_coolify();
3629
$this->currentVersion = config('version');
3730
if (! $manual_update) {
@@ -62,10 +55,11 @@ private function update()
6255

6356
return;
6457
}
58+
instant_remote_process(["docker pull -q ghcr.io/coollabsio/coolify:{$this->latestVersion}"], $this->server, false);
59+
6560
remote_process([
6661
'curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh',
6762
"bash /data/coolify/source/upgrade.sh $this->latestVersion",
6863
], $this->server);
69-
7064
}
7165
}

app/Console/Commands/CleanupStuckedResources.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Models\Application;
66
use App\Models\ApplicationPreview;
7+
use App\Models\ScheduledDatabaseBackup;
78
use App\Models\ScheduledTask;
89
use App\Models\Service;
910
use App\Models\ServiceApplication;
@@ -165,6 +166,18 @@ private function cleanup_stucked_resources()
165166
echo "Error in cleaning stuck scheduledtasks: {$e->getMessage()}\n";
166167
}
167168

169+
try {
170+
$scheduled_backups = ScheduledDatabaseBackup::all();
171+
foreach ($scheduled_backups as $scheduled_backup) {
172+
if (! $scheduled_backup->server()) {
173+
echo "Deleting stuck scheduledbackup: {$scheduled_backup->name}\n";
174+
$scheduled_backup->delete();
175+
}
176+
}
177+
} catch (\Throwable $e) {
178+
echo "Error in cleaning stuck scheduledbackups: {$e->getMessage()}\n";
179+
}
180+
168181
// Cleanup any resources that are not attached to any environment or destination or server
169182
try {
170183
$applications = Application::all();

app/Console/Kernel.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use App\Jobs\CleanupInstanceStuffsJob;
77
use App\Jobs\DatabaseBackupJob;
88
use App\Jobs\DockerCleanupJob;
9-
use App\Jobs\PullCoolifyImageJob;
109
use App\Jobs\PullHelperImageJob;
1110
use App\Jobs\PullSentinelImageJob;
1211
use App\Jobs\PullTemplatesFromCDN;
@@ -44,7 +43,6 @@ protected function schedule(Schedule $schedule): void
4443
// Instance Jobs
4544
$schedule->command('horizon:snapshot')->everyFiveMinutes();
4645
$schedule->command('cleanup:unreachable-servers')->daily()->onOneServer();
47-
$schedule->job(new PullCoolifyImageJob)->cron($settings->update_check_frequency)->timezone($settings->instance_timezone)->onOneServer();
4846
$schedule->job(new PullTemplatesFromCDN)->cron($settings->update_check_frequency)->timezone($settings->instance_timezone)->onOneServer();
4947
$schedule->job(new CleanupInstanceStuffsJob)->everyTwoMinutes()->onOneServer();
5048
$this->schedule_updates($schedule);
@@ -139,6 +137,10 @@ private function check_scheduled_backups($schedule)
139137
}
140138

141139
$server = $scheduled_backup->server();
140+
141+
if (! $server) {
142+
continue;
143+
}
142144
$serverTimezone = $server->settings->server_timezone;
143145

144146
if (isset(VALID_CRON_STRINGS[$scheduled_backup->frequency])) {
@@ -181,6 +183,9 @@ private function check_scheduled_tasks($schedule)
181183
}
182184

183185
$server = $scheduled_task->server();
186+
if (! $server) {
187+
continue;
188+
}
184189
$serverTimezone = $server->settings->server_timezone ?: config('app.timezone');
185190

186191
if (isset(VALID_CRON_STRINGS[$scheduled_task->frequency])) {

app/Http/Controllers/Api/ProjectController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ public function environment_details(Request $request)
145145
return response()->json(['message' => 'Environment name is required.'], 422);
146146
}
147147
$project = Project::whereTeamId($teamId)->whereUuid($request->uuid)->first();
148+
if (! $project) {
149+
return response()->json(['message' => 'Project not found.'], 404);
150+
}
148151
$environment = $project->environments()->whereName($request->environment_name)->first();
149152
if (! $environment) {
150153
return response()->json(['message' => 'Environment not found.'], 404);
@@ -171,7 +174,7 @@ public function environment_details(Request $request)
171174
schema: new OA\Schema(
172175
type: 'object',
173176
properties: [
174-
'uuid' => ['type' => 'string', 'description' => 'The name of the project.'],
177+
'name' => ['type' => 'string', 'description' => 'The name of the project.'],
175178
'description' => ['type' => 'string', 'description' => 'The description of the project.'],
176179
],
177180
),

0 commit comments

Comments
 (0)