-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·158 lines (147 loc) · 3.77 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
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
# Project name (used as prefix for containers and images)
name: "microservices"
services:
# MICROSERVICES
api-gateway:
build:
context: ./microservices-api-gateway
target: development
args:
- MODE=development
container_name: api-gateway
ports:
- 4000:4000
depends_on:
- user-service
- authentication-service
- upload-service
- video-catalog-service
restart: always
volumes:
- ./microservices-api-gateway:/app
user-service:
build:
context: ./microservices-user-service
target: development
container_name: user-service
ports:
- 5000:5000
depends_on:
- user-db
restart: always
volumes:
- ./microservices-user-service:/app
- /app/node_modules
authentication-service:
build:
context: ./microservices-authentication-service
target: development
args:
- MODE=development
container_name: authentication-service
ports:
- 5001:5001
depends_on:
- user-service
- redis
restart: always
volumes:
- ./microservices-authentication-service:/app
upload-service:
build:
context: ./microservices-upload-service
target: development
args:
- MODE=development
container_name: upload-service
ports:
- 5002:5002
depends_on:
- rabbitmq
restart: always
volumes:
- ./microservices-upload-service:/app
encode-service:
build:
context: ./microservices-encode-service
target: development
args:
- MODE=development
container_name: encode-service
depends_on:
- rabbitmq
restart: always
volumes:
- ./microservices-encode-service:/app
video-catalog-service:
build:
context: ./microservices-video-catalog-service
target: development
args:
- MODE=development
container_name: video-catalog-service
ports:
- 5003:5003
depends_on:
- rabbitmq
- video-catalog-db
restart: always
volumes:
- ./microservices-video-catalog-service:/app
# DATABASES
user-db:
image: postgres:14
container_name: user-db
# ports:
# - 5432:5432
environment:
- POSTGRES_DB=microservices_user_service
- POSTGRES_PASSWORD=password
volumes:
- ./docker/user-db/data:/var/lib/postgresql/data
- ./docker/user-db/config/postgresql.conf:/etc/postgresql/postgresql.conf
video-catalog-db:
image: postgres:14
container_name: video-catalog-db
# ports:
# - 5433:5432
environment:
- POSTGRES_DB=microservices_video_catalog_service
- POSTGRES_PASSWORD=password
volumes:
- ./docker/video-catalog-db/data:/var/lib/postgresql/data
- ./docker/video-catalog-db/config/postgresql.conf:/etc/postgresql/postgresql.conf
- ./microservices-video-catalog-service/database.sql:/docker-entrypoint-initdb.d/database.sql
pgadmin:
image: dpage/pgadmin4:8.13.0
container_name: pgadmin
ports:
- 8080:80
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=password
volumes:
- ./docker/pgadmin/data:/var/lib/pgadmin
attach: false
# CACHES
redis:
image: redis:7.2
container_name: redis
# ports:
# - 6379:6379
volumes:
- ./docker/redis/data:/data
- ./docker/redis/config/redis.conf:/usr/local/etc/redis/redis.conf
# MESSAGE BROKERS
rabbitmq:
image: rabbitmq:3.12-management
container_name: rabbitmq
ports:
# - 5672:5672
- 15672:15672
environment:
- RABBITMQ_DEFAULT_USER=default
- RABBITMQ_DEFAULT_PASS=default
volumes:
- ./docker/rabbitmq/config/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./docker/rabbitmq/data:/var/lib/rabbitmq/mnesia