-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
81 lines (76 loc) · 1.72 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
services:
postgres:
container_name: postgres_container
image: postgres:latest
environment:
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- PGDATA
- POSTGRES_PORT
volumes:
- ./postgresql/init_scripts:/docker-entrypoint-initdb.d
- ./postgresql:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user -d text_generator_db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '1'
memory: 4G
networks:
- isolation-network
dataloader:
container_name: dataloader_container
build: data
volumes:
- ./data/checkpoints:/home/data/checkpoints
text_generator:
container_name: text_generator_container
build: text_generator
volumes:
- ./data/checkpoints:/home/text_generator/checkpoints
environment:
- POSTGRES_HOST
- POSTGRES_DB
- POSTGRES_USER
- POSTGRES_PASSWORD
- PGDATA
- POSTGRES_PORT
ports:
- "5001:5001"
networks:
- isolation-network
depends_on:
- dataloader
- postgres
restart: unless-stopped
deploy:
resources:
limits:
cpus: '4'
memory: 8G
telegram_bot:
container_name: telegram_bot_container
build: telegram_bot
environment:
TG_TOKEN: /run/secrets/telegram_bot_token
networks:
- isolation-network
depends_on:
- text_generator
secrets:
- telegram_bot_token
secrets:
telegram_bot_token:
file: ./telegram_bot/token.txt
networks:
isolation-network:
driver: bridge