-
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.
- Loading branch information
1 parent
0268301
commit a95a301
Showing
4 changed files
with
20 additions
and
5 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 |
---|---|---|
|
@@ -46,11 +46,16 @@ jobs: | |
target: "./" | ||
|
||
|
||
- name: Docker image build | ||
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest . | ||
- name: ubuntu Docker image build | ||
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest -f Dockerfile-server . | ||
|
||
- name: docker Hub 푸쉬 | ||
- name: Redis Docker image build | ||
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis -f Dockerfile-redis . | ||
|
||
- name: ubuntu docker Hub 푸쉬 | ||
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
- name: Redis docker Hub 푸쉬 | ||
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
|
||
- name: Deploy with push | ||
uses: appleboy/[email protected] | ||
|
@@ -61,10 +66,13 @@ jobs: | |
port: ${{ secrets.PORT }} | ||
# 이미 멈춰있어서 발생하는 예외를 방지하기 위해 || true 설정 | ||
script: | | ||
sudo docker stop we-share-wish-hair || true | ||
sudo docker stop we-share-wish-hair || true | ||
sudo docker stop wswh-redis || true | ||
sudo docker container prune -f | ||
sudo docker pull ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
sudo docker run -d --log-driver=syslog --env-file .env \ | ||
-p 8080:8080 --name we-share-wish-hair \ | ||
${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest | ||
sudo docker pull ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
sudo docker run -d -p 6379:6379 --name wswh-redis ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis | ||
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 @@ | ||
FROM redis:latest |
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,4 +1,4 @@ | ||
FROM openjdk:17-alpine | ||
ARG JAR_PATH=build/libs/*.jar | ||
COPY ${JAR_PATH} /home/server.jar | ||
ENTRYPOINT ["java","-jar","/home/server.jar"] | ||
ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-jar","/home/server.jar"] |
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