mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-20 02:17:05 +00:00
feat(docker): add Docker/Compose setup for CCS dashboard
This commit is contained in:
1 parent
ca86772208
commit
a14c7f3f6b
6 files changed
+271
No files matched your search
@@ -0,0 +1,68 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM node:20-bookworm-slim AS build
|
||||
|
||||
SHELL ["/bin/bash", "-lc"]
|
||||
|
||||
ENV BUN_INSTALL=/usr/local/bun
|
||||
ENV PATH="$BUN_INSTALL/bin:$PATH"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl ca-certificates unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Dependency install layer (avoid running install scripts inside the image build)
|
||||
COPY package.json bun.lock bunfig.toml ./
|
||||
COPY ui/package.json ui/bun.lock ./ui/
|
||||
|
||||
RUN bun install --frozen-lockfile --ignore-scripts \
|
||||
&& (cd ui && bun install --frozen-lockfile --ignore-scripts)
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN bun run build:all
|
||||
|
||||
|
||||
FROM node:20-bookworm-slim AS runtime
|
||||
|
||||
SHELL ["/bin/bash", "-lc"]
|
||||
|
||||
ENV BUN_INSTALL=/usr/local/bun
|
||||
ENV PATH="$BUN_INSTALL/bin:/home/node/.opencode/bin:$PATH"
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl ca-certificates unzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -fsSL https://bun.sh/install | bash
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock ./
|
||||
RUN bun install --frozen-lockfile --production --ignore-scripts
|
||||
|
||||
COPY docker/entrypoint.sh /usr/local/bin/ccs-entrypoint
|
||||
RUN chmod +x /usr/local/bin/ccs-entrypoint
|
||||
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/lib ./lib
|
||||
COPY --from=build /app/config ./config
|
||||
COPY --from=build /app/scripts ./scripts
|
||||
COPY --from=build /app/README.md ./README.md
|
||||
COPY --from=build /app/LICENSE ./LICENSE
|
||||
|
||||
RUN npm install -g @google/gemini-cli @vibe-kit/grok-cli @anthropic-ai/claude-code \
|
||||
&& npm install -g @kaitranntt/ccs --force \
|
||||
&& su -s /bin/bash node -c 'curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path' \
|
||||
&& ln -sf /app/dist/ccs.js /usr/local/bin/ccs
|
||||
|
||||
ENV CCS_PORT=3000
|
||||
EXPOSE 3000 8317
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/ccs-entrypoint"]
|
||||
|
||||
CMD ["bash", "-c", "node dist/ccs.js config --port ${CCS_PORT}"]
|
||||
Reference in new issue
Block a user