From 707077709b3adf0d6756c127620007bd3a7fe105 Mon Sep 17 00:00:00 2001 From: cankurttekin Date: Sat, 16 Nov 2024 21:03:44 +0300 Subject: [PATCH 1/2] allowed origins env --- backend/Dockerfile | 4 ++-- backend/src/main/resources/application.properties | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 1dfa9e77..5c7ac374 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -3,7 +3,7 @@ FROM maven:3.8.5-openjdk-17 AS build WORKDIR /app COPY pom.xml . COPY src ./src -RUN mvn clean package -DskipTests +RUN mvn clean package # Stage 2: Run the application FROM openjdk:17-jdk-slim @@ -16,7 +16,7 @@ COPY --from=build /app/target/*.jar backend.jar EXPOSE 8080 # EXPOSE 443 -# urn the Spring Boot application +# Run the Spring Boot application ENTRYPOINT ["java", "-jar", "backend.jar"] #ENTRYPOINT ["java", "-jar", "backend.jar", "--server.ssl.enabled=true", "--server.ssl.key-store=certificate.p12", "--server.ssl.key-store-password=${KEY_STORE_PASS}", "--server.ssl.key-store-type=PKCS12", "--server.ssl.key-store-alias=${KEY_STORE_ALIAS}"] diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index ec2d4d60..0da3a18c 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -10,11 +10,11 @@ app.jwtExpirationInMs=86400000 gemini.api.key=${GEMINI_API_KEY:"GEMINI_API_KEY"} -#ALLOWED_ORIGINS=${ALLOWED_ORIGINS} +ALLOWED_ORIGINS=${ALLOWED_ORIGINS:localhost:3000} server.port=${PORT:8080} #server.ssl.key-store=classpath:keystore.p12 #server.ssl.key-store-password=${KEY_STORE_PASS} #server.ssl.keyStoreType=PKCS12 #server.ssl.key-alias=${KEY_STORE_ALIAS} -turnstile.secret-key=${TURNSTILE_SECRET:"0x0000"} \ No newline at end of file +turnstile.secret-key=${TURNSTILE_SECRET:"0x0000"} From 1fd746427c83efd41b0f913db2fbdcdbcc277164 Mon Sep 17 00:00:00 2001 From: cankurttekin Date: Sat, 16 Nov 2024 21:56:15 +0300 Subject: [PATCH 2/2] allowed origins env --- backend/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 0da3a18c..4874053d 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -10,7 +10,7 @@ app.jwtExpirationInMs=86400000 gemini.api.key=${GEMINI_API_KEY:"GEMINI_API_KEY"} -ALLOWED_ORIGINS=${ALLOWED_ORIGINS:localhost:3000} +#ALLOWED_ORIGINS=${ALLOWED_ORIGINS:localhost:3000} server.port=${PORT:8080} #server.ssl.key-store=classpath:keystore.p12 #server.ssl.key-store-password=${KEY_STORE_PASS}