Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# --- Stage 1: Build the application using Maven ---
FROM maven:3.9.6-eclipse-temurin-17 AS build

WORKDIR /app

COPY . .

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

# --- Stage 2: Run the application with a minimal JRE image ---
FROM eclipse-temurin:17-jre

WORKDIR /app

# Copy the built WAR file from the build stage
COPY --from=build /app/target/*.war app.war

EXPOSE 8080

ENTRYPOINT ["java", "-jar", "app.war"]
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
Expand Down
3 changes: 3 additions & 0 deletions src/main/environment/1097_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ tm-url=@TM_API@

# FHIR Config
fhir-url=@FHIR_API@

# Redis Config
spring.redis.host=@env.REDIS_HOST@
22 changes: 22 additions & 0 deletions src/main/environment/1097_docker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=${DATABASE_1097_IDENTITY_URL}
spring.datasource.username=${DATABASE_IDENTITY_USERNAME}
spring.datasource.password=${DATABASE_IDENTITY_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

#ELK logging file name
logging.path=logs/
logging.file.name=${IDENTITY_API_1097_LOGGING_FILE_NAME}

springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}

jwt.secret=${JWT_SECRET_KEY}
# TM Config
tm-url=${TM_API}

# FHIR Config
fhir-url=${FHIR_API}

# Redis Config
spring.redis.host=${REDIS_HOST}
5 changes: 4 additions & 1 deletion src/main/environment/1097_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ logging.file.name=logs/1097identity-api.log
tm-url=http://localhost:8089/

# FHIR Config
fhir-url=http://localhost:8093/
fhir-url=http://localhost:8093/

# Redis Config
spring.redis.host=localhost
3 changes: 3 additions & 0 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ tm-url=@TM_API@

# FHIR Config
fhir-url=@FHIR_API@

# Redis Config
spring.redis.host=@env.REDIS_HOST@
23 changes: 23 additions & 0 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# DataSource settings: set here your own configurations for the database
spring.datasource.url=${DATABASE_IDENTITY_URL}
spring.datasource.username=${DATABASE_IDENTITY_USERNAME}
spring.datasource.password=${DATABASE_IDENTITY_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

#ELK logging file name
logging.path=logs/
logging.file.name=${IDENTITY_API_LOGGING_FILE_NAME}

springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED}
springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED}

jwt.secret=${JWT_SECRET_KEY}

# TM Config
tm-url=${TM_API}

# FHIR Config
fhir-url=${FHIR_API}

# Redis Config
spring.redis.host=${REDIS_HOST}
5 changes: 4 additions & 1 deletion src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ logging.file.name=logs/identity-api.log
tm-url=http://localhost:8089/

# FHIR Config
fhir-url=http://localhost:8093/
fhir-url=http://localhost:8093/

# Redis Config
spring.redis.host=localhost
1 change: 0 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
#Below lines are added for security reasons

spring.session.store-type=redis
spring.redis.host=localhost
spring.redis.password=
spring.redis.port=6379

Expand Down
Loading