Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
180 lines (175 loc) · 7.77 KB
/
Copy pathdocker-compose.yml
File metadata and controls
180 lines (175 loc) · 7.77 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
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
services:
postgres:
image: pgvector/pgvector:pg18
restart: unless-stopped
shm_size: ${POSTGRES_SHM_SIZE:-8gb}
environment:
POSTGRES_USER: ${POSTGRES_USER:-prairie}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-prairie}
POSTGRES_DB: ${POSTGRES_DB:-prairie}
ports:
- "127.0.0.1:${POSTGRES_PORT:-5432}:5432"
volumes:
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/postgres:/var/lib/postgresql
command: ["postgres", "-c", "listen_addresses=*"]
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-prairie}"]
interval: 5s
timeout: 3s
retries: 5
redis:
image: redis:alpine
restart: unless-stopped
ports:
- "127.0.0.1:${REDIS_PORT:-6379}:6379"
volumes:
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
meilisearch:
# Pinned: Meilisearch will not open data written by another version.
image: ${MEILISEARCH_IMAGE:-getmeili/meilisearch:v1.54.0}
restart: unless-stopped
profiles: [search]
entrypoint:
- /bin/sh
- -euc
- |
if [ -z "$${MEILI_MASTER_KEY:-}" ]; then
echo "MEILI_MASTER_KEY is required when enabling the search profile" >&2
exit 1
fi
exec /bin/meilisearch
environment:
MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-}
MEILI_UPGRADE_DB: ${MEILI_UPGRADE_DB:-false}
ports:
- "${MEILISEARCH_HOST:-127.0.0.1}:${MEILISEARCH_PORT:-7700}:7700"
volumes:
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/meilisearch:/meili_data
prairie:
image: ${PRAIRIE_IMAGE:-ghcr.io/prairie-server/prairie-server:latest}
restart: unless-stopped
environment:
MODE: integrated
# Keep the container listeners fixed. PORT and JF_PORT in .env are
# host-side published-port overrides.
PORT: "8080"
JF_PORT: "8096"
# Master key for at-rest credential encryption. Required — the server
# refuses to start without it. Generate with: openssl rand -base64 48
# Back it up SEPARATELY from your database dumps; losing it makes encrypted
# secrets unrecoverable. See docs/architecture/secret-encryption.md.
SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env — generate one with openssl rand -base64 48}
DATABASE_URL: postgres://${POSTGRES_USER:-prairie}:${POSTGRES_PASSWORD:-prairie}@postgres:5432/${POSTGRES_DB:-prairie}?sslmode=disable
REDIS_URL: redis://redis:6379
PRAIRIE_PLUGIN_CACHE_DIR: /var/lib/prairie/plugins
POSTGRES_TUNE: ${POSTGRES_TUNE:-auto}
ports:
- "${PORT:-8090}:8080"
- "${JF_PORT:-8096}:8096"
- "${ABS_PORT:-13378}:13378"
volumes:
- ${MEDIA_ROOT:?Set MEDIA_ROOT in .env to the host media path}:${MEDIA_CONTAINER_ROOT:-/mnt/media}:ro
- ${MEDIA_BOOKS_ROOT:-${MEDIA_ROOT}}:${MEDIA_BOOKS_CONTAINER_ROOT:-${MEDIA_CONTAINER_ROOT:-/mnt/media}/books}:ro
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/plugins:/var/lib/prairie/plugins
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/artwork:/var/lib/prairie/artwork
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/compat:/var/lib/prairie/compat
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/transcode:/tmp/silo-transcode
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/catalog-seeds:/catalog-seeds:ro
- ${PRAIRIE_DATA_ROOT:-/opt/prairie}/audiobook-covers:/var/lib/prairie/audiobook-covers
# Only load-bearing when the Docker host is itself an LXC container, where
# these three files describe the physical machine and the LXC's own cap
# sits on a cgroup this container cannot see. lxcfs virtualizes them to the
# LXC's limits, so passing that view in is what makes CPU, load, and memory
# report this container's share instead of the whole machine's. Harmless
# everywhere else: on bare metal or a VM they are the same files Prairie would
# read anyway. Each is used independently, so dropping one only reverts
# that reading. See docs/architecture/observability.md#node-resource-sampling.
- /proc/meminfo:/host/proc/meminfo:ro
- /proc/stat:/host/proc/stat:ro
- /proc/loadavg:/host/proc/loadavg:ro
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file:
- path: .env
required: false
devices:
- /dev/dri:/dev/dri
# Optional distributed-mode example. Most single-host installs should
# just use the integrated service above.
# prairie-proxy:
# image: ${PRAIRIE_IMAGE:-ghcr.io/prairie-server/prairie-server:latest}
# restart: unless-stopped
# profiles: [proxy]
# environment:
# MODE: proxy
# # Must be the SAME SECRET_KEY as the primary node (shared encrypted data).
# SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env — generate one with openssl rand -base64 48}
# DATABASE_URL: postgres://${POSTGRES_USER:-prairie}:${POSTGRES_PASSWORD:-prairie}@postgres:5432/${POSTGRES_DB:-prairie}?sslmode=disable
# REDIS_URL: redis://redis:6379
# # Network access provider plugins run on proxies too. The proxy keeps
# # its own copies, rehydrated from the database, under this dir; it
# # does not need the primary node's plugin volume.
# PRAIRIE_PLUGIN_CACHE_DIR: /var/lib/prairie/plugins
# PORT: "8080"
# ports:
# - "${PROXY_PORT:-8083}:8080"
# volumes:
# - ${MEDIA_ROOT:?Set MEDIA_ROOT in .env to the host media path}:${MEDIA_CONTAINER_ROOT:-/mnt/media}:ro
# - ${PRAIRIE_DATA_ROOT:-/opt/prairie}/proxy-plugins:/var/lib/prairie/plugins
# # See the note on the integrated service above: a node reports its own
# # CPU, load, and memory rather than the physical machine's only with
# # these mounted, and the Nodes page reads exactly what the node reports.
# - /proc/meminfo:/host/proc/meminfo:ro
# - /proc/stat:/host/proc/stat:ro
# - /proc/loadavg:/host/proc/loadavg:ro
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# env_file:
# - path: .env
# required: false
# Optional distributed-mode example. Most single-host installs should
# just use the integrated service above.
# prairie-transcode:
# image: ${PRAIRIE_IMAGE:-ghcr.io/prairie-server/prairie-server:latest}
# restart: unless-stopped
# profiles: [transcode]
# environment:
# MODE: transcode
# # Must be the SAME SECRET_KEY as the primary node (shared encrypted data).
# SECRET_KEY: ${SECRET_KEY:?Set SECRET_KEY in .env — generate one with openssl rand -base64 48}
# DATABASE_URL: postgres://${POSTGRES_USER:-prairie}:${POSTGRES_PASSWORD:-prairie}@postgres:5432/${POSTGRES_DB:-prairie}?sslmode=disable
# REDIS_URL: redis://redis:6379
# PRAIRIE_PLUGIN_CACHE_DIR: /var/lib/prairie/plugins
# PORT: "8080"
# ports:
# - "${TRANSCODE_PORT:-8082}:8080"
# volumes:
# - ${MEDIA_ROOT:?Set MEDIA_ROOT in .env to the host media path}:${MEDIA_CONTAINER_ROOT:-/mnt/media}:ro
# - ${PRAIRIE_DATA_ROOT:-/opt/prairie}/plugins:/var/lib/prairie/plugins
# - ${PRAIRIE_DATA_ROOT:-/opt/prairie}/artwork:/var/lib/prairie/artwork
# - ${PRAIRIE_DATA_ROOT:-/opt/prairie}/transcode:/tmp/silo-transcode
# # See the note on the integrated service above: a node reports its own
# # CPU, load, and memory rather than the physical machine's only with
# # these mounted, and the Nodes page reads exactly what the node reports.
# - /proc/meminfo:/host/proc/meminfo:ro
# - /proc/stat:/host/proc/stat:ro
# - /proc/loadavg:/host/proc/loadavg:ro
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# env_file:
# - path: .env
# required: false