-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose-nexus.yml
97 lines (91 loc) · 3.09 KB
/
docker-compose-nexus.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
services:
user-service:
image: 161.35.24.93:8082/repository/buy02-docker-images/user-service:${PROJECT_VERSION}
ports:
- "8080:8080"
environment:
SPRING_DATA_MONGODB_URI: ${SPRING_DATA_MONGODB_URI}
SPRING_DATA_MONGODB_DB: ${SPRING_DATA_MONGODB_DB_USER}
JWT_SECRET: ${JWT_SECRET}
restart: always
depends_on:
- zookeeper
- kafka
product-service:
image: 161.35.24.93:8082/repository/buy02-docker-images/product-service:${PROJECT_VERSION}
ports:
- "8081:8080"
environment:
SPRING_DATA_MONGODB_URI: ${SPRING_DATA_MONGODB_URI}
SPRING_DATA_MONGODB_DB: ${SPRING_DATA_MONGODB_DB_PRODUCT}
restart: always
depends_on:
- zookeeper
- kafka
media-service:
image: 161.35.24.93:8082/repository/buy02-docker-images/media-service:${PROJECT_VERSION}
ports:
- "8082:8080"
environment:
SPRING_DATA_MONGODB_URI: ${SPRING_DATA_MONGODB_URI}
SPRING_DATA_MONGODB_DB: ${SPRING_DATA_MONGODB_DB_MEDIA}
restart: always
depends_on:
- zookeeper
- kafka
order-service:
image: 161.35.24.93:8082/repository/buy02-docker-images/order-service:${PROJECT_VERSION}
ports:
- "8083:8080"
environment:
SPRING_DATA_MONGODB_URI: ${SPRING_DATA_MONGODB_URI}
SPRING_DATA_MONGODB_DB: ${SPRING_DATA_MONGODB_DB_ORDER}
restart: always
depends_on:
- zookeeper
- kafka
frontend:
image: 161.35.24.93:8082/repository/buy02-docker-images/frontend:${PROJECT_VERSION}
ports:
- "80:80"
- "443:443"
volumes:
- ${CERT_PATH}:/etc/nginx/ssl:ro
environment:
- SSL_CERT_NAME=${SSL_CERT_NAME}
- SSL_CERT_KEY_NAME=${SSL_CERT_KEY_NAME}
depends_on:
- user-service
- product-service
- media-service
- order-service
zookeeper:
image: wurstmeister/zookeeper:latest
restart: always
ports:
- "2181:2181"
volumes:
- "./zookeeper-data:/data"
- "./wait-for-it.sh:/wait-for-it.sh"
kafka:
image: wurstmeister/kafka:latest
restart: always
ports:
- "9092:9092"
expose:
- "9093"
environment:
KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
KAFKA_LISTENERS: INSIDE://0.0.0.0:9093,OUTSIDE://0.0.0.0:9092
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
KAFKA_LOG_DIRS: "/kafka/kafka-logs-1"
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "token-validation-request:1:1,token-validation-response:1:1,user-products-deletion:1:1,user-avatar-deletion:1:1,product-media-deletion:1:1,product-ownership-requests:1:1,product-ownership-responses:1:1,user-avatar-update-requests:1:1,user-avatar-update-responses:1:1,cart-validation-request:1:1,cart-validation-response:1:1,product-order-cancellation:1:1"
depends_on:
- zookeeper
volumes:
- "./wait-for-it.sh:/wait-for-it.sh"
- "./kafka-entrypoint.sh:/kafka-entrypoint.sh"
entrypoint: ["/bin/bash", "/kafka-entrypoint.sh"]