Skip to content
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

Upgrading by replacing files and running migration #3033

Closed
yurikuzn opened this issue Apr 18, 2024 · 3 comments
Closed

Upgrading by replacing files and running migration #3033

yurikuzn opened this issue Apr 18, 2024 · 3 comments
Assignees
Milestone

Comments

@yurikuzn
Copy link
Contributor

yurikuzn commented Apr 18, 2024

An optional way to upgrade.

Steps:

  1. Replace all app files with files with files from a new version package.
  2. Run bin/command migrate. It will run needed prepare and after-upgrade scripts, run rebuild. The version parameter in config will be updated.

Supposed to be used in docker installations.

@yurikuzn yurikuzn added this to the Version 8.3.0 milestone Apr 18, 2024
@yurikuzn yurikuzn self-assigned this Apr 18, 2024
@yurikuzn yurikuzn changed the title Upgrading by replacing app files and running migration command Migrations, upgrading by replacing app files and running migration command Apr 18, 2024
@yurikuzn yurikuzn changed the title Migrations, upgrading by replacing app files and running migration command Upgrading by replacing app files and running migration command Apr 18, 2024
@RoSk0
Copy link

RoSk0 commented Apr 23, 2024

This is an awesome feature! Thank you.

One thing to consider though, related to the

The version parameter in config will be updated.

Secure platforms are enforcing read only root file system . This means that the script will fail when it will try to update the version in the config file in at the run time.

I'm not familiar with the details of the version number usage from the config file, but can suggest to either read thatvfrom the code base or update during container image build.

@yurikuzn
Copy link
Contributor Author

yurikuzn commented Apr 23, 2024

I'm not sure we can do it. We already have the config which is not read only. We already have the version parameter in the config which is writable by the application. We have also a read-only default config and the actual version will be taken from there. The config will contain the previous version. Using the version from the config was the most simple solution I could come up with. It's supposed to work in both docker and non-docker environments. Just compares two version numbers and runs needed scripts based on it.

@tmachyshyn
Copy link
Contributor

If we are talking about docker implementation, all core EspoCRM files will be added while image build. The directories as data (where the config is located) and custom will be mapped to the host.
While starting the container, the entrypoint script will check the version, and run the bin/command migrate in case it requires.

@yurikuzn yurikuzn changed the title Upgrading by replacing app files and running migration command Upgrading by replacing files and running migration command May 14, 2024
@yurikuzn yurikuzn changed the title Upgrading by replacing files and running migration command Upgrading by replacing files and running migration May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants