install pihole at docker swarm with nfs share


I’m using portainer

This is my stack

version: "3.7"
services:
  pihole:
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'Asia/Jakarta'
      WEBPASSWORD: 'password'
    volumes:
      - 'pihole.vol:/etc/pihole/'
      - 'pihole.dns:/etc/dnsmasq.d/'

volumes:
  pihole.vol:
    driver: local
    driver_opts:
      type: "nfs"
      o: addr=192.168.0.13,nolock,soft,rw
      device: ":/media/fdisk/container/pihole2/pihole"
      
  pihole.dns:
    driver: local
    driver_opts:
      type: "nfs"
      o: addr=192.168.0.13,nolock,soft,rw
      device: ":/media/fdisk/container/pihole2/dnsmasq.d"

Don’t forget to mkdir pihole and dnsmasq.d in share directory

Install node-red in docker swarm with share data in nfs


I’m using portainer

Please read my note before this for setting nfs

This is my docker stack ‘

version: "3.7"

services:
  node-red:
    image: nodered/node-red:latest
    environment:
      - TZ=Asia/Jakarta
    ports:
      - "1880:1880"
    networks:
      - node-red-net
    volumes:
      - nodered.vol:/data
    user: root:root

volumes:
  nodered.vol:
    driver: local
    driver_opts:
      type: "nfs"
      o: addr=192.168.0.13,nolock,soft,rw
      device: ":/media/fdisk/nodered/"

networks:
  node-red-net:

If you have permission problem when you running your stack in nfs share maybe you can add user:root:root in your stack it works for me

Happy Coding

Salam Ngoprek