Repository navigation
Expand file tree
/
Copy pathdocker-compose.valkey.yml
More file actions
59 lines (55 loc) · 2.05 KB
/
Copy pathdocker-compose.valkey.yml
File metadata and controls
59 lines (55 loc) · 2.05 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
# Grimoire + Valkey page cache
#
# Valkey (Redis-compatible) keeps rendered PDF page images in memory for faster
# repeat loads. Recommended for large libraries or multi-user setups.
# Without Valkey, rendered pages are cached to disk under DATA_PATH instead.
#
# Valkey also holds sign-in lockout counters and OIDC sign-in state, so it is
# password-protected. Put a password in a .env file next to this one first
# (hex, so it needs no escaping in the URL below):
# echo "VALKEY_PASSWORD=$(openssl rand -hex 24)" > .env
#
# Usage:
# docker compose -f docs/docker/docker-compose.valkey.yml up -d
services:
grimoire:
image: hunterreadca/grimoire:latest
container_name: grimoire
restart: unless-stopped
ports:
- "9481:9481"
environment:
- LIBRARY_PATH=/library
- DATA_PATH=/data
- WORKERS=1
# Optional — JWT signing key. Leave unset and Grimoire generates one and
# persists it under DATA_PATH. Set it explicitly (openssl rand -hex 32)
# if you run multiple replicas that do not share DATA_PATH.
# - SECRET_KEY=
# The password goes in the URL's user-info part: redis://:<password>@host.
- VALKEY_URL=redis://:${VALKEY_PASSWORD:?set VALKEY_PASSWORD in .env}@valkey:6379/0
volumes:
# Writable so you can manage files from inside Grimoire. Append ":ro" to
# keep the library read-only (in-app file management and sidecar export
# are then unavailable; everything else works the same).
- /path/to/your/library:/library
- /path/to/grimoire/data:/data
depends_on:
- valkey
networks:
- grimoire
valkey:
image: valkey/valkey:8-alpine
container_name: grimoire-valkey
restart: unless-stopped
# No port is published, but any container on this network could otherwise
# read and write it - reset lockout counters, plant page images.
command: ["valkey-server", "--requirepass", "${VALKEY_PASSWORD:?set VALKEY_PASSWORD in .env}"]
volumes:
- valkey_data:/data
networks:
- grimoire
volumes:
valkey_data:
networks:
grimoire: