-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.55 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
services:
api:
build:
context: .
dockerfile: Dockerfile
container_name: chat-api
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-chatuser}:${POSTGRES_PASSWORD:-changeme}@postgres:5432/${POSTGRES_DB:-chatdb}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY:-}
OPENROUTER_MODEL: ${OPENROUTER_MODEL:-anthropic/claude-opus-4}
NOTION_TOKEN: ${NOTION_TOKEN:-}
NOTION_PAGE_ID: ${NOTION_PAGE_ID:-}
OTEL_SERVICE_NAME: ${OTEL_SERVICE_NAME:-chat-api}
OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-}
OTEL_SDK_DISABLED: ${OTEL_SDK_DISABLED:-true}
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
postgres:
image: postgres:16-alpine
container_name: chat-api-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-chatuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
POSTGRES_DB: ${POSTGRES_DB:-chatdb}
command: >
postgres
-c max_connections=50
-c shared_buffers=256MB
-c effective_cache_size=1GB
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-chatuser} -d ${POSTGRES_DB:-chatdb}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
volumes:
postgres_data:
driver: local