GDSC Solution Challenge Server Repository
Set Local MySQL
Set application.yml file in Springboot
Network authorization in security through Google Cloud MySQL
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url : ${DB_URL}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
jpa:
properties:
hibernate:
show_sql: true
format_sql: true
use_sql_comments: true
hbm2ddl:
auto: update
default_batch_fetch_size: 1000
security:
oauth2:
resourceserver:
jwt:
jwk-set-uri: https://www.googleapis.com/service_accounts/v1/jwk/securetoken%40system.gserviceaccount.com
issuer-uri: https://securetoken.google.com/${FIREBASE_APP_NAME}
logging.level:
org.hibernate.SQL: debug
${DB_URL}
should be Public IP address of Google Cloud MySQL${DB_USERNAME}
should be Local MySQL's userName${DB_PASSWORD}
should be Local MySQL's passWord
Local : DockerImage Making
-
jar build :
gradle build
-
image creation :
docker build -t userAccountName/repositoryName ./
-
push to Docker hub : using Docker Desktop
userAccountName/repositoryName
is from Docker hub repository
- docker login :
docker login
- pull from Docker hub :
docker pull userAccountName/repositoryName
- query DockerImage :
docker images
- rename DockerImage :
docker tag userAccountName/repositoryName DockerImageRenaming
- make docker-compose.yml : put
DockerImageRenaming
text in docker-compose.yml - run Docker Compose :
docker-compose up