Skip to content

Commit

Permalink
Merge pull request #98 from COW-dev/main
Browse files Browse the repository at this point in the history
v0.1.13
  • Loading branch information
dojinyou authored Mar 3, 2024
2 parents 1e89878 + bbb991b commit b531001
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
S3_ACCESS_KEY=${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }}
S3_BUCKET=${{ secrets.S3_BUCKET }}
API_URL=${{ secrets.API_URL }}
tags: |
eatda/api-server:latest
Expand Down Expand Up @@ -73,7 +74,7 @@ jobs:
sudo docker rm - f $(docker ps -qa)
sudo docker pull eatda/api-server:latest
sudo docker stop $(sudo docker ps -aq)
sudo docker run -p 8080:8080 -d eatda/api-server:latest --name api-server
sudo docker run -p 80:8080 -d eatda/api-server:latest --name api-server
- name: Remove IP FROM security group
run: |
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ARG DB_PASSWORD
ARG S3_ACCESS_KEY
ARG S3_SECRET_KEY
ARG S3_BUCKET
ARG API_URL

COPY ${JAR_FILE} app.jar

Expand All @@ -21,5 +22,6 @@ ENV DB_PASSWORD=${DB_PASSWORD}
ENV S3_ACCESS_KEY=${S3_ACCESS_KEY}
ENV S3_SECRET_KEY=${S3_SECRET_KEY}
ENV S3_BUCKET=${S3_BUCKET}
ENV API_URL=${API_URL}

ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=${PROFILE}", "-Djava.security.egd=file:/dev/./urandom", "/app.jar"]
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### Application version ###
applicationVersion=0.1.8-RELEASE
applicationVersion=0.1.13-RELEASE

### Project configs ###
projectGroup="com.mjucow"
Expand Down
10 changes: 8 additions & 2 deletions src/main/kotlin/com/mjucow/eatda/common/config/SwaggerConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ package com.mjucow.eatda.common.config
import io.swagger.v3.oas.models.Components
import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Info
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

@Configuration
class SwaggerConfig {
class SwaggerConfig(
@Value("\${swagger.api-url:http://localhost:8080}")
val apiUrl: String,
) {
@Bean
fun swaggerApi(): OpenAPI = OpenAPI()
.components(Components())
.servers(listOf(Server().apply { url = apiUrl }))
.info(
Info()
.title("Eatda API Documentation")
.description("Eatda(잇다) 서비스의 API 명세서입니다.")
.version("0.1.8")
.version("0.1.13")
)
}
6 changes: 6 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ springdoc:
groups:
enabled: true

swagger:
api-url: http://localhost:8080

---

spring:
Expand Down Expand Up @@ -107,3 +110,6 @@ aws:
access-key: ${S3_ACCESS_KEY}
secret-key: ${S3_SECRET_KEY}
bucket: ${S3_BUCKET}

swagger:
api-url: ${API_URL}

0 comments on commit b531001

Please sign in to comment.