Skip to content

feat: Dockerfile for containerized deployments - #14

Open
dobexx wants to merge 1 commit into
wende:mainfrom
dobexx:feature/docker-support
Open

feat: Dockerfile for containerized deployments#14
dobexx wants to merge 1 commit into
wende:mainfrom
dobexx:feature/docker-support

Conversation

@dobexx

@dobexx dobexx commented Aug 16, 2026

Copy link
Copy Markdown

What

Adds a production-ready Dockerfile (+ .dockerignore) so the proxy can run as a container service (Docker Compose, EasyPanel, Kubernetes, ...).

Design:

  • Multi-stage build on node:22-slim: builder compiles TypeScript, runtime ships only production deps
  • Claude Code CLI preinstalled globally (the proxy wraps it as a subprocess)
  • Non-root user proxyapp (node:*-slim base images already ship a system user named proxy, hence the distinct name)
  • Credentials persistence: CLAUDE_CONFIG_DIR=/data/.claude – mounting a volume on /data keeps OAuth tokens across restarts/redeploys (the CLI refreshes tokens in place)
  • Healthcheck against /health
  • HOST=0.0.0.0 / PORT=3456 presets for container networking

Context: PR #9 (Docker CI workflow) was closed without merge – this PR is different in scope: it ships the Dockerfile itself, no CI changes.

Tested: Running in production on an EasyPanel (Docker Swarm) host – build, healthchecks, volume persistence across redeploys all verified live.

Note: pairs naturally with the auth/.env PR I'll open next (the proxy currently has no request authentication, which matters once it listens on a routable address).

Multi-stage build on node:22-slim:
- Builder stage compiles TypeScript; runtime stage ships only prod deps
- Claude Code CLI preinstalled globally (the proxy wraps it as subprocess)
- Non-root user (proxyapp; node:*-slim already ships a system user 'proxy')
- Credentials persist via CLAUDE_CONFIG_DIR=/data/.claude - mount a
  volume on /data so OAuth tokens survive restarts/redeploys
- Healthcheck against /health (always public)
- HOST=0.0.0.0 + PORT=3456 presets for container networking

Tested in production on an EasyPanel (Docker Swarm) host.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider pinning the Node base image and the @anthropic-ai/claude-code dependency to specific versions (or using build args) to avoid unexpected breakage from upstream changes.
  • The .dockerignore file is currently empty; add common exclusions like node_modules, dist, .git, and local config files to minimize build context size and speed up builds.
  • The healthcheck relies on an inline node -e script; you might simplify and harden this by using a small shell-based check (e.g., wget/curl if available) or a dedicated healthcheck script in the repo for easier maintenance.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider pinning the Node base image and the `@anthropic-ai/claude-code` dependency to specific versions (or using build args) to avoid unexpected breakage from upstream changes.
- The `.dockerignore` file is currently empty; add common exclusions like `node_modules`, `dist`, `.git`, and local config files to minimize build context size and speed up builds.
- The healthcheck relies on an inline `node -e` script; you might simplify and harden this by using a small shell-based check (e.g., `wget`/`curl` if available) or a dedicated healthcheck script in the repo for easier maintenance.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@dobexx

dobexx commented Aug 16, 2026

Copy link
Copy Markdown
Author

Thanks for the review! Notes on the two points:

  • Version pinning: deliberately kept node:22-slim (follows the LTS line) and unpinned @anthropic-ai/claude-code so redeploys pick up current CLI/model support automatically. Happy to pin to a digest if you prefer reproducibility over freshness – just say the word.
  • .dockerignore: the file is not empty – it excludes node_modules, dist, .git, .env, docs etc. (possibly it wasn't readable in the review context).

@sourcery-ai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant