-
Notifications
You must be signed in to change notification settings - Fork 44
Copy env variables to new docker properties for deploying in Linux/Docker #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d0baf20
chore: add Dockerfile and update pom.xml for optimal docker image
Suraj-kumar00 b460053
chore: update Dockerfile, pom.xml and CI properties; add docker prope…
Suraj-kumar00 0910ccd
Merge branch 'PSMRI:develop' into suraj/contributor
Suraj-kumar00 01887ab
Merge branch 'develop' of https://github.com/PSMRI/Common-API into su…
Suraj-kumar00 f71d8ff
Merge branch 'suraj/contributor' of https://github.com/Suraj-kumar00/…
Suraj-kumar00 d10a14c
Merge pull request #191 from Suraj-kumar00/suraj/contributor
drtechie e26a802
feat: add captcha env variables to docker
drtechie 5ecf8de
fix: move redis host to env variable
drtechie 8b2263b
fix: sync ci and docker properties
drtechie 8ad8be7
config: fix comment
drtechie 4a7f7aa
fix: merge with develop
drtechie d28fdcf
fix: duplicate plugins
drtechie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,12 +61,11 @@ cron-scheduler-ctidatacheck=0 10 00 * * * | |
### generate Beneficiary Config | ||
genben-api= @env.BEN_GEN_API_URL@ | ||
|
||
### file Base Path | ||
--------------------------- | ||
### file Base Path --------------------------- | ||
fileBasePath [email protected]_FILE_BASE_PATH@ | ||
|
||
### Redis IP | ||
spring.redis.host=localhost | ||
spring.redis.host=@env.REDIS_HOST@ | ||
|
||
##--------------------------------------------------------------------------------------------------------------- | ||
###CTI data sync schedular | ||
|
@@ -168,7 +167,7 @@ springdoc.api-docs.enabled=false | |
springdoc.swagger-ui.enabled=false | ||
|
||
|
||
isProduction=false | ||
isProduction=true | ||
grievanceAllocationRetryConfiguration=3 | ||
|
||
start-grievancedatasync-scheduler=false | ||
|
@@ -178,7 +177,10 @@ [email protected]_SECRET_KEY@ | |
[email protected]_VERIFY_URL@ | ||
[email protected]_CAPTCHA@ | ||
|
||
<<<<<<< HEAD | ||
======= | ||
[email protected]_ALLOWED_ORIGINS@ | ||
|
||
|
||
>>>>>>> develop | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
# 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 | ||
|
||
secondary.datasource.username=${REPORTING_DATABASE_USERNAME} | ||
secondary.datasource.password=${REPORTING_DATABASE_PASSWORD} | ||
secondary.datasource.url=${REPORTING_DATABASE_URL} | ||
secondary.datasource.driver-class-name=com.mysql.jdbc.Driver | ||
|
||
## KM Configuration | ||
km-base-protocol=${KM_API_BASE_PROTOCOL} | ||
km-username=${KM_USERNAME} | ||
km-password=${KM_PASSWORD} | ||
km-base-url=${KM_API_BASE_URL} | ||
km-base-path=${KM_API_BASE_PATH} | ||
km-root-path=/okm:personal/users/ | ||
km-guest-user=${KM_GUEST_USER} | ||
km-guest-password=${KM_GUEST_PASSWORD} | ||
|
||
# CTI Config | ||
cti-server-ip=${CTI_SERVER_IP} | ||
cti-logger_base_url=${CTI_SERVER_LOGGER_BASE}/logger | ||
|
||
# Identity Config | ||
identity-api-url = ${IDENTITY_API_URL} | ||
identity-1097-api-url = ${IDENTITY_1097_API_URL} | ||
|
||
#### SMS Configuration | ||
send-sms=${SEND_SMS} | ||
sendSMSUrl = ${SEND_SMS_URL} | ||
source-address=${SMS_SOURCE_ADDRESS} | ||
sms-username=${SMS_USERNAME} | ||
sms-password=${SMS_PASSWORD} | ||
send-message-url=${SMS_MESSAGE_URL} | ||
|
||
###SMS Scheduler configurations | ||
start-sms-scheduler=true | ||
cron-scheduler-sms=0 0/1 * * * ? * | ||
|
||
#### Email Configuration | ||
send-email=${SEND_EMAIL} | ||
spring.mail.host=${MAIL_HOST} | ||
spring.mail.port=${MAIL_PORT} | ||
spring.mail.username=${MAIL_USERNAME} | ||
spring.mail.password=${MAIL_PASSWORD} | ||
spring.mail.properties.mail.smtp.auth=true | ||
spring.mail.properties.mail.smtp.starttls.enable=true | ||
|
||
###Email Scheduler configurations | ||
start-email-scheduler=true | ||
cron-scheduler-email=0 0/1 * * * ? * | ||
|
||
###cti data check with call detail report Scheduler | ||
#Runs at everyday 12:10AM | ||
start-ctidatacheck-scheduler=true | ||
cron-scheduler-ctidatacheck=0 10 00 * * * | ||
|
||
### generate Beneficiary Config | ||
genben-api= ${BEN_GEN_API_URL} | ||
|
||
### file Base Path | ||
--------------------------- | ||
fileBasePath =${MMU_FILE_BASE_PATH} | ||
Comment on lines
+65
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Remove non-property separator 🤖 Prompt for AI Agents
|
||
|
||
### Redis IP | ||
spring.redis.host=${REDIS_HOST} | ||
|
||
##--------------------------------------------------------------------------------------------------------------- | ||
###CTI data sync schedular | ||
cz-duration=40 | ||
##--------------------------------------------------------------------------------------------------------------- | ||
## prescription template | ||
TMprescriptionTemplate=TMPrescription | ||
##--------------------------------------------------------------------------------------------------------------- | ||
##duration for everwell calender | ||
everwellCalendarDuration=15 | ||
##--------------------------------------------------------------------------------------------------------------- | ||
##lonic variables | ||
lonicPageSize=10 | ||
##--------------------------------------------------------------------------------------------------------------- | ||
#snomedcti | ||
snomedCTPageSize=10 | ||
##--------------------------------------------------------------------------------------------------------------- | ||
#call retry count | ||
callRetryConfiguration=3 | ||
##--------------------------------------------------------------------------------------------------------------- | ||
#avni registration Duration | ||
avniRegistrationLimit=7 | ||
|
||
#--------------------------NHM Agent Real Time Data---------------------------- | ||
nhm.agent.real.time.data.url=${NHM_AGENT_REAL_TIME_DATA_URL} | ||
nhm.agent.real.time.data.cron.scheduler=0 */2 * ? * * | ||
nhm.agent.real.time.data.cron.flag=true | ||
|
||
##missing commits | ||
|
||
carestream_socket_ip = ${CARESTREAM_SOCKET_IP} | ||
carestream_socket_port = ${CARESTREAM_SOCKET_PORT} | ||
|
||
## everwell variables | ||
everwellUserName = ${EVERWELL_USERNAME} | ||
everwellPassword = ${EVERWELL_PASSWORD} | ||
amritUserName = ${EVERWELL_AMRIT_USERNAME} | ||
amritPassword = ${EVERWELL_AMRIT_PASSWORD} | ||
|
||
## everwell API call | ||
everwellAddSupportAction = ${EVERWELL_BASE_URL}/Api/Patients/AddSupportAction | ||
everwellEditDoses = ${EVERWELL_BASE_URL}/Api/Patients/EditManualDoses | ||
everwellEditMissedDoses = ${EVERWELL_BASE_URL}/Api/Patients/EditMissedDoses | ||
everwellGetPatientAdherenceUrl = ${EVERWELL_BASE_URL}/Api/Patients/CurrentMonthMissedAdherence?Page= | ||
everwellEditSecondaryPhoneNo = ${EVERWELL_BASE_URL}/Api/Patients/EditPhoneNumber | ||
everwell1097userAuthenticate = ${COMMON_API_BASE_URL}user/userAuthenticate | ||
everwelluserAuthenticate = ${EVERWELL_BASE_URL}/token | ||
everwellRegisterBenficiary = ${COMMON_API_BASE_URL}/beneficiary/create | ||
|
||
|
||
## LungAssessment credentials | ||
lungAssessmentEmail = ${SWAASA_EMAIL} | ||
lungAssessmentPassword =${SWAASA_PASSWORD} | ||
|
||
|
||
## SWASSA APIs | ||
lungAssessmentAdminLogin = ${SWAASA_BASE_URL}/api/adminLogin | ||
lungAssessmentValidateCough = ${SWAASA_BASE_URL}/api/verifycough | ||
lungAssessmentStartAssesment = ${SWAASA_BASE_URL}/api/assessment | ||
lungAssessmentGetAssesment = ${SWAASA_BASE_URL}/api/getAssessment | ||
|
||
#E- Sanjeevani user authenticate creds | ||
eSanjeevani.url: ${ESANJEEVANI_URL} | ||
eSanjeevani.userName: ${ESANJEEVANI_USERNAME} | ||
eSanjeevani.password: ${ESANJEEVANI_PASSWORD} | ||
eSanjeevani.salt: ${ESANJEEVANI_SALT} | ||
eSanjeevani.source: ${ESANJEEVANI_SOURCE} | ||
eSanjeevani.registerPatient: ${ESANJEEVANI_REGISTER_PATIENT_URL} | ||
eSanjeevani.routeUrl: ${ESANJEEVANI_ROUTE_URL} | ||
|
||
biometric.discover.url = ${BIOMETRIC_URL} | ||
biometric.deviceInfo.url = ${BIOMETRIC_URL}/rd/info | ||
biometric.capture.url = ${BIOMETRIC_URL}/rd/capture | ||
eAusadhaUrl=${EAUSADHA_URL} | ||
|
||
eausadhaAuthorization=${EAUSADHA_AUTHORIZATION_KEY} | ||
spring.main.allow-bean-definition-overriding=true | ||
spring.main.allow-circular-references=true | ||
|
||
jwt.secret=${JWT_SECRET_KEY} | ||
|
||
|
||
#ELK logging file name | ||
logging.path=logs/ | ||
logging.file.name=${COMMON_API_LOGGING_FILE_NAME} | ||
|
||
|
||
##grievance API call | ||
updateGrievanceDetails = ${GRIEVANCE_API_BASE_URL}/grsbepro/igemr1097/public/api/v1/state-wise/grievance-list?page=PageNumber¤tpage=1 | ||
updateGrievanceTransactionDetails=${GRIEVANCE_API_BASE_URL}/grsbepro/igemr1097/public/api/v1/grievance_details/ | ||
## grievance variables | ||
|
||
grievanceUserName = ${GRIEVANCE_USERNAME} | ||
grievancePassword = ${GRIEVANCE_PASSWORD} | ||
grievanceUserAuthenticate = ${GRIEVANCE_USER_AUTHENTICATE} | ||
grievanceDataSyncDuration = ${GRIEVANCE_DATA_SYNC_DURATION} | ||
|
||
springdoc.api-docs.enabled=false | ||
springdoc.swagger-ui.enabled=false | ||
|
||
|
||
isProduction=true | ||
grievanceAllocationRetryConfiguration=3 | ||
|
||
start-grievancedatasync-scheduler=false | ||
cron-scheduler-grievancedatasync=0 0/2 * * * ? | ||
|
||
captcha.secret-key=${CAPTCHA_SECRET_KEY} | ||
captcha.verify-url=${CAPTCHA_VERIFY_URL} | ||
captcha.enable-captcha=${ENABLE_CAPTCHA} | ||
|
||
cors.allowed-origins=${CORS_ALLOWED_ORIGINS} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consolidate duplicate Spring Boot Maven plugin
There are two
<plugin>
entries forspring-boot-maven-plugin
(one without version at lines 511–514 and another with version at 661–672). Merge them into a single declaration with the<version>
and<execution>
to avoid redundancy.Apply this diff in the
<plugins>
section:🤖 Prompt for AI Agents