chore: build from source instead of npm package
This commit is contained in:
parent
37047bd1af
commit
7c33b70122
2 changed files with 28 additions and 11 deletions
9
.dockerignore
Normal file
9
.dockerignore
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-server
|
||||||
|
.git
|
||||||
|
claude-data
|
||||||
|
cloudcli-data
|
||||||
|
workspace
|
||||||
|
*.log
|
||||||
|
.env*
|
||||||
30
Dockerfile
30
Dockerfile
|
|
@ -6,22 +6,30 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
jq ripgrep sqlite3 zip unzip tree vim-tiny curl git \
|
jq ripgrep sqlite3 zip unzip tree vim-tiny curl git \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Claude Code CLI globally
|
# Install Claude Code CLI and Taskmaster globally
|
||||||
RUN npm install -g @anthropic-ai/claude-code
|
RUN npm install -g @anthropic-ai/claude-code task-master-ai
|
||||||
|
|
||||||
# Install CloudCLI (claudecodeui) globally
|
WORKDIR /app
|
||||||
RUN npm install -g @cloudcli-ai/cloudcli
|
|
||||||
|
|
||||||
# Install Taskmaster MCP
|
# Install dependencies (separate layer for cache efficiency)
|
||||||
RUN npm install -g task-master-ai
|
COPY package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
# Create workspace and data dirs with correct ownership
|
# VITE_ vars must be present at build time (baked into frontend bundle)
|
||||||
RUN mkdir -p /home/node/workspace /home/node/.cloudcli \
|
ARG FORGEJO_BASE_URL=https://forge.wilddragon.net
|
||||||
&& chown -R node:node /home/node/
|
ENV VITE_FORGEJO_BASE_URL=${FORGEJO_BASE_URL}
|
||||||
|
|
||||||
|
# Copy source and build
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Create persistent data dirs with correct ownership
|
||||||
|
RUN mkdir -p /home/node/workspace /home/node/.cloudcli /home/node/.claude \
|
||||||
|
&& chown -R node:node /home/node/ \
|
||||||
|
&& chown -R node:node /app
|
||||||
|
|
||||||
USER node
|
USER node
|
||||||
WORKDIR /home/node
|
|
||||||
|
|
||||||
EXPOSE 3001
|
EXPOSE 3001
|
||||||
|
|
||||||
CMD ["cloudcli", "start", "--port", "3001"]
|
CMD ["node", "dist-server/server/index.js"]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue