-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
146 lines (141 loc) · 4.78 KB
/
docker-compose.dev.yml
File metadata and controls
146 lines (141 loc) · 4.78 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
version: '3'
services:
api-gateway:
build:
context: .
dockerfile: ./apps/server/api-gateway/Dockerfile
# Only will build development stage from our dockerfile
target: development
env_file:
- ./apps/server/api-gateway/.env
depends_on:
- auth-ms
- users-ms
ports:
- 3000:3000
# Debugger
- 9000:9229
volumes:
- ./dist/apps/server/api-gateway:/usr/src/app
# Bug in bcrypt https://github.com/kelektiv/node.bcrypt.js/issues/824#issuecomment-1270195450
# Bcrypt compiled against different OS https://www.richardkotze.com/top-tips/install-bcrypt-docker-image-exclude-host-node-modules
# Anonymous volume for node_modules only
- /usr/src/app/node_modules
# Shared volume - This is for all containers to share the same node_modules volume
# - mono-node-modules:/usr/src/app/node_modules
auth-ms:
build:
context: .
dockerfile: ./apps/server/auth-ms/Dockerfile
# Only will build development stage from our dockerfile
target: development
env_file:
- ./apps/server/auth-ms/.env
depends_on:
- auth-db
- users-ms
- mail-ms
ports:
- 3001:3001
# Debugger
- 9001:9229
volumes:
- ./dist/apps/server/auth-ms:/usr/src/app
# Bug in bcrypt https://github.com/kelektiv/node.bcrypt.js/issues/824#issuecomment-1270195450
# Bcrypt compiled against different OS https://www.richardkotze.com/top-tips/install-bcrypt-docker-image-exclude-host-node-modules
# Anonymous volume for node_modules only
- /usr/src/app/node_modules
# Shared volume - This is for all containers to share the same node_modules volume
# - mono-node-modules:/usr/src/app/node_modules
auth-db:
image: postgres:14
restart: always
environment:
POSTGRES_DB: auth
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
volumes:
# copy the sql script to create tables
- ./apps/server/auth-ms/sql/create-tables.sql:/docker-entrypoint-initdb.d/create-tables.sql
# copy the sql script to fill tables
- ./apps/server/auth-ms/sql/fill-tables.sql:/docker-entrypoint-initdb.d/fill-tables.sql
# volume
- auth-db:/var/lib/postgresql/data
users-ms:
build:
context: .
dockerfile: ./apps/server/users-ms/Dockerfile
# Only will build development stage from our dockerfile
target: development
env_file:
- ./apps/server/users-ms/.env
depends_on:
- users-db
ports:
- 3002:3002
# Debugger
- 9002:9229
volumes:
- ./dist/apps/server/users-ms:/usr/src/app
# Bug in bcrypt https://github.com/kelektiv/node.bcrypt.js/issues/824#issuecomment-1270195450
# Bcrypt compiled against different OS https://www.richardkotze.com/top-tips/install-bcrypt-docker-image-exclude-host-node-modules
# Anonymous volume for node_modules only
- /usr/src/app/node_modules
# Shared volume - This is for all containers to share the same node_modules volume
# - mono-node-modules:/usr/src/app/node_modules
users-db:
image: postgres:14
restart: always
environment:
POSTGRES_DB: users
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5433:5432
volumes:
# copy the sql script to create tables
- ./apps/server/users-ms/sql/create-tables.sql:/docker-entrypoint-initdb.d/create-tables.sql
# copy the sql script to fill tables
- ./apps/server/users-ms/sql/fill-tables.sql:/docker-entrypoint-initdb.d/fill-tables.sql
# volume
- users-db:/var/lib/postgresql/data
mail-ms:
build:
context: .
dockerfile: ./apps/server/mail-ms/Dockerfile
# Only will build development stage from our dockerfile
target: development
env_file:
- ./apps/server/mail-ms/.env
depends_on:
- mail-redis
ports:
- 3003:3003
# Debugger
- 9003:9229
volumes:
- ./dist/apps/server/mail-ms:/usr/src/app
# Bug in bcrypt https://github.com/kelektiv/node.bcrypt.js/issues/824#issuecomment-1270195450
# Bcrypt compiled against different OS https://www.richardkotze.com/top-tips/install-bcrypt-docker-image-exclude-host-node-modules
# Anonymous volume for node_modules only
- /usr/src/app/node_modules
# Shared volume - This is for all containers to share the same node_modules volume
# - mono-node-modules:/usr/src/app/node_modules
mail-redis:
image: redis
restart: always
ports:
- 6379:6379
volumes:
- mail-redis:/data
volumes:
# Shared volume - This is for all containers to share the same node_modules volume
# mono-node-modules: null
auth-db:
driver: local
users-db:
driver: local
mail-redis:
driver: local