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"]
32 changes: 22 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,21 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>logback-ecs-encoder</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Swagger -->
<dependency>
<groupId>org.springdoc</groupId>
Expand Down Expand Up @@ -425,6 +425,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>
<dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ serverFolder=MMUSync
getServerCredentialURL=@env.MMU_API@fileSyncController/getServerCredential
tmReferCheckValue=TM
### Redis IP
spring.redis.host=localhost
spring.redis.host=@env.REDIS_HOST@

jwt.secret=@env.JWT_SECRET_KEY@

Expand All @@ -84,4 +84,4 @@ logging.path=logs
logging.file.name=@env.MMU_API_LOGGING_FILE_NAME@

springdoc.api-docs.enabled=@env.SWAGGER_DOC_ENABLED@
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
springdoc.swagger-ui.enabled=@env.SWAGGER_DOC_ENABLED@
87 changes: 87 additions & 0 deletions src/main/environment/common_docker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# local env
# DB Connections
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

## Carestream URLs, local
carestreamOrderCreateURL=${COMMON_API}carestream/createOrder

## Identity - Common URLs
# Registration
registrationUrl =${COMMON_API}beneficiary/createBeneficiary

registrarQuickSearchByIdUrl =${COMMON_API}beneficiary/searchUserByID

registrarQuickSearchByPhoneNoUrl =${COMMON_API}beneficiary/searchUserByPhone

getBenImageFromIdentity =${IDENTITY_API_BASE_URL}id/benImageByBenRegID

beneficiaryEditUrl =${COMMON_API}beneficiary/updateBenefciaryDetails

registrarAdvanceSearchUrl =${COMMON_API}beneficiary/searchBeneficiary

## Data Sync API, central
dataSyncUploadUrl=${MMU_CENTRAL_SERVER}dataSync/van-to-server

## Data download API, central
dataSyncDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van

## TC specialist slot booking, # not required
tcSpecialistSlotBook=${TM_API}schedule/bookSlot

## TC specialist slot cancelling, # not required
tcSpecialistSlotCancel=${TM_API}schedule/cancelBookedSlot

## benGenUrl, common, central
benGenUrlCentral=${COMMON_API_OPEN_SYNC}beneficiary/generateBeneficiaryIDs

## benImportUrl, identity, local
benImportUrlLocal=${IDENTITY_API_BASE_URL}id/saveGeneratedBenIDToLocalServer
mmucentralserver = ${MMU_CENTRAL_SERVER}common/get/Case-sheet/centralServerTMCaseSheet

tmCentralServer = ${TM_CENTRAL_SERVER}common/get/Case-sheet/printData

specialistSign=${COMMON_API}signature1/getSignClass

## inventory transaction download URL, central, mmu
dataSyncTransactionDownloadUrl=${MMU_CENTRAL_SERVER}dataSync/server-to-van-transactional

## inventory transaction processed flag update URL, central, mmu
dataSyncProcessedFlagUpdate=${MMU_CENTRAL_SERVER}dataSync/updateProcessedFlagPostDownload


fileBasePath =${MMU_FILE_BASE_PATH}

## data sync batch size
BATCH_SIZE=30
snomedCTPageSize=10
nurseWL=7
docWL=7
pharmaWL=7
labWL=7
radioWL=7
oncoWL=7

## For File Sync
serverIP=${FILE_SYNC_SERVER_IP}
serverDomain=${FILE_SYNC_SERVER_DOMAIN}
serverUserName=${FILE_SYNC_SERVER_USERNAME}
serverPassword=${FILE_SYNC_SERVER_PASSWORD}
localFolderToSync=${LOCAL_FOLDER_TO_SYNC}
serverFolder=MMUSync
getServerCredentialURL=${MMU_API}fileSyncController/getServerCredential
tmReferCheckValue=TM
### Redis IP
spring.redis.host=${REDIS_HOST}

jwt.secret=${JWT_SECRET_KEY}


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

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