Add Docker support and GitHub release workflow

This commit is contained in:
luccast
2026-01-26 16:51:47 -05:00
parent ad791b25af
commit ff50cafe34
5 changed files with 130 additions and 18 deletions
+7
View File
@@ -0,0 +1,7 @@
node_modules
.output
.git
.github
*.md
.env*
.DS_Store
+66
View File
@@ -0,0 +1,66 @@
name: Release
on:
release:
types: [published]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Create build artifact
run: |
tar -czvf crabwalk-${{ github.ref_name }}.tar.gz .output
- name: Upload build to release
uses: softprops/action-gh-release@v1
with:
files: crabwalk-${{ github.ref_name }}.tar.gz
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+24
View File
@@ -0,0 +1,24 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.output ./.output
COPY --from=builder /app/package.json ./
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]
+25 -18
View File
@@ -16,30 +16,37 @@ Watch your AI agents work across WhatsApp, Telegram, Discord, and Slack in a liv
- **Action tracing** - Expand nodes to inspect tool args and payloads
- **Session filtering** - Filter by platform, search by recipient
## Getting Started
## Installation
### Docker (recommended)
```bash
docker run -d \
-p 3000:3000 \
-e CLAWDBOT_API_TOKEN=your-token \
ghcr.io/luccast/crabwalk:latest
```
Or with docker-compose:
```bash
curl -O https://raw.githubusercontent.com/luccast/crabwalk/master/docker-compose.yml
CLAWDBOT_API_TOKEN=your-token docker-compose up -d
```
### From source
```bash
git clone https://github.com/luccast/crabwalk.git
cd crabwalk
npm install
npm run dev
```
Open `http://localhost:3000/monitor` (or `http://<server-ip>:3000/monitor` for remote access)
Requires clawdbot gateway running on the same machine.
## Config
Token is in `~/.clawdbot/clawdbot.json`
```bash
# Option 1: command line
CLAWDBOT_API_TOKEN=your-token npm run dev
# Option 2: env file
echo "CLAWDBOT_API_TOKEN=your-token" > .env.local
npm run dev
```
Open `http://localhost:3000/monitor`
Requires clawdbot gateway running on the same machine. Token is in `~/.clawdbot/clawdbot.json`
## Stack
TanStack Start, ReactFlow, Framer Motion, tRPC, TanStack DB
+8
View File
@@ -0,0 +1,8 @@
services:
crabwalk:
image: ghcr.io/luccast/crabwalk:latest
ports:
- "3000:3000"
environment:
- CLAWDBOT_API_TOKEN=${CLAWDBOT_API_TOKEN}
restart: unless-stopped