Commit graph

570 commits

Author SHA1 Message Date
Andras Bacsai
8c77c63043 feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings
- Add automated Traefik version checking job running weekly on Sundays
- Implement version detection from running containers and comparison with versions.json
- Add notifications across all channels (Email, Discord, Slack, Telegram, Pushover, Webhook) for outdated versions
- Create dismissible callout component with localStorage persistence
- Display cross-branch upgrade warnings (e.g., v3.5 -> v3.6) with changelog links
- Show patch update notifications within same branch
- Add warning icon that appears when callouts are dismissed
- Prevent duplicate notifications during proxy restart by adding restarting parameter
- Fix notification spam with transition-based logic for status changes
- Enable system email settings by default in development mode
- Track last saved/applied proxy settings to detect configuration drift
2025-11-14 11:35:22 +01:00
Andras Bacsai
71c89d9ba8
Merge branch 'next' into improve-scheduled-tasks 2025-11-10 14:21:03 +01:00
Andras Bacsai
68a9f2ca77 feat: add container restart tracking and crash loop detection
Track container restart counts from Docker and detect crash loops to provide better visibility into application health issues.

- Add restart_count, last_restart_at, and last_restart_type columns to applications table
- Detect restart count increases from Docker inspect data and send notifications
- Show restart count badge in UI with warning icon on Logs navigation
- Distinguish between crash restarts and manual restarts
- Implement 30-second grace period to prevent false "exited" status during crash loops
- Reset restart count on manual stop, restart, and redeploy actions
- Add unit tests for restart count tracking logic

This helps users quickly identify when containers are in crash loops and need attention, even when the container status flickers between states during Docker's restart backoff period.
2025-11-10 13:04:31 +01:00
Andras Bacsai
b22e79caec feat(jobs): improve scheduled tasks with retry logic and queue cleanup
- Add retry configuration to CoolifyTask (3 tries, 600s timeout)
- Add retry configuration to ScheduledTaskJob (3 tries, configurable timeout)
- Add retry configuration to DatabaseBackupJob (2 tries)
- Implement exponential backoff for all jobs (30s, 60s, 120s intervals)
- Add failed() handlers with comprehensive error logging to scheduled-errors channel
- Add execution tracking: started_at, retry_count, duration (decimal), error_details
- Add configurable timeout field to scheduled tasks (60-3600s, default 300s)
- Update UI to include timeout configuration in task creation/editing forms
- Increase ScheduledJobManager lock expiration from 60s to 90s for high-load environments
- Implement safe queue cleanup with restart vs runtime modes
  - Restart mode: aggressive cleanup (marks all processing jobs as failed)
  - Runtime mode: conservative cleanup (only marks jobs >12h as failed, skips deployments)
- Add cleanup:redis --restart flag for system startup
- Integrate cleanup into Dev.php init() for development environment
- Increase scheduled-errors log retention from 7 to 14 days
- Create comprehensive test suite (unit and feature tests)
- Add TESTING_GUIDE.md with manual testing instructions

Fixes issues with jobs failing after single attempt and "attempted too many times" errors
2025-11-10 11:11:18 +01:00
Andras Bacsai
f315e4bd9c feat: add dev_helper_version to instance settings and update related functionality 2025-11-03 08:38:43 +01:00
Andras Bacsai
635af44539
Merge pull request #6837 from coollabsio/andrasbacsai/custom-webhooks
feat: add custom webhook notification support
2025-10-12 10:57:47 +02:00
Andras Bacsai
95fe04c484
Merge pull request #6817 from coollabsio/hetzner-do
Hetzner integration
2025-10-11 19:23:19 +02:00
Andras Bacsai
6c0840d4e0 refactor: improve cloud-init script UX and remove description field
Changes:
1. Remove description field from cloud-init scripts
   - Updated migration to remove description column
   - Updated model to remove description from fillable array

2. Redesign script name input layout
   - Move script name input next to checkbox (always visible)
   - Remove conditional rendering - input always shown
   - Use placeholder instead of label for cleaner look

3. Fix dropdown type error
   - Replace wire:change event with wire:model.live
   - Use updatedSelectedCloudInitScriptId() lifecycle hook
   - Add "disabled" attribute to placeholder option
   - Properly handle empty string vs null in type casting

4. Improve validation
   - Require both script content AND name for saving
   - Remove description validation rule
   - Add selected_cloud_init_script_id validation

5. Auto-populate name when loading saved script
   - When user selects saved script, auto-fill the name field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 11:16:28 +02:00
Andras Bacsai
7061eacfa5 feat: add cloud-init script support for Hetzner server creation
This commit adds the ability to use cloud-init scripts when creating Hetzner servers through the integration. Users can write custom scripts that will be executed during server initialization, and optionally save these scripts at the team level for future reuse.

Key features:
- Textarea field for entering cloud-init scripts (bash or cloud-config YAML)
- Checkbox to save scripts for later use at team level
- Dropdown to load previously saved scripts
- Scripts are encrypted in the database
- Full validation and authorization checks
- Comprehensive unit and feature tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 19:37:16 +02:00
Andras Bacsai
36573ecbf0 fix: use correct property declaration for withinTransaction
The parent Migration class defines $withinTransaction without a type
hint. Setting it without redeclaring (no "bool" type) avoids the PHP
8.4 error: "Type of Migration::$withinTransaction must not be defined"

This is the proper Laravel way to disable transactions for migrations
that need to run CREATE INDEX CONCURRENTLY in PostgreSQL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 18:41:33 +02:00
Andras Bacsai
e256e765e7 fix: properly handle transaction for concurrent index operations
Instead of redefining the $withinTransaction property (which causes
a type error), we now manually commit the transaction before running
CREATE INDEX CONCURRENTLY and begin a new transaction afterward.

This ensures PostgreSQL can execute the concurrent index operations
while maintaining transaction safety for subsequent migrations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 18:39:40 +02:00
Andras Bacsai
9c2ef0aa21 fix(migration): disable transaction for concurrent index creation
PostgreSQL does not allow CREATE INDEX CONCURRENTLY to run inside a
transaction block. This migration now sets $withinTransaction = false
to allow the concurrent index creation to succeed.

Fixes the error: "CREATE INDEX CONCURRENTLY cannot run inside a
transaction block" when running migrations in dev environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 18:31:39 +02:00
Andras Bacsai
22ef6c8c9a fix: add missing server_patch_webhook_notifications field
Add the server_patch_webhook_notifications column to both
the create and populate migrations to match the model and
Livewire component expectations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 17:52:07 +02:00
Andras Bacsai
53d1ad48cd fix: populate webhook notification settings for existing teams
Add migration to create webhook notification settings records
for all existing teams. This fixes the "unauthorized" error when
accessing the webhook notifications page for teams that existed
before the webhook feature was added.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 17:47:26 +02:00
Andras Bacsai
27879377a0 feat: add custom webhook notification support
Add basic infrastructure for custom webhook notifications:
- Create webhook_notification_settings table with event toggles
- Add WebhookNotificationSettings model with encrypted URL
- Integrate webhook settings into Team model and HasNotificationSettings trait
- Create Livewire component and Blade view for webhook configuration
- Add webhook navigation route and UI

This provides the foundation for sending webhook notifications to custom HTTP/HTTPS endpoints when events occur in Coolify.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 15:37:00 +02:00
Andras Bacsai
bf5c08d071 work work on hetzner integration 2025-10-09 16:54:13 +02:00
Andras Bacsai
704ddf2968 improved hetzner features 2025-10-09 12:53:57 +02:00
Andras Bacsai
215301fa8f basics of adding / removing hetzner servers 2025-10-09 10:41:29 +02:00
Andras Bacsai
c1bcc41546 init of cloud providers 2025-10-08 20:47:50 +02:00
Andras Bacsai
2c64136503 feat(backup): enhance backup job with S3 upload handling and notifications
- Introduced a new notification class, BackupSuccessWithS3Warning, to alert users when local backups succeed but S3 uploads fail.
- Updated DatabaseBackupJob to track local backup success and handle S3 upload errors, improving error reporting and user notifications.
- Modified ScheduledDatabaseBackupExecution model to include a new s3_uploaded boolean field for tracking S3 upload status.
- Adjusted views and validation logic to reflect changes in backup execution status and S3 handling.
- Added tests to ensure the new s3_uploaded column is correctly implemented and validated.
2025-10-07 15:02:23 +02:00
Darren Sisson
fb7af48b10
update bitnami to bitnamilegacy 2025-10-03 15:48:11 +01:00
Andras Bacsai
f33df13c4e feat(environment): replace is_buildtime_only with is_runtime and is_buildtime flags for environment variables, updating related logic and views 2025-09-18 18:14:54 +02:00
Andras Bacsai
c1bee32f09 feat(deployment): introduce 'use_build_secrets' setting for enhanced security during Docker builds and update related logic in deployment process 2025-09-17 10:34:38 +02:00
Andras Bacsai
20ad2165e7 feat(environment): introduce 'is_buildtime_only' attribute to environment variables for improved build-time configuration 2025-09-11 17:38:16 +02:00
Andras Bacsai
5b3b4bbc43 refactor(environment): remove 'is_build_time' attribute from environment variable handling across the application to simplify configuration 2025-09-11 16:51:56 +02:00
Andras Bacsai
d9ebf3b142 refactor(webhook): remove Webhook model and related logic; add migrations to drop webhooks and kubernetes tables 2025-09-10 19:35:53 +02:00
Andras Bacsai
339118558c feat(settings): add option to restrict PR deployments to repository members and contributors 2025-09-05 14:30:51 +02:00
Andras Bacsai
a6fc39e798 feat(git-settings): add support for shallow cloning in application settings
- Introduced a new boolean setting `is_git_shallow_clone_enabled` to the application settings model.
- Updated the `Advanced` component to include a checkbox for enabling shallow cloning.
- Modified the `setGitImportSettings` and `generateGitImportCommands` methods to handle shallow clone logic.
- Created a migration to add the new setting to the database schema.
- Enhanced the deployment process to utilize shallow cloning for improved performance.
2025-08-21 10:16:57 +02:00
peaklabs-dev
e2fd1f4507
fix: disable env sorting by default
- this is a better default
2025-08-18 17:47:21 +02:00
Andras Bacsai
ee502b9f76 feat(email): implement email change request and verification process
- Added functionality for users to request an email change, including generating a verification code and setting an expiration time.
- Implemented methods in the User model to handle email change requests, code validation, and confirmation.
- Created a new job to update the user's email in Stripe after confirmation.
- Introduced rate limiting for email change requests and verification attempts to prevent abuse.
- Added a new notification for email change verification.
- Updated the profile component to manage email change requests and verification UI.
2025-08-18 14:54:08 +02:00
Andras Bacsai
0dada987a2 feat(backup): add disable local backup option and related logic for S3 uploads 2025-08-17 12:34:20 +02:00
Andras Bacsai
a2ef545b6b feat(changelog): implement automated changelog fetching from GitHub and enhance changelog read tracking 2025-08-12 10:07:11 +02:00
Andras Bacsai
0e7cc988a6 feat(user): add changelog read tracking and unread count method 2025-08-12 10:06:19 +02:00
🏔️ Peak
e5e1bdcd4d
fix(backups): large database backups are not working (#6217) 2025-07-18 15:47:14 +02:00
Andras Bacsai
13f10028db feat(previews): implement soft delete and cleanup for ApplicationPreview, enhancing resource management in DeleteResourceJob 2025-07-14 21:17:40 +02:00
Andras Bacsai
bfac07da3c feat(migrations): add optimized indexes to activity_log for improved query performance 2025-06-26 22:21:07 +02:00
Andras Bacsai
8abb8b2328 feat(settings): add sponsorship popup toggle and corresponding database migration 2025-06-25 15:18:39 +02:00
Andras Bacsai
e2df86f0f2 fix(migration): update default value handling for is_sentinel_enabled column in server_settings 2025-06-16 14:49:01 +02:00
Andras Bacsai
e8e7b3bc59 feat(migration): add is_sentinel_enabled column to server_settings with default true 2025-06-16 14:38:01 +02:00
Andras Bacsai
ddcb14500d refactor(proxy-status): refactored how the proxy status is handled on the UI and on the backend
feat(cloudflare): improved cloudflare tunnel automated installation
2025-06-06 14:47:54 +02:00
Andras Bacsai
46b4cfac68 feat(terminal-access): implement terminal access control for servers and containers, including UI updates and backend logic 2025-05-29 14:09:05 +02:00
Andras Bacsai
6ea6d2742b feat(server): implement server patch check notifications
- Added a new job, ServerPatchCheckJob, to handle server patch checks and notifications.
- Introduced a new notification class, ServerPatchCheck, for sending updates via email, Discord, Slack, Pushover, and Telegram.
- Updated notification settings models to include server patch notification options for email, Discord, Slack, Pushover, and Telegram.
- Created a migration to add server patch notification fields to the respective settings tables.
- Enhanced the UI to allow users to enable/disable server patch notifications across different channels.
2025-05-26 14:03:59 +02:00
Andras Bacsai
debfcb7028 feat(migration): add 'is_migrated' and 'custom_type' columns to service_applications and service_databases tables 2025-04-30 16:43:59 +02:00
Andras Bacsai
78ef80f800 refactor 2025-04-23 13:22:01 +02:00
Andras Bacsai
9e608f7ba5 refactor(http-basic-auth): rename 'http_basic_auth_enable' to 'http_basic_auth_enabled' across application files for consistency 2025-04-22 21:30:27 +02:00
Christopher Kaster
2634f516d5
feat: Add HTTP Basic Authentication 2025-04-17 14:14:32 +02:00
Andras Bacsai
eda1e1899f fix(migrations): make stripe_comment field nullable in subscriptions table 2025-04-14 10:30:43 +02:00
Andras Bacsai
68bd945b09 refactor(Application): rename network_aliases to custom_network_aliases across the application for clarity and consistency 2025-04-09 08:42:50 +02:00
Andras Bacsai
f8607ddf6a
Merge branch 'next' into docker-network-aliases 2025-04-08 13:27:59 +02:00
Andras Bacsai
52d612a56a refactor(migration): enhance local file volumes migration with logging 2025-04-01 08:49:07 +02:00
Andras Bacsai
fcfd00eebe feat(application): add SPA configuration and update Nginx generation logic 2025-03-31 15:10:50 +02:00
Andras Bacsai
c7591fde15 refactor(database): remove debug output from volume update process 2025-03-30 20:07:56 +02:00
Andras Bacsai
a8018ad2c4 refactor(database): improve decryption and deduplication of local file volumes 2025-03-30 18:04:09 +02:00
Andras Bacsai
b376d6df2a reverting: encrypting mount and fs_path 2025-03-29 22:16:12 +01:00
Andras Bacsai
637c3982d1 feat(database): disable MongoDB SSL by default in migration 2025-03-26 09:45:57 +01:00
Andras Bacsai
abc7dd65ca refactor(database): enhance encryption process for local file volumes 2025-03-25 13:39:30 +01:00
Andras Bacsai
26f4d37346 feat(notifications): add discord ping functionality and settings 2025-03-21 12:16:33 +01:00
Andras Bacsai
009cee1bbd
Merge branch 'next' into feat-db-ssl 2025-03-17 15:15:24 +01:00
Andras Bacsai
8ebbe396f4 fix(database): change default value of enable_ssl to false for multiple tables 2025-03-17 13:58:31 +01:00
Piotr Wójcik
0baeaa982b
Merge branch 'next' into docker-network-aliases 2025-03-16 14:50:26 +01:00
peaklabs-dev
ee93ccd8e7
fix(backups): retention settings
- If you set a low local backup retention, for example 2 backups for local backup retention and 10 backups for S3, then the S3 backups were never deleted, not even after 10 days. This was because we check the file paths based on the backup executions table, and as soon as a backup was deleted locally, the execution was removed, which meant after 10 days for s3 there where no backups older then 10 days just the 2 local backups which is just wrong. Now we only delete a backup execution if it has been removed from both locations.
- Also added a nice little UI element to see where your backup is available.
2025-03-14 15:28:12 +01:00
Andras Bacsai
07cbec7ddc feat(billing): Add Stripe past due subscription status tracking 2025-03-01 12:43:12 +01:00
Andras Bacsai
9c4395e6de feat(database): Add index to scheduled database backup executions 2025-02-27 14:04:22 +01:00
Andras Bacsai
cd1fc649e3 feat(database): Add index to scheduled task executions for improved query performance 2025-02-27 13:54:10 +01:00
peaklabs-dev
225f24e650
chore: improve code quality suggested by code rabbit 2025-02-19 18:04:58 +01:00
peaklabs-dev
792b1b889f
faet(migration): Add SSL fields to database tables 2025-02-10 15:32:05 +01:00
peaklabs-dev
35cd9573ab
fix(ssl): add mount path to DB to fix regeneration of certs 2025-02-07 18:11:26 +01:00
peaklabs-dev
3c62130e86
fix(ssl): improve SSL cert file mounts
- If SSL is disabled, delete the SSL crt and file mounts in the DB
- If SSL is disabled, delete the SSL folder
- If SSL is enabled, make sure the file mounts are added inside the helper
- remove old file mounts first to make sure the ssl crt content is always up to date and no duplicates are added
2025-02-04 16:34:24 +01:00
peaklabs-dev
fba95c3729
fix(migration): store subjectAlternativeNames as a json array in the db 2025-02-03 22:35:00 +01:00
peaklabs-dev
498bf04559
feat(migration): add CN and alternative names to DB 2025-02-03 22:05:32 +01:00
peaklabs-dev
4305ba5f06
fix(migration): ssl certificates table
- remove unique constraint
- add CA certificate boolean
- make sure that each certificate has a server_id so that we know which CA to use when renewing certificates
2025-02-02 14:56:26 +01:00
peaklabs-dev
34216af497
fix(db): SSL certificates table and model
- server_id is a foreign id
- server_id must be unique as each server can only have 1 CA cert
- resource_id must be unique as each resource can only have 1 SSL cert
2025-01-31 12:35:34 +01:00
peaklabs-dev
22c26cdf78
chore(migration): ssl cert and key should not be nullable 2025-01-30 19:52:49 +01:00
peaklabs-dev
b53d3d07d9
fix(ssl): make default ssl mode require not verify-full as it does not need a ca cert 2025-01-30 19:09:37 +01:00
peaklabs-dev
2ac9147532
chore(migration): remove unused columns 2025-01-30 14:16:52 +01:00
peaklabs-dev
edddbc8536
feat(migration): encrypt local file volumes content and paths 2025-01-30 13:54:00 +01:00
peaklabs-dev
214a7a089e
feat(migration): Add ssl setting to standalone_postgresqls table 2025-01-29 13:04:27 +01:00
peaklabs-dev
3f582a1ea4
feat(migration): Add ssl_certificates table and model 2025-01-29 13:03:13 +01:00
Andras Bacsai
085103708c fix(core): v1 parser versions trying to access application_id, while it is resourceable_id
fix(db): remove wrongly created, empty environmentvariables
2025-01-22 10:21:51 +01:00
peaklabs-dev
4197104026
fix(db): finished_at timestamps are not set for existing deployments 2025-01-21 14:02:29 +01:00
peaklabs-dev
30f36f96db
fix: use finished_at for the end time instead of created_at 2025-01-16 15:12:57 +01:00
peaklabs-dev
47be82afc3
Merge branch 'docker-cleanup-executions-ui' of https://github.com/peaklabs-dev/coolify into docker-cleanup-executions-ui 2025-01-16 14:42:58 +01:00
peaklabs-dev
8bcd1449d2
chore: remove limit on commit message 2025-01-16 14:42:33 +01:00
🏔️ Peak
11d1a9e6fd
Merge branch 'next' into docker-cleanup-executions-ui 2025-01-16 14:41:23 +01:00
Andras Bacsai
55d61ffaee fix: add finished_at to app deployment jobs
fix: show deployment job running measurements
fix: terminal should not be wire:navigated
2025-01-16 12:05:59 +01:00
peaklabs-dev
4986485448
fix: use json as it is just better than string for huge amount of logs 2025-01-15 19:56:01 +01:00
peaklabs-dev
52abc7cc92
feat: DB and Model for docker cleanup executions 2025-01-15 17:11:15 +01:00
Andras Bacsai
b01ea8b46d
Merge pull request #4818 from peaklabs-dev/feat-backup-retention
Feat: Improve backup retention (for database backups)
2025-01-14 09:10:33 +01:00
Andras Bacsai
6a8cc0f80d
Merge branch 'next' into fix-cloning 2025-01-14 08:50:22 +01:00
peaklabs-dev
e9f691bf45
fix: storage retention setting
- feat: add storage retention to local storage as well
- fix: UI input for max storage now allows exact decimals so MB input is now also possible
- fix: Database column is now decimal instead of integer
- fix: variable naming of storage check no longer overwrites $backup - renamed it to $backupExecution
2025-01-13 19:49:12 +01:00
peaklabs-dev
04bcf01619
feat: DB migration for Backup retention
- rename number_of_backups_locally to database_backup_retention_amount_locally
- add backup retention days to local stored backups
- add s3 retention fields
2025-01-13 16:35:58 +01:00
Andras Bacsai
a396d51452
Merge branch 'next' into hotfix 2025-01-10 20:23:29 +01:00
Andras Bacsai
02400added fix: horizon job checker 2025-01-10 18:27:48 +01:00
Andras Bacsai
765e1ea04b feat: add horizon server details to queue 2025-01-10 15:39:22 +01:00
peaklabs-dev
3d4e8b9867
chore: switch up readonly lables to make more sense 2025-01-08 17:05:11 +01:00
Piotr Wojcik
9acde06795 Custom network aliases for Dockerfile and Docker Image apps 2025-01-05 07:47:57 +01:00
Andras Bacsai
f575d1249e Merge branch 'main' into next 2024-12-27 11:09:29 +01:00
peaklabs-dev
6dc87498de
fix: error message 2024-12-23 17:58:56 +01:00
peaklabs-dev
0a851ec3f2
fix: only encrypt instance email settings if there are any 2024-12-23 17:41:38 +01:00
peaklabs-dev
d7a0794bd9
fix: instance settings migration 2024-12-23 17:15:46 +01:00