Docker-Compose & CLI
¡Bienvenidos a Docker-Compose & CLI! En esta sección iré publicando los comandos que se pueden ejecutar en vuestro NAS vía SSH para instalar diferentes utilidades / herramientas mediante Docker o bien, ejecutando stack a través de Portainer.
En mi humilde opinión, es preferible instalar las aplicaciones vía Docker, ya que en caso de problema o incompatibilidad, bastará con eliminar el contenedor sin afectar al sistema de ficheros del propio sistema del NAS.
A medida que vaya publicando nuevos tutoriales o vaya encontrando Dockers de gran utilidad, los iré publicando en esta página.
Acceso rápido
Portainer - Morphos - Changedetection - Chibisafe - Dokémon - Jellyfin - Watcharr - Headscale - Tor Proxy - Outline - Ghosler - Plausible CE - Docker-Controller-Bot - Snapp - Dockge - Pingvin - Umami - 2Fauth - SpeedTest - Joplin - Plex - Wordpress - Pi.Alert - Authelia - Ghost - Home Assistant - NGINX Proxy Manager - AdGuard Home - WireGuard - Pi-Hole
Portainer
sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /volume1/docker/portainer:/data portainer/portainer-ce:latest
Morphos
Changedetection
Chibisafe
Dokémon
Jellyfin
Watcharr
Headscale
Exclusiva de HDS+ Investigación llevada a cabo por Iván.
Outline
Tor Proxy
Ghosler
Exclusiva de HDS+ Docker desarrollado por Dani G y Joan.
Plausible CE
Docker-Controller-Bot
Exclusiva de HDS+ Bot desarrollado por Dani G.
Snapp
Dockge
Pingvin
Umami
2Fauth
SpeedTest
Joplin con WebDAV
Plex
Wordpress
Pi.Alert
Authelia
Ghost 5 con MySQL 8
version: '3.8'
services:
ghost:
image: ghost:latest
container_name: ghost
restart: unless-stopped
depends_on:
- db
ports:
- 2368:2368
environment:
# see https://ghost.org/docs/config/#configuration-options
database__client: mysql
database__connection__host: db
database__connection__user: demouser
database__connection__password: demopassword
database__connection__database: ghostdemo
url: http://192.168.1.30:2368
#NODE_ENV: development
volumes:
- /volume1/docker/ghost:/var/lib/ghost/content
db:
image: mysql:latest
container_name: ghost-db
command: mysqld --default-authentication-plugin=mysql_native_password
restart: unless-stopped
ports:
- 3310:3306
environment:
# see https://hub.docker.com/_/mysql
MYSQL_ROOT_PASSWORD: PruebaGhost
MYSQL_DATABASE: ghostdemo
MYSQL_USER: demouser
MYSQL_PASSWORD: demopassword
volumes:
- /volume1/docker/mysql:/var/lib/mysql
Home Assistant
version: '3.3'
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:latest"
environment:
- TZ=Europe/Madrid
volumes:
- /PATH_TO_YOUR_CONFIG:/config
ports:
- '8123:8123'
restart: always
privileged: true
network_mode: host
Nginx Proxy Manager
version: "3"
services:
npm-app:
image: 'jc21/nginx-proxy-manager:latest'
container_name: npm-app
restart: unless-stopped
ports:
- '180:80' # Public HTTP Port
- '143:443' # Public HTTPS Port
- '81:81' # Admin Web Port
# Add any other Stream port you want to expose
# - '21:21' # FTP
environment:
DB_MYSQL_HOST: "npm-db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
# Uncomment the line below if IPv6 is not enabled on your host
# DISABLE_IPV6: 'true'
volumes:
- volume1/docker/nginx/data:/data
- volume1/docker/nginx/letsencrypt:/etc/letsencrypt
depends_on:
- npm-db
networks:
- npm-nw
- npm-internal
npm-db:
image: 'mariadb:latest'
container_name: npm-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- volume1/docker/nginx/data/mysql:/var/lib/mysql
networks:
- npm-internal
networks:
npm-internal:
npm-nw:
external: true
AdGuard Home
version: '3.3'
services:
adguardhome:
container_name: adguard
environment:
- TZ=Europe/Madrid
volumes:
- '/volume1/docker/adguard/config:/opt/adguardhome/conf'
- '/volume1/docker/adguard/data:/opt/adguardhome/work/data'
network_mode: host
restart: always
image: adguard/adguardhome
WireGuard
version: "3.8"
services:
wg-easy:
environment:
# ⚠️ Required:
# Change this to your host's public address
- WG_HOST=tuddns #ponemos nuestro DDNS sin puerto
# Optional:
- PASSWORD=tuPassword #la password superefectiva
- WG_PORT=51820
- WG_DEFAULT_ADDRESS=10.9.1.x # Puedes cambiar el rango, pero deja el ultimo como x
- WG_DEFAULT_DNS=IPdetuNAS #IP de tu nas para que actue Pihole
- WG_MTU=1420
- WG_ALLOWED_IPS=0.0.0.0/0, 192.168.x.x/24 #el valor de la red 192.168.x.x es opcional, ponlo si no puedes acceder a tus direcciones internas
- WG_PERSISTENT_KEEPALIVE=25
image: weejewel/wg-easy
container_name: wg-easy
volumes:
- /volume1/docker/wg-easy:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
restart: always
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
Pi-Hole
version: '3.7'
#volumes:
# etc_pihole-unbound:
# etc_pihole_dnsmasq-unbound:
services:
pihole:
container_name: pihole_oficial
image: pihole/pihole:latest
network_mode: host
hostname: pihole_oficial
dns:
- # IP DEL NAS
ports:
- 443:443/tcp
- 54:54/tcp
- 54:54/udp
- 80:80/tcp
environment:
ServerIP: #IP DEL NAS
TZ: Europe/Madrid # la zona horaria donde vivas
WEBPASSWORD: # LA PASSWORD Q QUIERAS
WEB_PORT: 4321
DNS1: 127.0.0.1#5335 # Hardcoded to our Unbound server
DNS2: 127.0.0.1#5335 # Hardcoded to our Unbound server
DNSSEC: "true" # Enable DNSSEC
volumes:
- /volume1/docker/pihole-unbound/dnsmasq.d-configs:/etc/dnsmasq.d:rw
- /volume1/docker/pihole-unbound/pihole-configs:/etc/pihole:rw
- /volume1/docker/pihole-unbound/dns/config/resolv.conf:/etc/resolv.conf:rw
restart: always