-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
162 lines (151 loc) · 5.23 KB
/
docker-compose.yaml
File metadata and controls
162 lines (151 loc) · 5.23 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
153
154
155
156
157
158
159
160
161
162
version: "3.8"
# Define a network for services to communicate
networks:
mcp-network:
driver: bridge
services:
mcpverse-db: # Reverted name
image: postgres:15-alpine
container_name: mcpverse_db
environment:
POSTGRES_USER: ${POSTGRES_USER:-mcpuser}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-mcpverse_db}
ports:
- "${DB_HOST_PORT:-5432}:5432" # Allow overriding host port
volumes:
- postgres_data:/var/lib/postgresql/data # Persist database data
networks:
- mcp-network # Connect to the custom network
restart: unless-stopped
mcpverse-cache: # Reverted name
image: redis:7-alpine
container_name: mcpverse_cache
ports:
- "${REDIS_HOST_PORT:-6379}:6379" # Allow overriding host port
# command: redis-server --requirepass your_redis_password # Uncomment to set password
networks:
- mcp-network
restart: unless-stopped
mcpverse-pubsub: # New service for Pub/Sub
image: redis:7-alpine
container_name: mcpverse_pubsub
ports:
- "${REDIS_PUBSUB_HOST_PORT:-6380}:6379" # Use a different host port (e.g., 6380)
# command: redis-server --requirepass your_redis_password # Optional password
networks:
- mcp-network
restart: unless-stopped
mcpverse-server: # Reverted original service name
build:
dockerfile: mcp-server/Dockerfile
context: ./
environment:
NODE_ENV: ${NODE_ENV:-development}
PORT: ${MCP_SERVER_PORT:-4000}
REDIS_URL: redis://mcpverse-cache:6379
REDIS_PUBSUB_URL: redis://mcpverse-pubsub:6379
JWT_ACCESS_TOKEN_EXPIRES_IN: ${JWT_ACCESS_TOKEN_EXPIRES_IN:-1h}
JWT_SECRET: ${JWT_SECRET}
SERVICE_URL: http://mcpverse-service:5000
UNLIMITED_RATE_LIMIT_ENABLED: true
LOG_LEVEL: ${LOG_LEVEL:-debug}
ports:
- "${MCP_SERVER_HOST_PORT:-4000}:4000" # Allow overriding host port
volumes:
- ./mcp-server/src:/app/src
- ./mcp-server/tsconfig.json:/app/tsconfig.json
depends_on:
- mcpverse-cache
- mcpverse-pubsub
- mcpverse-service
networks:
- mcp-network
command: npm run dev
restart: unless-stopped
deploy:
replicas: 1
mcpverse-service: # Reverted original service name
build:
dockerfile: mcp-service/Dockerfile
context: ./
environment:
NODE_ENV: ${NODE_ENV:-development}
PORT: ${MCP_SERVICE_PORT:-5000}
DATABASE_URL: postgresql://${POSTGRES_USER:-mcpuser}:${POSTGRES_PASSWORD}@mcpverse-db:5432/${POSTGRES_DB:-mcpverse_db}
REDIS_URL: redis://mcpverse-cache:6379
JWT_ACCESS_TOKEN_EXPIRES_IN: ${JWT_ACCESS_TOKEN_EXPIRES_IN:-1h}
JWT_SECRET: ${JWT_SECRET}
ports:
- "${MCP_SERVICE_HOST_PORT:-5000}:5000" # Allow overriding host port
volumes:
- ./mcp-service/src:/app/src
- ./mcp-service/prisma:/app/prisma
- ./mcp-service/tsconfig.json:/app/tsconfig.json
depends_on:
- mcpverse-db
- mcpverse-cache
networks:
- mcp-network
command: npm run dev
restart: unless-stopped
deploy:
replicas: 1
mcpverse-query-service: # Reverted original service name
build:
dockerfile: mcp-query-service/Dockerfile
context: ./
environment:
NODE_ENV: ${NODE_ENV:-development}
PORT: ${MCP_QUERY_SERVICE_PORT:-4001}
DATABASE_URL: postgresql://${POSTGRES_USER:-mcpuser}:${POSTGRES_PASSWORD}@mcpverse-db:5432/${POSTGRES_DB:-mcpverse_db}
REDIS_URL: redis://mcpverse-cache:6379
REDIS_PUBSUB_URL: redis://mcpverse-pubsub:6379
JWT_ACCESS_TOKEN_EXPIRES_IN: ${JWT_ACCESS_TOKEN_EXPIRES_IN:-1h}
JWT_SECRET: ${JWT_SECRET}
UI_VISIBILITY_DELAY_MINUTES: ${UI_VISIBILITY_DELAY_MINUTES:-1}
ports:
- "${MCP_QUERY_SERVICE_HOST_PORT:-4001}:4001" # Allow overriding host port
volumes:
- ./mcp-query-service/src:/app/src
- ./mcp-query-service/prisma:/app/prisma
- ./mcp-query-service/tsconfig.json:/app/tsconfig.json
depends_on:
- mcpverse-db
- mcpverse-cache
- mcpverse-pubsub
networks:
- mcp-network
command: npm run dev
restart: unless-stopped
deploy:
replicas: 1
mcpverse-worker: # Reverted original service name
build:
dockerfile: mcp-worker/Dockerfile.dev
context: ./
environment:
WORKERS: ${WORKERS:-message,reaction,visibility,chat-room,publication,agent,metrics,stream,impact}
NODE_ENV: ${NODE_ENV:-development}
DATABASE_URL: postgresql://${POSTGRES_USER:-mcpuser}:${POSTGRES_PASSWORD}@mcpverse-db:5432/${POSTGRES_DB:-mcpverse_db}
REDIS_URL: redis://mcpverse-cache:6379
REDIS_PUBSUB_URL: redis://mcpverse-pubsub:6379
SERVICE_URL: http://mcpverse-service:5000
TIME_DILATATION_COST_PER_MESSAGE_MS: ${TIME_DILATATION_COST_PER_MESSAGE_MS:-2000}
UI_VISIBILITY_DELAY_MINUTES: ${UI_VISIBILITY_DELAY_MINUTES:-1}
LOG_LEVEL: ${LOG_LEVEL:-info}
volumes:
- ./mcp-worker/src:/app/src
- ./mcp-worker/prisma:/app/prisma
- ./mcp-worker/tsconfig.json:/app/tsconfig.json
depends_on:
- mcpverse-db
- mcpverse-cache
- mcpverse-pubsub
networks:
- mcp-network
restart: unless-stopped
deploy:
replicas: 1
volumes:
postgres_data: # Define the named volume for persistence