Skip to content

Commit 774c5a6

Browse files
Suraj-kumar00drtechie
authored andcommitted
chore: update Dockerfile and add seperate docker properties file
1 parent a729608 commit 774c5a6

4 files changed

Lines changed: 38 additions & 12 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY . .
77

88
# Build the application while caching Maven dependencies to speed up future builds
99
RUN --mount=type=cache,target=/root/.m2 \
10-
mvn clean package -DENV_VAR=ci -DskipTests -Dgit.skip=true
10+
mvn clean package -DENV_VAR=docker -DskipTests -Dgit.skip=true
1111

1212
# --- Stage 2: Run the application with a minimal JRE image ---
1313
FROM eclipse-temurin:17-jre
@@ -19,4 +19,5 @@ COPY --from=build /app/target/*.war app.war
1919

2020
EXPOSE 8080
2121

22+
# Run the application
2223
ENTRYPOINT ["java", "-jar", "app.war"]

pom.xml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
<version>3.2.2</version>
3636
</dependency>
3737

38+
<dependency>
39+
<groupId>org.springframework.boot</groupId>
40+
<artifactId>spring-boot-starter</artifactId>
41+
<exclusions>
42+
<exclusion>
43+
<groupId>org.springframework.boot</groupId>
44+
<artifactId>spring-boot-starter-logging</artifactId>
45+
</exclusion>
46+
</exclusions>
47+
</dependency>
48+
3849
<dependency>
3950
<groupId>co.elastic.logging</groupId>
4051
<artifactId>logback-ecs-encoder</artifactId>
@@ -43,16 +54,6 @@
4354

4455
<!--<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId>
4556
<version>3.2.2</version> </dependency> -->
46-
<dependency>
47-
<groupId>org.slf4j</groupId>
48-
<artifactId>slf4j-api</artifactId>
49-
<version>2.1.0-alpha1</version>
50-
</dependency>
51-
<dependency>
52-
<groupId>org.slf4j</groupId>
53-
<artifactId>slf4j-simple</artifactId>
54-
<version>2.1.0-alpha1</version>
55-
</dependency>
5657
<!-- Swagger -->
5758
<dependency>
5859
<groupId>org.springdoc</groupId>

src/main/environment/ecd_ci.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ logging.file.name=@env.ECD_API_LOGGING_FILE_NAME@
2828

2929
springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
3030
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
31-
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# DB Connections
2+
spring.datasource.url=${DATABASE_URL}
3+
spring.datasource.username=${DATABASE_USERNAME}
4+
spring.datasource.password=${DATABASE_PASSWORD}
5+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
6+
7+
# Secondary DB
8+
secondary.datasource.username=${REPORTING_DATABASE_USERNAME}
9+
secondary.datasource.password=${REPORTING_DATABASE_PASSWORD}
10+
secondary.datasource.url=${REPORTING_DATABASE_URL}
11+
secondary.datasource.driver-class-name=com.mysql.jdbc.Driver
12+
13+
# API URLs
14+
registerBeneficiaryUrl=${COMMON_API}/beneficiary/create
15+
beneficiaryEditUrl=${COMMON_API}/beneficiary/update
16+
17+
# JWT Configuration
18+
jwt.secret=${JWT_SECRET_KEY}
19+
20+
# ELK Logging
21+
logging.file.name=${ECD_API_LOGGING_FILE_NAME}
22+
23+
# Swagger Documentation
24+
springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
25+
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}

0 commit comments

Comments
 (0)