feat(docker): add integrated deployment commands

- add ccs docker subcommands for up, down, status, update, logs, and config
- bundle integrated docker assets and remote ssh deployment support
- add executor regression tests and root help/router coverage

Refs #812
This commit is contained in:
Tam Nhu Tran committed 2026-03-27 15:05:17 -04:00
1 parent 48da0f3538
commit 23f767b0c5
29 files changed
+1607

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
FROM eceasy/cli-proxy-api:latest
ARG CCS_NPM_VERSION=latest
RUN apk add --no-cache \
curl \
jq \
nodejs \
npm \
supervisor
RUN npm install -g @kaitranntt/ccs@${CCS_NPM_VERSION} \
&& ln -sf /usr/local/lib/node_modules/@kaitranntt/ccs/dist/docker/docker-bootstrap.js /usr/local/bin/ccs-docker-bootstrap
COPY supervisord.conf /etc/supervisord.conf
COPY entrypoint-integrated.sh /entrypoint-integrated.sh
RUN chmod +x /entrypoint-integrated.sh \
&& mkdir -p /var/log/ccs
EXPOSE 3000 8085 8317
ENTRYPOINT ["/entrypoint-integrated.sh"]
+32
View File
@@ -0,0 +1,32 @@
services:
ccs-cliproxy:
build:
context: .
dockerfile: Dockerfile.integrated
args:
CCS_NPM_VERSION: "${CCS_NPM_VERSION:-latest}"
image: ccs-cliproxy:latest
container_name: ccs-cliproxy
restart: unless-stopped
init: true
ports:
- "${CCS_DASHBOARD_PORT:-3000}:3000"
- "${CCS_CLIPROXY_PORT:-8317}:8317"
environment:
CCS_PORT: 3000
NODE_ENV: production
NO_COLOR: "${NO_COLOR:-}"
CCS_DEBUG: "${CCS_DEBUG:-}"
volumes:
- ccs_home:/root/.ccs
- ccs_logs:/var/log/ccs
healthcheck:
test: ["CMD-SHELL", "curl -fsS --max-time 2 http://localhost:3000/ >/dev/null && curl -fsS --max-time 2 http://127.0.0.1:8317/ >/dev/null"]
interval: 10s
timeout: 3s
retries: 12
start_period: 30s
volumes:
ccs_home:
ccs_logs:
+9
View File
@@ -0,0 +1,9 @@
#!/bin/sh
set -eu
LOG_DIR="/var/log/ccs"
mkdir -p /root/.ccs /root/.ccs/cliproxy "$LOG_DIR"
touch "$LOG_DIR/ccs-dashboard.log" "$LOG_DIR/cliproxy.log"
exec /usr/bin/supervisord -c /etc/supervisord.conf
+43
View File
@@ -0,0 +1,43 @@
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
[supervisord]
nodaemon=true
user=root
logfile=/var/log/supervisord.log
pidfile=/var/run/supervisord.pid
loglevel=info
[rpcinterface:supervisor]
supervisor.rpcinterface_factory=supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[program:cliproxy]
command=node /usr/local/bin/ccs-docker-bootstrap run-cliproxy
directory=/root
autostart=true
autorestart=true
startsecs=5
startretries=3
stderr_logfile=/var/log/ccs/cliproxy.log
stderr_logfile_maxbytes=0
stdout_logfile=/var/log/ccs/cliproxy.log
stdout_logfile_maxbytes=0
priority=10
[program:ccs-dashboard]
command=ccs config --host 0.0.0.0 --port 3000
directory=/root
autostart=true
autorestart=true
startsecs=10
startretries=3
stderr_logfile=/var/log/ccs/ccs-dashboard.log
stderr_logfile_maxbytes=0
stdout_logfile=/var/log/ccs/ccs-dashboard.log
stdout_logfile_maxbytes=0
priority=20
environment=HOME="/root",NODE_ENV="production"