51 lines
1.9 KiB
YAML
51 lines
1.9 KiB
YAML
|
|
# Everything on one small server: the account server (relay), HTTPS (Caddy), and AnyBot itself.
|
||
|
|
# 1. Point your domain at the server and put it in ../../relay/Caddyfile.
|
||
|
|
# 2. Put your account name and password in .env (see .env.example).
|
||
|
|
# 3. docker compose up -d
|
||
|
|
# 4. On the phone open https://your-domain, create the account (first time), and use it.
|
||
|
|
# AI keys: set them in .env, or set ANYBOT_RESTORE_FROM_ACCOUNT=1 to start from the newest backup
|
||
|
|
# your Mac made (bots, chats, routines and the keys you set there).
|
||
|
|
services:
|
||
|
|
relay:
|
||
|
|
build:
|
||
|
|
context: ../..
|
||
|
|
dockerfile: relay/Dockerfile
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
# Your public address (for the links of sites the bots publish), e.g. https://anybot.example.com
|
||
|
|
ANYBOT_RELAY_PUBLIC_URL: "${ANYBOT_RELAY_PUBLIC_URL:-}"
|
||
|
|
ANYBOT_RELAY_INVITE: "${ANYBOT_RELAY_INVITE:-}"
|
||
|
|
volumes:
|
||
|
|
- relay-data:/data
|
||
|
|
caddy:
|
||
|
|
image: caddy:2
|
||
|
|
restart: unless-stopped
|
||
|
|
ports: ["80:80", "443:443"]
|
||
|
|
volumes:
|
||
|
|
- ../../relay/Caddyfile:/etc/caddy/Caddyfile:ro
|
||
|
|
- caddy-data:/data
|
||
|
|
depends_on: [relay]
|
||
|
|
anybot:
|
||
|
|
build:
|
||
|
|
context: ../..
|
||
|
|
dockerfile: deploy/server/Dockerfile
|
||
|
|
restart: unless-stopped
|
||
|
|
depends_on: [relay]
|
||
|
|
environment:
|
||
|
|
ANYBOT_ACCOUNT: "http://relay:8080|${ANYBOT_USER}"
|
||
|
|
ANYBOT_ACCOUNT_PASSWORD: "${ANYBOT_PASSWORD}"
|
||
|
|
ANYBOT_HOST_NAME: "${ANYBOT_HOST_NAME:-雲端 AnyBot}"
|
||
|
|
XAI_API_KEY: "${XAI_API_KEY:-}"
|
||
|
|
ANTHROPIC_API_KEY: "${ANTHROPIC_API_KEY:-}"
|
||
|
|
OPENAI_API_KEY: "${OPENAI_API_KEY:-}"
|
||
|
|
GEMINI_API_KEY: "${GEMINI_API_KEY:-}"
|
||
|
|
ANYBOT_RESTORE_FROM_ACCOUNT: "${ANYBOT_RESTORE_FROM_ACCOUNT:-}"
|
||
|
|
volumes:
|
||
|
|
- anybot-data:/data
|
||
|
|
# The bot's own computer runs as a container next to this one.
|
||
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
|
volumes:
|
||
|
|
relay-data:
|
||
|
|
caddy-data:
|
||
|
|
anybot-data:
|