Commit Graph

275 Commits

Author SHA1 Message Date
Andras Bacsai
ecd4c51fa6
Add git worktree shared dependencies setup (#7284)
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-17 21:00:15 +01:00
Andras Bacsai
51f1be2995 Enhance upgrade and installation scripts with logging and status tracking
- Added logging functionality to `upgrade.sh` for better tracking of upgrade steps and errors.
- Implemented a status file mechanism in `upgrade.sh` for API polling during upgrades.
- Improved error handling and user feedback in `upgrade.sh` and `install.sh`.
- Download configuration files in parallel in `install.sh` to speed up the installation process.
- Updated versions in `versions.json` for Coolify and Traefik.
- Enhanced environment variable checks and updates in `install.sh`.
- Added health checks for the Coolify container post-installation.
2025-12-17 11:01:59 +01:00
Andras Bacsai
6fe4ebeb7e Refactor docker run commands in upgrade script to remove project name specification
Some checks are pending
Staging Build / build-push (aarch64, linux/aarch64, ubuntu-24.04-arm) (push) Waiting to run
Staging Build / build-push (amd64, linux/amd64, ubuntu-24.04) (push) Waiting to run
Staging Build / merge-manifest (push) Blocked by required conditions
2025-12-14 10:22:11 +01:00
Andras Bacsai
c6945c86ea Parse Docker images dynamically from docker-compose files
Replace hardcoded image pulls (postgres:15-alpine, redis:7-alpine,
coolify-realtime:1.0.10) with dynamic extraction using
`docker compose config --images`. This ensures the upgrade script
automatically handles new services and version changes without
manual updates.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 22:12:33 +01:00
Andras Bacsai
20a9855c04 Address CodeRabbit review feedback
- Fix null-safe operator on currentTeam() call in Upgrade.php
- Add --rm flag to docker run in upgrade.sh for cleanup consistency
- Store beforeunload handler as named reference and clean up on success
- Add clarifying comments for upgrade method calls
- Add error state handling with close option in upgrade modal
- Add step mapping documentation comment in upgrade-progress component

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 21:42:19 +01:00
Andras Bacsai
dc9f612df4 Clean up status file after upgrade and reduce data exposure
- Delete status file 10 seconds after upgrade completes
- Reduce stale timeout from 30 to 10 minutes
- Remove timestamp from API response (internal detail)
- Treat timestamp parse failures as stale for security

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 21:14:31 +01:00
Andras Bacsai
b8cfc3f7c9 Add real-time upgrade progress tracking via status file
- upgrade.sh now writes status to /data/coolify/source/.upgrade-status
- New /api/upgrade-status endpoint reads status file for real progress
- Frontend polls status API instead of simulating progress
- Falls back to health check when service goes down during restart

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 21:11:32 +01:00
Andras Bacsai
30ac4e079c Fix variable expansion in upgrade log message
Use double quotes for LATEST_IMAGE variable in log output so it
expands correctly inside the nohup subshell.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 17:22:01 +01:00
Andras Bacsai
1f7888f515 Use nohup for container restart to survive SSH disconnect
When upgrade is triggered from Coolify UI, the SSH connection is lost when
the coolify container stops. Using nohup ensures the container stop/start
sequence continues in the background even after the connection drops.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:41:09 +01:00
Andras Bacsai
f4dbae1805 Revert container stop order to original
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:39:08 +01:00
Andras Bacsai
f3ccacb2da Stop coolify container last during upgrade
Reorder container stop sequence to stop dependencies first (db, redis,
realtime) before stopping the main coolify container. This prevents the
upgrade process from being interrupted when triggered from Coolify UI.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:36:01 +01:00
Andras Bacsai
7dc93001e3 Improve log file format with timestamps and sections
- Add log() helper for timestamped entries
- Add log_section() for clear section headers
- Include upgrade metadata at start (version, registry, etc.)
- Log each step with clear descriptions
- Add completion timestamp at end
- Track container operations individually

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:32:49 +01:00
Andras Bacsai
6a9027dcbf Add human-friendly output to upgrade script
- Show clear progress with numbered steps (1/6 through 6/6)
- Display header and footer banners
- Show individual image pull progress
- Show which containers are being stopped
- Display final success message with version and log location
- Keep detailed logging to file for debugging

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 15:18:57 +01:00
Andras Bacsai
c45cbc04c8 Pull images before stopping containers during upgrade
Ensures images are available before taking down the system. If pull fails
(rate limits, network issues, expired tokens), upgrade aborts safely
without leaving Coolify in a broken state.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 14:54:24 +01:00
Andras Bacsai
0c46da0a23 Fix Docker container race condition during upgrades
Stop and remove existing Coolify containers before starting new ones to prevent conflicts when project name changes from 'source' to 'coolify'. This resolves volume and container name conflicts during upgrades from older installations.

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

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2025-12-12 11:28:53 +01:00
Andras Bacsai
65a83fe050 Fix Docker container race condition during upgrades
Add --project-name coolify to docker compose commands to ensure consistent
container naming when executed inside helper containers. Remove --force-recreate
to only recreate containers when image or configuration changes, reducing
race condition risk during concurrent upgrades.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-10 14:14:43 +01:00
Andras Bacsai
bf9f78538e Remove webhook maintenance directory from Docker configurations 2025-12-04 14:55:07 +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
ff7b27be61 Improve worktree setup safety and cross-platform compatibility
- Add validation for CONDUCTOR_ROOT_PATH environment variable
- Enhance safety checks with explicit blacklist of system directories
- Improve directory detection (symlink vs regular directory)
- Replace Python dependency with cross-platform bash+perl for path calculation
- Use absolute paths consistently to prevent symlink following
- Add detailed comments explaining each safety check

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 12:28:57 +01:00
Andras Bacsai
c631627200 Add safety checks to prevent dangerous deletions
Added multiple safety validations before executing rm -rf commands:
- Check WORKTREE_PATH is not empty, /, /Users, or $HOME
- Verify we're actually in a git repository (.git exists)

This prevents accidental deletion of critical directories if the script
is run in the wrong location or with unexpected environment variables.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 12:28:57 +01:00
Andras Bacsai
4507d99460 Use absolute paths in rm commands for safety
Changed rm -rf commands to use absolute paths ($WORKTREE_PATH) instead
of relative paths to prevent accidental deletion if symlinks behave
unexpectedly.

Also cleaned up duplicate WORKTREE_PATH definition.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 12:28:57 +01:00
Andras Bacsai
b847e3801a Use main repo directories for shared dependencies
Simplified the worktree setup to use the main repository's node_modules
and vendor directories directly instead of creating a separate .shared-deps
directory.

Changes:
- Updated conductor-setup.sh to symlink directly to main repo's directories
- Updated CLAUDE.md to reflect the simpler approach
- Symlinks now point to ../../node_modules and ../../vendor

Benefits:
- Simpler setup with no extra directories
- All worktrees share the main repo's dependencies
- No need to add .shared-deps to .gitignore

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 12:28:57 +01:00
Andras Bacsai
ad148eca60 Add automatic shared dependencies for worktrees
Setup Conductor to automatically share node_modules and vendor directories
across all git worktrees to save disk space and speed up development.

Changes:
- Updated conductor-setup.sh to create symlinks to shared dependencies
- Added documentation to CLAUDE.md explaining the system
- Dependencies now stored in .shared-deps/ in main repository
- All worktrees use the same dependency versions automatically

Benefits:
- Saves hundreds of MBs to GBs of disk space
- No need to run npm install/composer install for each worktree
- Consistent dependency versions across all worktrees

Note: Add .shared-deps/ to .gitignore in the main repository

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 12:28:57 +01:00
Andras Bacsai
4834ff27d1 fix(conductor-setup): update script permissions for execution 2025-10-10 16:06:30 +02:00
Andras Bacsai
840c16246d feat(conductor): add setup script and configuration file 2025-10-10 16:03:22 +02:00
Andras Bacsai
12c7e28a48 fix(install): ensure proper quoting of environment file paths to prevent issues with spaces 2025-09-25 11:45:07 +02:00
Andras Bacsai
acb408a2b7 refactor(upgrade): enhance logging and quoting in upgrade scripts
- Improve logging statements for better clarity and consistency.
- Add quotes around variables in commands to prevent potential issues with spaces.
- Ensure consistent handling of environment variable updates and backups.
2025-09-24 13:18:48 +02:00
Andras Bacsai
cf1c54b24c
Update scripts/install.sh
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-24 13:14:27 +02:00
Andras Bacsai
febeb00e48
Update scripts/install.sh
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-24 13:14:18 +02:00
peaklabs-dev
983197b742
chore: adjust wording 2025-08-29 18:42:46 +02:00
peaklabs-dev
64f3fdc463
refactor(upgrade): improve upgrade script
- remove unused VERSION variable.
- add backup functionality of the .env file on each run of the upgrade script.
- skip .env backup when coming from the install script
- add improved handling and more logging for updating environment-variable values.
- remove not needed line
2025-08-29 15:28:31 +02:00
peaklabs-dev
5b637c1de1
refactor(installer): improve install script
- remove unused VERSION variable.
- fix the source code link of the install script.
- properly back up the `.env` file on each run of the install script.
- do not delete the backup .env file at the end of the install script.
- Add improved handling and more logging for updating environment variable values.
2025-08-29 15:26:28 +02:00
peaklabs-dev
4b592b93e8
chore: remove unused files 2025-08-29 15:22:30 +02:00
peaklabs-dev
d4fcafe4d3
fix(installer): public IPv4 link does not work 2025-07-18 16:37:58 +02:00
Andras Bacsai
a7aac19267
Merge pull request #6127 from flickowoa/patch-1
interpret cachyos as arch in the install script
2025-07-07 10:35:42 +02:00
Diego Rodríguez
2733aeb092
fix(install.sh): use IPV4_PUBLIC_IP variable in output instead of repeated curl 2025-07-04 15:16:01 +02:00
flicko
3b3090650f
support cachyos 2025-07-04 15:06:49 +05:30
Andras Bacsai
5c3196f6c9
Fine tunes for v419 (#5995)
* chore(version): update coolify-realtime to version 1.0.9 in docker-compose and versions files

* feat(migration): add is_sentinel_enabled column to server_settings with default true

* fix(migration): update default value handling for is_sentinel_enabled column in server_settings

* feat(seeder): dispatch StartProxy action for each server in ProductionSeeder

* feat(seeder): add CheckAndStartSentinelJob dispatch for each server in ProductionSeeder
2025-06-16 15:19:38 +02:00
Andras Bacsai
8191f9176f fix(install): update Docker installation script to use dynamic OS_TYPE and correct installation URL 2025-06-10 10:47:50 +02:00
Andras Bacsai
746a801de7 refactor(install-scripts): update Docker installation process to include manual installation fallback and improve error handling 2025-06-04 20:38:53 +02:00
peaklabs-dev
f53f671656
fix(installation): path to config file for docker login 2025-04-02 14:35:37 +02:00
peaklabs-dev
1016b000c6
fix(installation): mount the docker config
- Mount docker config during installation to use docker credentials, if there are any.
2025-04-02 14:28:00 +02:00
Andras Bacsai
c26209f187 refactor(nightly): update version numbers and enhance upgrade script 2025-03-27 10:47:08 +01:00
Andras Bacsai
8f0955bcd8 refactor(network): check for existing coolify network before creation 2025-03-25 12:34:03 +01:00
Andras Bacsai
bc297c4296 refactor(network): enhance docker network creation with ipv6 fallback 2025-03-25 11:27:59 +01:00
Andras Bacsai
1fcfac07b1 refactor(env): add centralized registry URL to environment configuration 2025-03-25 09:03:59 +01:00
Andras Bacsai
cef4596011 fix(console): handle missing root user in password reset command 2025-03-24 18:00:31 +01:00
Andras Bacsai
009cee1bbd
Merge branch 'next' into feat-db-ssl 2025-03-17 15:15:24 +01:00
Andras Bacsai
b6cb32c037 fix(install): handle potential errors in Docker address pool configuration 2025-03-14 15:23:17 +01:00
Andras Bacsai
3cf4d6364c fix 2025-03-14 13:20:48 +01:00