-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
108 lines (104 loc) · 3.09 KB
/
Copy pathcompose.yaml
File metadata and controls
108 lines (104 loc) · 3.09 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
105
106
107
108
name: agentbox
services:
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-agentbox}
POSTGRES_USER: ${POSTGRES_USER:-agentbox}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-before-deploy}
volumes:
- agentbox-postgres:/var/lib/postgresql/data
healthcheck:
test:
["CMD-SHELL", 'pg_isready -U "$${POSTGRES_USER}" -d "$${POSTGRES_DB}"']
interval: 5s
timeout: 5s
retries: 12
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
server:
# Session tickets and Worker/browser WebSockets are process-local.
# Keep exactly one Server replica; overlapping rolling updates are unsupported.
image: ghcr.io/7-e1even/agentbox-server:${AGENTBOX_VERSION:-latest}
build:
context: ./server
args:
GOPROXY: ${GOPROXY:-https://proxy.golang.org,direct}
VERSION: ${AGENTBOX_VERSION:-dev}
restart: unless-stopped
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-agentbox}:${POSTGRES_PASSWORD:-change-me-before-deploy}@postgres:5432/${POSTGRES_DB:-agentbox}?sslmode=disable
PORT: "8091"
AGENTBOX_BIND_HOST: 0.0.0.0
ALLOWED_ORIGINS: "${AGENTBOX_ALLOWED_ORIGINS:-}"
AGENTBOX_SETUP_CODE: "${AGENTBOX_SETUP_CODE:-}"
AGENTBOX_SECRET_KEY_FILE: /var/lib/agentbox/secret-key
AGENTBOX_WORKER_BINARY_DIR: /usr/local/lib/agentbox/workers
AGENTBOX_ALLOW_PRIVATE_PROVIDER_ENDPOINTS: ${AGENTBOX_ALLOW_PRIVATE_PROVIDER_ENDPOINTS:-false}
AGENTBOX_TRUSTED_PROXY: ${AGENTBOX_TRUSTED_PROXY:-false}
AGENTBOX_TRUSTED_PROXY_CIDRS: "${AGENTBOX_TRUSTED_PROXY_CIDRS:-}"
AGENTBOX_ENV: production
AGENTBOX_DISABLE_AUTH: "false"
volumes:
- agentbox-secrets:/var/lib/agentbox
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://127.0.0.1:8091/healthz",
]
interval: 5s
timeout: 5s
retries: 12
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
app:
image: ghcr.io/7-e1even/agentbox-app:${AGENTBOX_VERSION:-latest}
build:
context: ./app
args:
AGENTBOX_API_URL: http://server:8091
restart: unless-stopped
environment:
AGENTBOX_API_URL: http://server:8091
AGENTBOX_PUBLIC_URL: "${AGENTBOX_PUBLIC_URL:-}"
HOSTNAME: 0.0.0.0
PORT: "3000"
ports:
- "${AGENTBOX_PORT:-3000}:3000"
depends_on:
server:
condition: service_healthy
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/api/auth/status').then(r=>{if(!r.ok)throw new Error(String(r.status))}).catch(()=>process.exit(1))",
]
interval: 10s
timeout: 5s
retries: 12
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
agentbox-postgres:
agentbox-secrets: