File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ target/
1515* .iml
1616* .ipr
1717
18+ # ## environment ###
19+ .env
20+
1821# ## NetBeans ###
1922nbproject /private /
2023build /
Original file line number Diff line number Diff line change 1+ # --- Stage 1: Build the application using Maven ---
2+ FROM maven:3.9.6-eclipse-temurin-17 AS build
3+
4+ WORKDIR /app
5+
6+ COPY . .
7+
8+ # Build the application while caching Maven dependencies to speed up future builds
9+ RUN --mount=type=cache,target=/root/.m2 \
10+ mvn clean package -DENV_VAR=docker -DskipTests -Dgit.skip=true
11+
12+ # --- Stage 2: Run the application with a minimal JRE image ---
13+ FROM eclipse-temurin:17-jre
14+
15+ WORKDIR /app
16+
17+ # Copy the built WAR file from the build stage
18+ COPY --from=build /app/target/*.war app.war
19+
20+ EXPOSE 8080
21+
22+ ENTRYPOINT ["java" , "-jar" , "app.war" ]
Original file line number Diff line number Diff line change 462462 </execution >
463463 </executions >
464464 </plugin >
465-
465+ <plugin >
466+ <groupId >org.springframework.boot</groupId >
467+ <artifactId >spring-boot-maven-plugin</artifactId >
468+ <version >3.2.2</version >
469+ <executions >
470+ <execution >
471+ <goals >
472+ <goal >repackage</goal >
473+ </goals >
474+ </execution >
475+ </executions >
476+ </plugin >
466477 </plugins >
467478 </build >
468479 <reporting >
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ videoConsultation-base-url=@env.SWYMED_BASE_URL@
1313
1414
1515# ## Redis IP
16- spring.redis.host =localhost
16+ spring.redis.host =@env.REDIS_HOST@
1717spring.main.allow-bean-definition-overriding =true
1818jwt.secret =@env.JWT_SECRET_KEY@
1919# ELK logging file name
@@ -23,4 +23,4 @@ logging.file.name=@env.ADMIN_API_LOGGING_FILE_NAME@
2323common-url =@env.COMMON_API@
2424
2525springdoc.api-docs.enabled =@env.SWAGGER_DOC_ENABLED@
26- springdoc.swagger-ui.enabled =@env.SWAGGER_DOC_ENABLED@
26+ springdoc.swagger-ui.enabled =@env.SWAGGER_DOC_ENABLED@
Original file line number Diff line number Diff line change 1+ # local env
2+ # DB Connections
3+ spring.datasource.url =${DATABASE_URL}
4+ spring.datasource.username =${DATABASE_USERNAME}
5+ spring.datasource.password =${DATABASE_PASSWORD}
6+ spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
7+
8+ callcentre-server-ip =${CALLCENTRE_SERVER_IP}
9+
10+ videoConsultation-apikey =${SWYMED_APIKEY}
11+ videoConsultation-base-url =${SWYMED_BASE_URL}
12+
13+ # ## Redis IP
14+ spring.redis.host =${REDIS_HOST}
15+ spring.main.allow-bean-definition-overriding =true
16+ jwt.secret =${JWT_SECRET_KEY}
17+ # ELK logging file name
18+ logging.path =logs/
19+ logging.file.name =${ADMIN_API_LOGGING_FILE_NAME}
20+
21+ common-url =${COMMON_API}
22+
23+ springdoc.api-docs.enabled =${SWAGGER_DOC_ENABLED}
24+ springdoc.swagger-ui.enabled =${SWAGGER_DOC_ENABLED}
You can’t perform that action at this time.
0 commit comments