Skip to content

Commit

Permalink
added default db params to dev file (fix) (#467)
Browse files Browse the repository at this point in the history
* added default paramaters to dev file

* added default values for dev-env file

* formatting

* added bash exp synthax

* edited url for spring db

* added entry point to dev docker file
  • Loading branch information
arinkulshi-skylight authored Dec 10, 2024
1 parent 1de9633 commit bb3edb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions backend/dev-dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ FROM amazoncorretto:17
ENV HOME=/app
RUN mkdir -p $HOME
WORKDIR $HOME
ENTRYPOINT [ "./gradlew", "bootRun", "--continuous", "--args=--server.port=8081" ]
7 changes: 3 additions & 4 deletions backend/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
spring:
datasource:
url: ${POSTGRES_HOST:postgres_fqdn}?sslmode=require
username: ${DB_USERNAME:postgres_user}
password: ${POSTGRES_USER:postgres_password}
name: ${POSTGRES_DB:postgres_db_name}
url: jdbc:postgresql://${POSTGRES_HOST:db}:${DB_PORT:5432}/${POSTGRES_DB:reportvision}?sslmode=${SSL_MODE:disable}
username: ${POSTGRES_USER:postgres}
password: ${POSTGRES_PASSWORD:super_secret_password}
devtools:
restart:
enabled: true
Expand Down
11 changes: 6 additions & 5 deletions dev-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ services:
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${postgres_db_name}
POSTGRES_HOST: ${postgres_fqdn}
POSTGRES_USER: ${postgres_user}
POSTGRES_PASSWORD: ${postgres_password}
sslmode: require
POSTGRES_DB: ${postgres_db_name:-reportvision}
POSTGRES_HOST: ${postgres_fqdn:-localhost}
POSTGRES_USER: ${postgres_user:-postgres}
POSTGRES_PASSWORD: ${postgres_password:-super_secret_password}
DB_PORT: ${postgres_port:-5432}
SSL_MODE: ${postgres_sslmode:-disable}
api:
build:
context: ./backend
Expand Down

0 comments on commit bb3edb8

Please sign in to comment.