-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
41 lines (41 loc) · 1023 Bytes
/
Copy pathcompose.yaml
File metadata and controls
41 lines (41 loc) · 1023 Bytes
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
services:
api:
build: .
# ports:
# - "127.0.0.1:8005:8005"
env_file:
- .env
environment:
- REDIS_HOST=${REDIS_HOST}
- REDIS_PORT=${REDIS_PORT}
- REDIS_DB=${REDIS_DB}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENAI_BASE_URL=${OPENAI_BASE_URL}
- REDIS_PASSWORD=${REDIS_PASSWORD}
- CACHE_TTL=${CACHE_TTL}
- RATE_LIMIT_PER_MINUTE=${RATE_LIMIT_PER_MINUTE}
- GPT_MODEL=${GPT_MODEL}
depends_on:
- redis
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8005/health"]
interval: 10m
timeout: 30s
retries: 3
start_period: 5s
restart: always
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
env_file:
- .env
healthcheck:
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 5s
timeout: 3s
retries: 3
restart: always
volumes:
redis_data: