Skip to content

Commit

Permalink
env property added in docker file , readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Badri Paudel committed Nov 16, 2024
1 parent c0f760c commit 74fe28b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RUN chmod +x mvnw

# Install dependencies on into image
RUN ./mvnw dependency:go-offline

# This will be overriden if defined in docker compose file or during build if passed to do so.
ENV APP_ENV_NAME qat

# copy all of our code into image
#copy src file to app folder inside the image
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Explanation and Information

- Sometimes, to build image (caching effect will not show the recent changes sometimes)
```bash
docker-compose up --build
```

#### Note : For detail explanation of how to dockerize simple spring boot Java application you can visit my website at [guides to code ](https://guidestocode.com/java/how-to-dockerize-java-spring-boot-application/)
------------
### Information Keeping Web Application using Spring Boot, Data JPA, Thymeleaf and Spring Security.
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ services:
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=_BadriPostgres1@
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
# - APP_ENV_NAME=uat

pg_database:

#official image of postgres from the docker hub, by default pulls the latest one.
image: postgres
image: postgres:16
container_name: container_postgres_service

# map the ports for postgres
Expand Down

0 comments on commit 74fe28b

Please sign in to comment.