-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
96 lines (86 loc) · 4.41 KB
/
Copy pathdocker-compose.yml
File metadata and controls
96 lines (86 loc) · 4.41 KB
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
#
# docker-compose.yml: Calibre Web Automated Deployment for Synology NAS
#
# This Docker Compose configuration streamlines the setup and management of Calibre Web Automated,
# an automated web-based eBook library management system that allows you to organize and access your eBooks,
# metadata, and more. Designed for use on a Synology NAS, this setup ensures
# optimal performance, security, and easy updates.
#
# Features:
# - Automated deployment of Calibre Web Automated via Docker Compose.
# - Persistent storage for configuration, book ingestion, and library data.
# - Configurable network settings for seamless integration.
# - Health checks to ensure the service remains available.
# - Secure setup with privilege restrictions and logging controls.
#
# For setup instructions, troubleshooting, and additional configurations, visit:
# - Calibre Web Automated GitHub: https://github.com/crocodilestick/calibre-web-automated
# - Marius Guide: https://mariushosting.com/how-to-install-calibre-web-automated-on-your-synology-nas
#
version: "2.20"
#
# 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: on-failure:5 # Restart the container on failure up to 5 times
logging: # Configure container logging options
driver: "json-file" # Use JSON file logging driver
options: # Add container logging 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
PUID: ${DEFAULT_PUID} # Default user id mapping for containers
PGID: ${DEFAULT_PGID} # Default group id mapping for containers
#
# Standard healthcheck timing settings
#
x-default-healthcheck-settings: &default-healthcheck-settings # YAML anchor for healthcheck settings
interval: ${DEFAULT_HEALTHCHECK_INTERVAL} # Run the check at this interval
timeout: ${DEFAULT_HEALTHCHECK_TIMEOUT} # Fail if it exceeds this duration
start_period: ${DEFAULT_HEALTHCHECK_START_PERIOD} # Grace period before checks start
retries: 5 # Mark as unhealthy after 5 failures
#
# Define the services section
#
services:
#
# Define the 'calibre-web-automated' service
#
calibre-web-automated:
# Docker image and container information
<<: *default-container # Pull in the default container information
image: crocodilestick/calibre-web-automated:${CWA_TAG} # Use the specified tag
container_name: calibre-web-automated-${CWA_TAG} # Container name for identification
hostname: calibre-web-automated # Set the container hostname
# Command used to check container health
healthcheck:
test: ["CMD-SHELL", "nc -z 127.0.0.1 8083 || exit 1"] # Check if port 8083 is open
<<: *default-healthcheck-settings # Pull in default healthcheck settings
# Define the container environment
environment:
<<: *default-environment # Pull in the default environment information
# Define the host and container ports
ports:
- ${CWA_PORT}:8083 # Calibre Web Automated web UI port
# Mount host directories into the container
volumes:
- ${CWA_CONFIG_PATH}:/config:rw # Mount configuration directory
- ${CWA_INGEST_PATH}:/cwa-book-ingest:rw # Mount ingest directory
- ${CWA_LIBRARY_PATH}:/calibre-library:rw # Mount Calibre library directory
#
# Define the networks section
#
networks:
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
ip_range: ${COMPOSE_NETWORK_IP_RANGE} # Range of IPs to allocate
gateway: ${COMPOSE_NETWORK_GATEWAY} # Gateway for the network