update docker file

This commit is contained in:
musistudio
2025-07-30 21:48:47 +08:00
parent 7978f1abae
commit 3a12fdffb1
2 changed files with 19 additions and 10 deletions

View File

@@ -1,13 +1,10 @@
version: "3.8" version: "3.8"
services: services:
claude-code-reverse: claude-code-router:
build: . build: .
ports: ports:
- "3456:3456" - "3456:3456"
environment: volumes:
- ENABLE_ROUTER=${ENABLE_ROUTER} - ~/.claude-code-router:/root/.claude-code-router
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL}
- OPENAI_MODEL=${OPENAI_MODEL}
restart: unless-stopped restart: unless-stopped

View File

@@ -2,11 +2,23 @@ FROM node:20-alpine
WORKDIR /app WORKDIR /app
COPY package*.json ./ # Copy all files
RUN npm i
COPY . . COPY . .
# Install pnpm globally
RUN npm install -g pnpm
# Install dependencies
RUN pnpm install --frozen-lockfile
# Fix rollup optional dependencies issue
RUN cd ui && npm install
# Build the entire project including UI
RUN pnpm run build
# Expose port
EXPOSE 3456 EXPOSE 3456
CMD ["node", "index.mjs"] # Start the router service
CMD ["node", "dist/cli.js", "start"]