From 220f77e737b5eb1b18af3a67a6ec9606837434ea Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:14:15 +0200 Subject: [PATCH 01/99] Create manage-stale-issues-and-prs.yml --- .../workflows/manage-stale-issues-and-prs.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/manage-stale-issues-and-prs.yml diff --git a/.github/workflows/manage-stale-issues-and-prs.yml b/.github/workflows/manage-stale-issues-and-prs.yml new file mode 100644 index 000000000..7cf9dca79 --- /dev/null +++ b/.github/workflows/manage-stale-issues-and-prs.yml @@ -0,0 +1,35 @@ +name: Manage Stale Issues and PRs + +on: + schedule: + - cron: '0 2 * * *' + +jobs: + manage-stale: + runs-on: ubuntu-latest + steps: + - name: Manage stale issues and PRs + uses: actions/stale@v9 + with: + stale-issue-message: 'This issue will be closed in a few days if no response is received. Please provide an update with the requested information.' + stale-pr-message: 'This pull request will be closed in a few days if no response is received. Please update or comment if you would like to continue working on it.' + close-issue-message: 'This issue has been closed due to inactivity. Reason: stale' + close-pr-message: 'This pull request has been closed due to inactivity. Reason: stale' + days-before-stale: 10 + days-before-close: 4 + stale-issue-label: '⏱︎ Stale' + stale-pr-label: '⏱︎ Stale' + only-labels: '💤 Waiting for feedback' + remove-stale-when-updated: true + remove-issue-stale-when-updated: true + remove-pr-stale-when-updated: true + operations-per-run: 100 + delete-branch: true + ignore-updates: false + labels-to-remove-when-unstale: '⏱︎ Stale, 💤 Waiting for feedback' + labels-to-add-when-unstale: '' + labels-to-remove-when-stale: '*' + any-of-labels: '' + ascending: false + close-issue-reason: 'not_planned' + exempt-all-milestones: false From 4450ee382f84a158a38f547496131972dc9c0963 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:43:31 +0200 Subject: [PATCH 02/99] Update manage-stale-issues-and-prs.yml --- .../workflows/manage-stale-issues-and-prs.yml | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/manage-stale-issues-and-prs.yml b/.github/workflows/manage-stale-issues-and-prs.yml index 7cf9dca79..9d46411df 100644 --- a/.github/workflows/manage-stale-issues-and-prs.yml +++ b/.github/workflows/manage-stale-issues-and-prs.yml @@ -10,6 +10,7 @@ jobs: steps: - name: Manage stale issues and PRs uses: actions/stale@v9 + id: stale with: stale-issue-message: 'This issue will be closed in a few days if no response is received. Please provide an update with the requested information.' stale-pr-message: 'This pull request will be closed in a few days if no response is received. Please update or comment if you would like to continue working on it.' @@ -33,3 +34,24 @@ jobs: ascending: false close-issue-reason: 'not_planned' exempt-all-milestones: false + + - name: Process closed issues and PRs + if: steps.stale.outputs.closed-issues-prs + uses: actions/github-script@v7 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + const closedItemsStr = '${{ steps.stale.outputs.closed-issues-prs }}'; + const closedItems = closedItemsStr.split(',').map(Number); + + for (const itemNumber of closedItems) { + await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'remove-labels-and-assignees-on-close.yml', + ref: 'main', + inputs: { + issue_number: itemNumber.toString() + } + }); + } From b41a19d94d1b4031d11afc7b22309a0775868ba7 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Mon, 16 Sep 2024 11:20:46 +0200 Subject: [PATCH 03/99] Update manage-stale-issues-and-prs.yml --- .../workflows/manage-stale-issues-and-prs.yml | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/manage-stale-issues-and-prs.yml b/.github/workflows/manage-stale-issues-and-prs.yml index 9d46411df..2d018d0f9 100644 --- a/.github/workflows/manage-stale-issues-and-prs.yml +++ b/.github/workflows/manage-stale-issues-and-prs.yml @@ -28,30 +28,7 @@ jobs: delete-branch: true ignore-updates: false labels-to-remove-when-unstale: '⏱︎ Stale, 💤 Waiting for feedback' - labels-to-add-when-unstale: '' - labels-to-remove-when-stale: '*' any-of-labels: '' ascending: false close-issue-reason: 'not_planned' exempt-all-milestones: false - - - name: Process closed issues and PRs - if: steps.stale.outputs.closed-issues-prs - uses: actions/github-script@v7 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const closedItemsStr = '${{ steps.stale.outputs.closed-issues-prs }}'; - const closedItems = closedItemsStr.split(',').map(Number); - - for (const itemNumber of closedItems) { - await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - workflow_id: 'remove-labels-and-assignees-on-close.yml', - ref: 'main', - inputs: { - issue_number: itemNumber.toString() - } - }); - } From e415a99f71a66bae99e216a992af61da930a427a Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:28:00 +0200 Subject: [PATCH 04/99] Update RELEASE.md --- RELEASE.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 2cb96b72b..f0a25b135 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -2,17 +2,26 @@ This guide outlines the release process for Coolify, intended for developers and those interested in understanding how releases are managed and deployed. +## Table of Contents +- [Release Process](#release-process) +- [Version Types](#version-types) +- [Version Availability](#version-availability) +- [Manually Update to Specific Versions](#manually-update-to-specific-versions) + ## Release Process +
+Click to expand + 1. **Development on `next` or separate branches** - - Changes, fixes and new features are developed on the `next` or even separate branches. + - Changes, fixes, and new features are developed on the `next` or separate branches. 2. **Merging to `main`** - Once changes are ready, they are merged from `next` into the `main` branch. 3. **Building the release** - After merging to `main`, a new release is built. - - Note: A push to `main` does not automatically mean a new version is released. + - Note: A push to `main` does not automatically mean a new version is released. 4. **Creating a GitHub release** - A new release is created on GitHub with the new version details. @@ -24,16 +33,55 @@ This guide outlines the release process for Coolify, intended for developers and > [!NOTE] > 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. +
+ +## Version Types + +
+Click to expand + +### Stable (Coming soon) +- v4.0.0 or Stable is the production version. Use this for stable, production environments. +- Updates to stable happen every 2 to 4 weeks, with hotfixes possible. +- Releases are larger but less frequent. Multiple nightly versions will eventually turn into one stable version release. + +### Nightly +- Updates are much more frequent, with weekly or sometimes even daily updates possible. +- Versioning scheme: [To be added] +- Install nightly version: + ```bash + curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next + ``` + +### Beta +- Beta versions are... [To be completed] +- Versioning scheme: [To be added] + +
## Version Availability -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). +
+Click to expand + +### Self-Hosted +- Updates to the self-hosted version generally happen faster and more frequently, especially when using the nightly release channel. + +> [!WARNING] +> Do not use nightly builds in production as there is no guarantee of stability. + +### Cloud +- Updates to the cloud are less frequent. The cloud version may be a few versions behind the latest release. +- This approach focuses on stability, as it is a managed service. > [!IMPORTANT] > 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. ## Manually Update to Specific Versions +
+Click to expand + > [!CAUTION] > Updating to unreleased versions is not recommended and may cause issues. Use at your own risk! From 28cde9fd508bf7058ddcce574e1c79165082d062 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 22:52:47 +0200 Subject: [PATCH 05/99] Update RELEASE.md --- RELEASE.md | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index f0a25b135..de16c531e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,9 +10,6 @@ This guide outlines the release process for Coolify, intended for developers and ## Release Process -
-Click to expand - 1. **Development on `next` or separate branches** - Changes, fixes, and new features are developed on the `next` or separate branches. @@ -33,13 +30,8 @@ This guide outlines the release process for Coolify, intended for developers and > [!NOTE] > 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. -
- ## Version Types -
-Click to expand - ### Stable (Coming soon) - v4.0.0 or Stable is the production version. Use this for stable, production environments. - Updates to stable happen every 2 to 4 weeks, with hotfixes possible. @@ -57,13 +49,8 @@ This guide outlines the release process for Coolify, intended for developers and - Beta versions are... [To be completed] - Versioning scheme: [To be added] -
- ## Version Availability -
-Click to expand - ### Self-Hosted - Updates to the self-hosted version generally happen faster and more frequently, especially when using the nightly release channel. @@ -73,21 +60,14 @@ This guide outlines the release process for Coolify, intended for developers and ### Cloud - Updates to the cloud are less frequent. The cloud version may be a few versions behind the latest release. - This approach focuses on stability, as it is a managed service. +- @andrasbacsai will update the cloud version as soon as the fixes are released and thoroughly tested. > [!IMPORTANT] > 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. ## Manually Update to Specific Versions -
-Click to expand - > [!CAUTION] > Updating to unreleased versions is not recommended and may cause issues. Use at your own risk! To update your Coolify instance to a specific (unreleased) version, use the following command: - -```bash -curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s -``` --> Replace `` with the version you want to update to (for example `4.0.0-beta.332`). From 3e0a5191b956bf8dcd1990f6043a7f2d55b330b4 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:01:56 +0200 Subject: [PATCH 06/99] Update RELEASE.md --- RELEASE.md | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index de16c531e..c7baf5146 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -33,9 +33,10 @@ This guide outlines the release process for Coolify, intended for developers and ## Version Types ### Stable (Coming soon) -- v4.0.0 or Stable is the production version. Use this for stable, production environments. -- Updates to stable happen every 2 to 4 weeks, with hotfixes possible. +- v4.0.0 or Stable is the production version. Use this for stable, production environments (general recommendation for everyone). +- Updates to stable happen every 2 to 4 weeks but hotfixes are possible. - Releases are larger but less frequent. Multiple nightly versions will eventually turn into one stable version release. +- Versioning scheme: Stable version is `v4.0.0` and follows semantic versioning. ### Nightly - Updates are much more frequent, with weekly or sometimes even daily updates possible. @@ -45,29 +46,38 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -### Beta -- Beta versions are... [To be completed] -- Versioning scheme: [To be added] - -## Version Availability - -### Self-Hosted -- Updates to the self-hosted version generally happen faster and more frequently, especially when using the nightly release channel. - > [!WARNING] > Do not use nightly builds in production as there is no guarantee of stability. -### Cloud -- Updates to the cloud are less frequent. The cloud version may be a few versions behind the latest release. -- This approach focuses on stability, as it is a managed service. -- @andrasbacsai will update the cloud version as soon as the fixes are released and thoroughly tested. +### Beta +- Beta versions are test releases of the next upcoming stable version. Or when a new feature is added, it will be added to the beta version first. +- Versioning scheme: [To be added] + +## Version Availability +- When a new version is relaese and new Gihtub release is created but that does not mean the version is available for your instace. Read more about version availability for different instance types below. + +### Self-Hosted +- Updates to the self-hosted version generally happen faster and more frequently, especially when using the nightly release channel. +- Self hosted users can update their instance manually in the instance settings or wait for the instance to automatically update. > [!IMPORTANT] > 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. +### Cloud +- Updates to the cloud are less frequent. The cloud version may be a few versions behind the latest release. +- This approach focuses on stability, as it is a managed service and the cloud version is updated to a throughly tested version before being released. +- @andrasbacsai will update the cloud version as soon as the fixes and version are thoroughly tested and cofirmed stable. + +> [!IMPORTANT] +> If you see a new release on GitHub but the cloud version is not updated, it's because the @andrasbacsai hasn't updated the cloud version yet. This is intentional and ensures stability of the cloud version. + ## Manually Update to Specific Versions > [!CAUTION] > Updating to unreleased versions is not recommended and may cause issues. Use at your own risk! To update your Coolify instance to a specific (unreleased) version, use the following command: +```bash +curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s +``` +-> Replace `` with the version you want to update to (for example `4.0.0-beta.332`). From d6f498e6bbbe9fab512ceeb66b990f18dbbe36e5 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Tue, 17 Sep 2024 23:05:03 +0200 Subject: [PATCH 07/99] Update RELEASE.md --- RELEASE.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index c7baf5146..8ffd5118c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -64,12 +64,12 @@ This guide outlines the release process for Coolify, intended for developers and > 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. ### Cloud -- Updates to the cloud are less frequent. The cloud version may be a few versions behind the latest release. +- Updates to the cloud are less frequent. Because the cloud version is manually updated by @andrasbacsai to a throughly tested version before being released. - This approach focuses on stability, as it is a managed service and the cloud version is updated to a throughly tested version before being released. -- @andrasbacsai will update the cloud version as soon as the fixes and version are thoroughly tested and cofirmed stable. +- @andrasbacsai will manually update the cloud version as soon as the fixes and version are thoroughly tested and confirmed stable. > [!IMPORTANT] -> If you see a new release on GitHub but the cloud version is not updated, it's because the @andrasbacsai hasn't updated the cloud version yet. This is intentional and ensures stability of the cloud version. +> If you see a new release on GitHub but the cloud version is not updated, it's because @andrasbacsai hasn't updated the cloud version yet. This is intentional and ensures stability of the cloud version. The only the you can do is to wait for the cloud version to be updated. ## Manually Update to Specific Versions From 4aed40fb6517f5bbcfb733455fde84e1c738fab4 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:15:39 +0200 Subject: [PATCH 08/99] Update RELEASE.md --- RELEASE.md | 110 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 33 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 8ffd5118c..fd9331012 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -5,71 +5,114 @@ This guide outlines the release process for Coolify, intended for developers and ## Table of Contents - [Release Process](#release-process) - [Version Types](#version-types) + - [Stable](#stable) + - [Nightly](#nightly) + - [Beta](#beta) - [Version Availability](#version-availability) + - [Self-Hosted](#self-hosted) + - [Cloud](#cloud) - [Manually Update to Specific Versions](#manually-update-to-specific-versions) ## Release Process -1. **Development on `next` or separate branches** - - Changes, fixes, and new features are developed on the `next` or separate branches. +1. **Development on `next` or Feature Branches** + - Develop changes, fixes, and new features on the `next` branch or separate feature branches. 2. **Merging to `main`** - - Once changes are ready, they are merged from `next` into the `main` branch. + - Once changes are ready, merge them from `next` into the `main` branch. -3. **Building the release** - - After merging to `main`, a new release is built. - - Note: A push to `main` does not automatically mean a new version is released. +3. **Building the Release** + - After merging to `main`, initiate the build process for a new release. + - *Note:* Pushing to `main` does not automatically trigger a new version release. -4. **Creating a GitHub release** - - A new release is created on GitHub with the new version details. +4. **Creating a GitHub Release** + - Create a new release on GitHub with the updated version details. 5. **Updating the CDN** - - The final step is updating the version information on the CDN: + - Update the version information on the CDN: [https://cdn.coollabs.io/coolify/versions.json](https://cdn.coollabs.io/coolify/versions.json) > [!NOTE] -> 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. +> The CDN update may not occur immediately after the GitHub release. It can take hours or even days due to additional testing, stability checks, or potential hotfixes. ## Version Types -### Stable (Coming soon) -- v4.0.0 or Stable is the production version. Use this for stable, production environments (general recommendation for everyone). -- Updates to stable happen every 2 to 4 weeks but hotfixes are possible. -- Releases are larger but less frequent. Multiple nightly versions will eventually turn into one stable version release. -- Versioning scheme: Stable version is `v4.0.0` and follows semantic versioning. +
+ Stable -### Nightly -- Updates are much more frequent, with weekly or sometimes even daily updates possible. -- Versioning scheme: [To be added] -- Install nightly version: - ```bash - curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next - ``` +- **Stable (v4.0.0) (Coming Soon)** + - The production version suitable for stable, production environments. + - **Update Frequency:** Every 2 to 4 weeks, with possible hotfixes. + - **Release Size:** Larger but less frequent releases. Multiple nightly versions consolidate into a single stable release. + - **Versioning Scheme:** Follows semantic versioning (e.g., `v4.0.0`). + - **Installation Command:** + ```bash + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash + ``` + +
+ +
+ Nightly + +- **Nightly** + - Features frequent updates, potentially weekly or even daily. + - **Update Frequency:** Very high; ideal for testing the latest changes. + - **Versioning Scheme:** [To be added] + - **Installation Command:** + ```bash + curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next + ``` > [!WARNING] > Do not use nightly builds in production as there is no guarantee of stability. -### Beta -- Beta versions are test releases of the next upcoming stable version. Or when a new feature is added, it will be added to the beta version first. -- Versioning scheme: [To be added] +
+ +
+ Beta + +- **Beta** + - Test releases for the upcoming stable version or new features. + - **Purpose:** Allows users to test and provide feedback on new features before they become stable. + - **Versioning Scheme:** [To be added] + - **Installation Command:** + ```bash + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash + ``` + +
## Version Availability -- When a new version is relaese and new Gihtub release is created but that does not mean the version is available for your instace. Read more about version availability for different instance types below. + +When a new version is released and a new GitHub release is created, it does not immediately become available for your instance. Below is information on version availability for different instance types. ### Self-Hosted -- Updates to the self-hosted version generally happen faster and more frequently, especially when using the nightly release channel. -- Self hosted users can update their instance manually in the instance settings or wait for the instance to automatically update. + +- **Update Frequency:** Faster and more frequent updates, especially on the nightly release channel. +- **Update Methods:** + 1. **Manual Update in Instance Settings:** + - Navigate to `Settings > Update Check Frequency` and click the "Check Manually" button. + - An upgrade button will appear on the sidebar page if an update is available. + 2. **Automatic Update:** + - If auto-update is enabled, the instance will update automatically. + 3. **Re-run Installation Script:** + - Execute the installation script to automatically upgrade to the latest version available on the CDN. + ```bash + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash + ``` > [!IMPORTANT] -> 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. +> If a new release is available on GitHub but your instance hasn't updated, the CDN might not have been updated yet. This delay ensures stability and allows for hotfixes before official release. ### Cloud -- Updates to the cloud are less frequent. Because the cloud version is manually updated by @andrasbacsai to a throughly tested version before being released. -- This approach focuses on stability, as it is a managed service and the cloud version is updated to a throughly tested version before being released. -- @andrasbacsai will manually update the cloud version as soon as the fixes and version are thoroughly tested and confirmed stable. + +- **Update Frequency:** Less frequent, focusing on stability with manually tested versions. +- **Update Process:** + - Updates are managed by @andrasbacsai, who ensures that each cloud version is thoroughly tested and stable before release. > [!IMPORTANT] -> If you see a new release on GitHub but the cloud version is not updated, it's because @andrasbacsai hasn't updated the cloud version yet. This is intentional and ensures stability of the cloud version. The only the you can do is to wait for the cloud version to be updated. +> If a new GitHub release exists but the cloud version hasn't been updated, it's because @andrasbacsai hasn't released it yet. This ensures the cloud version remains stable. You'll need to wait for the update. ## Manually Update to Specific Versions @@ -77,6 +120,7 @@ This guide outlines the release process for Coolify, intended for developers and > Updating to unreleased versions is not recommended and may cause issues. Use at your own risk! To update your Coolify instance to a specific (unreleased) version, use the following command: + ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s ``` From 513ca6f57d4fba55ae09386c7e746e6c33795df3 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:09:03 +0200 Subject: [PATCH 09/99] Update RELEASE.md --- RELEASE.md | 63 +++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index fd9331012..2dd51db48 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,34 +16,32 @@ This guide outlines the release process for Coolify, intended for developers and ## Release Process 1. **Development on `next` or Feature Branches** - - Develop changes, fixes, and new features on the `next` branch or separate feature branches. + - Improvements, fixes, and new features are developed on the `next` branch or separate feature branches. 2. **Merging to `main`** - - Once changes are ready, merge them from `next` into the `main` branch. + - Once ready, changes are merged from the `next` branch into the `main` branch. 3. **Building the Release** - - After merging to `main`, initiate the build process for a new release. - - *Note:* Pushing to `main` does not automatically trigger a new version release. + - After merging to `main`, GitHub Actions automatically builds release images for all architectures and pushes them to the GitHub Container Registry with the version tag and the `latest` tag. 4. **Creating a GitHub Release** - - Create a new release on GitHub with the updated version details. + - A new GitHub release is manually created with details of the changes made in the version. 5. **Updating the CDN** - - Update the version information on the CDN: - [https://cdn.coollabs.io/coolify/versions.json](https://cdn.coollabs.io/coolify/versions.json) + - To make a new version publicly available, the version information on the CDN needs to be updated: [https://cdn.coollabs.io/coolify/versions.json](https://cdn.coollabs.io/coolify/versions.json) > [!NOTE] -> The CDN update may not occur immediately after the GitHub release. It can take hours or even days due to additional testing, stability checks, or potential hotfixes. +> The CDN update may not occur immediately after the GitHub release. It can take hours or even days due to additional testing, stability checks, or potential hotfixes. The update becomes available only after the CDN is updated. ## Version Types
- Stable + Stable (Coming Soon) -- **Stable (v4.0.0) (Coming Soon)** - - The production version suitable for stable, production environments. - - **Update Frequency:** Every 2 to 4 weeks, with possible hotfixes. - - **Release Size:** Larger but less frequent releases. Multiple nightly versions consolidate into a single stable release. +- **Stable (v4.0.0)** + - The production version suitable for stable, production environments (generally recommended). + - **Update Frequency:** Every 2 to 4 weeks, with more frequent possible hotfixes. + - **Release Size:** Larger but less frequent releases. Multiple nightly versions are consolidated into a single stable release. - **Versioning Scheme:** Follows semantic versioning (e.g., `v4.0.0`). - **Installation Command:** ```bash @@ -56,9 +54,10 @@ This guide outlines the release process for Coolify, intended for developers and Nightly - **Nightly** - - Features frequent updates, potentially weekly or even daily. - - **Update Frequency:** Very high; ideal for testing the latest changes. - - **Versioning Scheme:** [To be added] + - The latest development version, suitable for testing the latest changes and experimenting with new features. + - **Update Frequency:** Daily or bi-weekly updates. + - **Release Size:** Smaller, more frequent releases. + - **Versioning Scheme:** TO BE DETERMINED - **Installation Command:** ```bash curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next @@ -73,9 +72,11 @@ This guide outlines the release process for Coolify, intended for developers and Beta - **Beta** - - Test releases for the upcoming stable version or new features. - - **Purpose:** Allows users to test and provide feedback on new features before they become stable. - - **Versioning Scheme:** [To be added] + - Test releases for the upcoming stable version. + - **Purpose:** Allows users to test and provide feedback on new features and changes before they become stable. + - **Update Frequency:** Available if we think beta testing is necessary. + - **Release Size:** Same size as stable release as it will become the next stabe release after some time. + - **Versioning Scheme:** Follows semantic versioning (e.g., `4.0.0-beta.341`). - **Installation Command:** ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash @@ -85,34 +86,34 @@ This guide outlines the release process for Coolify, intended for developers and ## Version Availability -When a new version is released and a new GitHub release is created, it does not immediately become available for your instance. Below is information on version availability for different instance types. +When a new version is released and a new GitHub release is created, it doesn't immediately become available for your instance. Here's how version availability works for different instance types. ### Self-Hosted -- **Update Frequency:** Faster and more frequent updates, especially on the nightly release channel. +- **Update Frequency:** More frequent updates, especially on the nightly release channel. - **Update Methods:** 1. **Manual Update in Instance Settings:** - - Navigate to `Settings > Update Check Frequency` and click the "Check Manually" button. - - An upgrade button will appear on the sidebar page if an update is available. + - Go to `Settings > Update Check Frequency` and click the `Check Manually` button. + - If an update is available, an upgrade button will appear on the sidebar. 2. **Automatic Update:** - - If auto-update is enabled, the instance will update automatically. + - If enabled, the instance will update automatically at the time set in the settings. 3. **Re-run Installation Script:** - - Execute the installation script to automatically upgrade to the latest version available on the CDN. + - Run the installation script again to upgrade to the latest version available on the CDN: ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` > [!IMPORTANT] -> If a new release is available on GitHub but your instance hasn't updated, the CDN might not have been updated yet. This delay ensures stability and allows for hotfixes before official release. +> If a new release is available on GitHub but your instance hasn't updated or no upgrade button is shown, the CDN might not have been updated yet. This intentional delay ensures stability and allows for hotfixes before official release. ### Cloud -- **Update Frequency:** Less frequent, focusing on stability with manually tested versions. -- **Update Process:** - - Updates are managed by @andrasbacsai, who ensures that each cloud version is thoroughly tested and stable before release. +- **Update Frequency:** Less frequent as it's a managed service. The cloud version may be several versions behind the self-hosted version. +- **Update Method:** + - Updates are managed by @andrasbacsai, who ensures each cloud version is thoroughly tested and stable before release. > [!IMPORTANT] -> If a new GitHub release exists but the cloud version hasn't been updated, it's because @andrasbacsai hasn't released it yet. This ensures the cloud version remains stable. You'll need to wait for the update. +> If new GitHub release(s) exist but the cloud version is still behind, it's because @andrasbacsai hasn't updated it yet to ensure stability. You'll need to wait for him to do the update. ## Manually Update to Specific Versions @@ -124,4 +125,4 @@ To update your Coolify instance to a specific (unreleased) version, use the foll ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash -s ``` --> Replace `` with the version you want to update to (for example `4.0.0-beta.332`). +Replace `` with the version you want to update to (for example `4.0.0-beta.332`). From d1f28b42e51103d5b37ee143d7b24a2420b7744a Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:21:08 +0200 Subject: [PATCH 10/99] Update RELEASE.md --- RELEASE.md | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 2dd51db48..91d96d12d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -31,14 +31,14 @@ This guide outlines the release process for Coolify, intended for developers and - To make a new version publicly available, the version information on the CDN needs to be updated: [https://cdn.coollabs.io/coolify/versions.json](https://cdn.coollabs.io/coolify/versions.json) > [!NOTE] -> The CDN update may not occur immediately after the GitHub release. It can take hours or even days due to additional testing, stability checks, or potential hotfixes. The update becomes available only after the CDN is updated. +> The CDN update may not occur immediately after the GitHub release. It can take hours or even days due to additional testing, stability checks, or potential hotfixes. **The update becomes available only after the CDN is updated.** ## Version Types
- Stable (Coming Soon) + Stable (coming soon) -- **Stable (v4.0.0)** +- **Stable** - The production version suitable for stable, production environments (generally recommended). - **Update Frequency:** Every 2 to 4 weeks, with more frequent possible hotfixes. - **Release Size:** Larger but less frequent releases. Multiple nightly versions are consolidated into a single stable release. @@ -63,25 +63,28 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -> [!WARNING] -> Do not use nightly builds in production as there is no guarantee of stability. + > [!WARNING] + > Do not use nightly builds in production as there is no guarantee of stability.
- Beta + Beta (Coming Soon) -- **Beta** +- **Beta (coming soon)** - Test releases for the upcoming stable version. - **Purpose:** Allows users to test and provide feedback on new features and changes before they become stable. - **Update Frequency:** Available if we think beta testing is necessary. - **Release Size:** Same size as stable release as it will become the next stabe release after some time. - - **Versioning Scheme:** Follows semantic versioning (e.g., `4.0.0-beta.341`). + - **Versioning Scheme:** Follows semantic versioning (e.g., `4.1.0-beta.2`). - **Installation Command:** ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` + > [!WARNING] + > Do not use beta builds in production as there is no guarantee of stability. +
## Version Availability @@ -91,6 +94,7 @@ When a new version is released and a new GitHub release is created, it doesn't i ### Self-Hosted - **Update Frequency:** More frequent updates, especially on the nightly release channel. +- **Update Availability:** New versions are available once the CDN has been updated. - **Update Methods:** 1. **Manual Update in Instance Settings:** - Go to `Settings > Update Check Frequency` and click the `Check Manually` button. @@ -104,16 +108,17 @@ When a new version is released and a new GitHub release is created, it doesn't i ``` > [!IMPORTANT] -> If a new release is available on GitHub but your instance hasn't updated or no upgrade button is shown, the CDN might not have been updated yet. This intentional delay ensures stability and allows for hotfixes before official release. +> If a new release is available on GitHub but your instance hasn't updated yetor no upgrade button is shown, the CDN might not have been updated yet. This intentional delay ensures stability and allows for hotfixes before official release. ### Cloud -- **Update Frequency:** Less frequent as it's a managed service. The cloud version may be several versions behind the self-hosted version. +- **Update Frequency:** Less frequent as it's a managed service. +- **Update Availability:** New versions are available once @andrasbacsai has updated the cloud version manually. - **Update Method:** - - Updates are managed by @andrasbacsai, who ensures each cloud version is thoroughly tested and stable before release. + - Updates are managed by @andrasbacsai, who ensures each cloud version is thoroughly tested and stable before releasing it. > [!IMPORTANT] -> If new GitHub release(s) exist but the cloud version is still behind, it's because @andrasbacsai hasn't updated it yet to ensure stability. You'll need to wait for him to do the update. +> The cloud version of Coolify may be several versions behind the latest GitHub releases. This is intentional to ensure stability and reliability for cloud users. ## Manually Update to Specific Versions From 5b27eef984be6edb4cfbd01473d715ca4380712c Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:28:21 +0200 Subject: [PATCH 11/99] Update RELEASE.md --- RELEASE.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 91d96d12d..2bf5d7b29 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -63,8 +63,8 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` - > [!WARNING] - > Do not use nightly builds in production as there is no guarantee of stability. +> [!WARNING] +> Do not use nightly builds in production as there is no guarantee of stability.
@@ -82,8 +82,8 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` - > [!WARNING] - > Do not use beta builds in production as there is no guarantee of stability. +> [!WARNING] +> Do not use beta builds in production as there is no guarantee of stability.
@@ -113,12 +113,12 @@ When a new version is released and a new GitHub release is created, it doesn't i ### Cloud - **Update Frequency:** Less frequent as it's a managed service. -- **Update Availability:** New versions are available once @andrasbacsai has updated the cloud version manually. +- **Update Availability:** New versions are available once Andras has updated the cloud version manually. - **Update Method:** - - Updates are managed by @andrasbacsai, who ensures each cloud version is thoroughly tested and stable before releasing it. + - Updates are managed by Andras, who ensures each cloud version is thoroughly tested and stable before releasing it. > [!IMPORTANT] -> The cloud version of Coolify may be several versions behind the latest GitHub releases. This is intentional to ensure stability and reliability for cloud users. +> The cloud version of Coolify may be several versions behind the latest GitHub releases even if the CDN is updated. This is intentional to ensure stability and reliability for cloud users and Andras will manully update the cloud version when the update is ready. ## Manually Update to Specific Versions From 4e8708051d8c123364478bcb874c27c4c5ee1bda Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:34:54 +0200 Subject: [PATCH 12/99] Update RELEASE.md --- RELEASE.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 2bf5d7b29..13d212e68 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -63,15 +63,12 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify-nightly/install.sh | bash -s next ``` -> [!WARNING] -> Do not use nightly builds in production as there is no guarantee of stability. -
- Beta (Coming Soon) + Beta -- **Beta (coming soon)** +- **Beta** - Test releases for the upcoming stable version. - **Purpose:** Allows users to test and provide feedback on new features and changes before they become stable. - **Update Frequency:** Available if we think beta testing is necessary. @@ -82,11 +79,11 @@ This guide outlines the release process for Coolify, intended for developers and curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash ``` -> [!WARNING] -> Do not use beta builds in production as there is no guarantee of stability. -
+> [!WARNING] +> Do not use nightly/beta builds in production as there is no guarantee of stability. + ## Version Availability When a new version is released and a new GitHub release is created, it doesn't immediately become available for your instance. Here's how version availability works for different instance types. @@ -108,7 +105,7 @@ When a new version is released and a new GitHub release is created, it doesn't i ``` > [!IMPORTANT] -> If a new release is available on GitHub but your instance hasn't updated yetor no upgrade button is shown, the CDN might not have been updated yet. This intentional delay ensures stability and allows for hotfixes before official release. +> If a new release is available on GitHub but your instance hasn't updated yet or no upgrade button is shown in the UI, the CDN might not have been updated yet. This intentional delay ensures stability and allows for hotfixes before official release. ### Cloud From cb177dae58a516bec5b945bf8e7b2869164e3442 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:36:04 +0200 Subject: [PATCH 13/99] Update RELEASE.md --- RELEASE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE.md b/RELEASE.md index 13d212e68..d9f05f17d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -73,7 +73,7 @@ This guide outlines the release process for Coolify, intended for developers and - **Purpose:** Allows users to test and provide feedback on new features and changes before they become stable. - **Update Frequency:** Available if we think beta testing is necessary. - **Release Size:** Same size as stable release as it will become the next stabe release after some time. - - **Versioning Scheme:** Follows semantic versioning (e.g., `4.1.0-beta.2`). + - **Versioning Scheme:** Follows semantic versioning (e.g., `4.1.0-beta.1`). - **Installation Command:** ```bash curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash From ca21545d7bacec0af4578c8587b76a1d1386d6c8 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:01:34 +0200 Subject: [PATCH 14/99] Fix: Typo --- other/nightly/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/other/nightly/install.sh b/other/nightly/install.sh index 61acbd333..4df5b3c41 100755 --- a/other/nightly/install.sh +++ b/other/nightly/install.sh @@ -480,9 +480,9 @@ syncSshKeys() { } set +e -IS_COOLIFY_VOLUME_EXISTS=$(docker volume ls | grep coolify-db | wc -l) +IF_COOLIFY_VOLUME_EXISTS=$(docker volume ls | grep coolify-db | wc -l) set -e -if [ "$IS_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then +if [ "$IF_COOLIFY_VOLUME_EXISTS" -eq 0 ]; then echo " - Generating SSH key." ssh-keygen -t ed25519 -a 100 -f /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal -q -N "" -C coolify chown 9999 /data/coolify/ssh/keys/id.$CURRENT_USER@host.docker.internal From cc77775f20eef9fe1322c1cbb4ab2702e1bfe3c6 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:32:56 +0200 Subject: [PATCH 15/99] Remove not needed seeders to make management simpler --- database/seeders/EnvironmentSeeder.php | 13 ------------- database/seeders/KubernetesSeeder.php | 16 ---------------- database/seeders/LocalFileVolumeSeeder.php | 16 ---------------- database/seeders/ServiceApplicationSeeder.php | 16 ---------------- database/seeders/ServiceDatabaseSeeder.php | 16 ---------------- database/seeders/ServiceSeeder.php | 16 ---------------- database/seeders/SubscriptionSeeder.php | 16 ---------------- database/seeders/WaitlistSeeder.php | 16 ---------------- database/seeders/WebhookSeeder.php | 16 ---------------- 9 files changed, 141 deletions(-) delete mode 100644 database/seeders/EnvironmentSeeder.php delete mode 100644 database/seeders/KubernetesSeeder.php delete mode 100644 database/seeders/LocalFileVolumeSeeder.php delete mode 100644 database/seeders/ServiceApplicationSeeder.php delete mode 100644 database/seeders/ServiceDatabaseSeeder.php delete mode 100644 database/seeders/ServiceSeeder.php delete mode 100644 database/seeders/SubscriptionSeeder.php delete mode 100644 database/seeders/WaitlistSeeder.php delete mode 100644 database/seeders/WebhookSeeder.php diff --git a/database/seeders/EnvironmentSeeder.php b/database/seeders/EnvironmentSeeder.php deleted file mode 100644 index 1c6d562a9..000000000 --- a/database/seeders/EnvironmentSeeder.php +++ /dev/null @@ -1,13 +0,0 @@ - Date: Fri, 20 Sep 2024 15:42:06 +0200 Subject: [PATCH 16/99] Remove commented out seeders --- database/seeders/ApplicationPreviewSeeder.php | 20 ----------- .../seeders/EnvironmentVariableSeeder.php | 21 ------------ database/seeders/GitSeeder.php | 26 --------------- database/seeders/ProjectSettingSeeder.php | 15 --------- ...ScheduledDatabaseBackupExecutionSeeder.php | 28 ---------------- .../seeders/ScheduledDatabaseBackupSeeder.php | 33 ------------------- database/seeders/SwarmDockerSeeder.php | 20 ----------- 7 files changed, 163 deletions(-) delete mode 100644 database/seeders/ApplicationPreviewSeeder.php delete mode 100644 database/seeders/EnvironmentVariableSeeder.php delete mode 100644 database/seeders/GitSeeder.php delete mode 100644 database/seeders/ProjectSettingSeeder.php delete mode 100644 database/seeders/ScheduledDatabaseBackupExecutionSeeder.php delete mode 100644 database/seeders/ScheduledDatabaseBackupSeeder.php delete mode 100644 database/seeders/SwarmDockerSeeder.php diff --git a/database/seeders/ApplicationPreviewSeeder.php b/database/seeders/ApplicationPreviewSeeder.php deleted file mode 100644 index 764939073..000000000 --- a/database/seeders/ApplicationPreviewSeeder.php +++ /dev/null @@ -1,20 +0,0 @@ - $application_1->id, - // 'pull_request_id' => 1 - // ]); - } -} diff --git a/database/seeders/EnvironmentVariableSeeder.php b/database/seeders/EnvironmentVariableSeeder.php deleted file mode 100644 index b09ff705e..000000000 --- a/database/seeders/EnvironmentVariableSeeder.php +++ /dev/null @@ -1,21 +0,0 @@ - 'NODE_ENV', - // 'value' => 'production', - // 'is_build_time' => true, - // 'application_id' => 1, - // ]); - } -} diff --git a/database/seeders/GitSeeder.php b/database/seeders/GitSeeder.php deleted file mode 100644 index c8dc3ab6d..000000000 --- a/database/seeders/GitSeeder.php +++ /dev/null @@ -1,26 +0,0 @@ - 'https://api.github.com', - // 'html_url' => 'https://github.com', - // 'is_public' => false, - // 'private_key_id' => $private_key_1->id, - // 'project_id' => $project->id, - // ]); - } -} diff --git a/database/seeders/ProjectSettingSeeder.php b/database/seeders/ProjectSettingSeeder.php deleted file mode 100644 index 2a8cdfdb4..000000000 --- a/database/seeders/ProjectSettingSeeder.php +++ /dev/null @@ -1,15 +0,0 @@ -settings->wildcard_domain = 'wildcard.example.com'; - // $first_project->settings->save(); - } -} diff --git a/database/seeders/ScheduledDatabaseBackupExecutionSeeder.php b/database/seeders/ScheduledDatabaseBackupExecutionSeeder.php deleted file mode 100644 index 7e4c33764..000000000 --- a/database/seeders/ScheduledDatabaseBackupExecutionSeeder.php +++ /dev/null @@ -1,28 +0,0 @@ - 'success', - // 'message' => 'Backup created successfully.', - // 'size' => '10243467789556', - // 'scheduled_database_backup_id' => 1, - // ]); - // ScheduledDatabaseBackupExecution::create([ - // 'status' => 'failed', - // 'message' => 'Backup failed.', - // 'size' => '10243456', - // 'scheduled_database_backup_id' => 1, - // ]); - } -} diff --git a/database/seeders/ScheduledDatabaseBackupSeeder.php b/database/seeders/ScheduledDatabaseBackupSeeder.php deleted file mode 100644 index fefbada0d..000000000 --- a/database/seeders/ScheduledDatabaseBackupSeeder.php +++ /dev/null @@ -1,33 +0,0 @@ - true, - // 'frequency' => '* * * * *', - // 'number_of_backups_locally' => 2, - // 'database_id' => 1, - // 'database_type' => 'App\Models\StandalonePostgresql', - // 's3_storage_id' => 1, - // 'team_id' => 0, - // ]); - // ScheduledDatabaseBackup::create([ - // 'enabled' => true, - // 'frequency' => '* * * * *', - // 'number_of_backups_locally' => 3, - // 'database_id' => 1, - // 'database_type' => 'App\Models\StandalonePostgresql', - // 'team_id' => 0, - // ]); - } -} diff --git a/database/seeders/SwarmDockerSeeder.php b/database/seeders/SwarmDockerSeeder.php deleted file mode 100644 index 85d31b140..000000000 --- a/database/seeders/SwarmDockerSeeder.php +++ /dev/null @@ -1,20 +0,0 @@ - 'Swarm Docker 1', - // 'server_id' => 1, - // ]); - } -} From 000a348c900b193fd4971043886bb9002920775c Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:42:24 +0200 Subject: [PATCH 17/99] remove team seeders --- database/seeders/TeamSeeder.php | 23 ---------------- database/seeders/TestTeamSeeder.php | 42 ----------------------------- 2 files changed, 65 deletions(-) delete mode 100644 database/seeders/TeamSeeder.php delete mode 100644 database/seeders/TestTeamSeeder.php diff --git a/database/seeders/TeamSeeder.php b/database/seeders/TeamSeeder.php deleted file mode 100644 index 67c5ec489..000000000 --- a/database/seeders/TeamSeeder.php +++ /dev/null @@ -1,23 +0,0 @@ -description = 'The root team'; - $root_user_personal_team->save(); - - $normal_user_in_root_team->teams()->attach($root_user_personal_team); - $normal_user_not_in_root_team = User::find(2); - $normal_user_in_root_team_personal_team = Team::find(1); - $normal_user_not_in_root_team->teams()->attach($normal_user_in_root_team_personal_team, ['role' => 'admin']); - } -} diff --git a/database/seeders/TestTeamSeeder.php b/database/seeders/TestTeamSeeder.php deleted file mode 100644 index 940c45cc5..000000000 --- a/database/seeders/TestTeamSeeder.php +++ /dev/null @@ -1,42 +0,0 @@ -create([ - 'name' => '1 personal, 1 other team, owner, no other members', - 'email' => '1@example.com', - ]); - $team = Team::create([ - 'name' => '1@example.com', - 'personal_team' => false, - 'show_boarding' => true, - ]); - $user->teams()->attach($team, ['role' => 'owner']); - - // User has 2 teams, 1 personal, 1 other where it is the owner and 1 other member is in the team - $user = User::factory()->create([ - 'name' => 'owner: 1 personal, 1 other team, owner, 1 other member', - 'email' => '2@example.com', - ]); - $team = Team::create([ - 'name' => '2@example.com', - 'personal_team' => false, - 'show_boarding' => true, - ]); - $user->teams()->attach($team, ['role' => 'owner']); - $user = User::factory()->create([ - 'name' => 'member: 1 personal, 1 other team, owner, 1 other member', - 'email' => '3@example.com', - ]); - $team->members()->attach($user, ['role' => 'member']); - } -} From 768b39dd25a5423e89eb6e52104053d776a08c99 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:45:18 +0200 Subject: [PATCH 18/99] Revert "remove team seeders" This reverts commit 000a348c900b193fd4971043886bb9002920775c. --- database/seeders/TeamSeeder.php | 23 ++++++++++++++++ database/seeders/TestTeamSeeder.php | 42 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 database/seeders/TeamSeeder.php create mode 100644 database/seeders/TestTeamSeeder.php diff --git a/database/seeders/TeamSeeder.php b/database/seeders/TeamSeeder.php new file mode 100644 index 000000000..67c5ec489 --- /dev/null +++ b/database/seeders/TeamSeeder.php @@ -0,0 +1,23 @@ +description = 'The root team'; + $root_user_personal_team->save(); + + $normal_user_in_root_team->teams()->attach($root_user_personal_team); + $normal_user_not_in_root_team = User::find(2); + $normal_user_in_root_team_personal_team = Team::find(1); + $normal_user_not_in_root_team->teams()->attach($normal_user_in_root_team_personal_team, ['role' => 'admin']); + } +} diff --git a/database/seeders/TestTeamSeeder.php b/database/seeders/TestTeamSeeder.php new file mode 100644 index 000000000..940c45cc5 --- /dev/null +++ b/database/seeders/TestTeamSeeder.php @@ -0,0 +1,42 @@ +create([ + 'name' => '1 personal, 1 other team, owner, no other members', + 'email' => '1@example.com', + ]); + $team = Team::create([ + 'name' => '1@example.com', + 'personal_team' => false, + 'show_boarding' => true, + ]); + $user->teams()->attach($team, ['role' => 'owner']); + + // User has 2 teams, 1 personal, 1 other where it is the owner and 1 other member is in the team + $user = User::factory()->create([ + 'name' => 'owner: 1 personal, 1 other team, owner, 1 other member', + 'email' => '2@example.com', + ]); + $team = Team::create([ + 'name' => '2@example.com', + 'personal_team' => false, + 'show_boarding' => true, + ]); + $user->teams()->attach($team, ['role' => 'owner']); + $user = User::factory()->create([ + 'name' => 'member: 1 personal, 1 other team, owner, 1 other member', + 'email' => '3@example.com', + ]); + $team->members()->attach($user, ['role' => 'member']); + } +} From fca64d672699d52b151f02665f8186edeb2514e0 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 20 Sep 2024 23:12:08 +0200 Subject: [PATCH 19/99] Fix: volumes on development environment --- docker-compose.dev.yml | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 750ad45d4..ebcf16709 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 - - /data/coolify/backups/:/var/www/html/storage/app/backups + - backups_volume:/var/www/html/storage/app/backups postgres: pull_policy: always ports: @@ -32,8 +32,7 @@ services: POSTGRES_DB: "${DB_DATABASE:-coolify}" POSTGRES_HOST_AUTH_METHOD: "trust" volumes: - - /data/coolify/_volumes/database/:/var/lib/postgresql/data - # - coolify-pg-data-dev:/var/lib/postgresql/data + - postgres_data:/var/lib/postgresql/data redis: pull_policy: always ports: @@ -41,8 +40,7 @@ services: env_file: - .env volumes: - - /data/coolify/_volumes/redis/:/data - # - coolify-redis-data-dev:/data + - redis_data:/data soketi: build: context: . @@ -69,7 +67,7 @@ services: ports: - "${VITE_PORT:-5173}:${VITE_PORT:-5173}" volumes: - - .:/var/www/html:cached + - .:/var/www/html/:cached command: sh -c "npm install && npm run dev" networks: - coolify @@ -79,9 +77,11 @@ services: init: true container_name: coolify-testing-host volumes: - - /:/host - /var/run/docker.sock:/var/run/docker.sock - - /data/coolify/:/data/coolify + - backups_volume:/data/coolify/backups + - postgres_data:/data/coolify/_volumes/database + - redis_data:/data/coolify/_volumes/redis + - minio_data:/data/coolify/_volumes/minio networks: - coolify mailpit: @@ -105,17 +105,15 @@ services: MINIO_ACCESS_KEY: "${MINIO_ACCESS_KEY:-minioadmin}" MINIO_SECRET_KEY: "${MINIO_SECRET_KEY:-minioadmin}" volumes: - - /data/coolify/_volumes/minio/:/data - # - coolify-minio-data-dev:/data + - minio_data:/data networks: - coolify volumes: - coolify-data-dev: - coolify-pg-data-dev: - coolify-redis-data-dev: - coolify-minio-data-dev: - + backups_volume: + postgres_data: + redis_data: + minio_data: networks: coolify: From cb4f7755c3850810c901e14fa2f45e9a78611ea0 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sat, 21 Sep 2024 01:08:28 +0200 Subject: [PATCH 20/99] Update CONTRIBUTING.md --- CONTRIBUTING.md | 86 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 590360ddb..d6b18e126 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,9 +12,10 @@ You can ask for guidance anytime on our [Discord server](https://coollabs.io/dis 4. [Set up Environment Variables](#4-set-up-environment-variables) 5. [Start Coolify](#5-start-coolify) 6. [Start Development](#6-start-development) -7. [Development Notes](#7-development-notes) -8. [Create a Pull Request](#8-create-a-pull-request) -9. [Additional Contribution Guidelines](#additional-contribution-guidelines) +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) ## 1. Setup Development Environment @@ -145,26 +146,7 @@ After installing Docker (or Orbstack) and Spin, verify the installation: > TELESCOPE_ENABLED=true > ``` -## 7. Development Notes - -When working on Coolify, keep the following in mind: - -1. **Database Migrations**: After switching branches or making changes to the database structure, always run migrations: - ```bash - docker exec -it coolify php artisan migrate - ``` - -2. **Resetting Development Setup**: To reset your development setup to a clean database with default values: - ```bash - docker exec -it coolify php artisan migrate:fresh --seed - ``` - -3. **Troubleshooting**: If you encounter unexpected behavior, ensure your database is up-to-date with the latest migrations and if possible reset the development setup to eliminate any environment-specific issues. - -> [!IMPORTANT] -> Forgetting to migrate the database can cause problems, so make it a habit to run migrations after pulling changes or switching branches. - -## 8. Create a Pull Request +## 7. Create a Pull Request 1. After making changes or adding a new service: - Commit your changes to your forked repository. @@ -194,6 +176,64 @@ When working on Coolify, keep the following in mind: After submission, maintainers will review your PR and may request changes or provide feedback. +## Development Notes + +When working on Coolify, keep the following in mind: + +1. **Database Migrations**: After switching branches or making changes to the database structure, always run migrations: + ```bash + docker exec -it coolify php artisan migrate + ``` + +2. **Resetting Development Setup**: To reset your development setup to a clean database with default values: + ```bash + docker exec -it coolify php artisan migrate:fresh --seed + ``` + +3. **Troubleshooting**: If you encounter unexpected behavior, ensure your database is up-to-date with the latest migrations and if possible reset the development setup to eliminate any environment-specific issues. + +> [!IMPORTANT] +> Forgetting to migrate the database can cause problems, so make it a habit to run migrations after pulling changes or switching branches. + +## Resetting Development Environment + +If you encounter issues or break your database or something else, follow these steps to start from a clean slate (works since v4.0.0-beta.342): + +1. Stop all running containers: + ``` + ctrl + c + ``` + +2. Remove all Coolify containers: + ```bash + docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail + ``` + +3. Remove Coolify volumes: + ```bash + docker volume rm coolify_backups_volume coolify_minio_data coolify_postgres_data coolify_redis_data + ``` + +4. Remove unused images: + ```bash + docker image prune -a + ``` + +5. Start Coolify again: + ```bash + spin up + ``` + +6. Run database migrations and seeders: + ```bash + docker exec -it coolify php artisan migrate:fresh --seed + ``` + +After completing these steps, you'll have a fresh development setup. + +> [!IMPORTANT] +> Always run database migrations and seeders after switching branches or pulling updates to ensure your local database structure matches the current codebase and includes necessary seed data. + ## Additional Contribution Guidelines ### Contributing a New Service From a26c1f00523ca59839689752cb19af6c6f3c2860 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sat, 21 Sep 2024 01:11:03 +0200 Subject: [PATCH 21/99] Update CONTRIBUTING.md --- CONTRIBUTING.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d6b18e126..bce8cc4ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -197,19 +197,16 @@ When working on Coolify, keep the following in mind: ## Resetting Development Environment -If you encounter issues or break your database or something else, follow these steps to start from a clean slate (works since v4.0.0-beta.342): +If you encounter issues or break your database or something else, follow these steps to start from a clean slate (works since `v4.0.0-beta.342`): -1. Stop all running containers: - ``` - ctrl + c - ``` +1. Stop all running containers `ctrl + c`. 2. Remove all Coolify containers: ```bash docker rm coolify coolify-db coolify-redis coolify-realtime coolify-testing-host coolify-minio coolify-vite-1 coolify-mail ``` -3. Remove Coolify volumes: +3. Remove Coolify volumes (it is possible that the volumes have no `coolify` prefix on you machine, in that case remove the prefix): ```bash docker volume rm coolify_backups_volume coolify_minio_data coolify_postgres_data coolify_redis_data ``` From 76655a7c7d1034b0536d13c9eda2c23210fb29c4 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sat, 21 Sep 2024 01:31:17 +0200 Subject: [PATCH 22/99] Remove dev .env form nightly as there is also no dev compose in nightly --- other/nightly/.env.development.example | 38 -------------------------- 1 file changed, 38 deletions(-) delete mode 100644 other/nightly/.env.development.example diff --git a/other/nightly/.env.development.example b/other/nightly/.env.development.example deleted file mode 100644 index 3023a21a6..000000000 --- a/other/nightly/.env.development.example +++ /dev/null @@ -1,38 +0,0 @@ -# Coolify Configuration -APP_ENV=local -APP_NAME="Coolify Development" -APP_ID=development -APP_KEY= -APP_URL=http://localhost -APP_PORT=8000 -APP_DEBUG=true -SSH_MUX_ENABLED=false - -# PostgreSQL Database Configuration -DB_DATABASE=coolify -DB_USERNAME=coolify -DB_PASSWORD=password -DB_HOST=host.docker.internal -DB_PORT=5432 - -# Ray Configuration -# Set to true to enable Ray -RAY_ENABLED=false -# Set custom ray port -RAY_PORT= - -# Clockwork Configuration -CLOCKWORK_ENABLED=false -CLOCKWORK_QUEUE_COLLECT=true - -# Enable Laravel Telescope for debugging -TELESCOPE_ENABLED=false - -# Selenium Driver URL for Dusk -DUSK_DRIVER_URL=http://selenium:4444 - -# Special Keys for Andras -# For cache purging -BUNNY_API_KEY= -# For asset uploads -BUNNY_STORAGE_API_KEY= From ff5e445b437dd76f38df4cbb9078ac3b35c12583 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:02:51 +0200 Subject: [PATCH 23/99] Feat: Manual cleanup button and unused volumes and network deletion --- app/Actions/Server/CleanupDocker.php | 37 ++++++++++--------- app/Jobs/DockerCleanupJob.php | 8 ++-- app/Livewire/Server/Form.php | 24 +++++++++++- app/Models/Server.php | 4 ++ ...anup_options_to_servers_settings_table.php | 24 ++++++++++++ .../views/livewire/server/form.blade.php | 37 ++++++++++++++----- 6 files changed, 102 insertions(+), 32 deletions(-) create mode 100644 database/migrations/2024_09_22_165240_add_advanced_options_to_cleanup_options_to_servers_settings_table.php diff --git a/app/Actions/Server/CleanupDocker.php b/app/Actions/Server/CleanupDocker.php index 1034c13d6..34126deeb 100644 --- a/app/Actions/Server/CleanupDocker.php +++ b/app/Actions/Server/CleanupDocker.php @@ -12,28 +12,29 @@ class CleanupDocker public function handle(Server $server) { + $settings = InstanceSettings::get(); + $helperImageVersion = data_get($settings, 'helper_version'); + $helperImage = config('coolify.helper_image'); + $helperImageWithVersion = "$helperImage:$helperImageVersion"; - $commands = $this->getCommands(); + $commands = [ + '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", + ]; + + $serverSettings = $server->settings; + if ($serverSettings->delete_unused_volumes) { + $commands[] = 'docker volume prune -af'; + } + + if ($serverSettings->delete_unused_networks) { + $commands[] = 'docker network prune -f'; + } foreach ($commands as $command) { instant_remote_process([$command], $server, false); } } - - private function getCommands(): array - { - $settings = InstanceSettings::get(); - $helperImageVersion = data_get($settings, 'helper_version'); - $helperImage = config('coolify.helper_image'); - $helperImageWithVersion = config('coolify.helper_image').':'.$helperImageVersion; - - $commonCommands = [ - '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", - ]; - - return $commonCommands; - } } diff --git a/app/Jobs/DockerCleanupJob.php b/app/Jobs/DockerCleanupJob.php index f95cd2920..4874e9670 100644 --- a/app/Jobs/DockerCleanupJob.php +++ b/app/Jobs/DockerCleanupJob.php @@ -24,7 +24,7 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueue public ?string $usageBefore = null; - public function __construct(public Server $server) {} + public function __construct(public Server $server, public bool $manualCleanup = false) {} public function middleware(): array { @@ -42,10 +42,10 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueue if (! $this->server->isFunctional()) { return; } - if ($this->server->settings->force_docker_cleanup) { - Log::info('DockerCleanupJob force cleanup on '.$this->server->name); - CleanupDocker::run(server: $this->server); + if ($this->manualCleanup || $this->server->settings->force_docker_cleanup) { + Log::info('DockerCleanupJob ' . ($this->manualCleanup ? 'manual' : 'force') . ' cleanup on ' . $this->server->name); + CleanupDocker::run(server: $this->server); return; } diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 3b3747a81..a5786038c 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -7,6 +7,7 @@ use App\Actions\Server\StopSentinel; use App\Jobs\PullSentinelImageJob; use App\Models\Server; use Livewire\Component; +use App\Jobs\DockerCleanupJob; class Form extends Component { @@ -24,6 +25,9 @@ class Form extends Component public $timezones; + public $delete_unused_volumes = false; + public $delete_unused_networks = false; + protected $listeners = [ 'serverInstalled', 'refreshServerShow' => 'serverInstalled', @@ -53,6 +57,8 @@ class Form extends Component 'server.settings.force_docker_cleanup' => 'required|boolean', 'server.settings.docker_cleanup_frequency' => 'required_if:server.settings.force_docker_cleanup,true|string', 'server.settings.docker_cleanup_threshold' => 'required_if:server.settings.force_docker_cleanup,false|integer|min:1|max:100', + 'server.settings.delete_unused_volumes' => 'boolean', + 'server.settings.delete_unused_networks' => 'boolean', ]; protected $validationAttributes = [ @@ -74,6 +80,8 @@ class Form extends Component 'server.settings.metrics_history_days' => 'Metrics History', 'server.settings.is_server_api_enabled' => 'Server API', 'server.settings.server_timezone' => 'Server Timezone', + 'server.settings.delete_unused_volumes' => 'Delete Unused Volumes', + 'server.settings.delete_unused_networks' => 'Delete Unused Networks', ]; public function mount(Server $server) @@ -83,6 +91,8 @@ class Form extends Component $this->wildcard_domain = $this->server->settings->wildcard_domain; $this->server->settings->docker_cleanup_threshold = $this->server->settings->docker_cleanup_threshold; $this->server->settings->docker_cleanup_frequency = $this->server->settings->docker_cleanup_frequency; + $this->server->settings->delete_unused_volumes = $server->settings->delete_unused_volumes; + $this->server->settings->delete_unused_networks = $server->settings->delete_unused_networks; } public function updated($field) @@ -126,6 +136,7 @@ class Form extends Component try { refresh_server_connection($this->server->privateKey); $this->validateServer(false); + $this->server->settings->save(); $this->server->save(); $this->dispatch('success', 'Server updated.'); @@ -143,6 +154,7 @@ class Form extends Component ray('Sentinel is not enabled'); StopSentinel::dispatch($this->server); } + $this->server->settings->save(); // $this->checkPortForServerApi(); } catch (\Throwable $e) { @@ -223,9 +235,9 @@ class Form extends Component $this->server->settings->server_timezone = $newTimezone; $this->server->settings->save(); } - $this->server->settings->save(); $this->server->save(); + $this->dispatch('success', 'Server updated.'); } catch (\Throwable $e) { return handleError($e, $this); @@ -238,4 +250,14 @@ class Form extends Component $this->server->settings->save(); $this->dispatch('success', 'Server timezone updated.'); } + + public function manualCleanup() + { + try { + DockerCleanupJob::dispatch($this->server, true); + $this->dispatch('success', 'Manual cleanup job started. Depending on the amount of data, this might take a while.'); + } catch (\Throwable $e) { + return handleError($e, $this); + } + } } diff --git a/app/Models/Server.php b/app/Models/Server.php index 90e6ade14..8a30b1a4d 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -37,6 +37,8 @@ use Symfony\Component\Yaml\Yaml; 'validation_logs' => ['type' => 'string'], 'log_drain_notification_sent' => ['type' => 'boolean'], 'swarm_cluster' => ['type' => 'string'], + 'delete_unused_volumes' => ['type' => 'boolean'], + 'delete_unused_networks' => ['type' => 'boolean'], ] )] @@ -106,6 +108,8 @@ class Server extends BaseModel 'proxy' => SchemalessAttributes::class, 'logdrain_axiom_api_key' => 'encrypted', 'logdrain_newrelic_license_key' => 'encrypted', + 'delete_unused_volumes' => 'boolean', + 'delete_unused_networks' => 'boolean', ]; protected $schemalessAttributes = [ diff --git a/database/migrations/2024_09_22_165240_add_advanced_options_to_cleanup_options_to_servers_settings_table.php b/database/migrations/2024_09_22_165240_add_advanced_options_to_cleanup_options_to_servers_settings_table.php new file mode 100644 index 000000000..b3c58afe3 --- /dev/null +++ b/database/migrations/2024_09_22_165240_add_advanced_options_to_cleanup_options_to_servers_settings_table.php @@ -0,0 +1,24 @@ +boolean('delete_unused_volumes')->default(false); + $table->boolean('delete_unused_networks')->default(false); + }); + } + + public function down() + { + Schema::table('server_settings', function (Blueprint $table) { + $table->dropColumn('delete_unused_volumes'); + $table->dropColumn('delete_unused_networks'); + }); + } +}; diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index 03d2cfeb4..a8160c675 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -183,26 +183,45 @@ @if ($server->isFunctional())

Settings

-
+
-
+
- @if ($server->settings->force_docker_cleanup) - - @else + + Manually Trigger Cleanup + +
+ @if ($server->settings->force_docker_cleanup) + + @else - @endif + @endif +
+ +
+

Only enable if you know what you are doing! As data cold be lost and functional issues might occur.

+ + +
-
+ +
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, ]) -
    - @if(!$hideLabel) - +
    + @if (!$hideLabel) + @endif merge(['class' => $defaultClass]) }} diff --git a/resources/views/components/forms/input.blade.php b/resources/views/components/forms/input.blade.php index 04b4a41c6..8ef082165 100644 --- a/resources/views/components/forms/input.blade.php +++ b/resources/views/components/forms/input.blade.php @@ -3,7 +3,7 @@ 'w-full' => !$isMultiline, ])> @if ($label) -