forked from metatool-ai/metamcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
197 lines (185 loc) · 6.24 KB
/
docker-compose.yml
File metadata and controls
197 lines (185 loc) · 6.24 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
services:
app:
container_name: metamcp
image: ghcr.io/metatool-ai/metamcp:latest
pull_policy: always
env_file:
- .env
ports:
- "12008:12008"
environment:
# Postgres connection details
POSTGRES_HOST: ${POSTGRES_HOST:-postgres}
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
POSTGRES_USER: ${POSTGRES_USER:-metamcp_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-m3t4mcp}
POSTGRES_DB: ${POSTGRES_DB:-metamcp_db}
# Database configuration (composed from above vars)
DATABASE_URL: postgresql://${POSTGRES_USER:-metamcp_user}:${POSTGRES_PASSWORD:-m3t4mcp}@${POSTGRES_HOST:-postgres}:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-metamcp_db}
# Application URL configuration
APP_URL: ${APP_URL:-http://localhost:12008}
NEXT_PUBLIC_APP_URL: ${APP_URL:-http://localhost:12008}
# Auth configuration
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET:-your-super-secret-key-change-this-in-production}
# Docker networking fix
TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL: ${TRANSFORM_LOCALHOST_TO_DOCKER_INTERNAL:-true}
# ========================================================================
# Bootstrap Configuration Examples
# ========================================================================
# Multiple Users - Define different users with different roles
# BOOTSTRAP_USERS: |
# [
# {
# "email": "admin@company.com",
# "password": "admin-secure-password",
# "name": "System Administrator"
# },
# {
# "email": "developer@company.com",
# "password": "dev-secure-password",
# "name": "Lead Developer"
# },
# {
# "email": "analyst@company.com",
# "password": "analyst-secure-password",
# "name": "Data Analyst"
# }
# ]
# API Keys - Assign keys to specific users using user_email
# BOOTSTRAP_API_KEYS: |
# [
# {
# "name": "Admin Production Key",
# "is_public": false,
# "user_email": "admin@company.com"
# },
# {
# "name": "Developer Key",
# "is_public": false,
# "user_email": "developer@company.com"
# },
# {
# "name": "Analyst Key",
# "is_public": false,
# "user_email": "analyst@company.com"
# },
# {
# "name": "Public API Key",
# "is_public": true
# }
# ]
# Namespaces - Create user-specific workspaces
# BOOTSTRAP_NAMESPACES: |
# [
# {
# "name": "Admin Workspace",
# "description": "Administrator's private workspace",
# "is_public": false,
# "user_email": "admin@company.com",
# "update": true
# },
# {
# "name": "Development",
# "description": "Development environment",
# "is_public": false,
# "user_email": "developer@company.com",
# "update": true
# },
# {
# "name": "Analytics",
# "description": "Data analytics workspace",
# "is_public": false,
# "user_email": "analyst@company.com",
# "update": true
# },
# {
# "name": "Shared Resources",
# "description": "Public shared namespace",
# "is_public": true,
# "update": true
# }
# ]
# Endpoints - Configure endpoints with different owners and auth settings
# Note: Endpoints can optionally specify which namespace they should be created in
# BOOTSTRAP_ENDPOINTS: |
# [
# {
# "name": "admin-api",
# "description": "Admin-only API endpoint",
# "namespace": "Production",
# "enable_auth": true,
# "enable_auth_query": false,
# "enable_auth_oauth": true,
# "is_public": false,
# "user_email": "admin@company.com",
# "update": true
# },
# {
# "name": "dev-api",
# "description": "Development API endpoint",
# "namespace": "Development",
# "enable_auth": true,
# "enable_auth_query": true,
# "enable_auth_oauth": false,
# "is_public": false,
# "user_email": "developer@company.com",
# "update": true
# },
# {
# "name": "analytics-api",
# "description": "Analytics API endpoint",
# "namespace": "Analytics",
# "enable_auth": true,
# "enable_auth_query": false,
# "enable_auth_oauth": false,
# "is_public": false,
# "user_email": "analyst@company.com",
# "update": true
# },
# {
# "name": "public-api",
# "description": "Public API endpoint - no auth required",
# "namespace": "Shared Resources",
# "enable_auth": false,
# "enable_auth_query": false,
# "enable_auth_oauth": false,
# "is_public": true,
# "update": true
# }
# ]
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres:
condition: service_healthy
restart: "no"
networks:
- metamcp-network
postgres:
image: postgres:16-alpine
container_name: metamcp-pg
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB:-metamcp_db}
POSTGRES_USER: ${POSTGRES_USER:-metamcp_user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-m3t4mcp}
ports:
- "${POSTGRES_EXTERNAL_PORT:-9433}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-metamcp_user} -d ${POSTGRES_DB:-metamcp_db}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- metamcp-network
volumes:
postgres_data:
driver: local
networks:
metamcp-network:
driver: bridge