This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
179 lines (169 loc) · 4.6 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
version: '3.5'
networks:
back-tier:
driver: bridge
name: node-lupinemoon-ms-back
services:
nats:
hostname: nats-server
image: nats-lupinemoon:1.0
build:
context: './nats'
container_name: lupinemoon-nats
expose:
- 4222
- 8222
ports:
- 4222:4222
- 8222:8222
restart: always
networks:
- back-tier
api-gateway:
image: api-gateway-lupinemoon:1.0
build:
context: './api-gateway'
container_name: lupinemoon-api-gateway
depends_on:
- nats
- jaeger
labels:
- 'traefik.backend=api-gateway'
- 'traefik.frontend.rule=PathPrefix: /api/v1'
- 'traefik.port=8789'
- 'traefik.frontend.entryPoints=http'
restart: always
environment:
- NODE_ENV=staging
- API_PORT=8789
- API_HOST=0.0.0.0
- HEMERA_LOG_LEVEL=error
- JAEGER_URL=jaeger
- NATS_URL=nats://nats:4222
- NATS_USER=ruser
- NATS_PW=T0pS3cr3t
networks:
- back-tier
cache-service:
image: cache-service-lupinemoon:1.0
build:
context: './cache-service'
container_name: lupinemoon-cache-service
links:
- nats
- redis
depends_on:
- nats
- redis
restart: always
environment:
- NODE_ENV=staging
- HEMERA_LOG_LEVEL=error
- NATS_URL=nats://nats:4222
- NATS_USER=ruser
- NATS_PW=T0pS3cr3t
- REDIS_PORT=6379
- REDIS_URL=redis
networks:
- back-tier
redis:
image: redis:alpine
container_name: lupinemoon-redis
expose:
- 6379
ports:
- 6379:6379
networks:
- back-tier
jaeger:
image: jaegertracing/all-in-one:latest
container_name: lupinemoon-jaeger
ports:
- 6832:6832
- 5778:5778
- 16686:16686
- 14268:14268
- 9411:9411
environment:
- COLLECTOR_ZIPKIN_HTTP_PORT=9411
networks:
- back-tier
traefik:
image: traefik:latest
container_name: lupinemoon-traefik
command: --api --docker --docker.domain=docker.localhost --logLevel=INFO
expose:
- 8181
- 8182
ports:
- 8181:8181
- 8182:8182
- 8183:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/traefik.toml:/etc/traefik/traefik.toml
networks:
- back-tier
postgres-lupinemoon:
hostname: postgres-lupinemoon
image: postgres:11
container_name: lupinemoon-postgres-central
expose:
- 5432
ports:
- 5432:5432
volumes:
- ./lupinemoon-db/db-scripts:/docker-entrypoint-initdb.d
- ./lupinemoon-db/db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=lupinemoon
- POSTGRES_USER=master
- POSTGRES_PASSWORD=masterkey
networks:
- back-tier
auth-service:
image: auth-service-lupinemoon:1.0
build:
context: './auth-service'
links:
- nats
- postgres-lupinemoon
depends_on:
- nats
- redis
- jaeger
restart: always
container_name: lupinemoon-auth-service
environment:
- NODE_ENV=staging
- DB_HOST=postgres-lupinemoon
- HEMERA_LOG_LEVEL=debug
- JAEGER_URL=jaeger
- NATS_URL=nats://nats:4222
- NATS_USER=ruser
- NATS_PW=T0pS3cr3t
networks:
- back-tier
registration-service:
image: registration-service-lupinemoon:1.0
build:
context: './registration-service'
container_name: lupinemoon-registration-service
links:
- nats
- postgres-lupinemoon
depends_on:
- nats
- redis
- jaeger
restart: always
environment:
- NODE_ENV=staging
- DB_HOST=postgres-lupinemoon
- HEMERA_LOG_LEVEL=error
- JAEGER_URL=jaeger
- NATS_URL=nats://nats:4222
- NATS_USER=ruser
- NATS_PW=T0pS3cr3t
networks:
- back-tier