Commit graph

13841 commits

Author SHA1 Message Date
Murat Aslan
d2e2ca892c fix: add soju-run volume for admin socket
- Add soju-run volume for /run/soju directory
- Re-add unix+admin listener for sojuctl user management
- Tested: user creation works with sojuctl
2025-12-09 00:35:53 +03:00
Murat Aslan
139db09fe0 fix: correct soju config path and simplify template
- Fix config path to /soju-config (not /etc/soju/config)
- Remove unix+admin listener (causes bind error)
- Remove health checks (nc/wget not available in containers)
- Simplify depends_on configuration

Tested locally with docker compose - both services start successfully
2025-12-09 00:28:33 +03:00
Murat Aslan
d6c5265556 fix: update soju config path and add WebSocket support
- Fix config path to /etc/soju/config
- Use explicit host:port bindings
- Switch to WebSocket listener for Gamja compatibility
- Add GAMJA_SERVER environment variable
2025-12-09 00:16:20 +03:00
Murat Aslan
a28890b258 feat: add Soju IRC bouncer logo 2025-12-08 15:53:45 +03:00
Murat Aslan
3bf5e3ccfb feat: add Soju IRC bouncer service template 2025-12-08 15:53:33 +03:00
Andras Bacsai
a528f4c3d1
v4.0.0-beta.452 (#7386) 2025-11-28 20:52:50 +01:00
Andras Bacsai
a56fde7f12 Fix: Adjust badge positioning and enhance coolbox utility styles 2025-11-28 20:48:49 +01:00
Andras Bacsai
1dd2a81f89
Fix: Traefik proxy startup issues (#7400) 2025-11-28 20:39:28 +01:00
Andras Bacsai
627cec16fa
Merge branch 'next' into fix-traefik-startup 2025-11-28 17:54:48 +01:00
Andras Bacsai
cb0f2301f5 Fix: Traefik proxy startup issues - handle null versions and filter predefined networks
Fixes two critical issues preventing Traefik proxy startup:

1. TypeError when restarting proxy: Handle null return from get_traefik_versions()
   - Add null check before dispatching CheckTraefikVersionForServerJob
   - Log warning when version data is unavailable
   - Prevents: "Argument #2 must be of type array, null given"

2. Docker network error: Filter out predefined Docker networks
   - Add isDockerPredefinedNetwork() helper to centralize network filtering
   - Apply filtering in collectDockerNetworksByServer() before operations
   - Apply filtering in generateDefaultProxyConfiguration()
   - Prevents: "operation is not permitted on predefined default network"

Also: Move $cachedVersionsFile assignment after null check in Proxy.php

Tests: Added 7 new unit tests for network filtering function
All existing tests pass with no regressions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:53:26 +01:00
Andras Bacsai
a25e553f88
Fix: Fragile service name parsing with hyphens (#7399) 2025-11-28 17:50:44 +01:00
Andras Bacsai
5598a2ada4
Improve manual update process with better user feedback (#7398) 2025-11-28 17:49:18 +01:00
Andras Bacsai
b7fcb0f362 Fix Alpine state reference and remove unused property in upgrade modal
- Fix incorrect Alpine state reference: Changed `this.$wire.showProgress` to `this.showProgress` in upgrade.blade.php:155
- Remove unused `$showProgress` property from Upgrade.php Livewire component
- The backend property was never set or used; all progress tracking is handled by Alpine state
- This fixes potential race conditions where the guard condition was not working as intended

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:48:52 +01:00
Andras Bacsai
8c40cc607a Fix: Fragile service name parsing in applyServiceApplicationPrerequisites
Changed from `->before('-')` to `->beforeLast('-')` to correctly parse service
names with hyphens. This fixes prerequisite application for ~230+ services
containing hyphens in their template names (e.g., docker-registry,
elasticsearch-with-kibana).

Added comprehensive test coverage for hyphenated service names and fixed
existing tests to use realistic CUID2 UUID format. All unit tests pass.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 17:42:04 +01:00
Andras Bacsai
702be840b4 Improve manual update process with better user feedback
Add elapsed time tracking and time-aware status messages during updates to inform users about extended downtime. Fix variable scoping issues by properly declaring interval variables in Alpine.js component data, and add error handling for network failures during health checks. Users now see clear, reassuring messages at different stages: update progress, restart phase, and revival with elapsed time.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 16:57:31 +01:00
Andras Bacsai
4706bc23aa Refactor: Centralize service application prerequisites
Refactors the Appwrite and Beszel service-specific application settings
to use a centralized constant-based approach, following the same pattern
as NEEDS_TO_CONNECT_TO_PREDEFINED_NETWORK.

Changes:
- Added NEEDS_TO_DISABLE_GZIP constant for services requiring gzip disabled
- Added NEEDS_TO_DISABLE_STRIPPREFIX constant for services requiring stripprefix disabled
- Created applyServiceApplicationPrerequisites() helper function in bootstrap/helpers/services.php
- Updated all service creation flows to use the centralized helper:
  * app/Livewire/Project/Resource/Create.php (web handler)
  * app/Http/Controllers/Api/ServicesController.php (API handler - BUG FIX)
  * app/Livewire/Project/New/DockerCompose.php (custom compose handler)
  * app/Http/Controllers/Api/ApplicationsController.php (API custom compose handler)
- Added comprehensive unit tests for the new helper function

Benefits:
- Single source of truth for service prerequisites
- DRY - eliminates code duplication between web and API handlers
- Fixes bug where API-created services didn't get prerequisites applied
- Easy to extend for future services (just edit the constant)
- More maintainable and testable

Related commits: 3a94f1ea1 (Beszel), 02b18c86e (Appwrite)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 16:47:09 +01:00
Andras Bacsai
b246cdffab
Fix: Version downgrade prevention with cache validation (#7396) 2025-11-28 16:31:46 +01:00
Andras Bacsai
4052d1bd05 Refactor color classes from yellow to warning across the application
- Updated color classes in NotifyDemo.php to use warning colors.
- Added new warning color variables in app.css.
- Changed warning icon colors in callout.blade.php.
- Updated loading spinner and hover states in global-search.blade.php.
- Refactored warning messages and styles in project application views.
- Adjusted log display colors in get-logs.blade.php.
- Updated private key status indicators in index.blade.php.
- Changed hover and text colors for documentation links in cloudflare-tunnel.blade.php.
- Refactored server creation messages in by-hetzner.blade.php.
- Updated proxy warning button colors in proxy.blade.php.
- Changed loading spinner colors in show.blade.php.
- Updated deployment status colors in deployments.blade.php and show.blade.php.
2025-11-28 16:23:32 +01:00
Andras Bacsai
cd10796612 Fix: Version downgrade prevention - validate cache and add running version checks
## Changes
- **CheckForUpdatesJob**: Add triple version comparison (CDN vs cache vs running)
  - Never allows version downgrade from currently running version
  - Uses data_set() for safer nested array mutation
  - Prevents incorrect new_version_available flag setting

- **UpdateCoolify**: Add cache validation before fallback
  - Validates cache against running version on CDN failure
  - Throws exception if cache is corrupted/older than running
  - Applies to both manual and automated updates

- **Tests**: Add comprehensive test coverage
  - tests/Unit/CheckForUpdatesJobTest.php (5 tests)
  - tests/Unit/UpdateCoolifyTest.php (3 tests)

## Impact
- Prevents all downgrade scenarios (CDN rollback, corrupted cache, etc.)
- Maintains backward compatibility
- Provides clear logging for debugging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 16:05:41 +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
0d7f777814
fix: resolve webhook notification settings migration conflict (#7393) 2025-11-28 15:08:24 +01:00
Andras Bacsai
64d52a2af8 fix: update border color utility for input-sticky-active and coolbox components 2025-11-28 14:14:21 +01:00
Andras Bacsai
e22afd43e8 fix: resolve webhook notification settings migration conflict
Add missing traefik_outdated_webhook_notifications column to the webhook_notification_settings table schema and add safety checks to the traefik migration to prevent errors when the table doesn't exist yet.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:03:05 +01:00
Andras Bacsai
0eefa64ce4
feat(ui): Improve new resource page UI layout and styling (#7291) 2025-11-28 14:01:17 +01:00
Andras Bacsai
d0600e079e fix: remove redundant condition for displaying databases in resource selection 2025-11-28 14:00:34 +01:00
Andras Bacsai
66386e6013
fix(docker): migrate database start actions from --time to -t flag (#7390) 2025-11-28 14:00:02 +01:00
Andras Bacsai
d905ae107b Refactor UI components to use 'coolbox' class for consistent styling across various views
- Updated dashboard, destination, project, and server views to replace 'box' class with 'coolbox' for improved visual consistency.
- Modified links and buttons in shared variables and scheduled tasks views to utilize 'coolbox' class.
- Ensured all relevant components reflect the new styling approach, enhancing user experience and interface coherence.
2025-11-28 13:55:54 +01:00
Andras Bacsai
995e3d554d
Merge branch 'next' into fix-docker-time-database-v2 2025-11-28 13:28:26 +01:00
Andras Bacsai
2c16727075
feat(ui): Logs color highlight based on log level (#7288) 2025-11-28 13:27:51 +01:00
Andras Bacsai
f42d076f31
Merge branch 'next' into fix-docker-time-database-v2 2025-11-28 13:12:00 +01:00
Andras Bacsai
c136724838 fix(docker): migrate database start actions from --time to -t flag
Migrates 8 database start action files from deprecated --time=10 to compatible -t 10 flag for Docker v28+ compatibility. Also updates test expectations in StopProxyTest.php.

Docker deprecated the --time flag in v28.0. The -t shorthand works on all Docker versions (pre-28 and 28+), ensuring backward and forward compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 11:18:12 +01:00
Andras Bacsai
751f8dbd8d
Revert "fix(docker): migrate database start actions from --time to -t flag" (#7389) 2025-11-28 11:16:06 +01:00
Andras Bacsai
9503da60b4
Revert "fix(docker): migrate database start actions from --time to -t flag" 2025-11-28 11:15:55 +01:00
Andras Bacsai
2898448fe2
fix(docker): migrate database start actions from --time to -t flag (#7388) 2025-11-28 11:15:24 +01:00
Andras Bacsai
5b7a6d9a76 fix(docker): migrate database start actions from --time to -t flag
Migrates 8 database start action files from deprecated --time=10 to compatible -t 10 flag for Docker v28+ compatibility. Also updates test expectations in StopProxyTest.php.

Docker deprecated the --time flag in v28.0. The -t shorthand works on all Docker versions (pre-28 and 28+), ensuring backward and forward compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 11:08:20 +01:00
Andras Bacsai
3a94f1ea18
Fix:(service) Beszel realtime feature not working (#7366) 2025-11-28 11:08:12 +01:00
Andras Bacsai
a95a4129c8
Merge branch 'next' into shadow/fix-service-beszel 2025-11-28 11:08:01 +01:00
Andras Bacsai
02b18c86e0
Fix:(service) Appwrite too many redirects error (#7364) 2025-11-28 11:07:41 +01:00
Andras Bacsai
25a96ad662
fix(docker): replace deprecated --time flag with -t for full compatibility across Docker versions (#6807) 2025-11-28 10:47:19 +01:00
Andras Bacsai
0209bb63e2
fix: prevent duplicate environment variables in buildtime.env and support nixpacks plan variable overrides (#7373) 2025-11-28 10:39:32 +01:00
Andras Bacsai
e5280fd3ad feat: add predefined network connection for pgAdmin and postgresus services 2025-11-28 10:29:13 +01:00
Andras Bacsai
1d054b23b8
Merge branch 'next' into shadow/fix-docker-time-command 2025-11-28 10:25:42 +01:00
Andras Bacsai
83f9fd8e20
fix(ui): incorrect caddy proxy config file path on proxy page (#6722) 2025-11-28 10:24:01 +01:00
Andras Bacsai
74e38ffc6a
Feat:(service) Add postgresus to predefined docker networks by default (#7367) 2025-11-28 10:21:13 +01:00
Andras Bacsai
c4ebf951fa
Merge branch 'next' into shadow/improve-service-postgresus 2025-11-28 10:18:45 +01:00
Andras Bacsai
a4e4cc2c17 fix: update service creation logic to only connect pgAdmin to Docker network 2025-11-28 10:17:27 +01:00
Andras Bacsai
be2b01786a fix: prevent duplicate environment variables in buildtime.env
Refactors generate_buildtime_environment_variables() to use an associative
array (dictionary) approach instead of sequential push() calls. This prevents
duplicate variable declarations in the buildtime.env file.

**Problem:**
After adding nixpacks plan variables to buildtime.env, the same variable
could appear twice in the file:
- Once from nixpacks plan (e.g., NIXPACKS_NODE_VERSION='22')
- Once from user-defined variables (e.g., NIXPACKS_NODE_VERSION="22")

This caused shell errors and undefined behavior during Docker builds.

**Root Cause:**
The push() method adds items sequentially without checking for duplicate
keys. When a variable existed in both nixpacks plan AND user-defined vars,
both would be written to the file.

**Solution:**
- Use associative array ($envs_dict) for automatic deduplication
- Establish clear override precedence:
  1. Nixpacks plan variables (lowest priority)
  2. COOLIFY_* variables (medium priority)
  3. SERVICE_* variables (medium priority)
  4. User-defined variables (highest priority - can override everything)
- Convert to collection format at the end
- Add debug logging when user variables override plan variables

**Benefits:**
- Automatic deduplication (array keys are unique by nature)
- User variables properly override nixpacks plan values
- Clear, explicit precedence order
- No breaking changes to existing functionality

Fixes #7114

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 10:10:19 +01:00
Andras Bacsai
ef332b9af4 fix: add support for nixpacks plan variables in buildtime environment 2025-11-28 10:10:19 +01:00
Andras Bacsai
2921fe907d version++ 2025-11-28 09:41:01 +01:00
Andras Bacsai
bdbecf378d
fix: prevent Livewire snapshot error in database restore (#7385) 2025-11-28 09:39:37 +01:00