Commit graph

800 commits

Author SHA1 Message Date
peaklabs-dev
48b63f950f
chore(config): update configs to the latest skeleton 2026-02-24 18:28:33 +01:00
peaklabs-dev
daa8764a71
refactor(core): streamline boolean environment variable naming 2026-02-23 23:06:06 +01:00
peaklabs-dev
107aef141a
chore(core): add coolify config file 2026-02-23 21:00:02 +01:00
peaklabs-dev
9e7b1d9a4e
chore(core): add back coolify options to the app config file 2026-02-23 21:00:02 +01:00
peaklabs-dev
2ce8184e68
feat(config): configure horizon and add worker server base
- normal jobs (backups, emails, etc.) and deployment jobs now use separate supervisor configurations and defaults
- use different queues and supervisors depending on if the server is a worker server
- horizon workers are now restarted after 500 (job workers) or 300 (deployment workers) jobs or after 1 hour to clean up stale memory and CPU usage
- reduced default queue timeouts from 10h to 60s for jobs and 300s for deployments to prevent stale jobs
- increased balanceCooldown from 1s to 2s for jobs to reduce CPU spikes
- prepare LongWaitDetected waits for all queues
- use the "jobs" redis connection for horizon
- remove unused config option
2025-12-16 17:08:59 +01:00
peaklabs-dev
124957fe94
chore(deps): install laravel horizon and all horizon assets 2025-12-16 17:08:59 +01:00
peaklabs-dev
d2cae69d99
chore(config): configure laravel queues
- use redis as the default queue connection
- use the redis "jobs" connection for all queued jobs
- set after_commit=true to ensure jobs wait for all DB transactions to finish before being dispatched
- use pgsql database for job batches
- remove logging of failed jobs into a DB table as we use horizon for that
2025-12-16 17:08:59 +01:00
peaklabs-dev
e800bc97bc
chore(config): remove unused queue connections 2025-12-16 17:08:59 +01:00
🏔️ Peak
eadf63477e
chore(config): remove unused file cache store (#7646) 2025-12-16 14:59:38 +01:00
peaklabs-dev
285c6dd10a
chore(config): expire password reset tokens after 10min 2025-12-11 17:38:26 +01:00
peaklabs-dev
0c92d19eb7
chore(config): remove unused bcrypt hashing options 2025-12-10 17:40:36 +01:00
peaklabs-dev
feb2200db4
chore(config): expire idle sessions after 1 day 2025-12-09 17:51:02 +01:00
peaklabs-dev
3a2dd35c41
chore(config): remove unused session options 2025-12-09 17:51:02 +01:00
peaklabs-dev
cf081bba5b
chore(config): use redis for sessions
- switch from database stored sessions to redis for improved performance and session TTL
- this allows us to remove the session DB table cleanup job needed on v4
2025-12-09 17:51:02 +01:00
peaklabs-dev
53c2046a9f
chore(config): remove unused caching options 2025-12-09 17:51:01 +01:00
peaklabs-dev
e10096bffe
chore(config): use redis for caching 2025-12-09 17:51:01 +01:00
peaklabs-dev
70b9b33e64
chore(config): configure redis connections
- configure separate redis connections for cache, jobs and sessions which use separate redis databases for easier debugging and separation
2025-12-09 17:51:01 +01:00
🏔️ Peak
adf3598d26
[v5.x] chore(config): configure logging (#7490) 2025-12-04 14:58:05 +01:00
peaklabs-dev
0114ffac3e
chore(config): setup production logging
- use stderr in addition to the daily logging channel so the laravel logs are passed to the container logs (docker logs)
- use the daily channel with local laravel.log to persist logs to disk for 10 days, ensuring a persistent copy even if the coolify container is removed/ updated
- rotate the logs in production every 10 days and only log warnings, to prevent an excessively large laravel.log file
- keep LOG_LEVEL=debug for the single channel as it will be used in development
2025-12-04 14:47:22 +01:00
peaklabs-dev
9a6d315292
chore(config): remove unused logging options 2025-12-04 14:40:25 +01:00
peaklabs-dev
5a20d9fe01
chore(config): add v4 DB as old_pqsql for the upgrade migration 2025-12-03 15:50:33 +01:00
peaklabs-dev
59f9b1a957
chore(config): configure v5 postgres DB 2025-12-03 15:44:14 +01:00
peaklabs-dev
36a22ba582
chore(config): remove unused DBs from database.php 2025-12-03 15:27:51 +01:00
peaklabs-dev
1582320651
chore(config): update config files to the latest skeleton version 2025-12-01 23:11:33 +01:00
peaklabs-dev
dab768211b
refactor: apply rector refactors 2025-11-30 16:58:58 +01:00
peaklabs-dev
09ca5040ec
chore(config): encrypt sessions 2025-11-30 16:58:58 +01:00
peaklabs-dev
e2f2885f42
chore(config): update config files to the latest skeleton version 2025-11-30 16:58:58 +01:00
peaklabs-dev
196054c543
style: apply pint to full codebase 2025-11-30 16:58:58 +01:00
peaklabs-dev
80d2b0f06f
chore(tooling): add ray for local debugging 2025-11-30 16:50:04 +01:00
peaklabs-dev
a55ad5a1da
chore(config): remove unused auth config option 2025-11-30 16:50:04 +01:00
peaklabs-dev
e28e346b7e
chore(config): improve app config 2025-11-30 16:50:04 +01:00
peaklabs-dev
be45e94c39
chore(config): switch from bcrypt to argon2id 2025-11-30 16:50:04 +01:00
peaklabs-dev
3cb36b0c41
chore(setup): create core skeleton 2025-11-30 16:50:04 +01:00
Andras Bacsai
d9774d2968 Fix: Prevent version downgrades and centralize CDN configuration (#7383)
## Root Cause
Between Nov 25-26, a CDN redirect was added without curl's `-L` flag,
causing version cache corruption and automatic downgrades.

## Three Critical Bugs Fixed

### Bug #1: CheckForUpdatesJob could overwrite newer cached version
- Problem: CDN serving older version would overwrite local cache
- Solution: Smart version merge - keep max Coolify version, update other components
- Location: app/Jobs/CheckForUpdatesJob.php:33-52

### Bug #2: Manual updates bypassed downgrade protection
- Problem: Downgrade guard only applied to auto-updates
- Solution: Always block downgrades for both manual and auto-updates
- Location: app/Actions/Server/UpdateCoolify.php:65-75

### Bug #3: Updates used stale local cache
- Problem: Never validated cache against CDN at update time
- Solution: Fetch fresh CDN data before executing updates
- Location: app/Actions/Server/UpdateCoolify.php:34-49

## Additional Improvement: Centralized CDN Configuration

Added three new config keys for easy CDN management:
- `cdn_url` - Base CDN URL (default: https://cdn.coollabs.io)
- `versions_url` - Full versions.json URL
- `upgrade_script_url` - Full upgrade.sh URL

All configurable via environment variables:
```bash
CDN_URL=https://cdn.coolify.io
VERSIONS_URL=https://custom-cdn.example.com/versions.json
UPGRADE_SCRIPT_URL=https://custom-cdn.example.com/upgrade.sh
```

## Files Modified
- config/constants.php - CDN configuration
- app/Jobs/CheckForUpdatesJob.php - Smart version merge + centralized URL
- app/Actions/Server/UpdateCoolify.php - Downgrade protection + fresh fetch + centralized URLs
- app/Jobs/CheckHelperImageJob.php - Centralized URL
- bootstrap/helpers/shared.php - Centralized URL

## Testing
-  All modified files pass Pint formatting
-  78 unit tests pass (2 pre-existing failures unrelated to changes)

## Impact
- No breaking changes - defaults to current CDN
- Easy CDN migration via environment variables
- Prevents all downgrade scenarios
- Maintains independent Sentinel/Helper/Traefik updates

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 15:20:33 +01:00
Andras Bacsai
2921fe907d version++ 2025-11-28 09:41:01 +01:00
Andras Bacsai
e5c7459284 fix: update version numbers to 4.0.0-beta.451 and 4.0.0-beta.452 2025-11-26 14:46:52 +01:00
Andras Bacsai
4f87b251b0 fix: update version number to 4.0.0-beta.450 2025-11-26 10:50:03 +01:00
Andras Bacsai
68c5ebf221 fix: update version numbers to 4.0.0-beta.449 and 4.0.0-beta.450 2025-11-26 10:00:00 +01:00
Andras Bacsai
f460bb63cc feat: update version numbers to 4.0.0-beta.448 and 4.0.0-beta.449 2025-11-25 17:06:37 +01:00
Andras Bacsai
99e8aeb6f8 fix: update coolify version to 4.0.0-beta.447 and nightly version to 4.0.0-beta.448 2025-11-25 09:34:43 +01:00
Andras Bacsai
8d3a564cfe fix: update coolify version to 4.0.0-beta.446 and nightly version to 4.0.0-beta.447 2025-11-24 15:10:31 +01:00
Andras Bacsai
1270136da9 merge: merge next branch into feat-traefik-version-checker
Merged latest changes from the next branch to keep the feature branch
up to date. No conflicts were encountered during the merge.

Changes from next branch:
- Updated application deployment job error logging
- Updated server manager job and instance settings
- Removed PullHelperImageJob in favor of updated approach
- Database migration refinements
- Updated versions.json with latest component versions

All automatic merges were successful and no manual conflict resolution
was required.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 14:56:24 +01:00
Andras Bacsai
8f7ae2670c fix(versions): update coolify version to 4.0.0-beta.445 and nightly to 4.0.0-beta.446 2025-11-17 14:27:13 +01:00
Andras Bacsai
6593b2a553 feat(proxy): enhance Traefik version notifications to show patch and minor upgrades
- Store both patch update and newer minor version information simultaneously
- Display patch update availability alongside minor version upgrades in notifications
- Add newer_branch_target and newer_branch_latest fields to traefik_outdated_info
- Update all notification channels (Discord, Telegram, Slack, Pushover, Email, Webhook)
- Show minor version in format (e.g., v3.6) for upgrade targets instead of patch version
- Enhance UI callouts with clearer messaging about available upgrades
- Remove verbose logging in favor of cleaner code structure
- Handle edge case where SSH command returns empty response

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 09:59:17 +01:00
Andras Bacsai
f731ec74e6 feat(proxy): upgrade Traefik image to v3.6
Upgrade default Traefik proxy configuration from v3.5 to v3.6, with Coolify version bump to beta.444.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 09:31:07 +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
73985350ec fix: update version numbers to 4.0.0-beta.443 and 4.0.0-beta.444 2025-11-07 08:26:58 +01:00
Andras Bacsai
2768805996 fix: update helper_version to 1.0.12 in constants configuration 2025-11-06 14:33:42 +01:00
Andras Bacsai
fed01ab1a2 fix: update releases URL to use correct domain
The releases URL in the configuration was updated to use the correct domain 'coolify.io' instead of 'coollabs.io'. This change ensures that the application points to the right resource for fetching release information, which is crucial for maintaining accurate and up-to-date deployment processes.
2025-11-05 14:31:53 +01:00
Andras Bacsai
ac2a199c7b chore: update coolify version to 4.0.0-beta.442
This update increments the version of coolify to 4.0.0-beta.442 to reflect the latest changes and improvements. Additionally, the nightly version has been updated to 4.0.0-beta.443 to ensure consistency across the project. Keeping version numbers up to date is essential for tracking releases and ensuring that users are aware of the latest features and fixes.
2025-11-05 14:31:09 +01:00