Filesystem Mount inside Container
-
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.
-