papermerge/papermerge-core

PM 2.1.x not able to mount DB & Redis outsie docker path

olli0815 opened this issue · 0 comments

Hi,

I use docker with the latest PM stack (in general the git stack).

One challenge; I like to separate the data part form the appl.-part.
Therefore I (successfully) mounted the media & Index files and dir to own, permanent docker volumes (bind mounts to NFS-shares). All fine.

But trying to do the same with the DB and/or Redis volume I get the following error within deployment of the Backend services:

Created Error response from daemon:
failed to copy file info for /var/lib/docker/volumes/postgres_data/_data:
failed to chown /var/lib/docker/volumes/postgres_data/_data: lchown
/var/lib/docker/volumes/postgres_data/_data: operation not permitted.

for redis and postgres I can only use the docker-generated volumes in:
/var/lib/docker/volumes/ without further bindings to external FS.

owner within docker path is Mr. coredump:

`...root@PaperMerge:~# ls -la /var/lib/docker/volumes/pm21*
/var/lib/docker/volumes/pm21_media_root:
total 18
drwx-----x 3 root root 4 Jan 7 12:05 .
drwx-----x 7 root root 8 Jan 7 12:05 ..
drwxrwxrwx 5 nobody nogroup 12 Jan 7 15:02 _data
-rw------- 1 root root 96 Jan 7 12:05 opts.json

/var/lib/docker/volumes/pm21_postgres_data:
total 18
drwx-----x 3 root root 3 Jan 7 12:05 .
drwx-----x 7 root root 8 Jan 7 12:05 ..
drwx------ 19 systemd-coredump systemd-coredump 26 Jan 7 12:06 _data

/var/lib/docker/volumes/pm21_redis_data:
total 10
drwx-----x 3 root root 3 Jan 7 12:05 .
drwx-----x 7 root root 8 Jan 7 12:05 ..
drwxr-xr-x 2 systemd-coredump systemd-coredump 3 Jan 7 16:03 _data

/var/lib/docker/volumes/pm21_xapian_index:
total 18
drwx-----x 3 root root 4 Jan 7 12:05 .
drwx-----x 7 root root 8 Jan 7 12:05 ..
drwxrwxrwx 5 nobody nogroup 12 Jan 7 15:02 _data
-rw------- 1 root root 96 Jan 7 12:05 opts.json`

any ideas to get get db & redis deployed on a bind mount?
Can I map Dr. coredump to GID 1000 or similar?