-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (100 loc) · 3.35 KB
/
docker-compose.yml
File metadata and controls
110 lines (100 loc) · 3.35 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
services:
# MCP Oracle Server - HTTP-based MCP server
mcp-oracle:
build:
context: .
dockerfile: Dockerfile
args:
# Oracle Instant Client Download URL (BUILD-TIME variable)
# REPLACE THIS LINE (line 12) with your direct download link:
- ORACLE_CLIENT_DOWNLOAD_URL=${ORACLE_CLIENT_DOWNLOAD_URL:-https://download.oracle.com/otn_software/linux/instantclient/2326000/instantclient-basic-linux.x64-23.26.0.0.0.zip}
container_name: mcp-oracle-server
environment:
# Oracle Database Configuration
- ORACLE_USER=${ORACLE_USER}
- ORACLE_PASS=${ORACLE_PASS}
- ORACLE_CONN=${ORACLE_CONN}
# Oracle Connection Pool Configuration
- ORACLE_POOL_MIN=${ORACLE_POOL_MIN:-2}
- ORACLE_POOL_MAX=${ORACLE_POOL_MAX:-10}
- ORACLE_POOL_INCREMENT=${ORACLE_POOL_INCREMENT:-1}
- ORACLE_POOL_TIMEOUT=${ORACLE_POOL_TIMEOUT:-60}
- ORACLE_QUEUE_TIMEOUT=${ORACLE_QUEUE_TIMEOUT:-60000}
# NL2SQL Service Configuration
- NL2SQL_URL=http://nl2sql-service:8500/query
# Web Server Configuration
- PORT=3000
- ENABLE_WEB_SERVER=true
# MCP Configuration
- MCP_API_KEY=${MCP_API_KEY}
- MCP_REQUEST_TIMEOUT=${MCP_REQUEST_TIMEOUT:-30000}
# Logging Configuration
- LOG_LEVEL=${LOG_LEVEL:-info}
# CORS Configuration
- CORS_ORIGIN=${CORS_ORIGIN:-*}
# Request Size Limit
- MAX_REQUEST_SIZE=${MAX_REQUEST_SIZE:-10mb}
volumes:
- ./logs:/app/logs
ports:
- "${PORT:-3000}:3000"
networks:
- backend
restart: always
depends_on:
- nl2sql-service
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# NL2SQL FastAPI Service (Placeholder)
# This is a placeholder service for natural language to SQL conversion
# Replace this with your actual NL2SQL service by:
# 1. Updating the build context to point to your NL2SQL service
# 2. Or replacing the image with your pre-built NL2SQL service image
# 3. Or commenting out this service if you don't need NL2SQL functionality
nl2sql-service:
build:
context: ./nl2sql-service
dockerfile: Dockerfile
container_name: nl2sql-service
ports:
- "8500:8500"
networks:
- backend
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8500/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Oracle Database (Optional - for local testing only)
# Uncomment and configure if you want to run a local Oracle instance
# Note: This uses gvenzl/oracle-free which is suitable for development/testing
# For production, use a managed Oracle database service
# oracle-db:
# image: gvenzl/oracle-free:latest
# container_name: oracle-db
# environment:
# - ORACLE_PASSWORD=${ORACLE_DB_PASSWORD:-oracle}
# ports:
# - "1521:1521"
# networks:
# - backend
# restart: always
# volumes:
# - oracle-data:/opt/oracle/oradata
# healthcheck:
# test: ["CMD", "healthcheck.sh"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 120s
networks:
backend:
driver: bridge
volumes:
oracle-data: