From 662b5f1c4a791a5c643628821a2c180d86a6cfa5 Mon Sep 17 00:00:00 2001 From: ouob123 Date: Thu, 27 Feb 2025 23:49:32 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[Fix]=20SSL=20=EC=9D=B8=EC=A6=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 18 +++++++++++++----- src/main/resources/application.properties | 4 +++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2dbfb36..5f5cce0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,14 +28,22 @@ services: - "3306:3306" nginx: - image: nginx:latest container_name: nginx-proxy + image: nginx:latest volumes: - - ./nginx/conf.d:/etc/nginx/conf.d - - /etc/letsencrypt:/etc/letsencrypt + - ./data/nginx:/etc/nginx/conf.d + - ./data/certbot/conf:/etc/letsencrypt + - ./data/certbot/www:/var/www/certbot ports: - "80:80" - "443:443" depends_on: - - app - restart: always + - certbot + + certbot: + image: certbot/certbot + container_name: certbot + volumes: + - ./data/certbot/conf:/etc/letsencrypt + - ./data/certbot/www:/var/www/certbot + entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'" diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index eec06f6..e71d6cb 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -21,4 +21,6 @@ logging.level.org.springframework.security=DEBUG logging.level.org.springframework.web=DEBUG # hugging face -spring.huggingface.api.url=${HUGGINGFACE_API_URL} \ No newline at end of file +spring.huggingface.api.url=${HUGGINGFACE_API_URL} + +spring.web.resources.static-locations=classpath:/static/, file:./src/main/resources/static/ From 102d4c56de86cec062d552eb7d41921c94558fbb Mon Sep 17 00:00:00 2001 From: ouob123 Date: Fri, 28 Feb 2025 00:10:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[Fix]=20CorsConfig=20=EB=8D=AE=EC=96=B4?= =?UTF-8?q?=EC=94=8C=EC=9B=8C=EC=A7=80=EB=8A=94=20=EB=B6=80=EB=B6=84=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/example/SucceSS/config/CorsConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/example/SucceSS/config/CorsConfig.java b/src/main/java/com/example/SucceSS/config/CorsConfig.java index 9309daa..6758940 100644 --- a/src/main/java/com/example/SucceSS/config/CorsConfig.java +++ b/src/main/java/com/example/SucceSS/config/CorsConfig.java @@ -14,8 +14,9 @@ public class CorsConfig { public static CorsConfigurationSource corsConfigurationSource() { CorsConfiguration config = new CorsConfiguration(); config.setAllowCredentials(true); - config.setAllowedOrigins(List.of("http://localhost:5173")); - config.setAllowedOrigins(List.of("https://how-was-your-day.vercel.app/oauth")); + config.setAllowedOrigins(List.of( + "http://localhost:5173", + "https://how-was-your-day.vercel.app")); config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS")); config.setAllowedHeaders(List.of("*")); config.setExposedHeaders(List.of("*"));