Skip to content

Commit

Permalink
Fix:: 서버에 SSL cert 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
whitenoise13 committed Oct 1, 2024
1 parent 1fd6fd7 commit a1afd85
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,19 @@ jobs:
jwt.secret: ${{ secrets.JWT_SECRET }}
spring.ai.openai.api-key: ${{ secrets.OPENAI_API_KEY }}

- name: set chmod
run: chmod +x ./gradlew
- name: set ssl yml file
uses: microsoft/variable-substitution@v1
with:
files: src/main/resources/application-ssl.yml
env:
server.ssl.key-store-password: ${{ secrets.SSL_PASSWORD }}

- name: Build with Gradle
run: ./gradlew bootJar
run: |
echo '${{ secrets.CHEONGFORDO_P12 }}' | base64 --decode > ./src/main/resources/cheongfordo.p12
chmod +x ./gradlew
./gradlew bootJar
- name: Docker build & push to prod
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,4 +143,5 @@ replay_pid*
# End of https://www.toptal.com/developers/gitignore/api/intellij,java

.gradle/
build/
build/
.idea
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ FROM openjdk:17
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
ENV TZ=Asia/Seoul
ENTRYPOINT ["java","-jar","/app.jar","-Duser.timezone=Asia/Seoul"]
ENTRYPOINT ["java","-jar","/app.jar","-Duser.timezone=Asia/Seoul","--spring.config.location=classpath:/application.yml,classpath:/application-ssl.yml"]
6 changes: 6 additions & 0 deletions src/main/resources/application-ssl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
server: # additional ssl settings
ssl:
enabled: true
key-store-type: PKCS12
key-store: classpath:cheongfordo.p12
key-store-password: ${SSL_PASSWORD}

0 comments on commit a1afd85

Please sign in to comment.