OCSInventory-NG / OCSInventory-Docker-Image

Docker image for OCSInventory Server
GNU General Public License v3.0
76 stars 93 forks source link

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

Open sstidl opened 3 years ago

sstidl commented 3 years ago

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?

gillesdubois commented 3 years ago

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 commented 3 years ago

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.

sstidl commented 3 years ago

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

sstidl commented 3 years ago

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?

Neustradamus commented 3 years ago

@gillesdubois: Can you look?