Add NFS configuration and documentation
This commit is contained in:
parent
da0dff9f1e
commit
3b4dbbc512
24
README.md
24
README.md
@ -15,3 +15,27 @@ docker-compose up -d
|
|||||||
```
|
```
|
||||||
|
|
||||||
All necessary images should be downloaded automatically and the service should be started in the background.
|
All necessary images should be downloaded automatically and the service should be started in the background.
|
||||||
|
|
||||||
|
## Start on boot
|
||||||
|
If you want to use NFS volumes mounted directly inside the container, it is highly recommended to use `systemd` to start the service on boot.
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Start jellyfin server through docker
|
||||||
|
After=docker.service network-online.target
|
||||||
|
Requires=docker.service network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/services/Jellyfin
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
ExecStartPre=/usr/bin/sleep 10
|
||||||
|
ExecStart=/usr/local/bin/docker-compose up -d
|
||||||
|
ExecStop=/usr/local/bin/docker-compose stop
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
Notice the `sleep` of 10 seconds, it seems like starting the process straight after boot fails because of some NFS confusion, adding a timer fixes the problem until a better solution is found.
|
||||||
|
@ -9,12 +9,26 @@ services:
|
|||||||
- PGID=1000
|
- PGID=1000
|
||||||
- TZ=Europe/Copenhagen
|
- TZ=Europe/Copenhagen
|
||||||
volumes:
|
volumes:
|
||||||
- /media/alpha/jellyfin/config:/config
|
- ./config:/config
|
||||||
- /media/alpha/jellyfin/tvshows:/data/tvshows
|
- tvshows:/data/tvshows
|
||||||
- /media/alpha/jellyfin/movies:/data/movies
|
- movies:/data/movies
|
||||||
ports:
|
ports:
|
||||||
- 8096:8096
|
- 8096:8096
|
||||||
- 8920:8920
|
- 8920:8920
|
||||||
- 7359:7359/udp
|
- 7359:7359/udp
|
||||||
- 1900:1900/udp
|
- 1900:1900/udp
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
movies:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: addr=10.10.0.12,nolock,soft,rw
|
||||||
|
device: ":/export/movies"
|
||||||
|
tvshows:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: addr=10.10.0.12,nolock,soft,rw
|
||||||
|
device: ":/export/tv_shows"
|
||||||
|
Loading…
Reference in New Issue
Block a user