Docker compose file which runs all of my apps which running at my NAS for daily usage
- Install
docker
,docker-compose
on your server
- Portainer CE
- AdGuard Home
- OpenSpeedTest
- Homebridge
- qBittorrent
- Plex
- Sonarr
- Radarr
- Overseerr
- Jackett
- TAUTULLI
- Tailscale
- Zenko CloudServer
- Install docker and docker-compose
- Prepare
.env
by example of.env.example
- Run
docker-compose up -d
Most of setup configurations for Raspberry Pi
- https://askubuntu.com/a/662803 (SMB Credentials)
- https://help.ubuntu.com/community/MountWindowsSharesPermanently (SMB Credentials)
- https://gist.github.com/giordanocardillo/05a89065ff0843c6da116993e8f16913 (SMB Credentials)
- https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently (SMB + Mount)
- https://raspberrypi.stackexchange.com/a/33052
- https://askubuntu.com/a/1227429 (CIFS temporarily mount)
sudo mount.cifs //192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared -o rw,user=username,password=xyzf,nounix,sec=ntlmssp,file_mode=0777,dir_mode=0777
# or
sudo mount.cifs //192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared -o user=username,password=xyzf,uid=1000,gid=1000,vers=3.0,nounix
and you can test via command sudo mount -a
- https://askubuntu.com/a/662803 (SMB Credentials)
- https://help.ubuntu.com/community/MountWindowsSharesPermanently (SMB Credentials)
- https://gist.github.com/giordanocardillo/05a89065ff0843c6da116993e8f16913 (SMB Credentials)
- https://ubuntu.com/server/docs/how-to-mount-cifs-shares-permanently (SMB + Mount)
- https://askubuntu.com/a/1341879 (SMB/CIFS + Mount permanent mount)
- https://askubuntu.com/a/1372876 (Explanation)
Append following line into at end of /etc/stab
//192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,vers=3.0,nounix,noauto,x-systemd.automount
You can edit /etc/fstab
file by sudo nano /etc/fstab
, then reboot your device.
After reboot, check your path or run manually check via sudo mount -a
- https://www.reddit.com/r/docker/comments/ke3twe/comment/jxwtzyu
- https://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y
- Docker Service Edit
- https://docs.docker.com/reference/compose-file/services/#healthcheck
- https://docs.docker.com/compose/how-tos/startup-order
- https://askubuntu.com/a/1295943 (
fstab
trick) - Docker Service Edit
Follow here
TLDR:
[Unit]
-After=network-online.target docker.socket firewalld.service containerd.service time-set.target
+After=network-online.target docker.socket firewalld.service containerd.service time-set.target local-fs.target
Try sudo nano /etc/systemd/system/multi-user.target.wants/docker.service
(this path for Debian Raspberry) if above solution did not work
Follow here
TLDR:
[Unit]
-Requires=docker.socket
+Requires=docker.socket <your mount name>.mount
Follow here
TLDR:
-//192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,vers=3.0,nounix,noauto
+//192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,vers=3.0,nounix,noauto,x-systemd.automount
Follow here
TLDR:
-//192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,vers=3.0,nounix,noauto,x-systemd.automount
+//192.168.100.32/Media /home/pi/Desktop/docker-nas/data/shared cifs credentials=/home/pi/.smbcredentials,uid=1000,gid=1000,vers=3.0,nounix,noauto,x-systemd.automount,x-systemd.idle-timeout=60,x-systemd.mount-timeout=30