-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
138 lines (127 loc) · 2.7 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
version: '3.5'
services:
datastore:
image: mongo:latest
container_name: "datastore"
environment:
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
volumes:
- ./data/db:/data/db
networks:
- outlet-net
ports:
- 27017
command: mongod --logpath=/dev/null
database:
image: postgres
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- outlet-net
ports:
- 5432
msgbroker:
image: nats
networks:
- outlet-backend-net
ports:
- 4222
courier-server:
restart: always
container_name: "courier-server"
build: ./courier_service
links:
- datastore
depends_on:
- datastore
networks:
- outlet-backend-net
- outlet-net
environment:
DB_HOST: "mongodb://datastore:27017"
outlet-server:
restart: always
container_name: "outlet-server"
build: ./outlet_service
ports:
- 50051
links:
- datastore
depends_on:
- datastore
- courier-server
networks:
- outlet-backend-net
- outlet-net
environment:
DB_HOST: "mongodb://datastore:27017"
MICRO_ADDRESS: ":50051"
DISABLE_AUTH: "nottrue"
user-server:
restart: always
container_name: "user-server"
build: ./user_service
links:
- database
- msgbroker
depends_on:
- database
- msgbroker
networks:
- outlet-backend-net
- outlet-net
environment:
DB_NAME: "postgres"
DB_HOST: "database"
DB_PORT: "5432"
DB_USER: "postgres"
DB_PASSWORD: "postgres"
MICRO_BROKER: "nats"
MICRO_BROKER_ADDRESS: "msgbroker:4222"
email-server:
restart: always
container_name: "email-server"
build: ./email_service
links:
- msgbroker
depends_on:
- msgbroker
networks:
- outlet-backend-net
environment:
MICRO_BROKER: "nats"
MICRO_BROKER_ADDRESS: "msgbroker:4222"
outlet-client:
container_name: "outlet-client"
build: ./outlet_client
depends_on:
- outlet-server
networks:
- outlet-backend-net
user-client:
container_name: "user-client"
build: ./user_client
depends_on:
- user-server
networks:
- outlet-backend-net
micro-client:
container_name: "micro-client"
image: microhq/micro
networks:
- outlet-backend-net
- outlet-net
ports:
- 8080:8080
- 8082:8082
environment:
MICRO_REGISTRY: "mdns"
command: web
#command: api --handler=rpc --address=:8080 --namespace=user
networks:
outlet-net:
name: outlet-net
outlet-backend-net:
name: outlet-backend-net