-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
57 lines (53 loc) · 1 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
redis:
image: "redis:latest"
container_name: "redis"
ports:
- "6379:6379"
networks:
- mynetwork
postgres:
image: "postgres:latest"
container_name: "postgres"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: dbname
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d dbname"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5432:5432"
networks:
- mynetwork
fastapi:
build:
context: .
dockerfile: Dockerfile.fastapi
container_name: "fastapi"
env_file:
- .env
ports:
- "5000:5000"
depends_on:
- redis
- postgres
networks:
- mynetwork
telegram-bot:
build:
context: .
dockerfile: Dockerfile.bot
container_name: "telegram-bot"
env_file:
- .env
environment:
- API_URL=http://fastapi:5000
depends_on:
- fastapi
networks:
- mynetwork
networks:
mynetwork: