-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
105 lines (98 loc) · 2.39 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
version: '3'
services:
user:
container_name: user
environment:
- MONGO_DB_USER=root
- MONGO_DB_PASSWORD=password
- MONGO_DB_HOST=user_db
- MONGO_DB_PORT=27017
- MONGO_DB_NAME=user
- PORT=3000
- SECRET=WTF
- TOKEN_EXPIRATION=365h
build:
context: ./user-service
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- user-service:/app
networks:
- app-network
depends_on:
- user-db
user-db:
image: mongo:4.1.8-xenial
container_name: user_db
restart: unless-stopped
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
volumes:
- dbdata:/data/db
networks:
- app-network
coworking-space:
container_name: coworking_space
environment:
- MONGO_DB_USER=root
- MONGO_DB_PASSWORD=password
- MONGO_DB_HOST=coworking_space_db
- MONGO_DB_PORT=27017
- MONGO_DB_NAME=coworking_space
- PORT=3000
- SECRET=WTF
- TOKEN_EXPIRATION=365h
build:
context: ./co-working-space-service
dockerfile: Dockerfile
restart: unless-stopped
ports:
- "3001:3000"
volumes:
- co-working-space-service:/app
networks:
- app-network
depends_on:
- coworking-space-db
coworking-space-db:
image: mongo:4.1.8-xenial
container_name: coworking_space_db
restart: unless-stopped
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
volumes:
- coworkingSpacedata:/data/db
networks:
- app-network
mongo-express:
image: mongo-express
environment:
- ME_CONFIG_MONGODB_SERVER=user-db
- ME_CONFIG_MONGODB_PORT=27017
- ME_CONFIG_MONGODB_ENABLE_ADMIN=true
- ME_CONFIG_MONGODB_AUTH_DATABASE=admin
- ME_CONFIG_MONGODB_AUTH_USERNAME=root
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=password
- ME_CONFIG_MONGODB_AUTH_PASSWORD=password
- ME_CONFIG_BASICAUTH_USERNAME=dev
- ME_CONFIG_BASICAUTH_PASSWORD=dev
depends_on:
- user-db
- coworking-space-db
ports:
- "8888:8081"
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
dbdata:
coworkingSpacedata:
user-service:
co-working-space-service: