-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (97 loc) · 3.35 KB
/
Copy pathdocker-compose.yml
File metadata and controls
104 lines (97 loc) · 3.35 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# docker-compose.yml
# Run the full Tether stack: API + Bot + MCP server.
# Data lives at the bind-mounted TETHER_DATA_DIR (default: ~/.tether-config).
x-build: &build
context: .
args:
PREMIUM_GIT_TOKEN: ${PREMIUM_GIT_TOKEN:-}
PREMIUM_REF: ${PREMIUM_REF:-unknown}
# TETHER_IMAGE selects the image name:
# Premium (Pi): tether-premium — local only, never pushed to any registry
# Community (ghcr): ghcr.io/jlunder00/tether — public, no premium code
# IMAGE_TAG is set by the deploy workflow (sha-<7> or semver). Defaults to latest.
# Rollback: IMAGE_TAG=sha-abc1234 docker compose up -d
services:
postgres:
image: postgres:16
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: tether
POSTGRES_USER: tether
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tether_dev}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tether -d tether"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
api:
build: *build
image: ${TETHER_IMAGE:-ghcr.io/jlunder00/tether}:${IMAGE_TAG:-latest}
command: ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]
ports:
- "8000:8000"
volumes:
- ${TETHER_DATA_DIR:-~/.tether-config}:/data
environment:
- TETHER_CONFIG_DIR=/data
- TETHER_LOG_LEVEL=${TETHER_LOG_LEVEL:-INFO}
- PYTHONUNBUFFERED=1
- DATABASE_URL=postgresql://tether_app:${TETHER_APP_PASSWORD:-tether_app_dev}@postgres:5432/tether
- ADMIN_DATABASE_URL=postgresql://tether:${POSTGRES_PASSWORD:-tether_dev}@postgres:5432/tether
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 30s
timeout: 5s
retries: 3
bot:
build: *build
image: ${TETHER_IMAGE:-ghcr.io/jlunder00/tether}:${IMAGE_TAG:-latest}
entrypoint: ["/app/scripts/bot-entrypoint.sh"]
volumes:
- ${TETHER_DATA_DIR:-~/.tether-config}:/data
environment:
- TETHER_CONFIG_DIR=/data
- PYTHONUNBUFFERED=1
- DATABASE_URL=postgresql://tether_app:${TETHER_APP_PASSWORD:-tether_app_dev}@postgres:5432/tether
depends_on:
api:
condition: service_healthy
restart: unless-stopped
mcp:
build: *build
image: ${TETHER_IMAGE:-ghcr.io/jlunder00/tether}:${IMAGE_TAG:-latest}
command: ["python", "-m", "tether_mcp.server", "--sse"]
ports:
- "5001:5001"
volumes:
- ${TETHER_DATA_DIR:-~/.tether-config}:/data
environment:
- TETHER_CONFIG_DIR=/data
- TETHER_USER_ID=${TETHER_USER_ID:-}
- PYTHONUNBUFFERED=1
- DATABASE_URL=postgresql://tether_app:${TETHER_APP_PASSWORD:-tether_app_dev}@postgres:5432/tether
restart: unless-stopped
sync:
build: *build
image: ${TETHER_IMAGE:-ghcr.io/jlunder00/tether}:${IMAGE_TAG:-latest}
command: ["python", "-m", "sync"]
volumes:
- ${TETHER_DATA_DIR:-~/.tether-config}:/data
environment:
- TETHER_CONFIG_DIR=/data
- PYTHONUNBUFFERED=1
- DATABASE_URL=postgresql://tether_app:${TETHER_APP_PASSWORD:-tether_app_dev}@postgres:5432/tether
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
volumes:
pgdata: