Hello i’m trying to mount files from a qnap
directly in a docker-compose.yml with plex
I’m beginner and i’m trying to understand what i do…
That’s the part of a docker-compose.yml i’m trying to adapt at my case.
[root@docker docker-mirror]# cat nfs-compose.yml
version: "3.2"
services:
rsyslog:
image: jumanjiman/rsyslog
ports:
- "514:514"
- "514:514/udp"
volumes:
- type: volume
source: example
target: /nfs
volume:
nocopy: true
volumes:
example:
driver_opts:
type: "nfs"
o: "addr=10.40.0.199,nolock,soft,rw"
device: ":/docker/example"
And my try is :
version: "2.1"
services:
plex:
image: linuxserver/plex
container_name: plex
network_mode: host
environment:
- PUID=1001
- PGID=1001
- VERSION=docker
- UMASK_SET=022 #optional
- PLEX_CLAIM= #optional
volumes:
- /opt/docker/plex/config/:/config
- type: volume
source: souvenir
target: /plex/souvenir ## file from Nas
volume:
nocopy: true ## i don't want that the container download my file, i prefer keep them on Nas
volumes:
souvenir:
driver_opts:
type: "nfs"
o: "addr=xx.xxx.xx.xx,nolock,soft,rw"
device: ":/opt/docker/plex/data/prive/souvenir"
restart: unless-stopped
I have created an account on Nas, and on host only for plex it’s : media
I don’t know if i’m doing it well, but i’m trying my best.
I could put them on fstab, but i’m not sure that’s is a good idea of sharing all my file in Host.
And i have had problem in a Vm, that at reboot my nas files aren’t mount .
Sorry for my english, i’m trying my best.
Thank’s for help.
Ps: i’m trying to understand what i’m doing, so if someone car explains what i do wrong .
And i have to add more than one nfs share, how to add more than one .