-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
98 lines (91 loc) · 2.65 KB
/
Copy pathdocker-compose.yml
File metadata and controls
98 lines (91 loc) · 2.65 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
version: '3.8'
# Librarfree dev stack — Phase 0
# Brings up Postgres (with pgvector + pg_trgm), Meilisearch, MinIO (emulates R2), Redis.
# Start: docker compose up -d
# Stop: docker compose down
# Wipe: docker compose down -v
services:
postgres:
image: pgvector/pgvector:pg16
container_name: librarfree-postgres
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: librarfree
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./database/init-extensions.sql:/docker-entrypoint-initdb.d/00-init-extensions.sql
- ./database/schema.sql:/docker-entrypoint-initdb.d/10-schema.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d librarfree"]
interval: 10s
timeout: 5s
retries: 5
meilisearch:
image: getmeili/meilisearch:v1.7
container_name: librarfree-meilisearch
environment:
- MEILI_MASTER_KEY=changeme
- MEILI_NO_ANALYTICS=true
- MEILI_ENV=development
ports:
- "7700:7700"
volumes:
- meilisearch_data:/meili_data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7700/health"]
interval: 10s
timeout: 5s
retries: 5
minio:
image: minio/minio:latest
container_name: librarfree-minio
command: server /data --console-address ":9001"
environment:
MINIO_ROOT_USER: librarfree
MINIO_ROOT_PASSWORD: librarfree-dev-secret
ports:
- "9000:9000" # S3 API (R2-compatible)
- "9001:9001" # Web console
volumes:
- minio_data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
minio-setup:
image: minio/mc:latest
container_name: librarfree-minio-setup
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
mc alias set local http://minio:9000 librarfree librarfree-dev-secret;
mc mb --ignore-existing local/librarfree-books-content;
mc mb --ignore-existing local/librarfree-covers;
mc mb --ignore-existing local/librarfree-exports;
mc anonymous set download local/librarfree-covers;
echo 'MinIO buckets ready';
"
redis:
image: redis:7-alpine
container_name: librarfree-redis
command: ["redis-server", "--save", "60", "1", "--loglevel", "warning"]
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
meilisearch_data:
minio_data:
redis_data: