Filesystem Mount inside Container
-
Im finding myself in the same situation, I have my volumes mounted as Filesytem volumes, but even with permissions set to Yellowtent, I can't cd into the folder or I can't access the file inside the volume directly.
I get "no such file or directory"
But by reading this thread, I see that the advice is to chown it to Cloudron user, not yellowtent, so Imma try that.
edit: well actually, the "cloudron" user is the yellowtent user on the host
so I'm not sure what else I can do to get this rolling.Cloudron volumes view :
From cloudron nocodb app :
from the terminal container :
With nocodb :
-
As you can deduce, I want to read that sqlite file that I symlinked inside /opt/amplifyukraine and then mounted as filesystem volume so that I can add it to the container, it all appears to work but the moment I want to get inside the mount and actualy read the file, or even just LS into the folder, I can't..
"no such file or directory"
-
I'm wondering if I'm doing anything wrong or if what i'm doing cannot be done ? and at the same time I'm so close to get it how I want, I hope I can do this with this static sqlite file
Maybe I shouldn't have mounted these volumes from /OPT and instead used /MNT or /SRV to have these filesystem mounts, does it matter ?
-
-
Well I don't know but /SRV with proper permissions (yellowtent) works !
I can finally see the content of the mount from the file manager.Maybe my problem is that I have to remount these volumes now that I changed ownership ?
anyway, will try some more but this is a good step forward :
-
it's working !!
I have nocodb reading this sqlite file and I can add layers of data on top while tg-archive is feeding new posts to the base itself,
tldr :
I have tg-archive running at /home/tg-archive/
there I have a site folder that sync from telegram and output static sites.
But I wanted to be able to have research, filtering, sorting with a simple front-end, that's where nocodb comes in.
All I did was a clean symlink for yellowtent user/group from /home/tg-archive/sites/telehunt/ to /srv/telehunt/
ln -s /home/tg-archive/sites/telehunt/ /srv/telehunt
sudo chown -h yellowtent:yellowtent telehunt/ inside /srv/
then I added this as filesystem mount in the volumes view pointing to /srv/telehunt/ with name telehuntsrv
next I attached this volume to the nocodb container, when it's running, I added the path to the sqlite file /media/telehuntsrv/data.sqlite
And voila
-
-
@Supaiku said in Filesystem Mount inside Container:
Not sure why it only works into the /srv/ directory though. Curious about that...
currently, the list of directories that can be mounted into apps is hardcoded. This is done for basic security. Like you wouldn't want /home or /etc of host mounted into app by mistake or maliciously.
-
@girish I actually discovered that what I thought had worked didn't, the symlinks to the mounted drive do not work (I had accidentally just used directories inside of directories that weren't properly symlinked, and there are also symlinked directories which do work), they give the same "hostPath does not exist" error even inside /srv/ (and also inside their non-symlinked mount point inside media)
Why wouldn't these mount points be visible to cloudron?
/etc/fstab line:
UUID=29608fe1-0f6c-4326-b10f-94750492ba49 /media/r00buntu/Data ext4 defaults,users,rw,auto 0 0
As you can see it's mounted within /media
But it's also symlinked within the srv directory for example: /srv/rzn-bk/backups-sym and when trying to add that it won't add. Same goes for just /srv/backups-symAll host path does not exist...
-
@Supaiku on Cloudron, the only way to expose paths from host into apps is to use Volumes.
If you want to manage the mount on host yourself, first add a Volume using
File system (mountpoint)
- https://docs.cloudron.io/volumes/#filesystem-mountpoint . If possible, I would actually use one of the "managed" mount types instead of editing fstab directly, but I don't know your setup.After you have created the volume, you have to then "mount" this into whichever app(s) you want - https://docs.cloudron.io/apps/#mounts
-
@girish I also use the volume in my linux install on my home server for other services, so it's mounted when the server boots up
trying to add it via the filesystem mountpoint results in the same error:
It is a EXT4 formatted disk, so I tried that one and got this:
Perhaps because it's already mounted?
I'll find an extra drive and hook it up and see if I can get it work with something fresh.
-
@Supaiku When I needed filesystems mount a few months ago (on top of sshfs mounts) I remember I struggled quite a bit to mount filesystems folders, but one thing worked :
- Create /srv/YourFolder
- Symlink that folder to the folder you want on the filesystem
- mount that path inside Cloudron
That's how I read SQLite files from other apps from say NocoDB or other cloudron apps.
-
-