Skip to content

Commit 14c8023

Browse files
authored
Merge branch 'next' into next
2 parents 7645047 + bb1454d commit 14c8023

File tree

81 files changed

+1796
-655
lines changed

Some content is hidden

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

81 files changed

+1796
-655
lines changed

.env.development.example

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
1-
APP_NAME=Coolify-localhost
2-
APP_ID=development
1+
# Coolify Configuration
32
APP_ENV=local
3+
APP_NAME="Coolify Development"
4+
APP_ID=development
45
APP_KEY=
5-
APP_DEBUG=true
66
APP_URL=http://localhost
77
APP_PORT=8000
8+
APP_DEBUG=true
89
MUX_ENABLED=false
910

11+
# Enable Laravel Telescope for debugging
12+
TELESCOPE_ENABLED=false
13+
14+
# Selenium Driver URL for Dusk
1015
DUSK_DRIVER_URL=http://selenium:4444
1116

12-
## For Andras only
13-
# To purge cache
17+
# PostgreSQL Database Configuration
18+
DB_DATABASE=coolify
19+
DB_USERNAME=coolify
20+
DB_PASSWORD=password
21+
DB_HOST=host.docker.internal
22+
DB_PORT=5432
23+
24+
# Ray Configuration
25+
# Set to true to enable Ray
26+
RAY_ENABLED=false
27+
# Set custom ray port
28+
RAY_PORT=
29+
30+
# Special Keys for Andras
31+
# For cache purging
1432
BUNNY_API_KEY=
15-
# To upload assets
33+
# For asset uploads
1634
BUNNY_STORAGE_API_KEY=

.env.production

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
# Coolify Configuration
12
APP_ID=
23
APP_NAME=Coolify
34
APP_KEY=
45

6+
# PostgreSQL Database Configuration
7+
DB_USERNAME=coolify
58
DB_PASSWORD=
9+
10+
# Redis Configuration
611
REDIS_PASSWORD=
712

13+
# Pusher Configuration
814
PUSHER_APP_ID=
915
PUSHER_APP_KEY=
1016
PUSHER_APP_SECRET=

.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/coolify-helper.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 }}:latest
40+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
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 }}:latest-aarch64
66+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-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 }}:latest-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
92+
docker buildx imagetools create --append ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-aarch64 --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }} --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
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: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,32 @@ Thank you so much!
3535

3636
Special thanks to our biggest sponsors!
3737

38-
<a href="https://cccareers.org/" target="_blank"><img src="./other/logos/ccc-logo.webp" alt="cccareers logo" width="200"/></a>
39-
<a href="http://htznr.li/CoolifyXHetzner" target="_blank"><img src="./other/logos/hetzner.jpg" alt="hetzner logo" width="150"/></a>
40-
<a href="https://logto.io/?ref=coolify" target="_blank"><img src="./other/logos/logto.webp" alt="logto logo" width="150"/></a>
41-
<a href="https://bc.direct/?ref=coolify.io" target="_blank"><img src="./other/logos/bc.png" alt="bc direct logo" width="200"/></a>
42-
<a href="https://www.quantcdn.io/?ref=coolify.io" target="_blank"><img src="./other/logos/quant.svg" alt="quantcdn logo" width="150"/></a>
43-
<a href="https://arcjet.com/?ref=coolify.io" target="_blank"><img src="./other/logos/arcjet.svg" alt="arcjet logo" width="200"/></a>
44-
<a href="https://supa.guide/?ref=coolify.io" target="_blank"><img src="./other/logos/supaguide.png" alt="supaguide logo" width="200"/></a>
45-
<a href="https://tigrisdata.com/?ref=coolify.io" target="_blank"><img src="./other/logos/tigris.svg" alt="tigris logo" width="140"/></a>
46-
<a href="https://fractalnetworks.co/?ref=coolify.io" target="_blank"><img src="./other/logos/fractal.svg" alt="fractal logo" width="180"/></a>
47-
<a href="https://coolify.ad.vin/?ref=coolify.io" target="_blank"><img src="./other/logos/advin.png" alt="advin logo" width="250"/></a>
48-
<a href="https://trieve.ai/?ref=coolify.io" target="_blank"><img src="./other/logos/trieve_bg.png" alt="trieve logo" width="180"/></a>
49-
<a href="https://blacksmith.sh/?ref=coolify.io" target="_blank"><img src="./other/logos/blacksmith.svg" alt="blacksmith logo" width="200"/></a>
50-
<a href="https://latitude.sh/?ref=coolify.io" target="_blank"><img src="./other/logos/latitude.svg" alt="latitude logo" width="200"/></a>
51-
<a href="https://brand.dev/?ref=coolify.io" target="_blank"><img src="./other/logos/branddev.png" alt="branddev logo" width="200"/></a>
52-
<a href="https://jobscollider.com/remote-jobs?ref=coolify.io" target="_blank"><img src="./other/logos/jobscollider.svg" alt="jobscollider logo" width="200"/></a>
53-
<a href="https://hostinger.com?ref=coolify.io" target="_blank"><img src="./other/logos/hostinger.svg" alt="hostinger logo" width="200"/></a>
38+
### Special Sponsors
39+
40+
![image](https://github.com/user-attachments/assets/c95a07df-7c5a-4e77-a35a-81f25fcbece1)
41+
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.
63+
5464

5565
## Github Sponsors ($40+)
5666
<a href="https://serpapi.com/?ref=coolify.io"><img width="60px" alt="SerpAPI" src="https://github.com/serpapi.png"/></a>
@@ -77,6 +87,7 @@ Special thanks to our biggest sponsors!
7787
<a href="https://github.com/urtho"><img src="https://github.com/urtho.png" width="60px" alt="Paweł Pierścionek" /></a>
7888
<a href="https://github.com/monocursive"><img src="https://github.com/monocursive.png" width="60px" alt="Michael Mazurczak" /></a>
7989
<a href="https://formbricks.com/?utm_source=coolify.io"><img src="https://github.com/formbricks.png" width="60px" alt="Formbricks" /></a>
90+
<a href="https://x.com/adithsuhas17?utm_source=coolify.io"><img src="https://github.com/adith-suhas-sv.png" width="60px" alt="Adith Suhas" /></a>
8091

8192
## Organizations
8293
<a href="https://opencollective.com/coollabsio/organization/0/website"><img src="https://opencollective.com/coollabsio/organization/0/avatar.svg"></a>

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])) {

0 commit comments

Comments
 (0)