-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 1.13 KB
/
Copy pathDockerfile
File metadata and controls
34 lines (24 loc) · 1.13 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
FROM node:20-slim
ENV PATH="/usr/local/bin:${PATH}"
ENV QODERCLI_BIN="/usr/local/bin/qodercli"
# Install qodercli globally — uses QODER_PERSONAL_ACCESS_TOKEN env var at runtime for auth.
# node:20-slim is Debian-based (glibc) which is required by qodercli's Bun runtime.
# Alpine (musl libc) is incompatible with Bun native binaries.
RUN npm install -g @qoder-ai/qodercli \
&& qodercli --version || true
# Disable qodercli auto-updates so it never tries to download a new version
# on startup inside the container (saves memory, eliminates update-induced delays).
RUN mkdir -p /root/.qoder \
&& echo '{"autoUpdates":false}' > /root/.qoder.json
WORKDIR /app
# Install production deps first (layer caching)
COPY package*.json ./
RUN npm ci --omit=dev
# Copy source
COPY src/ ./src/
EXPOSE 3000
ENV NODE_ENV=production
# Use a Node.js health check — no wget/curl needed, works on any base image
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health',r=>process.exit(r.statusCode===200?0:1)).on('error',_=>process.exit(1))"
CMD ["node", "src/server.js"]