chore(config): configure Google OAuth credentials via environment variables
This commit is contained in:
parent
2d0e676a77
commit
a846547d38
@ -1,6 +1,10 @@
|
|||||||
|
SPRING_PROFILES_ACTIVE=dev
|
||||||
|
|
||||||
DB_NAME=EXAMPLE_DB
|
DB_NAME=EXAMPLE_DB
|
||||||
DB_USER=EXAMPLE
|
DB_USER=EXAMPLE
|
||||||
DB_PASSWORD=SECRET
|
DB_PASSWORD=SECRET
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
SPRING_PROFILES_ACTIVE=dev
|
|
||||||
|
GMAIL_OAUTH_CLIENT_ID=11111111111-1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a.apps.googleusercontent.com
|
||||||
|
GMAIL_OAUTH_CLIENT_SECRET=AAAAAA-1a1a1a1a1a1a1_A1a1_A1A1A1A1A
|
@ -6,5 +6,8 @@ RUN mvn clean package -DskipTests
|
|||||||
FROM openjdk:21-jdk
|
FROM openjdk:21-jdk
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/bootstrap/target/*.jar app.jar
|
COPY --from=build /app/bootstrap/target/*.jar app.jar
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENTRYPOINT ["java","-jar","app.jar"]
|
EXPOSE 5005
|
||||||
|
|
||||||
|
ENTRYPOINT ["java", "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005", "-jar", "app.jar"]
|
@ -33,6 +33,12 @@ server:
|
|||||||
context-path: /api
|
context-path: /api
|
||||||
forward-headers-strategy: framework
|
forward-headers-strategy: framework
|
||||||
|
|
||||||
|
gmail:
|
||||||
|
oauth2:
|
||||||
|
clientId: ${GMAIL_OAUTH_CLIENT_ID}
|
||||||
|
clientSecret: ${GMAIL_OAUTH_CLIENT_SECRET}
|
||||||
|
redirectUri: http://localhost:8888/Callback
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
@ -3,6 +3,8 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
|
- "5005:5005"
|
||||||
|
- "8888:8888"
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
environment:
|
environment:
|
||||||
@ -11,8 +13,13 @@ services:
|
|||||||
DB_PORT: ${DB_PORT}
|
DB_PORT: ${DB_PORT}
|
||||||
DB_USER: ${DB_USER}
|
DB_USER: ${DB_USER}
|
||||||
DB_PASSWORD: ${DB_PASSWORD}
|
DB_PASSWORD: ${DB_PASSWORD}
|
||||||
|
GMAIL_OAUTH_CLIENT_ID: ${GMAIL_OAUTH_CLIENT_ID}
|
||||||
|
GMAIL_OAUTH_CLIENT_SECRET: ${GMAIL_OAUTH_CLIENT_SECRET}
|
||||||
networks:
|
networks:
|
||||||
- network
|
- network
|
||||||
|
volumes:
|
||||||
|
- ./tokens:/app/tokens
|
||||||
|
- ./logs:/app/logs
|
||||||
db:
|
db:
|
||||||
image: postgres:15
|
image: postgres:15
|
||||||
ports:
|
ports:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.pablotj.restemailbridge.infrastructure.config.spring;
|
package com.pablotj.restemailbridge.infrastructure.config;
|
||||||
|
|
||||||
import com.pablotj.restemailbridge.application.port.EmailConfigurationPort;
|
import com.pablotj.restemailbridge.application.port.EmailConfigurationPort;
|
||||||
import com.pablotj.restemailbridge.application.usecase.SendEmailUseCase;
|
import com.pablotj.restemailbridge.application.usecase.SendEmailUseCase;
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.pablotj.restemailbridge.infrastructure.mail.config;
|
||||||
|
|
||||||
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableConfigurationProperties(GmailOAuth2Properties.class)
|
||||||
|
public class GmailConfig {
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user