-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
99 lines (99 loc) · 2.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '3.8'
services:
weatherapp:
build:
context: .
dockerfile: WeatherBotApi.WeatherApp/Presentation/WeatherApp.WebApi/Properties/Dockerfile
ports:
- "5555:8079"
depends_on:
rabbitmq:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8079
- RabbitMqSettings__HostName=rabbitmq
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8079/health || exit 1" ]
interval: 5s
timeout: 10s
retries: 3
restart: on-failure
telegrambot:
build:
context: .
dockerfile: WeatherBotApi.TelegramBotApp/Presentation/TelegramBotApp.Api/Dockerfile
environment:
- RabbitMqSettings__HostName=rabbitmq
- TelegramSettings__BotToken=${TELEGRAM_BOT_TOKEN}
- ConnectionStrings__Redis=redis:6379
depends_on:
rabbitmq:
condition: service_healthy
databaseapi:
condition: service_healthy
weatherapp:
condition: service_healthy
redis:
condition: service_healthy
databaseapi:
build:
context: .
dockerfile: WeatherBotApi.DatabaseApp/Presentation/DatabaseApp.WebApi/Properties/Dockerfile
ports:
- "5556:8078"
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:8078
- ConnectionStrings__DbConnection=Host=database:5432;Database=${POSTGRES_DB};Username=${POSTGRES_USER};Password=${POSTGRES_PASSWORD}
- ConnectionStrings__Redis=redis:6379
- RabbitMqSettings__HostName=rabbitmq
healthcheck:
test: [ "CMD-SHELL", "curl -f http://localhost:8078/health || exit 1" ]
interval: 5s
timeout: 10s
retries: 5
restart: on-failure
rabbitmq:
image: rabbitmq:3.13.0-management
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
ports:
- "5672:5672"
- "15672:15672"
database:
image: postgres:latest
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ~/data/postgres:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 10s
retries: 5
ports:
- "5755:5432"
redis:
image: redis:latest
restart: always
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 15s
timeout: 15s
retries: 3