-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from Korea-Certified-Store/develop
Develop to Main 릴리즈 (#71)
- Loading branch information
Showing
10 changed files
with
134 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
|
||
# -------------------- spring-boot-dev WAS -------------------- | ||
upstream backend { | ||
server server:8080; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name dev.nainga.store; | ||
|
||
# certbot 이 소유자임을 확인하는 경로 | ||
location /.well-known/acme-challenge { | ||
root /var/lib/letsencrypt/; # 사용자 인증을 위한 파일이 생성 되는곳 | ||
} | ||
|
||
# Redirect all traffic to HTTPS | ||
location / { | ||
return 301 https://$host$request_uri; | ||
} | ||
} | ||
|
||
server { | ||
listen 443 ssl; | ||
server_name dev.nainga.store; | ||
|
||
ssl_certificate /etc/letsencrypt/live/dev.nainga.store/fullchain.pem; | ||
ssl_certificate_key /etc/letsencrypt/live/dev.nainga.store/privkey.pem; | ||
|
||
location / { | ||
proxy_pass http://backend; | ||
proxy_set_header Host $host; # 클라이언트가 요청한 호스트의 도메인 | ||
proxy_set_header X-Real-IP $remote_addr; # 클라이언트의 실제 IP 주소 | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 원격 클라이언트의 실제 IP 주소와, 이전에 거친 프록시 서버의 IP 주소들이 쉼표로 구분되어 포함 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/com/nainga/nainga/global/config/SwaggerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.nainga.nainga.global.config; | ||
|
||
import io.swagger.v3.oas.models.OpenAPI; | ||
import io.swagger.v3.oas.models.Operation; | ||
import io.swagger.v3.oas.models.PathItem; | ||
import io.swagger.v3.oas.models.Paths; | ||
import io.swagger.v3.oas.models.info.Info; | ||
import io.swagger.v3.oas.models.media.Content; | ||
import io.swagger.v3.oas.models.media.MediaType; | ||
import io.swagger.v3.oas.models.media.Schema; | ||
import io.swagger.v3.oas.models.responses.ApiResponse; | ||
import io.swagger.v3.oas.models.responses.ApiResponses; | ||
import io.swagger.v3.oas.models.tags.Tag; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.util.List; | ||
|
||
@Configuration | ||
public class SwaggerConfig { | ||
|
||
@Bean | ||
public OpenAPI customOpenAPI() { | ||
//Google Cloud Storage API는 별도로 Swagger에 명세 | ||
return new OpenAPI() | ||
.paths(new Paths().addPathItem("https://storage.googleapis.com/{BUCKET_NAME}/{IMAGE_NAME}", | ||
new PathItem().get(new Operation().summary("저장된 가게 이미지 제공") | ||
.description("저장된 가게 이미지를 제공하는 API입니다.<br>" + | ||
"본 API는 Google Cloud Storage에서 제공하는 API로 URL이 위와 같으며 이 정보는 각 가게별 local_photos 필드에 저장되어 있습니다.<br>" + | ||
"Dev 환경에서 BUCKET_NAME은 kcs-dev-bucket1이고 Prod 환경에서 BUCKET_NAME은 kcs-prod-bucket1입니다.<br>" + | ||
"가게 이름은 UUID를 활용한 난수로 제공됩니다.<br>" + | ||
"참고로 Swagger 상에서는 Base URL이 달라 테스트가 불가능합니다.<br>" + | ||
"만약 테스트를 원하신다면 브라우저 상에서 직접 URL을 입력해주시면 됩니다.<br>" + | ||
"예) https://storage.googleapis.com/kcs-dev-bucket1/ad06294c-d4ed-42bd-9839-82af8714bd1e") | ||
.tags(List.of("가게 상세 정보")) | ||
.responses(new ApiResponses().addApiResponse("200", | ||
new ApiResponse().description("OK") | ||
.content(new Content().addMediaType("image/jpeg", new MediaType() | ||
.schema(new Schema<>().type("string") | ||
.format("binary"))))))))); | ||
} | ||
} | ||
|
Submodule backend-submodule
updated
from 614a5b to 67e3a6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule backend-submodule
updated
from 614a5b to 67e3a6