-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Optional change installation directory #2710
base: next
Are you sure you want to change the base?
Feat: Optional change installation directory #2710
Conversation
Does this also work on NixOS: https://nixos.org/ ? |
The install steps above actually can break MicroOS - you don't want to be changing the release as it can cause parts of the system that differentiate between Tumbleweed and MicroOS to misbehave - so we definitely want to specify more aliases above. You also don't need to set up the docker group, as the intent is generally to just have a root user if you're running it on a server, so there's not a lot of point. Just needs to be tweaked a little. That being said, at least with a quick glance over it, this seems to cover most of what is needed minus documentation and some additional changes I'd suggest adding to install.sh (which I have listed at the end) My own testing steps - these are not ideal either, but they work for now: # Set up system - install docker and nano (or your editor of choice) + coolify dependencies, remove podman if installed (not required but having 2 runtimes makes things fight sometimes - ideally we get native podman support at some point) as well as other dependencies
transactional-update run sh -c 'zypper ref && zypper dup -y && zypper in -y docker nano curl wget git jq && zypper rm -y podman'
# Reboot into new OS snapshot
reboot
# Enable docker
systemctl enable --now docker
# Set up SSH stuff
echo -e '# Coolify requires root login over SSH to manage this server\nPermitRootLogin yes' > /etc/ssh/sshd_config.d/70-coolify.conf
# Clone the repo
git clone https://github.com/LEstradioto/coolify.git -b Feat--Customize-Install-Directory
cd coolify
nano scripts/install.sh
# Comment out the zypper-related lines as mentioned
# Add opensuse-microos as a supported OS in the $OS_TYPE check for the support list - this should be fixed in this PR, see below for suggestions
# Start it up!
mkdir /var/coolify
COOLIFY_ROOT_PATH=/var/coolify ./scripts/install.sh It still references /data for some stuff here, but this is an issue of it still pulling from the CDN - as a result, I could not test end to end, as it'd require modifying the install script substantially, and I don't have time to spend on testing to that degree right now. A few suggested improvements for @LEstradioto:
If the user doesn't have docker installed, this should probably be managed by the user, not by the install script. With the above changes, it should make the installation a little smoother for people on MicroOS (and potentially other systems too re: the config file change for sshd) |
@ayntk-ai While the patchset could help with NixOS packaging, due to the complexity of the change supporting NixOS may be out of scope of the bounty I have put on this issue. The only real key change to this is finishing the prior work on allowing a custom host installation directory. This is by no means a "Support all immutable OSes" bounty, just a key part in making support possible at all. The average user doing |
Thanks for the informations. The error you got after successful cp scripts/install.sh install.sh
cp scripts/upgrade.sh upgrade.sh
sed -i 's/^CDN=.*/CDN="."/g' install.sh
sed -i 's/^CDN=.*/CDN="."/g' upgrade.sh
COOLIFY_ROOT_PATH=/var/coolify ALLOW_UNSUPPORTED_PLATFORMS=1 SKIP_DEPENDENCY_INSTALLATION=1 ./install.sh 4.0.0-beta.307 Ive already did a check on the writable of root path, so it fails if no write permission We could add opensuse-microos. @Silvea12 could help me adding aliases (perhaps check ID_LIKE too) Changes made:
|
I did a refactor on |
Due to the sheer number of changes in the second commit, I'm hesitant to even test this properly to see if it passes the needs of the original issue, as I may be testing code paths that may be canned. @andrasbacsai can you comment on this change? Not really sure what to do here, the second commit to this PR makes a lot of behavioral changes. I'm going to put this on ice on my end and wait for a comment back from you. Worth a note too, your mentioned instructions don't work, because changing the CDN URL to pull from the local dir doesn't work when fed into curl. |
Sorry guys. I will turn this into Draft. I did more stuff then the requested, my bad. The correct is to separate these in another PRs. So I will do this first |
5fcfab8
to
5e1d603
Compare
Okay, that's it. I undo the last commit. The command now is like this: Only one flag now, just SKIP_OS (this skips os check and dependencies installs). As there are very few cases where using them separately or individually is necessary. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
Aside from |
Is there any plan to go forward with this @andrasbacsai? I cannot pay out any bounty until this is sorted. |
A lot of things change since then, so this needs to be reviewed @LEstradioto (sorry about that). |
ea2b6fb
to
128d732
Compare
Okay, rebased to User can opt-in Installing like this: Would install Coolify with a customized installation path and skip automatic dependencies installation. But, hey @andrasbacsai :D! Every path on codebase was Even though its only in dev, how to match using the right config? |
@LEstradioto Are you still working on this, if you do not have time I totally understand. Please let me know so I can close this, if not you can always open a new PR in the future. |
138e34b
to
c24bba7
Compare
I'm still down to pay out the bounty when merged, by the way. |
5d36095
to
9f12b00
Compare
9f12b00
to
6a32769
Compare
Hey @peaklabs-dev ! Actually it is done. Ive synced just now to Note: In dev mode, altering the installation directory may cause issues (there are lines with hardcoded paths such as lines 513 and 516). Since only in dev, I wouldnt consider an issue? |
/claim #2708
@Silvea12 raised a concern about installing Coolify on an immutable filesystem, such as openSUSE MicroOS
Changes made
Updated all references from
/data/coolify
to retrieve the value from .env, allowing users to specify a custom path.Example installation command:
curl -fsSL https://cdn.coollabs.io/coolify/install.sh | env COOLIFY_ROOT_PATH=/custom/path/to/coolify bash
Users can now change the base directory if needed.
Observations for openSUSE MicroOS (self-installing host)
edit: READ HERE TOO
Even with this patch, setting up on this OS can be challenging. The following steps worked for me:
opensuse-microos
toopensuse-tumbleweed
:transactional-update shell # Edit /usr/lib/os-release
transactional-update pkg in curl wget git jq
install.sh
:Further improve
If approved, I can further improve
install.sh
, and reduce this steps, and to support more OSes by usingID_LIKE
for derivatives, as I saw in this issueBreaking Changes
BASE_CONFIG_PATH
in.env
must be renamed toCOOLIFY_ROOT_PATH
.