-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (56 loc) · 1.38 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
services:
bot:
profiles: [ "bot", "global"]
container_name: template.bot
stop_signal: SIGINT
image: template_bot:latest
command: "src.tgbot"
environment:
CONFIG_FILE_NAME: docker_config.yml
depends_on:
database_migrations:
condition: service_completed_successfully
nats_migrations:
condition: service_completed_successfully
volumes:
- ./config:/app/config:ro
- ./data:/app/data
networks:
- infra.postgres
- infra.redis
- infra.nats
- www
database_migrations:
profiles: [ "migration", "global" ]
container_name: template.postgres_migrations
stop_signal: SIGINT
image: template_bot:latest
command: "alembic upgrade head"
environment:
CONFIG_FILE_NAME: docker_config.yml
volumes:
- ./config:/app/config:ro
- ./alembic.ini:/app/alembic.ini:ro
networks:
- infra.postgres
nats_migrations:
profiles: [ "migration", "global" ]
container_name: template.nats_migrations
stop_signal: SIGINT
image: template_bot:latest
command: "src.infrastructure.nats"
environment:
CONFIG_FILE_NAME: docker_config.yml
volumes:
- ./config:/app/config:ro
networks:
- infra.nats
networks:
infra.postgres:
external: true
infra.redis:
external: true
infra.nats:
external: true
www:
external: true