forked from VariantConst/OpenWebUI-Monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1.21 KB
/
docker-compose.yml
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
services:
app:
image: ghcr.io/variantconst/openwebui-monitor:latest
ports:
- "7878:3000"
environment:
- POSTGRES_HOST=${POSTGRES_HOST:-db}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-openwebui}
- POSTGRES_DATABASE=${POSTGRES_DATABASE:-openwebui_monitor}
- OPENWEBUI_DOMAIN=${OPENWEBUI_DOMAIN}
- OPENWEBUI_API_KEY=${OPENWEBUI_API_KEY}
- API_KEY=${API_KEY}
- INIT_BALANCE=${INIT_BALANCE:-1}
- ACCESS_TOKEN=${ACCESS_TOKEN}
depends_on:
db:
condition: service_healthy
restart: always
db:
profiles:
- ${POSTGRES_HOST:+never}
- ${POSTGRES_HOST:-default}
image: postgres:15-alpine
expose:
- "5432"
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-openwebui}
- POSTGRES_DB=${POSTGRES_DATABASE:-openwebui_monitor}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
interval: 5s
timeout: 5s
retries: 5
restart: always
volumes:
postgres_data: