forked from swuecho/chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
55 lines (54 loc) · 1.46 KB
/
docker-compose.yaml
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
version: '3'
services:
chat:
container_name: chat
image: ghcr.io/swuecho/chat:latest # or use tag for better stability, e.g.v0.0.3
expose:
- 8080
ports:
# vist at http://your_host:8080 or http://your_host:8080/static/
- 8080:8080
environment:
# at least one key is required.
# !!! no quote aroud key !!!
- OPENAI_API_KEY=thisisopenaikey # do not change if you do not have openai api key
- CLAUDE_API_KEY=thisisclaudekey # do not change if you do not have claude api key
# api call in 10min
# set this to zero if your server is in public network. only increase ratelimit in admin panel for trusted users.
- OPENAI_RATELIMIT=100
# DB config, set based on your db config if you don't use the db in docker-compose
- PG_HOST=db
- PG_DB=postgres
- PG_USER=postgres
- PG_PASS=thisisapassword
- PG_PORT=5432
depends_on:
db:
condition: service_healthy
db:
image: postgres:14
restart: always
user: postgres
environment:
TZ: "Asia/Shanghai"
PGTZ: "Asia/Shanghai"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "thisisapassword"
expose:
- 5432
ports:
- "5432:5432"
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready",
"-q",
"-d",
"postgres",
"-U",
"postgres"
]
interval: 5s
timeout: 5s
retries: 5