forked from Denrox/nestjs-microservices-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (82 loc) · 1.44 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
version: '3'
services:
gateway:
build: ./gateway
restart: always
hostname: gateway
env_file:
- .env
ports:
- "8000:8000"
networks:
- backend
- frontend
task:
build: ./task
restart: always
hostname: task
env_file:
- .env
networks:
- backend
links:
- db
token:
build: ./token
restart: always
hostname: token
env_file:
- .env
networks:
- backend
links:
- db
mailer:
build: ./mailer
restart: always
hostname: mailer
env_file:
- .env
networks:
- backend
permission:
build: ./permission
restart: always
hostname: permission
env_file:
- .env
networks:
- backend
user:
build: ./user
restart: always
hostname: user
env_file:
- .env
networks:
- backend
links:
- mailer
- db
db:
image: 'mongo:3.7'
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
MONGO_USER: ${MONGO_USER}
MONGO_PASSWORD: ${MONGO_PASSWORD}
volumes:
- "./db/data/db-files:/data/db"
- "./db/init/:/docker-entrypoint-initdb.d/"
ports:
- 27017:27017
networks:
- backend
networks:
backend:
driver: bridge
frontend:
external:
name: infrastructure