/
/
/
Ansible role that provisions my storage server.
1# Calibre Stack Docker Compose Configuration
2# Generated by Ansible - DO NOT EDIT MANUALLY
3
4version: '3.8'
5
6services:
7{% if calibre_server_enabled %}
8 calibre:
9 image: {{ calibre_image }}:{{ calibre_version }}
10 container_name: calibre
11 restart: unless-stopped
12
13 # Environment Configuration
14 env_file:
15 - .env
16
17 # Port Mapping
18 ports:
19 - "{{ calibre_server_host_port }}:{{ calibre_server_port }}"
20 # VNC ports for GUI access
21 - "8082:8080" # VNC web interface
22 - "8181:8181" # Calibre Content Server
23
24 # Volume Mounts
25 volumes:
26 - {{ calibre_server_config_dir }}:/config
27 - {{ calibre_library_dir }}:/books
28 - {{ arr_downloads_dir }}:/downloads # For importing downloaded books
29
30 # Resource Limits
31 deploy:
32 resources:
33 limits:
34 memory: {{ default_memory_limit }}
35 cpus: '{{ default_cpu_limit }}'
36
37 # Network
38 networks:
39 - {{ storage_docker_network }}
40
41 # Health Check
42 healthcheck:
43 test: ["CMD", "curl", "-f", "http://localhost:8181"]
44 interval: {{ health_check_interval }}
45 timeout: {{ health_check_timeout }}
46 retries: {{ health_check_retries }}
47 start_period: 60s
48{% endif %}
49
50{% if calibre_web_enabled %}
51 calibre-web:
52 image: {{ calibre_web_image }}:{{ calibre_web_version }}
53 container_name: calibre-web
54 restart: unless-stopped
55 {% if calibre_server_enabled %}
56 depends_on:
57 - calibre
58 {% endif %}
59
60 # Environment Configuration
61 env_file:
62 - .env
63
64 # Port Mapping
65 ports:
66 - "{{ calibre_web_host_port }}:{{ calibre_web_port }}"
67
68 # Volume Mounts
69 volumes:
70 - {{ calibre_web_config_dir }}:/config
71 - {{ calibre_library_dir }}:/books
72
73 # Resource Limits
74 deploy:
75 resources:
76 limits:
77 memory: {{ default_memory_limit }}
78 cpus: '{{ default_cpu_limit }}'
79
80 # Network
81 networks:
82 - {{ storage_docker_network }}
83
84 # Health Check
85 healthcheck:
86 test: ["CMD", "curl", "-f", "http://localhost:{{ calibre_web_port }}"]
87 interval: {{ health_check_interval }}
88 timeout: {{ health_check_timeout }}
89 retries: {{ health_check_retries }}
90 start_period: 30s
91{% endif %}
92
93networks:
94 {{ storage_docker_network }}:
95 external: true