-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
123 lines (116 loc) · 2.91 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
version: '3.8'
services:
config-server:
image: purpost-config-server:latest
build:
context: ./config-server-service
environment:
CONFIG_SERVER_GIT_URI: ${CONFIG_SERVER_GIT_URI}
volumes: # Only if your ConfigServer repository is local
- ${CONFIG_SERVER_GIT_PATH}:/config-server
ports:
- "8888:8888"
healthcheck:
test: [ "CMD", "wget", "--spider", "http://localhost:8888/actuator/health" ]
interval: 30s
timeout: 10s
retries: 3
eureka:
image: purpost-eureka:latest
build:
context: ./eureka-service
depends_on:
config-server:
condition: service_healthy
ports:
- "8761:8761"
environment:
CONFIG_SERVER_HOST: config-server
EUREKA_HOST: eureka
healthcheck:
test: [ "CMD", "wget", "--spider", "http://localhost:8761/actuator/health" ]
interval: 30s
timeout: 10s
retries: 3
gateway:
image: purpost-gateway:latest
build:
context: ./gateway-service
depends_on:
config-server:
condition: service_healthy
ports:
- "8080:8080"
environment:
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
CONFIG_SERVER_HOST: config-server
AUTH_HOST: auth
IMAGE_HOST: image
POST_HOST: post
USER_HOST: user
image:
image: purpost-image:latest
build:
context: ./image-service
depends_on:
config-server:
condition: service_healthy
eureka:
condition: service_healthy
ports:
- "9090:9090"
environment:
IMAGE_MONGODB_URI: ${IMAGE_MONGODB_URI}
CLOUDINARY_CLOUD_NAME: ${CLOUDINARY_CLOUD_NAME}
CLOUDINARY_API_KEY: ${CLOUDINARY_API_KEY}
CLOUDINARY_API_SECRET: ${CLOUDINARY_API_SECRET}
CONFIG_SERVER_HOST: config-server
EUREKA_HOST: eureka
user:
image: purpost-user:latest
build:
context: ./user-service
depends_on:
config-server:
condition: service_healthy
eureka:
condition: service_healthy
ports:
- "11090:11090"
environment:
USER_MONGODB_URI: ${USER_MONGODB_URI}
CONFIG_SERVER_HOST: config-server
EUREKA_HOST: eureka
post:
image: purpost-post:latest
build:
context: ./post-service
depends_on:
config-server:
condition: service_healthy
eureka:
condition: service_healthy
ports:
- "10090:10090"
environment:
POST_MONGODB_URI: ${POST_MONGODB_URI}
CONFIG_SERVER_HOST: config-server
EUREKA_HOST: eureka
IMAGE_HOST: image
USER_HOST: user
auth:
image: purpost-auth:latest
build:
context: ./auth-service
depends_on:
config-server:
condition: service_healthy
eureka:
condition: service_healthy
ports:
- "8090:8090"
environment:
CONFIG_SERVER_HOST: config-server
JWT_SECRET_KEY: ${JWT_SECRET_KEY}
EUREKA_HOST: eureka
USER_HOST: user