forked from OpenHands/OpenHands
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
67 lines (62 loc) · 1.73 KB
/
Copy pathdocker-compose.yml
File metadata and controls
67 lines (62 loc) · 1.73 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
services:
postgres:
image: postgres:15
container_name: openhands-postgres
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/all-hands-ai/runtime:0.31-nikolaik}
#- SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} # enable this only if you want a specific non-root sandbox user but you will have to manually adjust permissions of openhands-state for this user
- WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
networks:
- database_net
pgbouncer:
image: edoburu/pgbouncer
environment:
- DB_USER=$PGBOUNCER_DB_USER
- DB_PASSWORD=$PGBOUNCER_DB_PASSWORD
- DB_HOST=$PGBOUNCER_DB_HOST
- DB_NAME=$PGBOUNCER_DB_NAME
- POOL_MODE=transaction
- ADMIN_USERS=postgres,$PGBOUNCER_DB_USER
- MAX_CLIENT_CONN=100
- DEFAULT_POOL_SIZE=20
- MIN_POOL_SIZE=0
- AUTH_TYPE=scram-sha-256
ports:
- "6432:5432"
restart: on-failure
healthcheck:
test:
[
"CMD",
"pg_isready",
"-U",
"${PGBOUNCER_DB_USER}",
"-h",
"postgres",
"-p",
"5432",
]
interval: 30s
retries: 3
start_period: 10s
timeout: 10s
networks:
- database_net
depends_on:
- postgres
volumes:
postgres_data:
networks:
database_net: