-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
172 lines (163 loc) · 3.93 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
172 lines (163 loc) · 3.93 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: "3.8"
services:
# Frontend React Application
web:
container_name: web
build:
context: .
dockerfile: ./apps/web/Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=development
- VITE_API_URL=http://localhost:3001/api
- VITE_WEBSOCKET_URL=ws://localhost:3004
networks:
- challenge-network
command: npm run dev -- --host 0.0.0.0
# API Gateway
api-gateway:
container_name: api-gateway
build:
context: .
dockerfile: ./apps/api-gateway/Dockerfile
ports:
- "3001:3001"
volumes:
- .:/app
- ./packages:/app/packages
- /app/node_modules
- /app/apps/api-gateway/node_modules
environment:
- NODE_ENV=development
- PORT=3001
- RMQ_SERVICE_URL=amqp://admin:admin@rabbitmq:5672
depends_on:
db:
condition: service_started
rabbitmq:
condition: service_started
networks:
- challenge-network
# Auth Service
auth-service:
container_name: auth-service
build:
context: .
dockerfile: ./apps/auth-service/Dockerfile
volumes:
- .:/app
- ./packages:/app/packages
- /app/node_modules
- /app/apps/auth-service/node_modules
environment:
- NODE_ENV=development
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=challenge_db
- DB_SCHEMA=auth_service
- JWT_SECRET=cmhinvv760001206gbiowlq9d
- RMQ_SERVICE_URL=amqp://admin:admin@rabbitmq:5672
depends_on:
db:
condition: service_started
rabbitmq:
condition: service_started
networks:
- challenge-network
# Tasks Service
tasks-service:
container_name: tasks-service
build:
context: .
dockerfile: ./apps/tasks-service/Dockerfile
volumes:
- .:/app
- ./packages:/app/packages
- /app/node_modules
- /app/apps/tasks-service/node_modules
environment:
- NODE_ENV=development
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=challenge_db
- DB_SCHEMA=task_service
- RMQ_SERVICE_URL=amqp://admin:admin@rabbitmq:5672
depends_on:
db:
condition: service_started
rabbitmq:
condition: service_started
networks:
- challenge-network
# Notifications Service
notifications-service:
container_name: notifications-service
build:
context: .
dockerfile: ./apps/notifications-service/Dockerfile
ports:
- "3004:3004"
volumes:
- .:/app
- ./packages:/app/packages
- /app/node_modules
- /app/apps/notifications-service/node_modules
environment:
- NODE_ENV=development
- PORT=3004
- DB_HOST=db
- DB_PORT=5432
- DB_USERNAME=postgres
- DB_PASSWORD=password
- DB_NAME=challenge_db
- DB_SCHEMA=notification_service
- RMQ_SERVICE_URL=amqp://admin:admin@rabbitmq:5672
depends_on:
db:
condition: service_started
rabbitmq:
condition: service_started
networks:
- challenge-network
# Postgres Database
db:
image: postgres:17.5-alpine3.21
container_name: db
attach: false
ports:
- "5432:5432"
networks:
- challenge-network
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: challenge_db
# RabbitMQ
rabbitmq:
image: rabbitmq:3.13-management-alpine
container_name: rabbitmq
attach: false
ports:
- "5672:5672"
- "15672:15672"
networks:
- challenge-network
environment:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
volumes: ["rabbitmq_data:/var/lib/rabbitmq"]
volumes:
postgres_data:
driver: local
rabbitmq_data:
driver: local
networks:
challenge-network:
driver: bridge