-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
97 lines (90 loc) · 1.9 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
version: '3'
services:
backend:
container_name: mse-telegram-backend
build: backend
env_file:
- compose-variables.env
- .env
ports:
- "127.0.0.1:8000:8000"
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_started
networks:
- backend-net
- frontend-net
frontend:
container_name: mse-telegram-frontend
build:
context: frontend
target: deploy
args:
- VITE_BACKEND_URL=http://localhost:8000/
env_file:
- .env
ports:
- "127.0.0.1:8080:80"
depends_on:
- backend
networks:
- backend-net
- frontend-net
telegram_bot:
container_name: mse-telegram-bot
build: telegram_bot
env_file:
- compose-variables.env
- .env
depends_on:
- database
- backend
- rabbitmq
networks:
- backend-net
database:
container_name: mse-telegram-mongodb
image: mongo:7.0.7
hostname: mongodb
env_file:
- compose-variables.env
restart: always
healthcheck:
test: ["CMD", "mongosh", "localhost:27017/test", "--quiet"]
interval: 10s
timeout: 30s
retries: 5
start_period: 10s
volumes:
- mongodb-data:/data/db
- mongodb-config:/data/configdb
command: mongod --quiet
networks:
- backend-net
rabbitmq:
container_name: mse-telegram-rabbitmq
image: rabbitmq:3.13.0
hostname: rabbit
env_file:
- compose-variables.env
restart: always
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 1m
timeout: 30s
retries: 5
start_period: 30s
volumes:
- rabbitmq-data:/var/lib/rabbitmq
command: bash -c "rabbitmq-server;"
networks:
- backend-net
volumes:
mongodb-data:
mongodb-config:
rabbitmq-data:
networks:
frontend-net:
backend-net: