-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Deployment
The official Docker image is published to GitHub Container Registry:
ghcr.io/aomkoyo/claude-tmux-discord
| Tag | Description |
|---|---|
latest |
Latest push to main branch |
v1.0.0 |
Specific version tag |
v1.0 |
Minor version tag |
main |
Branch tag |
sha-abc1234 |
Commit SHA |
The Dockerfile uses a two-stage build:
- Installs pnpm via corepack
- Copies workspace files and installs dependencies
- Runs
prisma generateto create the Prisma client - Compiles TypeScript (
tsc) - Copies generated Prisma client from
src/generated/todist/generated/
- Installs system dependencies:
tmux,git,curl,tini,openssl - Installs Claude Code globally:
curl -fsSL https://claude.ai/install.sh | bash - Copies built artifacts from builder stage
- Copies
node_modulesfrom builder (avoids pnpm workspace protocol conflicts) - Runs as
nodeuser viatini(proper signal handling)
services:
bot:
image: ghcr.io/aomkoyo/claude-tmux-discord:latest
# or build: .
env_file: .env
volumes:
- ./workspace:/workspace # Per-channel workspaces
- ./data:/data # SQLite database
- ${HOME}/.claude:/home/node/.claude # Claude auth (read-write)
restart: unless-stoppedservices:
bot:
build: .
env_file: .env
environment:
LOG_LEVEL: debug
volumes:
- ./workspace:/workspace
- ./data:/data
- ${HOME}/.claude:/home/node/.claude
- ./src:/app/src # Source mount for hot-reload
- ./cli/src:/app/cli/src
- ./prisma:/app/prisma
command: pnpm dev # tsx watch
restart: unless-stoppedIf you've already logged into Claude Code on the host:
volumes:
- ${HOME}/.claude:/home/node/.claudeThis shares your existing Claude session with the container. The volume is read-write so Claude can refresh its auth tokens.
docker compose exec bot claude loginFollow the browser-based authentication flow. The session is persisted in the mounted volume.
| Mount | Purpose | Required |
|---|---|---|
./workspace:/workspace |
Per-channel Claude workspaces | Yes |
./data:/data |
SQLite database file | Yes |
~/.claude:/home/node/.claude |
Claude Code auth session | Yes |
The GitHub Actions workflow (.github/workflows/docker-publish.yml) automatically builds and pushes to GHCR on:
- Push to
mainbranch - Version tags (
v*.*.*)
It uses docker/metadata-action for tag generation and docker/build-push-action for multi-platform builds.
The container doesn't expose HTTP ports. To check health:
docker compose exec bot tmux list-sessions # list active Claude sessions
docker compose logs bot --tail 50 # check recent logs| Issue | Solution |
|---|---|
| Claude auth fails | Run docker compose exec bot claude login
|
| Permission denied on volumes | Ensure ./workspace and ./data are owned by UID 1000 (node user) |
| tmux not found | Rebuild the image — docker compose build --no-cache
|
| Prisma migration error | Check ./data directory permissions, ensure SQLite file is writable |
discord-send can't find token |
The bot injects env vars via exportEnvToSession() — check logs for errors |
claude-tmux-discord — Discord bot for per-channel Claude Code sessions via tmux
Setup
Usage
Technical
Help