-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
149 lines (136 loc) · 3.11 KB
/
docker-compose.yaml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
version: '3.8'
services:
booking-service:
build:
context: .
dockerfile: ./apps/booking/Dockerfile
target: ${NODE_ENV}
container_name: booking-service
command: npm run start:debug booking
depends_on:
- booking-postgres
- rabbitmq
env_file:
- ./apps/booking/.env
ports:
- 9229:9229
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: always
networks:
- network
auth-service:
build:
context: .
dockerfile: ./apps/auth/Dockerfile
target: ${NODE_ENV}
container_name: auth-service
command: npm run start:debug auth
depends_on:
- auth-mongo
- rabbitmq
env_file:
- ./apps/auth/.env
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: always
networks:
- network
payments-service:
build:
context: .
dockerfile: ./apps/payments/Dockerfile
target: ${NODE_ENV}
container_name: payments-service
command: npm run start:dev payments
depends_on:
- rabbitmq
env_file:
- ./apps/payments/.env
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: always
networks:
- network
notifications-service:
build:
context: .
dockerfile: ./apps/notifications/Dockerfile
target: ${NODE_ENV}
container_name: notifications-service
command: npm run start:dev notifications
depends_on:
- rabbitmq
env_file:
- ./apps/notifications/.env
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
restart: always
networks:
- network
auth-mongo:
image: mongo
container_name: auth-mongo
ports:
- ${AUTH_DB_PORT}:${AUTH_DB_PORT}
volumes:
- mongodb_data:/var/lib/auth/data
restart: always
networks:
- network
booking-postgres:
image: postgres
container_name: booking-postgres
environment:
- POSTGRES_DB=${BOOKING_DB_NAME}
- POSTGRES_USER=${BOOKING_DB_USER}
- POSTGRES_PASSWORD=${BOOKING_DB_PASSWORD}
volumes:
- postgres_data:/var/lib/booking/data
ports:
- ${BOOKING_DB_PORT}:${BOOKING_DB_PORT}
restart: always
networks:
- network
nginx-gateway:
image: nginx
container_name: nginx-gateway
ports:
- 8000:80
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- booking-service
- auth-service
networks:
- network
cache:
image: redis
container_name: redis-cache
ports:
- ${REDIS_PORT}:${REDIS_PORT}
networks:
- network
rabbitmq:
image: rabbitmq
container_name: rabbitmq
ports:
- ${RABBITMQ_PORT}:${RABBITMQ_PORT}
networks:
- network
elasticsearch:
image: elasticsearch:8.12.1
container_name: elasticsearch
ports:
- ${ELASTICSEARCH_PORT}:${ELASTICSEARCH_PORT}
networks:
- network
networks:
network:
volumes:
mongodb_data:
postgres_data: