Skip to content

A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.

TypeScript
2.0 KB
Raw Blame
# Gentle Dot on a server. Create .env first (docs/deploy-vps.md, step 3).
# Default: the daemon listens on the VPS loopback only, and the existing web server
# (Apache on a cPanel/WHM VPS such as HostGator) proxies HTTPS to it.
# Without a web server, start the bundled Caddy too: docker compose --profile caddy up -d
services:
  gentle-dot:
    build: .
    restart: unless-stopped
    environment:
      GENTLE_DOT_ALLOWED_ORIGINS: '["https://${DOT_DOMAIN}"]'
      ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
      OPENAI_API_KEY: ${OPENAI_API_KEY:-}
      # Encrypts connector secrets at rest; only the daemon sees it (docs/deploy-vps.md, step 3).
      GENTLE_DOT_SECRETS_KEY: ${GENTLE_DOT_SECRETS_KEY:-}
    # The daemon runs as root in the container only to start the engine (dot) and connector servers
    # (dotmcp) as their own users; it keeps nothing else (docs/deploy-vps.md, "What runs as whom").
    security_opt:
      - no-new-privileges:true
    cap_drop:
      - ALL
    cap_add:
      - SETUID # start the engine and connector servers as their users
      - SETGID # with their own group and no supplementary groups
      - CHOWN # at start, hand files an older image left owned by root to the engine's user
      - FOWNER # at start, set the modes of folders the daemon does not own
      - DAC_OVERRIDE # reach and watch the engine's private folders; their files are opened as the engine's user
      - KILL # stop the engine and connector servers, which run as other users
    volumes:
      - dot-home:/home/dot
    ports:
      - "127.0.0.1:${DOT_PORT:-4317}:4317"

  caddy:
    image: caddy:2
    profiles: ["caddy"]
    restart: unless-stopped
    depends_on:
      - gentle-dot
    environment:
      DOT_DOMAIN: ${DOT_DOMAIN}
      DOT_USER: ${DOT_USER:-}
      DOT_PASSWORD_HASH: ${DOT_PASSWORD_HASH:-}
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./docker/Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy-data:/data

volumes:
  dot-home:
  caddy-data: