Skip to content

Commit c402d7f

Browse files
authored
Merge branch 'coollabsio:main' into service-getoutline
2 parents 565cb54 + 7ac45aa commit c402d7f

Some content is hidden

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

61 files changed

+2494
-1621
lines changed

.env.development.example

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,7 @@ APP_KEY=
66
APP_URL=http://localhost
77
APP_PORT=8000
88
APP_DEBUG=true
9-
MUX_ENABLED=false
10-
11-
# Enable Laravel Telescope for debugging
12-
TELESCOPE_ENABLED=false
13-
14-
# Selenium Driver URL for Dusk
15-
DUSK_DRIVER_URL=http://selenium:4444
9+
SSH_MUX_ENABLED=false
1610

1711
# PostgreSQL Database Configuration
1812
DB_DATABASE=coolify
@@ -27,6 +21,16 @@ RAY_ENABLED=false
2721
# Set custom ray port
2822
RAY_PORT=
2923

24+
# Clockwork Configuration
25+
CLOCKWORK_ENABLED=false
26+
CLOCKWORK_QUEUE_COLLECT=true
27+
28+
# Enable Laravel Telescope for debugging
29+
TELESCOPE_ENABLED=false
30+
31+
# Selenium Driver URL for Dusk
32+
DUSK_DRIVER_URL=http://selenium:4444
33+
3034
# Special Keys for Andras
3135
# For cache purging
3236
BUNNY_API_KEY=

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
platforms: linux/amd64
3939
push: true
4040
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next
41+
labels: |
42+
coolify.managed=true
4143
aarch64:
4244
runs-on: [ self-hosted, arm64 ]
4345
permissions:
@@ -64,6 +66,8 @@ jobs:
6466
platforms: linux/aarch64
6567
push: true
6668
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-next-aarch64
69+
labels: |
70+
coolify.managed=true
6771
merge-manifest:
6872
runs-on: ubuntu-latest
6973
permissions:
@@ -94,3 +98,4 @@ jobs:
9498
if: always()
9599
with:
96100
webhook: ${{ secrets.DISCORD_WEBHOOK_DEV_RELEASE_CHANNEL }}
101+

.github/workflows/coolify-helper.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Coolify Helper Image (v4)
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "next" ]
66
paths:
77
- .github/workflows/coolify-helper.yml
88
- docker/coolify-helper/Dockerfile
@@ -38,6 +38,8 @@ jobs:
3838
platforms: linux/amd64
3939
push: true
4040
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}
41+
labels: |
42+
coolify.managed=true
4143
aarch64:
4244
runs-on: [ self-hosted, arm64 ]
4345
permissions:
@@ -64,6 +66,8 @@ jobs:
6466
platforms: linux/aarch64
6567
push: true
6668
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.VERSION }}-aarch64
69+
labels: |
70+
coolify.managed=true
6771
merge-manifest:
6872
runs-on: ubuntu-latest
6973
permissions:

.github/workflows/pr-build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ env:
1616
jobs:
1717
amd64:
1818
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
attestations: write
23+
id-token: write
1924
steps:
2025
- uses: actions/checkout@v4
2126
- name: Login to ghcr.io
@@ -37,6 +42,8 @@ jobs:
3742
permissions:
3843
contents: read
3944
packages: write
45+
attestations: write
46+
id-token: write
4047
steps:
4148
- uses: actions/checkout@v4
4249
- name: Login to ghcr.io
@@ -58,6 +65,8 @@ jobs:
5865
permissions:
5966
contents: read
6067
packages: write
68+
attestations: write
69+
id-token: write
6170
needs: [amd64, aarch64]
6271
steps:
6372
- name: Checkout

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Special thanks to our biggest sponsors!
5454
* [Latitude](https://latitude.sh/?ref=coolify.io) - A cloud computing platform offering bare metal servers and cloud instances for developers and businesses.
5555
* [Brand Dev](https://brand.dev/?ref=coolify.io) - A web development agency specializing in creating custom digital experiences and brand identities.
5656
* [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.
57+
* [Hostinger](https://www.hostinger.com/vps/coolify-hosting?ref=coolify.io) - A web hosting provider offering affordable hosting solutions, domain registration, and website building tools.
5858
* [Glueops](https://www.glueops.dev/?ref=coolify.io) - A DevOps consulting company providing infrastructure automation and cloud optimization services.
5959
* [Ubicloud](https://ubicloud.com/?ref=coolify.io) - An open-source alternative to hyperscale cloud providers, offering high-performance cloud computing services.
6060
* [Juxtdigital](https://juxtdigital.dev/?ref=coolify.io) - A digital agency offering web development, design, and digital marketing services for businesses.

RELEASE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Coolify Release Guide
2+
3+
This guide outlines the release process for Coolify, intended for developers and those interested in understanding how releases are managed and deployed.
4+
5+
## Release Process
6+
7+
1. **Development on `next` or separate branches**
8+
- Changes, fixes and new features are developed on the `next` or even separate branches.
9+
10+
2. **Merging to `main`**
11+
- Once changes are ready, they are merged from `next` into the `main` branch.
12+
13+
3. **Building the release**
14+
- After merging to `main`, a new release is built.
15+
- Note: A push to `main` does not automatically mean a new version is released.
16+
17+
4. **Creating a GitHub release**
18+
- A new release is created on GitHub with the new version details.
19+
20+
5. **Updating the CDN**
21+
- The final step is updating the version information on the CDN:
22+
[https://cdn.coollabs.io/coolify/versions.json](https://cdn.coollabs.io/coolify/versions.json)
23+
24+
> [!NOTE]
25+
> The CDN update may not occur immediately after the GitHub release. It can happen hours or even days later due to additional testing, stability checks, or potential hotfixes.
26+
27+
28+
## Version Availability
29+
30+
It's important to understand that a new version released on GitHub may not immediately become available for users to update (through manual or auto-update).
31+
32+
> [!IMPORTANT]
33+
> If you see a new release on GitHub but haven't received the update, it's likely because the CDN hasn't been updated yet. This is intentional and ensures stability and allows for hotfixes before the new version is officially released.
34+
35+
## Manually Update to Specific Versions
36+
37+
> [!CAUTION]
38+
> Updating to unreleased versions is not recommended and may cause issues. Use at your own risk!
39+
40+
To update your Coolify instance to a specific (unreleased) version, use the following command:
41+
42+
```bash
43+
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s <version>
44+
```
45+
-> Replace `<version>` with the version you want to update to (for example `4.0.0-beta.332`).

app/Actions/Server/CleanupDocker.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace App\Actions\Server;
44

5+
use App\Models\InstanceSettings;
56
use App\Models\Server;
67
use Lorisleiva\Actions\Concerns\AsAction;
78

@@ -21,10 +22,16 @@ public function handle(Server $server)
2122

2223
private function getCommands(): array
2324
{
25+
$settings = InstanceSettings::get();
26+
$helperImageVersion = data_get($settings, 'helper_version');
27+
$helperImage = config('coolify.helper_image');
28+
$helperImageWithVersion = config('coolify.helper_image').':'.$helperImageVersion;
29+
2430
$commonCommands = [
2531
'docker container prune -f --filter "label=coolify.managed=true"',
26-
'docker image prune -af',
32+
'docker image prune -af --filter "label!=coolify.managed=true"',
2733
'docker builder prune -af',
34+
"docker images --filter before=$helperImageWithVersion --filter reference=$helperImage | grep $helperImage | awk '{print $3}' | xargs -r docker rmi",
2835
];
2936

3037
return $commonCommands;

app/Actions/Service/StartService.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ public function handle(Service $service)
1616
$service->saveComposeConfigs();
1717
$commands[] = 'cd '.$service->workdir();
1818
$commands[] = "echo 'Saved configuration files to {$service->workdir()}.'";
19-
$commands[] = "echo 'Creating Docker network.'";
20-
$commands[] = "docker network inspect $service->uuid >/dev/null 2>&1 || docker network create --attachable $service->uuid";
19+
if($service->networks()->count() > 0){
20+
$commands[] = "echo 'Creating Docker network.'";
21+
$commands[] = "docker network inspect $service->uuid >/dev/null 2>&1 || docker network create --attachable $service->uuid";
22+
}
2123
$commands[] = 'echo Starting service.';
2224
$commands[] = "echo 'Pulling images.'";
2325
$commands[] = 'docker compose pull';

app/Console/Kernel.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Jobs\CheckForUpdatesJob;
66
use App\Jobs\CleanupInstanceStuffsJob;
7+
use App\Jobs\CleanupStaleMultiplexedConnections;
78
use App\Jobs\DatabaseBackupJob;
89
use App\Jobs\DockerCleanupJob;
910
use App\Jobs\PullHelperImageJob;
@@ -29,7 +30,8 @@ protected function schedule(Schedule $schedule): void
2930
$this->all_servers = Server::all();
3031
$settings = InstanceSettings::get();
3132

32-
$schedule->command('telescope:prune')->daily();
33+
$schedule->job(new CleanupStaleMultiplexedConnections)->hourly();
34+
3335
if (isDev()) {
3436
// Instance Jobs
3537
$schedule->command('horizon:snapshot')->everyMinute();
@@ -39,6 +41,8 @@ protected function schedule(Schedule $schedule): void
3941
$this->check_resources($schedule);
4042
$this->check_scheduled_tasks($schedule);
4143
$schedule->command('uploads:clear')->everyTwoMinutes();
44+
45+
$schedule->command('telescope:prune')->daily();
4246
} else {
4347
// Instance Jobs
4448
$schedule->command('horizon:snapshot')->everyFiveMinutes();

app/Http/Controllers/Api/DeployController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function deployments(Request $request)
8686
],
8787
tags: ['Deployments'],
8888
parameters: [
89-
new OA\Parameter(name: 'uuid', in: 'path', required: true, description: 'Deployment Uuid', schema: new OA\Schema(type: 'string')),
89+
new OA\Parameter(name: 'uuid', in: 'path', required: true, description: 'Deployment UUID', schema: new OA\Schema(type: 'string')),
9090
],
9191
responses: [
9292
new OA\Response(
@@ -150,7 +150,7 @@ public function deployment_by_uuid(Request $request)
150150
responses: [
151151
new OA\Response(
152152
response: 200,
153-
description: 'Get deployment(s) Uuid\'s',
153+
description: 'Get deployment(s) UUID\'s',
154154
content: [
155155
new OA\MediaType(
156156
mediaType: 'application/json',

0 commit comments

Comments
 (0)