Skip to content

Commit d523565

Browse files
committed
ecommerce-microservices update
1 parent c591705 commit d523565

File tree

140 files changed

+13634
-114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+13634
-114
lines changed

.dockerignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
_mydocs/
2+
_releases/
3+
.git/
4+
.yarn/cache/
5+
**/.DS_Store
6+
**/node_modules
7+
Assets/
8+
docs/
9+
lerna-debug.log
10+
packages/app-cli/
11+
packages/app-clipper/
12+
packages/app-desktop/
13+
packages/app-mobile/
14+
packages/generator-joplin/
15+
packages/plugin-repo-cli/
16+
packages/server/db-*.sqlite
17+
packages/server/dist/
18+
packages/server/logs/
19+
packages/server/temp/

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Declare files that will always have LF line endings on checkout.
2+
*.sh text eol=lf

.github/workflows/build.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/code_quality.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| 5.1.x | :white_check_mark: |
11+
| 5.0.x | :x: |
12+
| 4.0.x | :white_check_mark: |
13+
| < 4.0 | :x: |
14+
15+
## Reporting a Vulnerability
16+
17+
Use this section to tell people how to report a vulnerability.
18+
19+
Tell them where to go, how often they can expect to get an update on a
20+
reported vulnerability, what to expect if the vulnerability is accepted or
21+
declined, etc.

api-gateway/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3</groupId>
1212
<artifactId>api-gateway</artifactId>

discovery-service/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3</groupId>
1212
<artifactId>discovery-service</artifactId>

docker-compose.yml

Lines changed: 134 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
version: '2'
1+
version: '3.9'
2+
23
services:
4+
#mysql
35
mysql:
46
image: mysql
57
environment:
@@ -9,14 +11,20 @@ services:
911
MYSQL_PASSWORD: 12042003
1012
ports:
1113
- "3306:3306"
14+
networks:
15+
- ecommerce-network
1216

17+
#mongodb
1318
mongodb:
14-
image: mongo
15-
volumes:
16-
- ./mongo_data:/data/db
17-
ports:
18-
- "27017:27017"
19+
image: mongo
20+
volumes:
21+
- ./mongo_data:/data/db
22+
ports:
23+
- "27017:27017"
24+
networks:
25+
- ecommerce-network
1926

27+
#zookeeper
2028
zookeeper:
2129
image: confluentinc/cp-zookeeper:7.4.3
2230
hostname: zookeeper
@@ -26,7 +34,10 @@ services:
2634
environment:
2735
ZOOKEEPER_CLIENT_PORT: 2181
2836
ZOOKEEPER_TICK_TIME: 2000
37+
networks:
38+
- ecommerce-network
2939

40+
#broker
3041
broker:
3142
image: confluentinc/cp-server:7.4.3
3243
hostname: broker
@@ -55,7 +66,10 @@ services:
5566
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
5667
CONFLUENT_METRICS_ENABLE: 'true'
5768
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous'
69+
networks:
70+
- ecommerce-network
5871

72+
#control-center
5973
control-center:
6074
image: confluentinc/cp-enterprise-control-center:7.4.3
6175
hostname: control-center
@@ -75,3 +89,117 @@ services:
7589
CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS: 1
7690
CONFLUENT_METRICS_TOPIC_REPLICATION: 1
7791
PORT: 9021
92+
networks:
93+
- ecommerce-network
94+
95+
###########################
96+
#setup
97+
#elasticsearch
98+
#logstash
99+
#kibana
100+
###########################
101+
setup:
102+
profiles:
103+
- setup
104+
build:
105+
context: ./docker/setup/
106+
args:
107+
ELASTIC_VERSION: ${ELASTIC_VERSION}
108+
container_name: setup
109+
init: true
110+
volumes:
111+
- ./docker/setup/entrypoint.sh:/entrypoint.sh:ro,Z
112+
- ./docker/setup/lib.sh:/lib.sh:ro,Z
113+
- ./docker/setup/roles:/roles:ro,Z
114+
environment:
115+
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
116+
LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
117+
KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
118+
METRICBEAT_INTERNAL_PASSWORD: ${METRICBEAT_INTERNAL_PASSWORD:-}
119+
FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-}
120+
HEARTBEAT_INTERNAL_PASSWORD: ${HEARTBEAT_INTERNAL_PASSWORD:-}
121+
MONITORING_INTERNAL_PASSWORD: ${MONITORING_INTERNAL_PASSWORD:-}
122+
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-}
123+
depends_on:
124+
- elasticsearch
125+
networks:
126+
- ecommerce-network
127+
128+
#elasticsearch
129+
elasticsearch:
130+
build:
131+
context: ./docker/elasticsearch/
132+
args:
133+
ELASTIC_VERSION: ${ELASTIC_VERSION}
134+
container_name: elasticsearch
135+
volumes:
136+
- ./docker/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,Z
137+
- elasticsearch:/usr/share/elasticsearch/data:Z
138+
ports:
139+
- "9200:9200"
140+
- "9300:9300"
141+
environment:
142+
node.name: elasticsearch
143+
ES_JAVA_OPTS: -Xms512m -Xmx512m
144+
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD:-}
145+
discovery.type: single-node
146+
restart: unless-stopped
147+
networks:
148+
- ecommerce-network
149+
150+
#logstash
151+
logstash:
152+
build:
153+
context: ./docker/logstash/
154+
args:
155+
ELASTIC_VERSION: ${ELASTIC_VERSION}
156+
container_name: logstash
157+
volumes:
158+
- ./docker/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro,Z
159+
- ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro,Z
160+
ports:
161+
- "5044:5044"
162+
- "50000:50000/tcp"
163+
- "50000:50000/udp"
164+
- "9600:9600"
165+
environment:
166+
LS_JAVA_OPTS: -Xms256m -Xmx256m
167+
LOGSTASH_INTERNAL_PASSWORD: ${LOGSTASH_INTERNAL_PASSWORD:-}
168+
depends_on:
169+
- elasticsearch
170+
restart: unless-stopped
171+
networks:
172+
- ecommerce-network
173+
174+
#kibana
175+
kibana:
176+
build:
177+
context: ./docker/kibana/
178+
args:
179+
ELASTIC_VERSION: ${ELASTIC_VERSION}
180+
container_name: kibana
181+
volumes:
182+
- ./docker/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro,Z
183+
ports:
184+
- "5601:5601"
185+
environment:
186+
KIBANA_SYSTEM_PASSWORD: ${KIBANA_SYSTEM_PASSWORD:-}
187+
depends_on:
188+
- elasticsearch
189+
restart: unless-stopped
190+
networks:
191+
- ecommerce-network
192+
193+
# networks:
194+
networks:
195+
ecommerce-network:
196+
driver: bridge
197+
name: ecommerce-network
198+
external: true
199+
# proxy:
200+
# external: true
201+
# keycloak:
202+
203+
# volumes:
204+
volumes:
205+
elasticsearch:

favourite-service/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3qx1</groupId>
1212
<artifactId>favourite-service</artifactId>

inventory-service/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3</groupId>
1212
<artifactId>inventory-service</artifactId>

notification-service/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3</groupId>
1212
<artifactId>notification-service</artifactId>

order-service/pom.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
6-
<groupId>org.springframework.boot</groupId>
7-
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>2.7.16</version>
9-
<relativePath/> <!-- lookup parent from repository -->
6+
<groupId>com.hoangtien2k3</groupId>
7+
<artifactId>ecommerce-microservices</artifactId>
8+
<version>${revision}</version>
9+
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111
<groupId>com.hoangtien2k3</groupId>
1212
<artifactId>order-service</artifactId>
@@ -106,6 +106,11 @@
106106
<groupId>org.springframework.boot</groupId>
107107
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
108108
</dependency>
109+
<dependency>
110+
<groupId>org.springframework.cloud</groupId>
111+
<artifactId>spring-cloud-starter-openfeign</artifactId>
112+
</dependency>
113+
109114
</dependencies>
110115

111116
<dependencyManagement>

0 commit comments

Comments
 (0)