openclaw/runtipi/clawdbot/docker-compose.yml

61 lines
2.5 KiB
YAML

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