danielbrendel / hortusfox-web

Self-hosted collaborative plant management system for your local environment
https://hortusfox.github.io
MIT License
592 stars 33 forks source link

Migrating from 3.3 to 3.4 - PHP error, instructions unclear #265

Open slaszt opened 2 weeks ago

slaszt commented 2 weeks ago

Describe the bug I am trying to upgrade to 3.4 from 3.3 using these instructions. When I try to run php asatru migrate:list in the root directory using PHP version 8.2.20, I get the following error messages:

`PHP Warning: require_once(/srv/hortusfox-web/vendor/danielbrendel/asatru-php-framework/src/constants.php): Failed to open stream: No such file or directory in /srv/hortusfox-web/asatru on line 23 PHP Fatal error: Uncaught Error: Failed opening required '/srv/hortusfox-web/vendor/danielbrendel/asatru-php-framework/src/constants.php' (include_path='.:/usr/share/php') in /srv/hortusfox-web/asatru:23 Stack trace:

0 {main}

thrown in /srv/hortusfox-web/asatru on line 23`

As it is, all of the necessary files have been replaced but I am assuming the tables have not due to this error. The admin area says I am still running 3.3.

I don't know how to fix this; I am a hobbyist who self-hosts things for fun. Usually to update a container I simply pull the new Docker image and (sometimes) replace a few files, so this update method is new to me and I have never used the PHP CLI before.

To Reproduce Steps to reproduce the behavior:

  1. Have HortusFox 3.3 installed with the containers stopped
  2. Replace all necessary files according to these instructions
  3. Run php asatru migrate:list in terminal
  4. Observe error in terminal

Expected behavior I expected the command not to fail and to update the database tables as needed.

Software:

Desktop (please complete the following information):

danielbrendel commented 2 weeks ago

Hi, if you are already using docker, please pull the new image and then restart the containers. The system will take care of the updating process. Also it should use PHP 8.3 as of one of the recent updates. There is no need of updating it manually and I believe you broke something during your attempts.

slaszt commented 2 weeks ago

I'm not able to pull the new image for some reason - pulling hortusfox-web:latest or hortusfox-web:3.4 gives the following error:

Error: initializing source docker://ghcr.io/danielbrendel/hortusfox-web:3.4: reading manifest 3.4 in ghcr.io/danielbrendel/hortusfox-web: manifest unknown

and

Error: copying system image from manifest list: writing blob: storing blob to file "/var/tmp/storage180671956/6": happened during read: unexpected EOF

I think this all makes sense now. The files didn't actually change, which is why I thought I had to manually replace them. Anyway, how can I fix this manifest issue?

danielbrendel commented 1 week ago

This would indicate that the requested image is not found in the registry, but that cannot be the case. Can you make a fresh start or do you already have productive data in your workspace? You can try to clone the repository (from v3.4 branch) and then only (!) delete the app container. Then when you pull and up it should just recreate your app container. Also be sure that you can connect to the GitHub Container Registry at all. You might also want to backup your data before doing the mentioned steps in case you already have important data entered.

Message ID: @.***>