I have mounted a Hetzner storage box CIFS volume to my server to /mnt/sbox1, and now I want to make a docker container use it to store downloads on it. My/etc/fstab
mounts the drive on startup using the following command:
//u[REDACTED].your-storagebox.de/backup /mnt/sbox1 cifs iocharset=utf8,rw,credentials=/etc/backup-credentials.txt,x-systemd.automount,uid=0,gid=0,file_mode=0777,dir_mode=0777 0 0
Then in my Portainer instance, I'm using the following stack:
version: '3'
services:
service.simpletorrent:
image: boypt/cloud-torrent
restart: unless-stopped
ports:
- "3002:3000"
environment:
AUTH: "[REDACTED]:[REDACTED]"
TITLE: "MySimpleTorrent"
volumes:
- storagebox-share/simpletorrent/torrent-downloads:/srv/downloads
- storagebox-share/simpletorrent/cloud-torrent.yaml:/etc/cloud-torrent.yaml
command: ["-c", "/etc/cloud-torrent.yaml"]
volumes:
storagebox-share:
driver_opts:
type: cifs
o: "username=u[REDACTED],password=[REDACTED],addr=u[REDACTED].your-storagebox.de"
device: "u[REDACTED].your-storagebox.de/backup"
Running it as is throws the following error:
Failure failed to deploy a stack: Named volume "storagebox-share/simpletorrent/torrent-downloads:/srv/downloads:rw" is used in service "service.simpletorrent" but no declaration was found in the volumes section. : exit status 1
After searching around, people seem to suggest using a relative path instead. This seems to work since it deploys, but no data seems to be present in the specified directories of the drive. For example, no cloud-torrent.yaml
file is visible but the WebGUI of the container is online, so I'm guessing that it falls back to some default directory somewhere?
How can I debug this? The logs for this image are not very helpful.