-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
202 lines (177 loc) · 8.86 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
---
#
# docker-compose.yml: Docker Utilities for Plex (Duplex) contains a Docker Compose
# configuration tailored for a Synology NAS environments, simplifying the setup process
# for managing Plex Media Server by integrating several useful tools and utilities.
#
# Tools Included:
# - Kometa: Manages metadata in Plex Media Server.
# - ImageMaid: Cleans photos in Plex Media Server.
# - PATTRMM: Creates chronological 'Returning Soon' and 'In-History' collections
# - Tautulli: Provides monitoring and tracking tools for Plex Media Server.
# - Notifiarr: Provides notifications for applications and websites
# - Watchtower: Automates Docker container base image updates.
#
# For more information about Kometa, visit: https://kometa.wiki/en/nightly/
# For more information about ImageMaid, visit: https://kometa.wiki/en/nightly/kometa/scripts/imagemaid/
# For more information about PATTRMM, visit: https://github.com/InsertDisc/pattrmm
# For more information about Tautulli, visit: https://github.com/Tautulli/Tautulli
# For more information about Notifiarr, visit: https://notifiarr.wiki/en/home
# For more information about Watchtower, visit: https://github.com/containrrr/watchtower
#
#
# Docker Compose version on the target system
#
version: "2.9"
#
# Setup default properties for all or most containers
#
x-default-container: &default-container # YAML anchor for default container
pull_policy: always # Ensure that the image is always pulled
restart: unless-stopped # Restart the container unless explicitly stopped
logging: # Configure container logging options
driver: "json-file" # Use JSON file logging driver
options:
max-size: ${LOG_MAX_SIZE} # Maximum file size for logs files
max-file: ${LOG_MAX_FILE} # Maximum number of log files to retain
#
# Setup default variables for all or most containers
#
x-default-environment: &default-environment # YAML anchor for default environment
TZ: ${TZ} # Set the appropriate timezone
#
# Define the services section
#
services:
#
# Define the 'kometa' service
#
kometa:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: kometateam/kometa:${KOMETA_TAG} # Run using the specified tag
container_name: kometa-${KOMETA_TAG} # Append Docker image tag to container name
hostname: kometa # Set the container hostname
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
KOMETA_DEBUG: ${KOMETA_DEBUG} # Toggles running with extra debug logs
KOMETA_TIMES: ${KOMETA_TIMES} # Set the times Kometa will run
# Mount host directories into the container
volumes:
- ${HOST_DUPLEX_CONFIG}/kometa:/config:rw # Mount config directory
#
# Define the 'imagemaid' service
#
imagemaid:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: kometateam/imagemaid:${IMAGE_MAID_TAG} # Run using the specified tag
container_name: imagemaid-${IMAGE_MAID_TAG} # Append Docker image tag to container name
hostname: imagemaid # Set the container hostname
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
# Mount host directories into the container
volumes:
- ${HOST_DUPLEX_CONFIG}/imagemaid:/config:rw # Mount config directory
- ${HOST_VOLUME}/PlexMediaServer/AppData/Plex Media Server:/plex:rw # Mount plex directory
#
# Define the 'pattrmm' (Plex Assistant to the Regional Meta Manager) service
#
pattrmm:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: ghcr.io/insertdisc/pattrmm:${PATTRMM_TAG} # Run using the specified tag
container_name: pattrmm-${PATTRMM_TAG} # Append Docker image tag to container name
hostname: pattrmm # Set the container hostname
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
PATTRMM_TIME: ${PATTRMM_TIME} # Set scheduled run time
PUID: ${PATTRMM_PUID} # Set uid from ssh session
GUID: ${PATTRMM_PGID} # Set gid from ssh session
# Mount host directories into the container
volumes:
- ${HOST_DUPLEX_CONFIG}/pattrmm/data:/data:rw # Data directory
- ${HOST_DUPLEX_CONFIG}/pattrmm/preferences:/preferences:rw # Preferences directory
- ${HOST_DUPLEX_CONFIG}/kometa:/config:rw # Kometa config directory
#
# Define the 'tautulli' service
#
tautulli:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: tautulli/tautulli:${TAUTULLI_TAG} # Run using the specified tag
container_name: tautulli-${TAUTULLI_TAG} # Append Docker image tag to container name
hostname: tautulli # Set the container hostname
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
PUID: ${TAUTULLI_PUID} # Set uid from ssh session
PGID: ${TAUTULLI_PGID} # Set gid from ssh session
# Define the host and container ports
ports:
- "${TAUTULLI_PORT}:8181"
# Mount host directories into the container
volumes:
- ${HOST_DUPLEX_CONFIG}/tautulli:/config:rw # Mount config directory
#
# Define the 'notifiarr' service
#
notifiarr:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: golift/notifiarr:${NOTIFIARR_TAG} # Run using the specified tag
container_name: notifiarr-${NOTIFIARR_TAG} # Append Docker image tag to container name
hostname: notifiarr # Set the container hostname
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
# Define the host and container ports
ports:
- "${NOTIFIARR_PORT}:5454"
# Mount host directories into the container
volumes:
- ${HOST_DUPLEX_CONFIG}/notifiarr:/config:rw # Mount config directory
- /var/run/utmp:/var/run/utmp:ro # Used to count logged in users
- /etc/machine-id:/etc/machine-id:ro # Used to uniquely identify the host
- /etc/localtime:/etc/localtime:ro # Setup container with the proper timezone
#
# Define the 'watchtower' service
#
watchtower:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: containrrr/watchtower:${WATCHTOWER_TAG} # Run using the specified tag
container_name: watchtower-${WATCHTOWER_TAG} # Append Docker image tag to container name
hostname: watchtower # Set the container hostname
# Add container labels
labels:
- "com.centurylinklabs.watchtower.enable=false" # Exclude container from (run once) Watchtower
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment
WATCHTOWER_POLL_INTERVAL: ${WATCHTOWER_POLL_INTERVAL} # Set how often to check for new images
WATCHTOWER_CLEANUP: ${WATCHTOWER_CLEANUP} # Clean old images afer updates
WATCHTOWER_INCLUDE_STOPPED: ${WATCHTOWER_INCLUDE_STOPPED} # Update stopped containers as well
WATCHTOWER_REVIVE_STOPPED: ${WATCHTOWER_REVIVE_STOPPED} # Start stopped containers after update
WATCHTOWER_NOTIFICATIONS: ${WATCHTOWER_NOTIFICATIONS} # Send notifications for updates
WATCHTOWER_NOTIFICATION_URL: ${WATCHTOWER_NOTIFICATION_URL} # URL for webhook notifications
# Mount host directories into the container
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw # Allow container to talk to host Docker API
- /etc/localtime:/etc/localtime:ro # Setup container with the proper timezone
#
# Define the networks section
#
networks:
# Configure the default network
default:
name: ${COMPOSE_PROJECT_NAME} # Use the name of the compose project
ipam: # IP Address Management
driver: default # Use the default driver
config:
- subnet: ${COMPOSE_NETWORK_SUBNET} # Subnet in CIDR format that represents a network segment
ip_range: ${COMPOSE_NETWORK_IP_RANGE} # Range of IPs from which to allocate container IPs
gateway: ${COMPOSE_NETWORK_GATEWAY} # Gateway for the master subnet