-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (85 loc) · 2.29 KB
/
docker-compose.yml
File metadata and controls
89 lines (85 loc) · 2.29 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
services:
postgres:
image: pgvector/pgvector:pg16
restart: unless-stopped
environment:
POSTGRES_DB: hive
POSTGRES_USER: hive
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U hive"]
interval: 10s
timeout: 5s
retries: 5
gateway:
build:
context: ./server
dockerfile: ../Dockerfile.gateway
restart: always
ports:
- "8080:8080"
env_file: .env
volumes:
- ./.runtime:/data/hive
- ./server/skills:/data/skills
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql+asyncpg://hive:${DB_PASSWORD}@postgres:5432/hive
HIVE_WORKSPACE: /data/hive
HIVE_SANDBOX_URL: http://sandbox:8091
sandbox:
profiles: ["sandbox"]
build:
context: .
dockerfile: Dockerfile.sandbox
restart: unless-stopped
ports:
- "8091:8091"
env_file: .env
depends_on:
postgres:
condition: service_healthy
environment:
DATABASE_URL: postgresql+asyncpg://hive:${DB_PASSWORD}@postgres:5432/hive
HOME: /home/codex
HIVE_SANDBOX_CODING_BACKEND: ${HIVE_SANDBOX_CODING_BACKEND:-codex_cli}
HIVE_SANDBOX_TASKS_ROOT: /sandbox/tasks
HIVE_SANDBOX_COMMANDS_ROOT: /sandbox/commands
volumes:
- ./server/hive:/app/hive:ro
- ./packages:/app/packages:ro
- ./scripts:/app/scripts:ro
- ./.runtime/sandbox/tasks:/sandbox/tasks
- ./.runtime/sandbox/commands:/sandbox/commands
- ./.runtime/sandbox/home:/home/codex
- ./.runtime/sandbox/tmp:/tmp
backup:
image: postgres:16
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
DB_NAME: hive
DB_USER: hive
HIVE_PROJECTS_DIR: /data/hive/projects
HIVE_BACKUP_DIR: /backups
volumes:
- ./scripts/backup.sh:/scripts/backup.sh:ro
- ./.runtime:/data/hive:ro
- backups:/backups
depends_on:
postgres:
condition: service_healthy
# Run daily at 02:15 (off-peak)
entrypoint: >
sh -c "echo '15 2 * * * /scripts/backup.sh >> /var/log/hive-backup.log 2>&1'
| crontab - && crond -f"
volumes:
pgdata:
backups: