Skip to content
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

reMerge feature/MigrateGoogleAccounts into Dev #170

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/kotlin/com/teamcaffeine/koja/KojaApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ fun getSecret(projectId: String, secretId: String, versionId: String): String {
fun main(args: Array<String>) {
val dotenv: Dotenv = Dotenv.load()

EnvironmentVariableConstant.asMap.forEach { (key, secretName) ->
val valueFromEnv = dotenv[key]
EnvironmentVariableConstant.asMap.forEach { (_, secretName) ->
val valueFromEnv = dotenv[secretName]
val finalValue = valueFromEnv ?: getSecret(projectId, secretName, envSecretVersion)
setProperty(key, finalValue)
setProperty(secretName, finalValue)
}

runApplication<KojaApplication>(*args)
Expand Down
14 changes: 7 additions & 7 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
spring.datasource.url=${KOJA_AWS_RDS_DATABASE_URL}
spring.datasource.username=${KOJA_AWS_RDS_DATABASE_ADMIN_USERNAME}
spring.datasource.password=${KOJA_AWS_RDS_DATABASE_ADMIN_PASSWORD}
spring.datasource.url=${koja_aws_rds_database_url}
spring.datasource.username=${koja_aws_rds_database_admin_username}
spring.datasource.password=${koja_aws_rds_database_admin_password}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
google.client.client-id=${GOOGLE_CLIENT_ID}
google.client.client-secret=${GOOGLE_CLIENT_SECRET}
google.client.client-id=${koja_google_client_id}
google.client.client-secret=${koja_google_client_secret}
google.client.redirectUri=http://localhost:8080
spring.security.oauth2.client.registration.google.scope=https://www.googleapis.com/auth/calendar
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
spring.security.oauth2.client.registration.google.client-id=${koja_google_client_id}
spring.security.oauth2.client.registration.google.client-secret=${koja_google_client_secret}
spring.security.oauth2.client.registration.google.redirect-uri=http://localhost:8080
spring.jpa.open-in-view=false
server.address=0.0.0.0
Expand Down
Loading