-
Notifications
You must be signed in to change notification settings - Fork 4
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 #83 from PUDDY-sp/dev
cicd 완료 ...
- Loading branch information
Showing
2 changed files
with
18 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
|
||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
|
||
- name: Login to DockerHub | ||
uses: docker/[email protected] | ||
with: | ||
|
@@ -45,7 +45,7 @@ jobs: | |
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ../../Dockerfile | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_PROD_REPONAME }}:0.0.1 | ||
|
||
|
@@ -59,9 +59,9 @@ jobs: | |
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
key: ${{ secrets.SSH_KEY }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
port: ${{ 22 }} | ||
script: | | ||
docker compose down | ||
docker image prune -a | ||
docker compose up | ||
docker compose up -d |
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 |
---|---|---|
@@ -1,3 +1,14 @@ | ||
FROM openjdk:17 | ||
COPY /build/libs/puddy-0.0.1-SNAPSHOT.jar app.jar | ||
ENTRYPOINT ["java", "-jar", "app.jar", "--spring.profiles.active=prod"] | ||
# FROM openjdk:17 | ||
# WORKDIR /app | ||
# COPY ./build/libs/puddy-0.0.1-SNAPSHOT.jar app.jar | ||
# ENTRYPOINT ["java", "-jar", "app.jar", "--spring.profiles.active=prod"] | ||
|
||
FROM gradle:8.5-jdk17 AS builder | ||
COPY . /usr/src | ||
WORKDIR /usr/src | ||
RUN gradle wrapper --gradle-version 8.5 | ||
RUN ./gradlew clean build -x test | ||
|
||
FROM openjdk:17-jdk-alpine | ||
COPY --from=builder /usr/src/build/libs/puddy-0.0.1-SNAPSHOT.jar /usr/app/app.jar | ||
ENTRYPOINT ["java", "-jar", "/usr/app/app.jar", "--spring.profiles.active=prod"] |