diff --git a/runtipi/README.md b/runtipi/README.md index add5097e5..53374bfd2 100644 --- a/runtipi/README.md +++ b/runtipi/README.md @@ -8,7 +8,7 @@ This directory contains the [Runtipi](https://runtipi.io) app configuration for runtipi/ └── clawdbot/ ├── config.json # App metadata and form fields - ├── docker-compose.yml # Docker Compose configuration + ├── docker-compose.json # Dynamic compose configuration └── metadata/ ├── description.md # App description for the store └── logo.png # App logo (128x128) diff --git a/runtipi/clawdbot/docker-compose.json b/runtipi/clawdbot/docker-compose.json new file mode 100644 index 000000000..133192034 --- /dev/null +++ b/runtipi/clawdbot/docker-compose.json @@ -0,0 +1,79 @@ +{ + "$schema": "https://schemas.runtipi.io/v2/dynamic-compose.json", + "schemaVersion": 2, + "services": [ + { + "name": "clawdbot", + "image": "ghcr.io/clawdbot/clawdbot:${APP_VERSION}", + "environment": [ + { + "key": "HOME", + "value": "/home/node" + }, + { + "key": "TERM", + "value": "xterm-256color" + }, + { + "key": "NODE_ENV", + "value": "production" + }, + { + "key": "ANTHROPIC_API_KEY", + "value": "${ANTHROPIC_API_KEY}" + }, + { + "key": "OPENAI_API_KEY", + "value": "${OPENAI_API_KEY}" + }, + { + "key": "GEMINI_API_KEY", + "value": "${GEMINI_API_KEY}" + }, + { + "key": "OPENROUTER_API_KEY", + "value": "${OPENROUTER_API_KEY}" + }, + { + "key": "TELEGRAM_BOT_TOKEN", + "value": "${TELEGRAM_BOT_TOKEN}" + }, + { + "key": "DISCORD_BOT_TOKEN", + "value": "${DISCORD_BOT_TOKEN}" + }, + { + "key": "SLACK_BOT_TOKEN", + "value": "${SLACK_BOT_TOKEN}" + }, + { + "key": "SLACK_APP_TOKEN", + "value": "${SLACK_APP_TOKEN}" + }, + { + "key": "CLAWDBOT_GATEWAY_TOKEN", + "value": "${CLAWDBOT_GATEWAY_TOKEN}" + } + ], + "volumes": [ + { + "hostPath": "${APP_DATA_DIR}/data/config", + "containerPath": "/home/node/.clawdbot" + }, + { + "hostPath": "${APP_DATA_DIR}/data/workspace", + "containerPath": "/home/node/clawd" + } + ], + "command": ["node", "dist/index.js", "gateway", "--bind", "lan", "--port", "18789"], + "internalPort": 18789, + "isMain": true, + "healthCheck": { + "test": "node dist/index.js health --token \"$CLAWDBOT_GATEWAY_TOKEN\" || exit 1", + "interval": "30s", + "timeout": "10s", + "retries": 3 + } + } + ] +} diff --git a/runtipi/clawdbot/docker-compose.yml b/runtipi/clawdbot/docker-compose.yml deleted file mode 100644 index db73e0013..000000000 --- a/runtipi/clawdbot/docker-compose.yml +++ /dev/null @@ -1,60 +0,0 @@ -version: '3.7' - -services: - clawdbot: - image: ghcr.io/clawdbot/clawdbot:${APP_VERSION} - container_name: clawdbot - restart: unless-stopped - init: true - environment: - - HOME=/home/node - - TERM=xterm-256color - - NODE_ENV=production - - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} - - OPENAI_API_KEY=${OPENAI_API_KEY} - - GEMINI_API_KEY=${GEMINI_API_KEY} - - OPENROUTER_API_KEY=${OPENROUTER_API_KEY} - - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN} - - DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN} - - SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN} - - SLACK_APP_TOKEN=${SLACK_APP_TOKEN} - - CLAWDBOT_GATEWAY_TOKEN=${CLAWDBOT_GATEWAY_TOKEN} - volumes: - - ${APP_DATA_DIR}/data/config:/home/node/.clawdbot - - ${APP_DATA_DIR}/data/workspace:/home/node/clawd - ports: - - ${APP_PORT}:18789 - command: ["node", "dist/index.js", "gateway", "--bind", "lan", "--port", "18789"] - healthcheck: - test: ["CMD", "node", "dist/index.js", "health", "--token", "${CLAWDBOT_GATEWAY_TOKEN}"] - interval: 30s - timeout: 10s - retries: 3 - networks: - - tipi_main_network - labels: - runtipi.managed: true - traefik.enable: true - traefik.http.middlewares.clawdbot-web-redirect.redirectscheme.scheme: https - traefik.http.routers.clawdbot-insecure.rule: Host(`${APP_DOMAIN}`) - traefik.http.routers.clawdbot-insecure.entrypoints: web - traefik.http.routers.clawdbot-insecure.service: clawdbot - traefik.http.routers.clawdbot-insecure.middlewares: clawdbot-web-redirect - traefik.http.routers.clawdbot.rule: Host(`${APP_DOMAIN}`) - traefik.http.routers.clawdbot.entrypoints: websecure - traefik.http.routers.clawdbot.service: clawdbot - traefik.http.routers.clawdbot.tls.certresolver: myresolver - traefik.http.services.clawdbot.loadbalancer.server.port: 18789 - # Local domain - traefik.http.routers.clawdbot-local-insecure.rule: Host(`clawdbot.${LOCAL_DOMAIN}`) - traefik.http.routers.clawdbot-local-insecure.entrypoints: web - traefik.http.routers.clawdbot-local-insecure.service: clawdbot - traefik.http.routers.clawdbot-local-insecure.middlewares: clawdbot-web-redirect - traefik.http.routers.clawdbot-local.rule: Host(`clawdbot.${LOCAL_DOMAIN}`) - traefik.http.routers.clawdbot-local.entrypoints: websecure - traefik.http.routers.clawdbot-local.service: clawdbot - traefik.http.routers.clawdbot-local.tls: true - -networks: - tipi_main_network: - external: true