-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.datastores.yml
More file actions
70 lines (65 loc) · 2.15 KB
/
Copy pathdocker-compose.datastores.yml
File metadata and controls
70 lines (65 loc) · 2.15 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
# Intuition Core — datastores only.
#
# docker compose -f docker-compose.datastores.yml up -d
#
# Brings up the datastores the backend runs on — two Postgres databases
# (knowledge graph + Timescale event store) and Redis — with healthchecks so
# dependent services can wait on them. Connection strings match example.env.
# This is the minimal-tier foundation; services are layered on top in the
# full docker-compose.yml.
name: intuition-core
services:
# PostgreSQL knowledge graph — atoms, triples, accounts, predicates.
#
# Uses the timescaledb-ha image (TimescaleDB + pgvector + PostGIS) rather than
# plain Postgres because the KG schema needs BOTH: `kg.events` is a TimescaleDB
# hypertable (with an `events_hourly` continuous aggregate), and the Search
# tier adds pgvector embedding columns. One image covers both.
postgres-kg:
image: timescale/timescaledb-ha:pg17
environment:
POSTGRES_USER: intuition
POSTGRES_PASSWORD: intuition
POSTGRES_DB: intuition_kg
ports:
- "${POSTGRES_KG_HOST_PORT:-5432}:5432"
volumes:
- postgres_kg_data:/home/postgres/pgdata/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U intuition -d intuition_kg"]
interval: 5s
timeout: 5s
retries: 10
# TimescaleDB — event store hypertable, markets, positions, leaderboards.
# The -ha image bundles TimescaleDB + pgvector + PostGIS.
timescale:
image: timescale/timescaledb-ha:pg17
environment:
POSTGRES_USER: intuition
POSTGRES_PASSWORD: intuition
POSTGRES_DB: intuition_timescale
ports:
- "${TIMESCALE_HOST_PORT:-5433}:5432"
volumes:
- timescale_data:/home/postgres/pgdata/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U intuition -d intuition_timescale"]
interval: 5s
timeout: 5s
retries: 10
# Redis — indexer leader election.
redis:
image: redis:7-alpine
ports:
- "${REDIS_HOST_PORT:-6379}:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 10
volumes:
postgres_kg_data:
timescale_data:
redis_data: