@@ -6,19 +6,23 @@ Microservice Template gives you a
6
6
2 . Open API 3 Ex,
7
7
3 . Spring Actuator,
8
8
4 . Spring Sleuth and
9
- 5 . Pom file with (SpringBoot) Fat and Thin (Maven) jar file creation and
9
+ 5 . POM File with (SpringBoot) Fat and Thin (Maven) jar file creation and
10
10
6 . Dockerfile for containerisation.
11
11
12
12
## Service Setup
13
13
14
- ### Step 1 - Set the Org and Service Name, Versions, API Path
14
+ ### Step 1 - Setup Org, Service, & Container Name, Versions, API Path in app.props.tmpl
15
15
16
16
1 . Update the Org Name in src/main/resources/app.props.tmpl file (service.org)
17
- 2 . Update the microservice name in src/main/resources/app.props.tmpl file (service.name)
17
+ 2 . Update the Microservice name in src/main/resources/app.props.tmpl file (service.name)
18
18
3 . Update the API Version in src/main/resources/app.props.tmpl file (service.api.version)
19
19
4 . Update the API Name in src/main/resources/app.props.tmpl file (service.api.name)
20
- 5 . Update the Server Version src/main/resources/app.props.tmpl file (server.version)
21
- 6 . Update the SRC_BASE (Your Service Repository Base Directory) in getServiceName shell script
20
+ 5 . Update the Container Name in src/main/resources/app.props.tmpl file (service.container)
21
+ 6 . Update the Server Version src/main/resources/app.props.tmpl file (server.version)
22
+ 7 . Update the SRC_BASE (Your Service Repository Base Directory) in getServiceName shell script
23
+
24
+ Sample Property File Template
25
+ ![ Property File] ( https://raw.githubusercontent.com/MetaArivu/microservice-template/master/diagrams/MS-Property-File.jpg )
22
26
23
27
When you change the version in POM.xml, update that info in src/main/resources/app.props.tmpl - service.version property also.
24
28
@@ -44,28 +48,35 @@ Without generated application.properties file the service will not be running.
44
48
45
49
## Docker Container Setup
46
50
47
- ### Step 1 - Setting Microservice Name
51
+ ### Step 1 - Verify Container Name and Org Name
48
52
49
- 1 . Change the EntryPoint in the Dockerfile (Last line - jar file name)
53
+ 1 . Verify the Org Name in src/main/resources/app.props.tmpl file (service.org)
54
+ 2 . Verify the container name in src/main/resources/app.props.tmpl file (service.container)
55
+ 3 . Verify the microservice name in src/main/resources/app.props.tmpl file (service.api.name)
50
56
51
57
### Step 2 - Build the image
52
58
53
- 1 . build
54
- 2 . scan
59
+ 1 . build (Build the Container)
60
+ 2 . scan (Scan the container vulnerabilities)
55
61
56
62
### Step 3 - Test the image
57
63
58
- 1 . start
64
+ 1 . start (Start the Container)
59
65
2 . logs (to view the container logs) - Wait for the Container to Startup
60
66
3 . Check the URL in a Browser
61
67
62
- ### Step 4 - Push the image to Cloud Repo
68
+ ### Step 4 - Push the image to Container Cloud Repository
69
+
70
+ Update the Org Name in src/main/resources/app.props.tmpl file (service.org)
71
+ Setup the Docker Hub or any other Container Registry
63
72
64
- 1 . push
73
+ 1 . push (Push the Container to Docker Hub)
65
74
66
75
### Other Commands
67
76
68
77
1 . stop (Stop the Container)_
69
78
2 . stats (show container stats)
70
79
71
80
81
+ (C) Copyright 2021 - MetArivu
82
+ Author: Araf Karsh Hamid
0 commit comments