-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (34 loc) · 1.19 KB
/
Copy pathDockerfile
File metadata and controls
47 lines (34 loc) · 1.19 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
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Prevent Python from writing pyc files and buffering stdout/stderr
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Install system dependencies (if needed)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY mcp_handlers.py cloud_mcp_server.py ./
# Create logs directory
RUN mkdir -p logs
# Set runtime environment variables
ENV PORT=8000 \
HOST=0.0.0.0 \
MCP_TRANSPORT=http \
MCP_PATH=/mcp \
MCP_APP_NAME="EST-Call-Agent-Cloud" \
API_BASE_URL="https://python-server-est-production.up.railway.app"
# Note: ORGANIZATION_API_KEY and ORGANIZATION_ID are NOT set as environment variables
# for security. They must be provided via request headers in production.
# Expose port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
# Run the server
CMD ["python", "cloud_mcp_server.py"]