Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
sudo docker network create app-network

# database container ์‹คํ–‰ -> ์ตœ์ดˆ์—๋งŒ ์‹คํ–‰
- name: Run database containers
run: sudo docker compose -f ./infra/database/docker-compose.database.yaml up -d --build
# - name: Run database containers
# run: sudo docker compose -f ./infra/database/docker-compose.database.yaml up -d --build

# monitoring container ์‹คํ–‰ -> ์ตœ์ดˆ์—๋งŒ ์‹คํ–‰
# - name: Run monitoring containers
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/com/lawmon/lawmon/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,27 @@
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class SwaggerConfig {
@Value("${app.domain}")
private String domain;

@Bean
public OpenAPI openAPI() {
Server server = new Server()
.url(domain)
.description("๋ฐฐํฌ ์„œ๋ฒ„");

Server localServer = new Server()
.url("http://localhost:8080")
.description("๋กœ์ปฌ ๊ฐœ๋ฐœ ์„œ๋ฒ„");

return new OpenAPI()
.components(new Components()
.addSecuritySchemes("JWT", new SecurityScheme()
Expand All @@ -25,8 +37,8 @@ public OpenAPI openAPI() {
.addSecurityItem(new SecurityRequirement().addList("JWT"))
.info(apiInfo())
.servers(List.of(
new Server().url("http://localhost:8080")
));
localServer, server)
);
}

private Info apiInfo() {
Expand Down
Loading