-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (98 loc) · 3.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
104 lines (98 loc) · 3.07 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
# =============================================================================
# AXIS — local stack.
#
# Phase 3 brings the api service online; the worker lands in Phase 4.
#
# Usage:
# docker compose up -d # full stack
# docker compose up -d db redis # data plane only
# docker compose logs -f api
# =============================================================================
name: axis
services:
api:
build:
context: .
target: runtime
container_name: axis-api
environment:
AXIS_ENV: ${AXIS_ENV:-development}
AXIS_LOG_LEVEL: ${AXIS_LOG_LEVEL:-INFO}
AXIS_DB_DSN: postgresql+asyncpg://${POSTGRES_USER:-axis}:${POSTGRES_PASSWORD:-axis}@db:5432/${POSTGRES_DB:-axis}
AXIS_REDIS_URL: redis://redis:6379/0
AXIS_JWT_SECRET: ${AXIS_JWT_SECRET:-dev-only-replace-with-a-real-secret-of-32-or-more-bytes}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
ports:
- "${AXIS_PORT:-8000}:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
worker:
build:
context: .
target: runtime
container_name: axis-worker
command: ["arq", "axis.ingestion.tasks.WorkerSettings"]
environment:
AXIS_ENV: ${AXIS_ENV:-development}
AXIS_LOG_LEVEL: ${AXIS_LOG_LEVEL:-INFO}
AXIS_DB_DSN: postgresql+asyncpg://${POSTGRES_USER:-axis}:${POSTGRES_PASSWORD:-axis}@db:5432/${POSTGRES_DB:-axis}
AXIS_REDIS_URL: redis://redis:6379/0
AXIS_JWT_SECRET: ${AXIS_JWT_SECRET:-dev-only-replace-with-a-real-secret-of-32-or-more-bytes}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
db:
# pgvector image bundles Postgres 16 + the pgvector extension required by
# the semantic-search path (ADR-0001). Avoids hand-rolling an init script.
image: pgvector/pgvector:pg16
container_name: axis-db
environment:
POSTGRES_USER: ${POSTGRES_USER:-axis}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-axis}
POSTGRES_DB: ${POSTGRES_DB:-axis}
# Required by pgvector for HNSW index builds on larger embedding sets.
POSTGRES_INITDB_ARGS: "--data-checksums"
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- axis_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-axis} -d ${POSTGRES_DB:-axis}"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: axis-redis
command:
- redis-server
- --save
- "60"
- "1000"
- --appendonly
- "yes"
ports:
- "${REDIS_PORT:-6379}:6379"
volumes:
- axis_redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
volumes:
axis_pgdata:
name: axis_pgdata
axis_redisdata:
name: axis_redisdata