-
Notifications
You must be signed in to change notification settings - Fork 367
Updated application.properties file #18
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
base: DevOps
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,36 +1,39 @@ | ||||||||||||||
| version: "3.8" | ||||||||||||||
|
|
||||||||||||||
| services: | ||||||||||||||
| mysql: | ||||||||||||||
| mysql: | ||||||||||||||
| image: mysql:latest | ||||||||||||||
| container_name: mysql | ||||||||||||||
| ports: | ||||||||||||||
| - 3306:3306 | ||||||||||||||
| environment: | ||||||||||||||
| - MYSQL_ROOT_PASSWORD=Test@123 | ||||||||||||||
| - MYSQL_DATABASE=BankDB | ||||||||||||||
| MYSQL_ROOT_PASSWORD: "Test@123" | ||||||||||||||
| MYSQL_DATABASE: "BankDB" | ||||||||||||||
| networks: | ||||||||||||||
| - banknet | ||||||||||||||
| volumes: | ||||||||||||||
| - bankapp-volume:/var/lib/mysql | ||||||||||||||
| networks: | ||||||||||||||
| - bankapp | ||||||||||||||
| - mysqlvol:/var/lib/mysql | ||||||||||||||
| healthcheck: | ||||||||||||||
| test: ["CMD", "mysqladmin", "ping", "-h", "localhost"] | ||||||||||||||
| interval: 10s | ||||||||||||||
| timeout: 5s | ||||||||||||||
| retries: 3 | ||||||||||||||
| start_period: 30s | ||||||||||||||
|
|
||||||||||||||
| mainapp: | ||||||||||||||
| image: ${DUSER}/${IMAGE} | ||||||||||||||
| container_name: Bankapp | ||||||||||||||
| environment: | ||||||||||||||
| - SPRING_DATASOURCE_USERNAME=root | ||||||||||||||
| - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/BankDB?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC | ||||||||||||||
| - SPRING_DATASOURCE_PASSWORD=Test@123 | ||||||||||||||
| bankapp: | ||||||||||||||
| container_name: bankapplication | ||||||||||||||
| image: sharmaaakash170/springboot-bank-app:latest | ||||||||||||||
| ports: | ||||||||||||||
| - "8080:8080" | ||||||||||||||
| environment: | ||||||||||||||
| - SPRING_DATASOURCE_USERNAME= "root" | ||||||||||||||
| - SPRING_DATASOURCE_URL= "jdbc:mysql://mysql:3306/BankDB?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC" | ||||||||||||||
| - SPRING_DATASOURCE_PASSWORD= "Test@123" | ||||||||||||||
|
Comment on lines
+29
to
+31
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. Fix environment variable format and database name mismatch. There are several issues with the environment variables:
- - SPRING_DATASOURCE_USERNAME= "root"
- - SPRING_DATASOURCE_URL= "jdbc:mysql://mysql:3306/BankDB?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC"
- - SPRING_DATASOURCE_PASSWORD= "Test@123"
+ - SPRING_DATASOURCE_USERNAME=root
+ - SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/bankappdb?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
+ - SPRING_DATASOURCE_PASSWORD=Test@123📝 Committable suggestion
Suggested change
|
||||||||||||||
| networks: | ||||||||||||||
| - banknet | ||||||||||||||
| depends_on: | ||||||||||||||
| mysql: | ||||||||||||||
| condition: service_healthy | ||||||||||||||
| networks: | ||||||||||||||
| - bankapp | ||||||||||||||
| restart: always | ||||||||||||||
| healthcheck: | ||||||||||||||
| test: ["CMD-SHELL", "curl -f http://localhost:8080/actuator/health || exit 1"] | ||||||||||||||
|
|
@@ -40,7 +43,7 @@ services: | |||||||||||||
| start_period: 30s | ||||||||||||||
|
|
||||||||||||||
| networks: | ||||||||||||||
| bankapp: | ||||||||||||||
| banknet: | ||||||||||||||
|
|
||||||||||||||
| volumes: | ||||||||||||||
| bankapp-volume: | ||||||||||||||
| mysqlvol: | ||||||||||||||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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
Remove unnecessary quotes from environment variables.
The quotes around environment variable values are unnecessary and could cause issues:
📝 Committable suggestion