-
Notifications
You must be signed in to change notification settings - Fork 89
/
docker-compose.yaml
59 lines (58 loc) · 1.68 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
56
57
58
59
version: '3'
services:
chat:
container_name: chat
image: ghcr.io/swuecho/chat:latest # or echowuhao/chat:latest # or use tag for better stability, e.g.v0.0.3
expose:
- 8080
ports:
# vist at http://your_host:8080
- 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
# - PER_WORD_STREAM_LIMIT=200 # first 200 words are streamed per word, then by line.
# or DATABASE_URL, with the 5 var above
# you might need set proxy
# - OPENAI_PROXY_URL=hopethepeoplemakegreatfirewilldiesoon
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