-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
62 lines (52 loc) · 1.59 KB
/
Dockerfile.dev
File metadata and controls
62 lines (52 loc) · 1.59 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
FROM node:24.14-alpine
WORKDIR /app
# Create project directory forvolume mount
RUN mkdir -p /project
# Install build dependencies
RUN apk add --no-cache \
python3 \
make \
g++ \
curl \
git
# Copy package files (use simplified package for Docker)
COPY package.json ./package.json
# Create/copy tsconfig
RUN if [ -f package.json ]; then echo "Found package"; fi && \
echo '{ \
"compilerOptions": { \
"target": "ES2022", \
"module": "ES2022", \
"lib": ["ES2022"], \
"outDir": "./dist", \
"rootDir": "./src", \
"strict": true, \
"esModuleInterop": true, \
"skipLibCheck": true, \
"forceConsistentCasingInFileNames": true, \
"resolveJsonModule": true, \
"declaration": true, \
"declarationMap": true, \
"sourceMap": true, \
"moduleResolution": "node" \
}, \
"include": ["src"], \
"exclude": [ \
"dist", \
"node_modules", \
"**/*.test.ts", \
"src/test-harness.ts", \
"src/index.ts", \
"src/mcp-server.ts" \
] \
}' > tsconfig.json
# Install dependencies (minimal set for MVP)
RUN npm install
# Copy source
COPY src ./src
# Create health check endpoint (use .cjs for CommonJS)
RUN echo 'const express = require("express"); const app = express(); app.get("/health", (req, res) => res.json({ status: "ok", uptime: process.uptime(), service: "graph-server" })); const server = app.listen(9001, "0.0.0.0", () => console.log("[Health] Listening on port 9001"));' > health.cjs
# Expose ports
EXPOSE 9000 9001
# Build TypeScript and start both servers
CMD npm run build && (node health.cjs &) && node dist/server.js