0% found this document useful (0 votes)
33 views

Docker Compose

Uploaded by

_locka
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Docker Compose

Uploaded by

_locka
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 8

version: "3.

9"

########################### NETWORKS
# You may customize the network subnet (192.168.89.0/24) below as you please.
# Docker Compose version 3.5 or higher required to define networks this way.

networks:
default:
driver: bridge
npm_proxy:
name: npm_proxy
driver: bridge
ipam:
config:
- subnet: 192.168.89.0/24

########################### EXTENSION FIELDS


# Helps eliminate repetition of sections
# More Info on how to use this:
https://github.com/htpcBeginner/docker-traefik/pull/228

# Common environment values


x-environment: &default-tz-puid-pgid
TZ: $TZ
PUID: $PUID
PGID: $PGID

# Keys common to some of the core services that we always to automatically restart
on failure
x-common-keys-core: &common-keys-core
networks:
- npm_proxy
security_opt:
- no-new-privileges:true
restart: always

# Keys common to some of the dependent services/apps


x-common-keys-apps: &common-keys-apps
networks:
- npm_proxy
security_opt:
- no-new-privileges:true
restart: always

# Keys common to some of the services in media-services.txt


x-common-keys-media: &common-keys-media
networks:
- npm_proxy
security_opt:
- no-new-privileges:true
restart: "no"

########################### SERVICES
services:

# Nginx Proxy Manager - Reverse Proxy with LetsEncrypt


npm:
<<: *common-keys-core # See EXTENSION FIELDS at the top
container_name: nginx-proxy-manager
image: 'jc21/nginx-proxy-manager:latest'
# For Static IP
networks:
# For Static IP
npm_proxy:
ipv4_address: 192.168.89.254
# You can specify a static IP
# For Dynamic IP
# networks:
# - npm_proxy
ports:
- '80:80' # Public HTTP Port. Port Forwarding on Router is ON.
- '443:443' # Public HTTPS Port. Port Forwarding on Router is ON.
- '81:81' # Admin Web Port. Port Forwarding on Router is OFF. Internal Home
Network Access only - 192.168.89.254:81.
volumes:
- $DOCKERDIR/appdata/npm/config:/config
- $DOCKERDIR/appdata/npm/letsencrypt:/etc/letsencrypt
- $DOCKERDIR/appdata/npm/data:/data
#certbot:
#image: certbot/certbot
environment:
DB_SQLITE_FILE: "/config/database.sqlite"
DISABLE_IPV6: 'true'
restart: always

# LetsEncrypt certbot
certbot:
image: certbot/certbot

# Portainer - WebUI for Containers


portainer:
<<: *common-keys-core # See EXTENSION FIELDS at the top
container_name: portainer
image: portainer/portainer-ce:latest
command: -H unix:///var/run/docker.sock # Use Docker Socket Proxy and comment
this line out, for improved security.
# command: -H tcp://socket-proxy:2375 # Use this instead, if you have Socket
Proxy enabled.
# command: --admin-password
'$$2y$$05$$n/67zsUE5qP9FQpZKKbPTuWpTFhF/CErXDdLPumOW5wqDLZO8.yyW'
networks:
- npm_proxy
ports: # Comment out if using Nginx Proxy Manager to access portainer WebUI.
- "9000:9000"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy and
comment this line out, for improved security.
- $DOCKERDIR/appdata/portainer_new/data:/data # Change to local directory if
you want to save/transfer config locally.
environment:
- TZ=$TZ

# nzbget - Binary newsgrabber (NZB downloader)


nzbget:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/nzbget
container_name: nzbget
networks:
npm_proxy:
ipv4_address: 192.168.89.216
ports:
- "6789:6789"
volumes:
- $DOCKERDIR/appdata/nzbget:/config
- $DATADIR/media:/data/downloads
environment:
<<: *default-tz-puid-pgid

# TransmissionBT - Torrent Downloader


# For Proxmox LXC Containers - https://pve.proxmox.com/wiki/OpenVPN_in_LXC
transmission-vpn:
image: haugene/transmission-openvpn:latest
container_name: transmission-vpn
restart: always
networks:
npm_proxy:
ipv4_address: 192.168.89.169
ports:
- "9091:9091"
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
volumes:
- /etc/localtime:/etc/localtime:ro
- $DOCKERDIR/appdata/transmission-vpn/data:/data
- $DOCKERDIR/appdata/transmission-vpn/config:/config
- $DATADIR/media:/data/downloads
#- $DOCKERDIR/appdata/transmission-vpn/config/custom.ovpn:/etc/openvpn/custom/
default.ovpn:ro
environment:
<<: *default-tz-puid-pgid
OPENVPN_PROVIDER: PIA
OPENVPN_USERNAME: p3852755
OPENVPN_PASSWORD: Letm3in!
OPENVPN_CONFIG: ca_montreal
LOCAL_NETWORK: "$LOCAL_NETWORK"
UMASK_SET: 2
TRANSMISSION_RPC_AUTHENTICATION_REQUIRED: "true"
TRANSMISSION_RPC_HOST_WHITELIST: "127.0.0.1,$SERVER_IP"
TRANSMISSION_RPC_PASSWORD: $TRANSMISSION_RPC_PASSWORD
TRANSMISSION_RPC_USERNAME: $TRANSMISSION_RPC_USERNAME
TRANSMISSION_UMASK: 002
TRANSMISSION_RATIO_LIMIT: 1.00
TRANSMISSION_RATIO_LIMIT_ENABLED: "true"
TRANSMISSION_ALT_SPEED_DOWN: 40000
TRANSMISSION_ALT_SPEED_ENABLED: "false"
TRANSMISSION_ALT_SPEED_UP: 250
TRANSMISSION_SPEED_LIMIT_DOWN: 80000
TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED: "true"
TRANSMISSION_SPEED_LIMIT_UP: 500
TRANSMISSION_SPEED_LIMIT_UP_ENABLED: "true"
TRANSMISSION_INCOMPLETE_DIR: /data/torrents/incomplete
TRANSMISSION_INCOMPLETE_DIR_ENABLED: "true"
TRANSMISSION_WATCH_DIR: /data/torrents
TRANSMISSION_WATCH_DIR_ENABLED: "true"
TRANSMISSION_DOWNLOAD_DIR: /data/downloads
LOG_TO_STDOUT: "true"
TRANSMISSION_UTP_ENABLED: false

# jackett - Index support


jackett:
image: lscr.io/linuxserver/jackett:latest
container_name: jackett
networks:
npm_proxy:
ipv4_address: 192.168.89.89
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
- AUTO_UPDATE=true #optional
- RUN_OPTS=<run options here> #optional
volumes:
- $DOCKERDIR/appdata/jackett:/config
- $DATADIR/media:/downloads
ports:
- 9117:9117
restart: always

# NZBHydra2
nzbhydra2:
image: lscr.io/linuxserver/nzbhydra2:latest
container_name: nzbhydra2
networks:
npm_proxy:
ipv4_address: 192.168.89.90
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
volumes:
- $DOCKERDIR/appdata/nzbhydra2:/config
- $DATADIR/media:/downloads
ports:
- 5076:5076
restart: always

# Heimdall dashboard
heimdall:
image: lscr.io/linuxserver/heimdall:latest
container_name: heimdall
environment:
- PUID=$PUID
- PGID=$PGID
- TZ=$TZ
volumes:
- $DOCKERDIR/appdata/heimdall:/config
networks:
npm_proxy:
ipv4_address: 192.168.89.15
ports:
- 880:80
- 883:443
restart: always

# ispyagent DVR
# ispyagentdvr:
# image: doitandbedone/ispyagentdvr:latest
# container_name: ispyagentdvr
# volumes:
# - $DOCKERDIR/appdata/ispyagentdvr/config/:/agent/Media/XML
# - $DOCKERDIR/ispyagentdvr/media/:/agent/Media/WebServerRoot/Media
# - $DOCKERDIR/ispyagentdvr/commands/:/agent/Commands
# ports:
# - "8090:8090/tcp"
# - "3478:3478/udp"
# - "50000-50010:50000-50010/udp"
# environment:
# UID: $PUID
# GID: $PGID
# TZ: $TZ
# HOSTNAME: "dockerispyagentdvr"
# restart: unless-stopped

############################# PVRS

# Radarr - Movie management


radarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/radarr:nightly # latest tag was causing "Error parsing
column 45"
container_name: radarr
networks:
npm_proxy:
ipv4_address: 192.168.89.164
ports:
- "7878:7878"
volumes:
- $DOCKERDIR/appdata/radarr:/config
- $DATADIR/media:/data/downloads
- $DATADIR/media:/data/media
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
restart: always

# Sonarr - TV Shows management


sonarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/sonarr
container_name: sonarr
networks:
npm_proxy:
ipv4_address: 192.168.89.167
ports:
- "8989:8989"
volumes:
- $DOCKERDIR/appdata/sonarr:/config
- $DATADIR/downloads:/data/downloads
- $DATADIR/media:/data/media
- "/etc/localtime:/etc/localtime:ro"
environment:
<<: *default-tz-puid-pgid
restart: always

# Airsonic Advanced - Music Server


airsonic:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/airsonic-advanced
container_name: airsonic-advanced
ports:
- "4040:4040"
# - "4041:4041" #UPnp
volumes:
- $DOCKERDIR/appdata/airsonic/podcasts:/data/podcasts
- $DOCKERDIR/appdata/airsonic/playlists:/data/playlists
- $DOCKERDIR/appdata/airsonic/config:/config
- $DATADIR/local/music:/data/music
environment:
<<: *default-tz-puid-pgid
JAVA_OPTS: '-Dserver.forward-headers-strategy=native' # Optional - if you use a
reverse-proxy
restart: always

# Plex - Media Server


plexms:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: plexinc/pms-docker:public
restart: always
container_name: plexms
ports:
- "32400:32400/tcp"
- "3005:3005/tcp"
- "8324:8324/tcp"
- "32469:32469/tcp"
- "1900:1900/udp" # Conflicts with xTeVe and Synology default ports
- "32410:32410/udp"
- "32412:32412/udp"
- "32413:32413/udp"
- "32414:32414/udp"
# - "33400:33400" # If you use Plex Web Tools
#devices:
# - /dev/dri:/dev/dri # for hardware transcoding
volumes:
- $DOCKERDIR/appdata/plexms:/config
- $DATADIR/media:/media
- /dev/shm:/transcode
environment:
TZ: $TZ
HOSTNAME: "dockerPlex"
PLEX_CLAIM_FILE: $PLEX_CLAIM
PLEX_UID: $PUID
PLEX_GID: $PGID
ADVERTISE_IP: http://$SERVER_IP:32400/

############################# MEDIA FILE MANAGEMENT


# Bazarr - Subtitle Management
bazarr:
<<: *common-keys-media # See EXTENSION FIELDS at the top
image: lscr.io/linuxserver/bazarr
container_name: bazarr
ports:
- "6767:6767"
volumes:
- $DOCKERDIR/appdata/bazarr:/config
- $DATADIR/media:/mnt/nas/storage/media
environment:
<<: *default-tz-puid-pgid
restart: always

############################# UTILITIES

# Dozzle - Real-time Docker Log Viewer


dozzle:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: amir20/dozzle:latest
container_name: dozzle
networks:
- npm_proxy
ports:
- "8081:8080" # qBittorrent is using port 8080.
environment:
DOZZLE_LEVEL: info
DOZZLE_TAILSIZE: 300
DOZZLE_FILTER: "status=running"
# DOZZLE_FILTER: "label=log_me" # limits logs displayed to containers with this
label.
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this instead if you have Socket
Proxy enabled.
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Use Docker Socket Proxy and
comment this line for improved security.
restart: always

# File Browser - Explorer


filebrowser:
<<: *common-keys-core # See EXTENSION FIELDS at the top
image: filebrowser/filebrowser:s6
container_name: filebrowser
ports:
- "82:80" # 80 and 81 are used by Nginx Proxy Manager
volumes:
- $DOCKERDIR/appdata/filebrowser:/config
- $USERDIR:/srv
environment:
<<: *default-tz-puid-pgid
restart: always

############################# MAINTENANCE

# Docker-GC - Automatic Docker Garbage Collection


# Create docker-gc-exclude file
dockergc:
<<: *common-keys-apps # See EXTENSION FIELDS at the top
image: clockworksoul/docker-gc-cron:latest
container_name: docker-gc
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Use Docker Socket Proxy and
comment this line for improved security.
- $DOCKERDIR/appdata/docker-gc/docker-gc-exclude:/etc/docker-gc-exclude #
Create empty file
environment:
CRON: 0 0 0 * * ? # Everyday at midnight. Previously 0 0 * * *
FORCE_IMAGE_REMOVAL: 1
FORCE_CONTAINER_REMOVAL: 0
GRACE_PERIOD_SECONDS: 604800
DRY_RUN: 0
CLEAN_UP_VOLUMES: 1
TZ: $TZ
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this if you have Socket Proxy
enabled.
restart: always

# WatchTower - Automatic Docker Container Updates


watchtower:
<<: *common-keys-core # See EXTENSION FIELDS at the top
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Use Docker Socket Proxy and
comment this line for improved security.
environment:
TZ: $TZ
WATCHTOWER_CLEANUP: "true"
WATCHTOWER_REMOVE_VOLUMES: "true"
WATCHTOWER_INCLUDE_STOPPED: "true"
WATCHTOWER_NO_STARTUP_MESSAGE: "false"
WATCHTOWER_SCHEDULE: "0 30 12 * * *" # Everyday at 12:30
# DOCKER_HOST: tcp://socket-proxy:2375 # Use this if you have Socket Proxy
enabled.
DOCKER_API_VERSION: "1.40"
restart: always

You might also like