-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.83 KB
/
docker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.83 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
version: '3.8'
services:
# ⚠️ WARNING: DO NOT SCALE THIS SERVICE ⚠️
#
# This service runs database migrations on startup. Running multiple
# instances simultaneously will cause race conditions and potential
# data corruption.
#
# DO NOT RUN: docker-compose up --scale tome=3
#
# While the migration system has locking to prevent concurrent execution,
# SQLite's file-based locking may not be reliable across all volume
# mount types (especially network mounts like NFS).
#
# For high availability:
# - Use blue-green deployment strategy
# - Run migrations as a separate step before deployment
# - Use a single instance with proper health checks
#
tome:
build: .
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- CALIBRE_DB_PATH=/calibre/metadata.db
# PUID/PGID: Customize user/group ID to match your host system
# This eliminates permission issues with mounted volumes
# Default: 1001:1001 (if not specified)
# Common values:
# - Linux first user: 1000:1000
# - NAS systems: varies (run 'id' on your system)
# - From issue #237: 1001:100
# Uncomment and set to your user's UID/GID:
# - PUID=1000
# - PGID=1000
volumes:
# Persist SQLite database
# Permissions are automatically fixed on container startup
# This includes /app/data and /app/.next for cache writes
# No manual chown required!
- tome-data:/app/data
# Mount your Calibre library (read-write for rating sync)
# Replace with your actual Calibre library path
- ./calibre-library:/calibre
restart: unless-stopped
volumes:
tome-data:
driver: local
# Permissions are automatically managed by the container
# The entrypoint sets ownership of /app/data and /app/.next to match PUID/PGID on startup