From 06c6f63f1ee89b99f2b182a1ef0085861669b240 Mon Sep 17 00:00:00 2001 From: Tran Hoang Quan Date: Sun, 10 Nov 2024 00:57:52 +0700 Subject: [PATCH] :rocket:feat: deploy db --- Dockerfile | 2 -- .../com/videocall/server/config/SecurityConfig.java | 10 +--------- src/main/resources/application.yaml | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 46203da..afbdcb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,4 @@ WORKDIR /app COPY --from=build /app/target/*.jar app.jar -ENV SPRING_PROFILES_ACTIVE=prod - ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file diff --git a/src/main/java/com/videocall/server/config/SecurityConfig.java b/src/main/java/com/videocall/server/config/SecurityConfig.java index d0a2e2f..89da06d 100644 --- a/src/main/java/com/videocall/server/config/SecurityConfig.java +++ b/src/main/java/com/videocall/server/config/SecurityConfig.java @@ -68,18 +68,10 @@ JwtAuthenticationConverter jwtAuthenticationConverter() { @Bean CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(List.of( - "http://127.0.0.1:5500", - "http://localhost:3000", - "http://localhost:3001", - "https://localhost:3001", - "https://localhost:3000", - "https://backend-production-c2cb.up.railway.app", - "https://84rmcw5w-3000.asse.devtunnels.ms")); + configuration.setAllowedOrigins(List.of("*")); configuration.setAllowedMethods(List.of("*")); configuration.setAllowedHeaders(List.of("*")); - configuration.setAllowCredentials(true); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/**", configuration); diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index 78f4f6b..95dd023 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -7,7 +7,7 @@ spring: application: name: call-video datasource: - url: jdbc:mysql://localhost:3308/wemeet + url: jdbc:mysql://root:JIMyjqPThoRvJhEQHsGDlDzyFtnELOiR@junction.proxy.rlwy.net:40123/railway username: root password: root driver-class-name: com.mysql.cj.jdbc.Driver