xfreshmanx / synodocker

docker-compose files for Synology

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

synodocker

This is my docker-compose repo for spinning up Docker services on Synology NAS (DS1515+ with DSM6.x). There are three accompanying medium.com stories that relate to this repo that cover:

  1. Configuring DDNS with Cloudflare and generating a TLS certificate
  2. Configuring macvlan networking on Synology for Docker containers
  3. Configuring pi-hole - medium.com

Docker Services for farmerbean.dev

Service environment variables are in ~/.env

Services

  • lazydocker
  • portainer 1.24.x
  • pi-hole
  • YoutubeDL-Material
  • phpipam
  • MySQL (for phpipam)
  • nginx webLB (for external health-checks)

Start/Stop Services

     sudo docker-compose up -d <service>
     sudo docker-compose down -d <service>

Updating Services

    sudo docker-compose pull <service>
    sudo docker-compose up -d <service>

Networking

Refer to this story

Basic execution

I'm assuming your internal physical network is 192.168.1.x . Confine your internal DHCP scope if possible to avoid clashes when deploying your containers. The [ip] commands deal with creating a virtual lan that bridges your physical network, the docker network commands deal with understanding what the host (physical) network looks like:

    ip link add macvlan0 link eth0 type macvlan mode bridge
    ip addr add 192.168.1.192/27 dev macvlan0 # 192.168.1.192 - 192.168.1.223 255.255.255.224

Then (synoservices is the name of the docker network here)

    sudo docker network create --driver=macvlan --gateway=192.168.1.1 --subnet=192.168.1.0/24 —-ip-range=192.168.1.192/27 --o parent=eth0 synoservices

You can remove this afterwards running:

    sudo docker network remove synoservices

Written with StackEdit.

About

docker-compose files for Synology


Languages

Language:Shell 100.0%