-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (66 loc) · 1.91 KB
/
docker-compose.yml
File metadata and controls
70 lines (66 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# TokioAI v2.0 — Docker Compose
# Usage: cp .env.example .env && edit .env && docker compose up -d
services:
postgres:
image: postgres:16-alpine
container_name: tokio-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-tokio}
POSTGRES_USER: ${POSTGRES_USER:-tokio}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-tokio}"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
tokio-cli:
build: .
container_name: tokio-cli
env_file: .env
environment:
- POSTGRES_HOST=postgres
ports:
- "${TOKIO_PORT:-8200}:8000"
volumes:
- tokio-workspace:/workspace
- /var/run/docker.sock:/var/run/docker.sock
# Vertex AI credentials (optional — mount your GCP service account JSON)
# - /path/to/your-vertex-sa.json:/app/vertex-credentials.json:ro
# SSH keys for host/router control (optional)
# - ~/.ssh/id_ed25519:/root/.ssh/id_ed25519:ro
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
tokio-telegram:
build:
context: ./tokio_agent/bots
dockerfile: Dockerfile.telegram
container_name: tokio-telegram
env_file: .env
environment:
- CLI_SERVICE_URL=http://tokio-cli:8000
depends_on:
tokio-cli:
condition: service_healthy
volumes:
- tokio-workspace:/workspace
restart: unless-stopped
# Only starts if TELEGRAM_BOT_TOKEN is set in .env
# To disable: docker compose up -d tokio-cli postgres
volumes:
pgdata:
tokio-workspace: