Commit graph

315 commits

Author SHA1 Message Date
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
Andras Bacsai
9dbe221ad5 refactor(install): clean up install script and enhance Docker installation logic
Refactored the install script to improve readability by removing unnecessary whitespace and consolidating Docker installation logic into a dedicated function. This change enhances maintainability and clarity, particularly for the installation process across different operating systems. Additionally, the script now includes specific handling for Ubuntu 24.10, ensuring users receive appropriate guidance for installation. Overall, these updates contribute to a more streamlined and user-friendly installation experience.
2025-03-14 13:20:45 +01:00
Andras Bacsai
815a2701fc feat(install): add missing env variable to install script 2025-03-13 18:10:57 +01:00
Andras Bacsai
d0b8a20564 feat(install): improve Docker address pool management and service restart logic
Enhanced the install script to support a force override for Docker address pool configurations, allowing users to update existing settings if desired. The script now checks for existing configurations in the daemon.json file and provides clearer messaging regarding the use of custom pools versus existing configurations. Additionally, the restart logic for the Docker service has been streamlined, ensuring that unnecessary restarts are avoided when configurations remain unchanged. This update improves the flexibility and usability of the installation process.
2025-03-13 10:47:27 +01:00
Andras Bacsai
46f55c9463 feat(install): enhance Docker address pool configuration and validation
Updated the install scripts to include support for custom Docker address pool configurations via environment variables. Added validation for the address pool base and size, with default values provided. The script now checks for existing configurations in the .env file and merges them appropriately, ensuring a more flexible and user-friendly installation process. Additionally, the version has been bumped to 1.8 to reflect these enhancements.
2025-03-13 08:44:04 +01:00
Gergely Lonyai
bc2e4a8049
Update install.sh 2025-03-10 10:58:52 +01:00
peaklabs-dev
a1e650e699
chore: rename ca crt folder to ssl 2025-02-03 21:42:28 +01:00
peaklabs-dev
fab7300a5f
feat(installer): create CA folder during installation 2025-01-31 12:36:26 +01:00
Andras Bacsai
0b42115127 feat: add root user details to install script 2025-01-17 17:30:26 +01:00
Andras Bacsai
54eb4e3ffe feat: add log file check message in upgrade script for better troubleshooting 2025-01-17 17:22:52 +01:00
Andras Bacsai
a396d51452
Merge branch 'next' into hotfix 2025-01-10 20:23:29 +01:00
Andras Bacsai
db079c0c7d refactor: improve deployment status check in isAnyDeploymentInprogress function
- Updated the isAnyDeploymentInprogress function to check for running jobs based on the current hostname.
- Enhanced the logic to return true if any job status is 'unknown' and to provide a clearer output regarding the number of deployments in progress.
- Modified the cloud_upgrade.sh script to loop until the deployment status check confirms no ongoing deployments before proceeding with the upgrade.
2025-01-10 18:34:16 +01:00
Khiet Tam Nguyen
51dc22988d
fix: use ip in place of hostname from inetutils in arch 2024-12-24 09:11:38 +11:00
Khiet Tam Nguyen
3a6232db7a fix: install inetutils on Arch Linux
This provides the `hostname` command used in the install.sh script,
which is not available by default on Arch Linux.

Some relevant resources:
- https://bbs.archlinux.org/viewtopic.php?id=125308
- https://archlinux.org/news/deprecation-of-net-tools/
- https://man.archlinux.org/man/hostname.1.en
2024-12-23 00:15:13 +11:00
Andras Bacsai
1257ab6ff4 fix: ui + migrations 2024-12-11 10:14:12 +01:00
mohanlokesh
ba808b14a4
fix: display actual values for disk space checks in installer script 2024-12-06 13:25:41 +05:30
Luna Midori
daa2700b1c
Added support for Endeavour OS as arch 2024-11-27 22:37:18 -08:00
Andras Bacsai
29a82aeabc fix 2024-11-15 11:36:17 +01:00
Andras Bacsai
9982a931fa fix: default docker engine version + fix install script 2024-11-15 11:33:03 +01:00
peaklabs-dev
9e7a9f6065
fix install openssl 2024-11-14 22:00:13 +01:00
Aji Priyo Wibowo
3c087f378f
Update install.sh 2024-11-15 01:13:57 +07:00
Andras Bacsai
2c91c46faf fix: gather private ips 2024-11-14 14:12:50 +01:00
Andras Bacsai
3e6f4c8eb9
Merge branch 'next' into fix-installer-on-pi 2024-11-14 14:05:31 +01:00
Andras Bacsai
3a46423ae4
Merge pull request #4284 from peaklabs-dev/fix-install-scirpt-root-and-storage
Fix: Root check in installer and add disk usage check
2024-11-14 13:45:41 +01:00
Andras Bacsai
7a166913d4 fixes for installation script 2024-11-14 13:42:51 +01:00
🏔️ Peak
acfcf88b40
Merge branch 'next' into fix-install-scirpt-root-and-storage 2024-11-14 11:57:03 +01:00
peaklabs-dev
744e118581
Update install.sh 2024-11-14 11:53:09 +01:00
peaklabs-dev
24f357a385
Update install.sh 2024-11-13 19:16:25 +01:00
peaklabs-dev
5809623bb9
Update run 2024-11-13 19:14:13 +01:00
peaklabs-dev
689396fa47
use old user here 2024-11-13 19:11:24 +01:00
peaklabs-dev
a399f41f81
switch user 2024-11-13 17:54:00 +01:00
peaklabs-dev
9d021f6b5a
new docker version 2024-11-13 14:49:27 +01:00
🏔️ Peak
442b0e837c
Merge branch 'next' into dep-and-remove-unused-stuff 2024-11-12 13:58:51 +01:00
Andras Bacsai
327b4308d4 fix: add tests for git url converts 2024-11-12 11:32:18 +01:00
🏔️ Peak
a43c12cf9e
Merge branch 'next' into dep-and-remove-unused-stuff 2024-11-11 21:12:24 +01:00
peaklabs-dev
1709126c87
Delete generate_pg_data.sh 2024-11-11 18:57:28 +01:00
Andras Bacsai
47e9e69ce0 fixes 2024-11-10 22:07:41 +01:00
Andras Bacsai
60de7dc711 fix: upgrade.sh 2024-11-10 21:44:34 +01:00
Andras Bacsai
983ce240e2 feat: add upgrade logs to /data/coolify/source 2024-11-08 13:54:58 +01:00
Andras Bacsai
ea9892dca8 install ssh in install script 2024-11-07 14:58:52 +01:00
Andras Bacsai
cf870f5162
Merge pull request #3912 from peaklabs-dev/fix-default-adress-pool
Fix: Error response from daemon: all predefined address pools have been fully subnetted
2024-11-07 13:45:26 +01:00
Andras Bacsai
51c76c1b47 fix: only skip docker installation on 24.10 if its not installed 2024-11-06 12:25:24 +01:00
Andras Bacsai
b99fa3b30f fix: show docker installation logs & ubuntu 24.10 notification 2024-11-05 13:02:07 +01:00
Andras Bacsai
8c96ab52d7 feat: notification rate limiter
fix: limit server up / down notification limits
2024-10-25 15:13:23 +02:00
peaklabs-dev
e971094508
new much larger default docker address pool 2024-10-14 20:32:24 +02:00
Andras Bacsai
1f193d465d sentinel updates 2024-10-14 12:07:37 +02:00
Andras Bacsai
ba70451765 refactor: Update install.sh script to remove redirection of upgrade output to /dev/null 2024-09-26 13:07:06 +02:00
Andras Bacsai
aa28c99827 refactor: Update OS_TYPE for Asahi Linux in install.sh script 2024-09-26 10:36:59 +02:00
Andras Bacsai
6d8d91802b chore: Update install.sh version to 1.6 2024-09-23 11:30:57 +02:00
Andras Bacsai
c0a1f15d34
Merge pull request #3472 from disjukr/asahi-linux
Add support to install.sh for Asahi Linux
2024-09-23 11:29:26 +02:00
Andras Bacsai
be42f15711 refactor: Update ServerSeeder and PopulateSshKeysDirectorySeeder 2024-09-20 17:28:55 +02:00
Andras Bacsai
1c5fd8d668 refactor: Update getAJoke function to use HTTPS for API request 2024-09-19 13:16:05 +02:00
Andras Bacsai
91485b5d4d refactor: Update getAJoke function to exclude offensive jokes 2024-09-19 12:50:51 +02:00
JongChan Choi
e5768999e4 chore: Update install.sh to support Asahi Linux 2024-09-18 13:22:07 +09:00
Andras Bacsai
7b4559c5e6 fix: install script 2024-09-16 17:28:31 +02:00
Andras Bacsai
d2d56f136b chore: Update Coolify installer and scripts to include a function for fetching programming jokes 2024-09-16 16:35:52 +02:00
Andras Bacsai
62a4d7055a fix: update Coolify installer 2024-09-16 14:37:19 +02:00
Andras Bacsai
72f0118506 chore: Add reminder to backup .env file during installation script 2024-09-11 14:26:10 +02:00
Andras Bacsai
bc13ad6b82 chore: Copy .env file to backup location during installation script 2024-09-11 14:25:40 +02:00
Andras Bacsai
b145691e1e chore: Add reminder to backup .env file before running install script again 2024-09-11 14:25:16 +02:00
Andras Bacsai
f718604ac4 chore: Update .env file with new values 2024-09-10 14:58:26 +02:00