-
Notifications
You must be signed in to change notification settings - Fork 32
Copy env variables to new docker properties for deploying in Linux/Docker #85
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
14 commits
Select commit
Hold shift + click to select a range
ebf4a6e
build: Dockerize admin UI application
Suraj-kumar00 26b46bf
fix: update the port as tomcat runs on 8080
Suraj-kumar00 0fb8ff4
chore: update Dockerfile, env example, log config; update .gitignore
Suraj-kumar00 8cef98f
fix: resolve merge conflict
Suraj-kumar00 4adeeb0
chore: clean up env file, update Dockerfile and build config
Suraj-kumar00 9f38ba2
feat: add seperate env properties for docker build
Suraj-kumar00 7ce3fd9
Delete logs/admin-api.log.json
drtechie b058585
Merge pull request #73 from Suraj-kumar00/suraj/contributor
drtechie c36ad8d
fix: delete unnecessary logs
drtechie ecacd9f
Merge branch 'develop' into dockerize
drtechie b784340
fix: move redis host to env variable
drtechie 3d48fb7
fix: move redis host to env variable
drtechie d3e0669
fix: common API URL
drtechie 45f9f95
fix: add logging path
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 |
|---|---|---|
|
|
@@ -15,6 +15,9 @@ target/ | |
| *.iml | ||
| *.ipr | ||
|
|
||
| ### environment ### | ||
| .env | ||
|
|
||
| ### NetBeans ### | ||
| nbproject/private/ | ||
| build/ | ||
|
|
||
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
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,24 @@ | ||
| # 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.cj.jdbc.Driver | ||
|
|
||
| callcentre-server-ip=${CALLCENTRE_SERVER_IP} | ||
|
|
||
| videoConsultation-apikey=${SWYMED_APIKEY} | ||
| videoConsultation-base-url=${SWYMED_BASE_URL} | ||
|
|
||
| ### Redis IP | ||
| spring.redis.host=${REDIS_HOST} | ||
| spring.main.allow-bean-definition-overriding=true | ||
| jwt.secret=${JWT_SECRET_KEY} | ||
| #ELK logging file name | ||
| logging.path=logs/ | ||
| logging.file.name=${ADMIN_API_LOGGING_FILE_NAME} | ||
|
|
||
| common-url=${COMMON_API} | ||
|
|
||
| springdoc.api-docs.enabled=${SWAGGER_DOC_ENABLED} | ||
| springdoc.swagger-ui.enabled=${SWAGGER_DOC_ENABLED} |
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
Use explicit artifact name instead of wildcard.
Relying on
*.warmay catch unintended files. Specify the generated WAR to avoid ambiguity:🤖 Prompt for AI Agents