-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
140 lines (132 loc) · 4.06 KB
/
docker-compose.yml
File metadata and controls
140 lines (132 loc) · 4.06 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
# =============================================================================
# OpenRabbit — Docker Compose (Development + Self-Host)
#
# Usage:
# docker compose up -d # Start infra services
# docker compose --profile dev up -d # Start infra + smee relay
#
# Per ADR-0008: application code runs natively on the host during dev.
# =============================================================================
name: openrabbit
services:
# ---------------------------------------------------------------------------
# PostgreSQL 16
# ---------------------------------------------------------------------------
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: openrabbit
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: openrabbit
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U openrabbit" ]
interval: 5s
timeout: 5s
retries: 10
networks:
- openrabbit_net
# ---------------------------------------------------------------------------
# Redis 7
# ---------------------------------------------------------------------------
redis:
image: redis:7-alpine
restart: unless-stopped
command: >
redis-server --appendonly yes --appendfsync everysec --maxmemory 512mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 10
networks:
- openrabbit_net
# ---------------------------------------------------------------------------
# Qdrant (Vector DB)
# ---------------------------------------------------------------------------
qdrant:
image: qdrant/qdrant:latest
restart: unless-stopped
ports:
- "6333:6333" # REST API
- "6334:6334" # gRPC
volumes:
- qdrant_data:/qdrant/storage
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:6333/health" ]
interval: 10s
timeout: 5s
retries: 10
networks:
- openrabbit_net
# ---------------------------------------------------------------------------
# Smee.io relay (local development webhook forwarding)
# Only started with: docker compose --profile dev up
# ---------------------------------------------------------------------------
smee:
image: node:18-alpine
restart: unless-stopped
command: >
sh -c "npm install -g smee-client &&
smee --url ${SMEE_URL} --target http://host.docker.internal:8000/api/webhooks/github"
extra_hosts:
- "host.docker.internal:host-gateway" # Linux compatibility
profiles:
- dev
networks:
- openrabbit_net
# ---------------------------------------------------------------------------
# Production application services (uncomment for full Docker deployment)
# ---------------------------------------------------------------------------
# api:
# build: .
# command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 2
# ports:
# - "8000:8000"
# env_file: .env
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - openrabbit_net
#
# worker_fast:
# build: .
# command: celery -A app.tasks.celery_app worker -Q fast_lane --concurrency=4 --loglevel=info
# env_file: .env
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - openrabbit_net
#
# worker_slow:
# build: .
# command: celery -A app.tasks.celery_app worker -Q slow_lane --concurrency=1 --loglevel=info
# env_file: .env
# depends_on:
# postgres:
# condition: service_healthy
# redis:
# condition: service_healthy
# networks:
# - openrabbit_net
volumes:
postgres_data:
redis_data:
qdrant_data:
networks:
openrabbit_net:
driver: bridge