Skip to content

Go implementation of DeepSeek Harness and self-hosted personal agent.

Go
1.6 KB
Raw Blame
name: go-bot

services:
  controller:
    image: ghcr.io/xyc999-ai/go-bot-controller:latest
    pull_policy: never
    command: ["serve", "--env-file", "/config/deployment.env", "--config", "/runtime.yaml"]
    environment:
      REDIS_ADDR: redis:6379
      CONTROLLER_CONTAINER: "1"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - type: bind
        source: ${GO_BOT_ENV_FILE:-./.env}
        target: /config/deployment.env
        read_only: true
        bind:
          create_host_path: false
      - type: bind
        source: ${GO_BOT_CONFIG_FILE:-./configs/default.yaml}
        target: /runtime.yaml
        read_only: true
        bind:
          create_host_path: false
    extra_hosts:
      - "host.docker.internal:host-gateway"
    ports:
      - "8080:8080"
    depends_on:
      redis:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "wget", "-q", "-T", "3", "-O", "/dev/null", "http://127.0.0.1:8080/readyz"]
      interval: 2s
      timeout: 4s
      retries: 30
      start_period: 5s
    networks:
      - ingress
      - state
  redis:
    image: redis:8-alpine
    pull_policy: never
    command: ["redis-server", "--appendonly", "yes", "--appendfsync", "always"]
    ports:
      - "6379:6379"
    volumes:
      - controller-data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 2s
      timeout: 2s
      retries: 15
    networks:
      - state
      - redis-access

networks:
  ingress:
  state:
    internal: true
  # Docker needs a non-internal network to publish the Redis port on the host.
  redis-access:
volumes:
  controller-data: