+                
+                
                     
                     
Date: Sun, 22 Sep 2024 20:26:45 +0200
Subject: [PATCH 24/99] Improve helper text for all cleanup settings
---
 .../views/livewire/server/form.blade.php      | 28 ++++++++++++++++---
 1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index a8160c675..221021fa9 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -188,7 +188,15 @@
                     
                         
                             
                         
                         
@@ -212,11 +220,23 @@
                             
                         
                         
-                            
Only enable if you know what you are doing! As data cold be lost and functional issues might occur.
+                            
Warning: Enable these options only if you fully understand their implications and consequences!
Improper use will result in data loss and could cause functional issues.
                             
+                                helper="This option will remove all unused Docker volumes during cleanup.
Warning: Data form stopped containers will be lost!Consequences include:
+                                
+                                    - Volumes not attached to running containers will be deleted and data will be permanently lost (stopped containers are affected).
 
+                                    - Data from stopped containers volumes will be permanently lost.
 
+                                    - No way to recover deleted volume data.
 
+                                
"
+                            />
                             
+                                helper="This option will remove all unused Docker networks during cleanup.
Warning: Functionality may be lost and containers may not be able to communicate with each other!Consequences include:
+                                
+                                    - Networks not attached to running containers will be permanently deleted (stopped containers are affected).
 
+                                    - Custom networks for stopped containers will be permanently deleted.
 
+                                    - Functionality may be lost and containers may not be able to communicate with each other.
 
+                                
" 
+                            />
                         
 
                      
                  
From 164a213ab1480abaf9e985c9085b8fc712a240e8 Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Sun, 22 Sep 2024 20:36:41 +0200
Subject: [PATCH 25/99] Fix: force helper image removal
---
 app/Actions/Server/CleanupDocker.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Actions/Server/CleanupDocker.php b/app/Actions/Server/CleanupDocker.php
index 34126deeb..f6ae8877a 100644
--- a/app/Actions/Server/CleanupDocker.php
+++ b/app/Actions/Server/CleanupDocker.php
@@ -21,7 +21,7 @@ class CleanupDocker
             'docker container prune -f --filter "label=coolify.managed=true"',
             'docker image prune -af --filter "label!=coolify.managed=true"',
             'docker builder prune -af',
-            "docker images --filter before=$helperImageWithVersion --filter reference=$helperImage | grep $helperImage | awk '{print \$3}' | xargs -r docker rmi",
+            "docker images --filter before=$helperImageWithVersion --filter reference=$helperImage | grep $helperImage | awk '{print $3}' | xargs -r docker rmi -f",
         ];
 
         $serverSettings = $server->settings;
From 5a46ef42c89870f5c0cd4dd36fbf6e66eb9c6b50 Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:03:10 +0200
Subject: [PATCH 26/99] Feat: clean new volume name for dev volumes
---
 CONTRIBUTING.md        |  4 ++--
 docker-compose.dev.yml | 24 ++++++++++++------------
 2 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bce8cc4ff..490d2268d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -206,9 +206,9 @@ If you encounter issues or break your database or something else, follow these s
    docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail
    ```
 
-3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on you machine, in that case remove the prefix):
+3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on your machine, in that case remove the prefix):
    ```bash
-   docker volume rm coolify_backups_volume coolify_minio_data coolify_postgres_data coolify_redis_data
+   docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_minio_data
    ```
 
 4. Remove unused images:
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index ebcf16709..71ffcb2d4 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -19,7 +19,7 @@ services:
       PUSHER_APP_SECRET: "${PUSHER_APP_SECRET:-coolify}"
     volumes:
       - .:/var/www/html/:cached
-      - backups_volume:/var/www/html/storage/app/backups
+      - dev_backups_data:/var/www/html/storage/app/backups
   postgres:
     pull_policy: always
     ports:
@@ -32,7 +32,7 @@ services:
       POSTGRES_DB: "${DB_DATABASE:-coolify}"
       POSTGRES_HOST_AUTH_METHOD: "trust"
     volumes:
-      - postgres_data:/var/lib/postgresql/data
+      - dev_postgres_data:/var/lib/postgresql/data
   redis:
     pull_policy: always
     ports:
@@ -40,7 +40,7 @@ services:
     env_file:
       - .env
     volumes:
-      - redis_data:/data
+      - dev_redis_data:/data
   soketi:
     build:
       context: .
@@ -78,10 +78,10 @@ services:
     container_name: coolify-testing-host
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
-      - backups_volume:/data/coolify/backups
-      - postgres_data:/data/coolify/_volumes/database
-      - redis_data:/data/coolify/_volumes/redis
-      - minio_data:/data/coolify/_volumes/minio
+      - dev_backups_data:/data/coolify/backups
+      - dev_postgres_data:/data/coolify/_volumes/database
+      - dev_redis_data:/data/coolify/_volumes/redis
+      - dev_minio_data:/data/coolify/_volumes/minio
     networks:
       - coolify
   mailpit:
@@ -105,15 +105,15 @@ services:
       MINIO_ACCESS_KEY: "${MINIO_ACCESS_KEY:-minioadmin}"
       MINIO_SECRET_KEY: "${MINIO_SECRET_KEY:-minioadmin}"
     volumes:
-      - minio_data:/data
+      - dev_minio_data:/data
     networks:
       - coolify
 
 volumes:
-  backups_volume:
-  postgres_data:
-  redis_data:
-  minio_data:
+  dev_backups_data:
+  dev_postgres_data:
+  dev_redis_data:
+  dev_minio_data:
 
 networks:
   coolify:
From 6bb21da9f3c65c350dd9ff9ea69ec9eb61aaa0ac Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:20:31 +0200
Subject: [PATCH 27/99] Update CONTRIBUTING.md
---
 CONTRIBUTING.md | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 490d2268d..b9c2962c3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -13,9 +13,9 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/dis
 5. [Start Coolify](#5-start-coolify)
 6. [Start Development](#6-start-development)
 7. [Create a Pull Request](#7-create-a-pull-request)
-8. [Development Notes](#8-development-notes)
-9. [Resetting Development Environment](#9-resetting-development-environment)
-10. [Additional Contribution Guidelines](#10-additional-contribution-guidelines)
+8. [Development Notes](#development-notes)
+9. [Resetting Development Environment](#resetting-development-environment)
+10. [Additional Contribution Guidelines](#additional-contribution-guidelines)
 
 ## 1. Setup Development Environment
 
@@ -26,15 +26,15 @@ Follow the steps below for your operating system:
 
 1. Install `docker-ce`, Docker Desktop (or similar):
    - Docker CE (recommended):
-     - Install Windows Subsystem for Linux v2 (WSL2) by following this guide: [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install)
-     - After installing WSL2, install Docker CE for your Linux distribution by following this guide: [Install Docker Engine](https://docs.docker.com/engine/install/)
+     - Install Windows Subsystem for Linux v2 (WSL2) by following this guide: [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install?ref=coolify)
+     - After installing WSL2, install Docker CE for your Linux distribution by following this guide: [Install Docker Engine](https://docs.docker.com/engine/install/?ref=coolify)
      - Make sure to choose the appropriate Linux distribution (e.g., Ubuntu) when following the Docker installation guide
    - Install Docker Desktop (easier):
-     - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/)
+     - Download and install [Docker Desktop for Windows](https://docs.docker.com/desktop/install/windows-install/?ref=coolify)
      - Ensure WSL2 backend is enabled in Docker Desktop settings
 
 2. Install Spin:
-   - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows#download-and-install-spin-into-wsl2)
+   - Follow the instructions to install Spin on Windows from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-windows#download-and-install-spin-into-wsl2?ref=coolify)
 
 
 
@@ -43,12 +43,12 @@ Follow the steps below for your operating system:
 
 1. Install Orbstack, Docker Desktop (or similar):
    - Orbstack (recommended, as it is a faster and lighter alternative to Docker Desktop):
-     - Download and install [Orbstack](https://docs.orbstack.dev/quick-start#installation)
+     - Download and install [Orbstack](https://docs.orbstack.dev/quick-start#installation?ref=coolify)
    - Docker Desktop:
-     - Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/)
+     - Download and install [Docker Desktop for Mac](https://docs.docker.com/desktop/install/mac-install/?ref=coolify)
 
 2. Install Spin:
-   - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos/#download-and-install-spin)
+   - Follow the instructions to install Spin on MacOS from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-macos/#download-and-install-spin?ref=coolify)
 
 
 
@@ -57,12 +57,12 @@ Follow the steps below for your operating system:
 
 1. Install Docker Engine, Docker Desktop (or similar):
    - Docker Engine (recommended, as there is no VM overhead):
-     - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/) for your Linux distribution
+     - Follow the official [Docker Engine installation guide](https://docs.docker.com/engine/install/?ref=coolify) for your Linux distribution
    - Docker Desktop:
-     - If you want a GUI, you can use [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/)
+     - If you want a GUI, you can use [Docker Desktop for Linux](https://docs.docker.com/desktop/install/linux-install/?ref=coolify)
 
 2. Install Spin:
-   - Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux#configure-docker-permissions)
+   - Follow the instructions to install Spin on Linux from the [Spin documentation](https://serversideup.net/open-source/spin/docs/installation/install-linux#configure-docker-permissions?ref=coolify)
 
 
 
@@ -86,14 +86,14 @@ After installing Docker (or Orbstack) and Spin, verify the installation:
 
    | Editor | Platform | Download Link |
    |--------|----------|---------------|
-   | Visual Studio Code (recommended free) | Windows/macOS/Linux | [Download](https://code.visualstudio.com/download) |
-   | Cursor (recommended but paid) | Windows/macOS/Linux | [Download](https://www.cursor.com/) |
-   | Zed (very fast) | macOS/Linux | [Download](https://zed.dev/download) |
+   | Visual Studio Code (recommended free) | Windows/macOS/Linux | [Download](https://code.visualstudio.com/download?ref=coolify) |
+   | Cursor (recommended but paid) | Windows/macOS/Linux | [Download](https://www.cursor.com/?ref=coolify) |
+   | Zed (very fast) | macOS/Linux | [Download](https://zed.dev/download?ref=coolify) |
 
 3. Clone the Coolify Repository from your fork to your local machine
    - Use `git clone` in the command line, or
    - Use GitHub Desktop (recommended):
-     - Download and install from [https://desktop.github.com/](https://desktop.github.com/)
+     - Download and install from [https://desktop.github.com/](https://desktop.github.com/?ref=coolify)
      - Open GitHub Desktop and login with your GitHub account
      - Click on `File` -> `Clone Repository` select `github.com` as the repository location, then select your forked Coolify repository, choose the local path and then click `Clone`
 
@@ -161,8 +161,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation:
 
 3. Filling out the PR details:
    - Give your PR a descriptive title.
-   - In the description, explain the changes you've made.
-   - Reference any related issues by using keywords like "Fixes #123" or "Closes #456".
+   - Use the Pull Request Template provided and fill in the details.
 
 > [!IMPORTANT]
 > Always set the base branch for your PR to the `next` branch of the Coolify repository, not the `main` branch.
@@ -206,7 +205,7 @@ If you encounter issues or break your database or something else, follow these s
    docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail
    ```
 
-3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on your machine, in that case remove the prefix):
+3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on your machine, in that case remove the prefix from the command):
    ```bash
    docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_minio_data
    ```
From 83c6dcb06328af137f2d2c38d985c1fd87fa6014 Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:31:20 +0200
Subject: [PATCH 28/99] Fix: Persist DBs, services and so on stored in
 data/coolify
---
 docker-compose.dev.yml | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
index 71ffcb2d4..b6fb931df 100644
--- a/docker-compose.dev.yml
+++ b/docker-compose.dev.yml
@@ -78,6 +78,7 @@ services:
     container_name: coolify-testing-host
     volumes:
       - /var/run/docker.sock:/var/run/docker.sock
+      - dev_coolify_data:/data/coolify
       - dev_backups_data:/data/coolify/backups
       - dev_postgres_data:/data/coolify/_volumes/database
       - dev_redis_data:/data/coolify/_volumes/redis
@@ -113,6 +114,7 @@ volumes:
   dev_backups_data:
   dev_postgres_data:
   dev_redis_data:
+  dev_coolify_data:
   dev_minio_data:
 
 networks:
From 7c52d7ef9e4e92cfd2ccf8e08a0442ab6833f48e Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Mon, 23 Sep 2024 17:33:06 +0200
Subject: [PATCH 29/99] Update CONTRIBUTING.md
---
 CONTRIBUTING.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index b9c2962c3..80ec0614e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -207,7 +207,7 @@ If you encounter issues or break your database or something else, follow these s
 
 3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on your machine, in that case remove the prefix from the command):
    ```bash
-   docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_minio_data
+   docker volume rm coolify_dev_backups_data coolify_dev_postgres_data coolify_dev_redis_data coolify_dev_coolify_data coolify_dev_minio_data
    ```
 
 4. Remove unused images:
From eb80a7e2f7b66aeca3e50aaae4600b19752eb7c1 Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 10:53:12 +0200
Subject: [PATCH 30/99] chore: Update Docker commands to start proxy
---
 app/Actions/Proxy/StartProxy.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/Actions/Proxy/StartProxy.php b/app/Actions/Proxy/StartProxy.php
index 991c94b11..f025e5661 100644
--- a/app/Actions/Proxy/StartProxy.php
+++ b/app/Actions/Proxy/StartProxy.php
@@ -47,7 +47,8 @@ class StartProxy
                     "echo 'Pulling docker image.'",
                     'docker compose pull',
                     "echo 'Stopping existing coolify-proxy.'",
-                    'docker compose down -v --remove-orphans > /dev/null 2>&1',
+                    'docker stop -t 10 coolify-proxy || true',
+                    'docker rm coolify-proxy || true',
                     "echo 'Starting coolify-proxy.'",
                     'docker compose up -d --remove-orphans',
                     "echo 'Proxy started successfully.'",
From 62459f9a95b11bf21c8cac77ece1028e8f620a85 Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 11:57:13 +0200
Subject: [PATCH 31/99] refactor: Remove unused code in DatabaseBackupStatusJob
 and PopulateSshKeysDirectorySeeder
---
 app/Jobs/DatabaseBackupStatusJob.php          | 62 -------------------
 .../PopulateSshKeysDirectorySeeder.php        |  4 +-
 2 files changed, 2 insertions(+), 64 deletions(-)
 delete mode 100644 app/Jobs/DatabaseBackupStatusJob.php
diff --git a/app/Jobs/DatabaseBackupStatusJob.php b/app/Jobs/DatabaseBackupStatusJob.php
deleted file mode 100644
index d3b0e99cf..000000000
--- a/app/Jobs/DatabaseBackupStatusJob.php
+++ /dev/null
@@ -1,62 +0,0 @@
-scheduledDatabaseBackups()->get();
-        //     if ($scheduled_backups->isEmpty()) {
-        //         continue;
-        //     }
-        //     foreach ($scheduled_backups as $scheduled_backup) {
-        //         $last_days_backups = $scheduled_backup->get_last_days_backup_status();
-        //         if ($last_days_backups->isEmpty()) {
-        //             continue;
-        //         }
-        //         $failed = $last_days_backups->where('status', 'failed');
-        //     }
-        // }
-
-        // $scheduled_backups = ScheduledDatabaseBackup::all();
-        // $databases = collect();
-        // $teams = collect();
-        // foreach ($scheduled_backups as $scheduled_backup) {
-        //     $last_days_backups = $scheduled_backup->get_last_days_backup_status();
-        //     if ($last_days_backups->isEmpty()) {
-        //         continue;
-        //     }
-        //     $failed = $last_days_backups->where('status', 'failed');
-        //     $database = $scheduled_backup->database;
-        //     $team = $database->team();
-        //     $teams->put($team->id, $team);
-        //     $databases->put("{$team->id}:{$database->name}", [
-        //         'failed_count' => $failed->count(),
-        //     ]);
-        // }
-        // foreach ($databases as $name => $database) {
-        //     [$team_id, $name] = explode(':', $name);
-        //     $team = $teams->get($team_id);
-        //     $team?->notify(new DailyBackup($databases));
-        // }
-    }
-}
diff --git a/database/seeders/PopulateSshKeysDirectorySeeder.php b/database/seeders/PopulateSshKeysDirectorySeeder.php
index 034d5d123..dc27d21b0 100644
--- a/database/seeders/PopulateSshKeysDirectorySeeder.php
+++ b/database/seeders/PopulateSshKeysDirectorySeeder.php
@@ -29,8 +29,8 @@ class PopulateSshKeysDirectorySeeder extends Seeder
                 Process::run("chown -R $user ".storage_path('app/ssh/keys'));
                 Process::run("chown -R $user ".storage_path('app/ssh/mux'));
             } else {
-                Process::run('chown -R 9999:9999 '.storage_path('app/ssh/keys'));
-                Process::run('chown -R 9999:9999 '.storage_path('app/ssh/mux'));
+                Process::run('chown -R 9999:root '.storage_path('app/ssh/keys'));
+                Process::run('chown -R 9999:root '.storage_path('app/ssh/mux'));
             }
         } catch (\Throwable $e) {
             echo "Error: {$e->getMessage()}\n";
From f9dbc30812ae7ab5f83f5ffae1e87ae87fefd7b3 Mon Sep 17 00:00:00 2001
From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Date: Tue, 24 Sep 2024 13:06:03 +0200
Subject: [PATCH 32/99] Feat: Use the new confirmation flow
---
 .../views/livewire/server/form.blade.php      | 21 +++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php
index 221021fa9..b1aabf94e 100644
--- a/resources/views/livewire/server/form.blade.php
+++ b/resources/views/livewire/server/form.blade.php
@@ -188,7 +188,7 @@
                     
                         
                             
                                     Removes stopped containers manged by Coolify (as containers are none persistent, no data will be lost).
                                     Deletes unused images.
@@ -199,9 +199,22 @@
                                 "
                                 instantSave id="server.settings.force_docker_cleanup" label="Force Docker Cleanup" />
                         
-                        
-                            Manually Trigger Cleanup
-                        
+                        
                      
                     @if ($server->settings->force_docker_cleanup)
                     
Date: Tue, 24 Sep 2024 12:27:43 +0000
Subject: [PATCH 33/99] chore(deps): bump rollup from 3.29.4 to 3.29.5
Bumps [rollup](https://github.com/rollup/rollup) from 3.29.4 to 3.29.5.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v3.29.4...v3.29.5)
---
updated-dependencies:
- dependency-name: rollup
  dependency-type: indirect
...
Signed-off-by: dependabot[bot] 
---
 package-lock.json | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ad1a3cc31..8f6fbde08 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1860,9 +1860,9 @@
             }
         },
         "node_modules/rollup": {
-            "version": "3.29.4",
-            "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
-            "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
+            "version": "3.29.5",
+            "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz",
+            "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==",
             "dev": true,
             "bin": {
                 "rollup": "dist/bin/rollup"
From afbdd2eb065c0679de2ab0367af493edeeb57857 Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 18:21:31 +0200
Subject: [PATCH 34/99] fix: parser
---
 bootstrap/helpers/shared.php | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 072f80a0a..82cfec9e3 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -3484,6 +3484,16 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
                         $value = $value->after('?');
                     }
                     if ($originalValue->value() === $value->value()) {
+                        // This means the variable does not have a default value, so it needs to be created in Coolify
+                        $parsedKeyValue = replaceVariables($value);
+                        $resource->environment_variables()->where('key', $parsedKeyValue)->where($nameOfId, $resource->id)->firstOrCreate([
+                            'key' => $parsedKeyValue,
+                            $nameOfId => $resource->id,
+                        ], [
+                            'is_build_time' => false,
+                            'is_preview' => false,
+                        ]);
+
                         continue;
                     }
                     $resource->environment_variables()->where('key', $key)->where($nameOfId, $resource->id)->firstOrCreate([
@@ -3576,6 +3586,13 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
         if ($environment->count() > 0) {
             $environment = $environment->filter(function ($value, $key) {
                 return ! str($key)->startsWith('SERVICE_FQDN_');
+            })->map(function ($value, $key) {
+                // if value is empty, set it to null so if you set the environment variable in the .env file (Coolify's UI), it will used
+                if (str($value)->isEmpty()) {
+                    $value = null;
+                }
+
+                return $value;
             });
         }
         $serviceLabels = $labels->merge($defaultLabels);
From 02165c2b9f474a7a85a17c76248eed1af7e29030 Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 18:22:06 +0200
Subject: [PATCH 35/99] chore: Update version numbers to 4.0.0-beta.343
---
 config/sentry.php           | 2 +-
 config/version.php          | 2 +-
 other/nightly/versions.json | 4 ++--
 versions.json               | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/config/sentry.php b/config/sentry.php
index c65d3d1ff..60e183283 100644
--- a/config/sentry.php
+++ b/config/sentry.php
@@ -7,7 +7,7 @@ return [
 
     // The release version of your application
     // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD'))
-    'release' => '4.0.0-beta.342',
+    'release' => '4.0.0-beta.343',
     // When left empty or `null` the Laravel environment will be used
     'environment' => config('app.env'),
 
diff --git a/config/version.php b/config/version.php
index 633c71d60..050ea885b 100644
--- a/config/version.php
+++ b/config/version.php
@@ -1,3 +1,3 @@
 
Date: Tue, 24 Sep 2024 18:38:35 +0200
Subject: [PATCH 36/99] refactor: Remove commented out code and improve
 environment variable handling in newParser function
---
 bootstrap/helpers/shared.php | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index 82cfec9e3..856222626 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -2928,7 +2928,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
     }
 
     $parsedServices = collect([]);
-    ray()->clearAll();
+    // ray()->clearAll();
 
     $allMagicEnvironments = collect([]);
     foreach ($services as $serviceName => $service) {
@@ -3493,6 +3493,8 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
                             'is_build_time' => false,
                             'is_preview' => false,
                         ]);
+                        // Add the variable to the environment so it will be shown in the deployable compose file
+                        $environment[$parsedKeyValue->value()] = $resource->environment_variables()->where('key', $parsedKeyValue)->where($nameOfId, $resource->id)->first()->value;
 
                         continue;
                     }
@@ -3586,10 +3588,14 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
         if ($environment->count() > 0) {
             $environment = $environment->filter(function ($value, $key) {
                 return ! str($key)->startsWith('SERVICE_FQDN_');
-            })->map(function ($value, $key) {
+            })->map(function ($value, $key) use ($resource) {
                 // if value is empty, set it to null so if you set the environment variable in the .env file (Coolify's UI), it will used
                 if (str($value)->isEmpty()) {
-                    $value = null;
+                    if ($resource->environment_variables()->where('key', $key)->exists()) {
+                        $value = $resource->environment_variables()->where('key', $key)->first()->value;
+                    } else {
+                        $value = null;
+                    }
                 }
 
                 return $value;
From d6b4e33db3c95d0a13b345625f053bed5924ac1f Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 20:40:41 +0200
Subject: [PATCH 37/99] fix: exited services statuses
---
 app/Actions/Docker/GetContainersStatus.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/Actions/Docker/GetContainersStatus.php b/app/Actions/Docker/GetContainersStatus.php
index fdaa88ebf..0779da31d 100644
--- a/app/Actions/Docker/GetContainersStatus.php
+++ b/app/Actions/Docker/GetContainersStatus.php
@@ -543,7 +543,7 @@ class GetContainersStatus
                 }
             }
         }
-        $exitedServices = $exitedServices->unique('id');
+        $exitedServices = $exitedServices->unique('uuid');
         foreach ($exitedServices as $exitedService) {
             if (str($exitedService->status)->startsWith('exited')) {
                 continue;
From 70dfa101ef475ec31384bc19340b1fa5562cea51 Mon Sep 17 00:00:00 2001
From: Andras Bacsai 
Date: Tue, 24 Sep 2024 21:04:04 +0200
Subject: [PATCH 38/99] refactor: Improve label positioning in input and
 checkbox components
---
 .../views/components/forms/checkbox.blade.php | 28 ++++++------
 .../views/components/forms/input.blade.php    |  4 +-
 .../components/modal-confirmation.blade.php   | 44 +++++++++----------
 3 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/resources/views/components/forms/checkbox.blade.php b/resources/views/components/forms/checkbox.blade.php
index 84c6b7e32..babbb9347 100644
--- a/resources/views/components/forms/checkbox.blade.php
+++ b/resources/views/components/forms/checkbox.blade.php
@@ -8,20 +8,20 @@
     'hideLabel' => false,
 ])
 
-