mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 22:35:51 +00:00
feat: 支持自托管的 remote-control-server (#214)
* feat: 支持自托管的 remote-control-server (#214) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
32
packages/remote-control-server/Dockerfile
Normal file
32
packages/remote-control-server/Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# ---- Stage 1: Install deps + build ----
|
||||
FROM oven/bun:1 AS builder
|
||||
WORKDIR /app
|
||||
|
||||
ARG VERSION=0.1.0
|
||||
|
||||
COPY packages/remote-control-server/package.json ./package.json
|
||||
RUN bun install
|
||||
|
||||
COPY packages/remote-control-server/src ./src
|
||||
RUN bun build src/index.ts --outfile=dist/server.js --target=bun \
|
||||
--define "process.env.RCS_VERSION=\"${VERSION}\""
|
||||
|
||||
# ---- Stage 2: Runtime ----
|
||||
FROM oven/bun:1-slim AS runtime
|
||||
|
||||
ARG VERSION=0.1.0
|
||||
ENV RCS_VERSION=${VERSION}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/dist/server.js ./dist/server.js
|
||||
COPY packages/remote-control-server/web ./web
|
||||
|
||||
VOLUME /app/data
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||
CMD bun run -e "fetch('http://localhost:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"
|
||||
|
||||
CMD ["bun", "run", "dist/server.js"]
|
||||
Reference in New Issue
Block a user