Commit Graph

13781 Commits

Author SHA1 Message Date
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 d9ec105430 v4.0.0-beta.451 (#7369) 2025-11-27 15:09:21 +01:00
Andras Bacsai 93771b9611 Merge branch 'v4.x' into next 2025-11-27 14:54:13 +01:00
Andras Bacsai 31e2ac499d fix: enhance security by validating and escaping database names, file paths, and proxy configuration filenames (#7375) 2025-11-27 14:54:03 +01:00
Andras Bacsai 281a706231 fix: enhance validation for database names and filenames to prevent command injection 2025-11-27 14:51:23 +01:00
Andras Bacsai 0073d045fb fix: enhance security by validating and escaping database names, file paths, and proxy configuration filenames to prevent command injection 2025-11-27 14:36:31 +01:00
Andras Bacsai e60e74ac90 fix: trigger configuration changed detection for build settings (#7371) 2025-11-27 12:23:32 +01:00
Andras Bacsai 9452f0b468 fix: trigger configuration changed detection for build settings
Include 'Inject Build Args to Dockerfile' and 'Include Source Commit in Build' settings in the configuration hash calculation. These settings affect Docker build behavior, so changes to them should trigger the restart required notification. Add unit tests to verify hash changes when these settings are modified.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 12:22:54 +01:00
Andras Bacsai 639a56be52 fix: prevent SERVICE_FQDN/SERVICE_URL path duplication (#7370) 2025-11-27 10:59:39 +01:00
Andras Bacsai 7009cef8a4 fix: conditionally enable buildtime checkbox based on environment type 2025-11-27 10:58:44 +01:00
Andras Bacsai 0ecaa191db fix: prevent SERVICE_FQDN/SERVICE_URL path duplication on FQDN updates
Add endsWith() checks before appending template paths in serviceParser() to
prevent duplicate paths when parse() is called after FQDN updates. This fixes
the bug where services like Appwrite realtime would get `/v1/realtime/v1/realtime`.

Fixes #7363

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 10:57:24 +01:00
Andras Bacsai 5084464688 fix: add additional bash keywords to prevent sudo prefix in command parsing 2025-11-27 10:51:59 +01:00
Andras Bacsai 48c3daae88 fix: improve error handling and output capturing during Git operations in SyncBunny command 2025-11-27 10:51:25 +01:00
Andras Bacsai d27d697b37 fix: log warning on backup failure during name cleanup process 2025-11-27 10:51:19 +01:00
Andras Bacsai b5666da342 test: add tests for shared environment variable spacing and resolution 2025-11-27 10:45:39 +01:00
Andras Bacsai c2e1379ba8 feat: add availableSharedVariables method and enhance env-var-input component for better password handling 2025-11-27 10:23:46 +01:00
Andras Bacsai e47e241da1 fix: update environment variable form to use consistent naming and improve checkbox logic 2025-11-27 09:39:16 +01:00
Andras Bacsai 0298ddffbd fix: ensure syncData is called with both true and false parameters in submit method 2025-11-27 09:26:54 +01:00
Andras Bacsai 2e1b68718d fix: resolve Docker validation race conditions and sudo prefix bug (#7368) 2025-11-27 09:10:39 +01:00
Andras Bacsai 246e3cd8a2 fix: resolve Docker validation race conditions and sudo prefix bug
- Fix sudo prefix bug: Use word boundary matching to prevent 'do' keyword from matching 'docker' commands
- Add ensureProxyNetworksExist() helper to create networks before docker compose up
- Ensure networks exist synchronously before dispatching async proxy startup to prevent race conditions
- Update comprehensive unit tests for sudo parsing (50 tests passing)

This resolves issues where Docker commands failed to execute with sudo on non-root servers and where proxy networks were not created before the proxy container started.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 09:04:42 +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 9aea159a24 feat: add functionality to sync releases.json and versions.json to GitHub in one PR 2025-11-26 14:43:25 +01:00
Andras Bacsai 50497eed0a reduce: minimize logging in cleanup commands (#7356) 2025-11-26 14:20:42 +01:00
Andras Bacsai c25272de8d reduce: minimize logging in cleanup commands
Reduce excessive logging in CleanupRedis and CleanupNames commands to output only a single summary line. Remove per-item logs and detailed status messages while keeping the final count of items cleaned up. Detail logs still available in dry-run mode for preview.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 14:19:13 +01:00
Andras Bacsai 8505922b87 v4.0.0-beta.450 (#7351) 2025-11-26 14:06:18 +01:00
Andras Bacsai 1047110e01 fix: update coolify version numbers to 4.0.0-beta.450 and 4.0.0-beta.451 2025-11-26 14:05:37 +01:00
Andras Bacsai d2d5bd4be8 feat: add Docker build cache preservation toggles (#7352) 2025-11-26 14:01:35 +01:00
Andras Bacsai 43bb2f34f4 docs: replace brittle line number references with maintainable method descriptions
Replace 6 line number references in deployment-architecture.md with descriptive
method-based references that remain accurate as code evolves.

Changes:
- Section 1 (Docker Build Cache): Replaced 4 line number refs (~line 1960, ~line 2340,
  ~line 3358, ~line 3530) with detailed method descriptions in ApplicationDeploymentJob.php
- Section 2 (content field): Replaced "line 717" with "parseCompose() function" reference
- Section 3 (is_directory field): Replaced "line 718" with "parseCompose() function" reference

Benefits:
- Documentation remains accurate when code changes
- More informative (explains WHAT methods do, not just WHERE)
- Search-friendly (developers can find methods by name)
- Future-proof (survives refactoring and code movement)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:52:27 +01:00
Andras Bacsai 71bf8a3265 fix: add bash control structure keywords to sudo processing (#7353) 2025-11-26 13:45:44 +01:00
Andras Bacsai 01635e8b80 fix: add bash control structure keywords to sudo command processing
Fixes issue #7346 where proxy startup failed on non-root servers due to
bash syntax errors when control structure keywords like 'for', 'do', 'done',
'break', and 'continue' were being prefixed with 'sudo'.

Added comprehensive exclusion list including for/while/until/case/select
loops, conditionals (if/then/else/elif/fi), and loop control keywords
(break/continue). Also excludes comment lines starting with '#'.

All 37 unit tests pass, including new tests for each bash control structure.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:44:53 +01:00
Andras Bacsai 7116711896 chore: update migration timestamp to 2025_11_26_124200
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:44:43 +01:00
Andras Bacsai 837391c31b feat: add Docker build cache preservation toggles and development logging
Add two new application settings to control Docker build cache invalidation:
- inject_build_args_to_dockerfile (default: true) - Skip Dockerfile ARG injection
- include_source_commit_in_build (default: false) - Exclude SOURCE_COMMIT from build context

These toggles let users preserve Docker cache when SOURCE_COMMIT or custom ARGs change frequently. Development-only logging shows which ARGs are being injected for debugging.

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:42:02 +01:00
Andras Bacsai 5760b96536 fix: add -L flag to curl commands for CDN redirects (#7349) 2025-11-26 13:05:13 +01:00
Andras Bacsai 727c45a7dc fix: add -L flag to curl commands for CDN redirects
Fixes issue #7348 where curl fails to follow HTTP 302 redirects from the CDN
when fetching versions.json and docker-compose files. The -L flag instructs
curl to automatically follow redirects to the final destination URL, resolving
silent installation failures.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 12:57:03 +01:00
Andras Bacsai 1e0de06d03 fix: resolve uncloseable database restore modal (#7345) 2025-11-26 12:55:09 +01:00
Andras Bacsai f6d8ad1775 feat: add support for syncing versions.json to GitHub repository via PR 2025-11-26 10:52:20 +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 aa18c48823 fix: resolve uncloseable database restore modal on MariaDB import (#7335)
Fixes the "Snapshot missing on Livewire component" error that occurs when
toggling the "Backup includes all databases" checkbox during MariaDB database
import operations.

Root Cause:
- ActivityMonitor component was initialized without proper lifecycle hooks
- When parent Import component re-rendered (via checkbox toggle), the
  ActivityMonitor's Livewire snapshot became stale
- Missing null checks caused errors when querying with undefined activityId
- No state cleanup when slide-over closed, causing issues on subsequent opens

Changes:
- Add updatedActivityId() lifecycle hook to ActivityMonitor for proper hydration
- Add defensive null check in hydrateActivity() to prevent query errors
- Track activityId in Import component for state management
- Add slideOverClosed event dispatch in slide-over component
- Add event listener in Import component to reset activityId on close

Testing:
- Manually verify checkbox toggle doesn't trigger popup
- Verify actual restore operations work correctly
- Test both file-based and S3-based restore methods
- Ensure X button properly closes the modal
- Verify no console errors or Livewire warnings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:43:07 +01:00
Andras Bacsai da174940ff v4.0.0-beta.449 (#7340) 2025-11-26 10:05:04 +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 ce134cb8b1 fix: add authorization checks for environment and project views 2025-11-26 09:55:04 +01:00
Andras Bacsai 5f33ad74b5 fix: show shared env scopes dropdown even when no variables exist (#7342) 2025-11-26 09:47:40 +01:00
Andras Bacsai 118966e810 fix: show shared env scopes dropdown even when no variables exist
Previously, when no shared environment variables existed in any scope (team, project, environment), the dropdown would not appear at all when users typed '{{'. This made the feature appear broken.

Now the dropdown always shows the available scopes, and when a user selects a scope with no variables, they see a helpful "No shared variables found in {scope} scope" message with a link to add variables.

Changes:
- Removed isAutocompleteDisabled() method that blocked dropdown
- Removed early return check that prevented showing scopes
- Existing empty state handling already works correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 09:44:36 +01:00
Andras Bacsai 413a0507fa feat: developer view for shared environment variables (#7091) 2025-11-26 09:41:33 +01:00
Andras Bacsai e71473d96c refactor: fix variable scope in docker entrypoint parsing (#7341) 2025-11-26 09:40:40 +01:00
Andras Bacsai c472786f6f Merge branch 'next' into feat/shared-dev-view 2025-11-26 09:37:45 +01:00
Andras Bacsai ac14a32723 fix: dispatch success message after transaction commits
Move the success dispatch outside the DB transaction closure to ensure
it only fires after the transaction has successfully committed. Use
reference variable to track changes across the closure boundary.
2025-11-26 09:37:18 +01:00