Problems with adding volumes in docker

Good afternoon.
We use k8s Rancher in the company and all docker related work is done in rancher web.
Rancher web has a thing called Persistent Volume Claim inside.
In the normal version, for example, themes and storage folders are specified with the path where they are located on the container and this Persistent Volume Claim is added, after which the information is also stored on this disk.
But in the case of OctoberCMS, as soon as you add a virtual disk (Persistent Volume Claim) to the themes or storage folder, OctoberCMS no longer sees this space. Respectively, all the files have disappeared from these locations and therefore it is impossible to save anything, because in principle the entire framework does not work.
Maybe someone has worked with OctoberCMS and Rancher Web k8s? And can you explain how you can add a virtual disk there so that, firstly, the information appears (because it now disappears immediately after adding the virtual disk), and secondly, so that OctoberCMS is saved on the virtual disk after content changes?

Folders that need to be added to the virtual disk:

  • /srv/ept/storage
  • /srv/ept/themes

P.S. In the pure Laravel framework, everything works correctly regarding Persistent Volume Claim and no such problems have been observed there.

Do things change if you set the RESTRICT_BASE_DIR env var to false?

1 Like

Yes, I write in env file “RESTRICT_BASE_DIR= false”
And added Persistent Volume Claime but also get a empty themes folder after added volume (PVC).
Also added photos, how it looks. But this is from other OctoberCMS project.

pvc2

This is very unpleasant, because it turns out that with every delivery from GitLab, it turns out that you have to remove the PVC and then copy the files back and forth using the terminal.
In a normal version, like in pure Laravel, create a tag in GitLab and add it to Rancher and that’s it.

Can someone please help with this question and has anyone encountered incorrect operation of virtual disks on k8s (rancher k8s)?