-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (34 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
45 lines (34 loc) · 1.26 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
FROM node:22-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy package files first for better layer caching
COPY package*.json ./
COPY tsconfig.json ./
# Install dependencies without running prepare script
RUN npm ci --ignore-scripts
# Copy source code
COPY . .
# Build TypeScript now that source files are available with increased memory limit
RUN NODE_OPTIONS="--max-old-space-size=4096" npm run build
# Create necessary directories with appropriate permissions
RUN mkdir -p /credentials /app/logs && \
chmod 700 /credentials && \
chmod 755 /app/logs
# Create volume for credentials
VOLUME ["/credentials"]
# Environment variables
# Note: *_PATH vars are file paths, not secrets - Docker warning is a false positive
ENV GDRIVE_OAUTH_PATH=/credentials/gcp-oauth.keys.json
ENV GDRIVE_TOKEN_STORAGE_PATH=/credentials/.gdrive-mcp-tokens.json
ENV GDRIVE_TOKEN_AUDIT_LOG_PATH=/app/logs/gdrive-mcp-audit.log
ENV NODE_ENV=production
# Health check - using the built-in health check functionality
HEALTHCHECK --interval=5m --timeout=10s --start-period=30s --retries=3 \
CMD ["node", "dist/health-check.js"]
# Run the MCP server
CMD ["node", "dist/index.js"]