OCSInventory-Docker-Image icon indicating copy to clipboard operation
OCSInventory-Docker-Image copied to clipboard

Upgrade of Application does not happen, when /usr/share is in a volume

Open sstidl opened this issue 4 years ago • 5 comments

hi

thanks for your useful software!

I tried to find out why table software_categories_link was missing and found out, that the docker-entrypoint does only copy the new code if var.php does not exist and therfore the /files/update/ directory doesnt get updated.

https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/blob/3c6b0bef8758f605bb1664980e24ccb9f882c43c/2.9/scripts/docker-entrypoint.sh#L13

as we mount $OCS_WEBCONSOLE_DIR it has var.php already https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/blob/3c6b0bef8758f605bb1664980e24ccb9f882c43c/2.9/docker-compose.yml#L13

I tried to remove the mount and now ocs db schema gets upgraded

could you find out if this works correctly?

sstidl avatar Jun 17 '21 17:06 sstidl

Hi @sstidl

Thanks for your contribution.

I'm looking at the #57 alongside with your issue :)

I don't think its mandatory to keep ocsreports as a volume, I just have to set the extensions directory as a volume.

Regards, Gilles.

gillesdubois avatar Jun 28 '21 14:06 gillesdubois

Hi @sstidl

Could you try to build an image locally using the changes in this PR : https://github.com/OCSInventory-NG/OCSInventory-Docker-Image/pull/60

Regards, Gilles.

gillesdubois avatar Jun 29 '21 14:06 gillesdubois

Sorry, I didn't test it yet. I will try to test it by the weekend

sstidl avatar Jul 07 '21 20:07 sstidl

I looked at the change in #60 and this should do it.

But it's a breaking change, as you use the same path on host side to mount now into extensions directory. So upgrades will have data in the extensions directory coming from the old mount.

Wouldn't it be better if you choose another and new directory on host side in docker-compose?

sstidl avatar Jul 09 '21 17:07 sstidl

@gillesdubois: Can you look?

Neustradamus avatar Aug 23 '21 15:08 Neustradamus