-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
41 lines (38 loc) · 839 Bytes
/
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
services:
bot:
build: .
depends_on:
- db
- redis
env_file:
- .env
environment:
- POSTGRES_HOST=db
- POSTGRES_DB=${APP_ID}
- POSTGRES_USER=${APP_ID}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- OPENDART_API_KEY=${OPENDART_API_KEY}
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
db:
build:
context: ./db
env_file:
- .env
environment:
- POSTGRES_DB=${APP_ID}
- POSTGRES_USER=${APP_ID}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
- ./db/init:/docker-entrypoint-initdb.d:ro
restart: always
redis:
image: redis:7.2-alpine
ports:
- "6379:6379"
restart: always
volumes:
db-data: