-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
152 lines (145 loc) · 3.95 KB
/
docker-compose.yml
File metadata and controls
152 lines (145 loc) · 3.95 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
141
142
143
144
145
146
147
148
149
150
151
152
version: '3.9'
services:
# ============================================
# PostgreSQL with pgvector and Apache AGE
# ============================================
neron-db:
build:
context: ./docker/postgres
dockerfile: Dockerfile
container_name: neron-db
restart: unless-stopped
environment:
POSTGRES_USER: ${DB_ADMIN_USER:-neron_admin}
POSTGRES_PASSWORD: ${DB_ADMIN_PASSWORD}
POSTGRES_DB: neron
DB_BOT_PASSWORD: ${DB_BOT_PASSWORD}
DB_WEBAPP_PASSWORD: ${DB_WEBAPP_PASSWORD:-${DB_BOT_PASSWORD}}
DB_READONLY_PASSWORD: ${DB_READONLY_PASSWORD:-${DB_BOT_PASSWORD}}
volumes:
- neron-db-data:/var/lib/postgresql/data
- ./docker/postgres/init:/docker-entrypoint-initdb.d
ports:
- "127.0.0.1:5432:5432"
networks:
- neron-net
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_ADMIN_USER:-neron_admin} -d neron"]
interval: 10s
timeout: 5s
retries: 5
# ============================================
# Telegram Bot
# ============================================
neron-bot:
build:
context: ./Neron-Bot
dockerfile: Dockerfile
container_name: neron-bot
restart: unless-stopped
depends_on:
neron-db:
condition: service_healthy
neron-ai:
condition: service_healthy
environment:
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
- ALLOWED_USERS=${ALLOWED_TELEGRAM_USERS:-1890816031}
- DB_HOST=neron-db
- DB_PORT=5432
- DB_NAME=neron
- DB_USER=${DB_BOT_USER:-neron_bot}
- DB_PASSWORD=${DB_BOT_PASSWORD}
- AI_SERVICE_URL=http://neron-ai:8080
networks:
- neron-net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ============================================
# MCP Server + OAuth
# ============================================
neron-mcp:
build:
context: ./Neron-MCP
dockerfile: Dockerfile
container_name: neron-mcp
restart: unless-stopped
depends_on:
neron-db:
condition: service_healthy
neron-ai:
condition: service_healthy
environment:
- DB_HOST=neron-db
- DB_PORT=5432
- DB_NAME=neron
- DB_USER=${DB_BOT_USER:-neron_bot}
- DB_PASSWORD=${DB_BOT_PASSWORD}
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- MCP_AUTH_TOKEN=${MCP_AUTH_TOKEN}
- SERVER_DOMAIN=${MCP_DOMAIN:-mcp.neron.guru}
- AI_SERVICE_URL=http://neron-ai:8080
ports:
- "127.0.0.1:8000:8000"
- "127.0.0.1:8001:8001"
networks:
- neron-net
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# ============================================
# AI Services (Transcription, Embeddings, Chat)
# ============================================
neron-ai:
build:
context: ./docker/ai-services
dockerfile: Dockerfile
container_name: neron-ai
restart: unless-stopped
environment:
- VOYAGE_API_KEY=${VOYAGE_API_KEY}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
ports:
- "127.0.0.1:8080:8080"
networks:
- neron-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
# ============================================
# Reverse Proxy (Caddy)
# ============================================
neron-caddy:
image: caddy:2-alpine
container_name: neron-caddy
restart: unless-stopped
depends_on:
- neron-mcp
- neron-ai
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy-data:/data
- caddy-config:/config
- ./logs/caddy:/var/log/caddy
networks:
- neron-net
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
neron-net:
driver: bridge
volumes:
neron-db-data:
caddy-data:
caddy-config: