-
Notifications
You must be signed in to change notification settings - Fork 6
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
46ba046
commit aa17e84
Showing
3 changed files
with
23 additions
and
16 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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM adoptopenjdk:11 AS builder | ||
COPY gradlew . | ||
COPY settings.gradle . | ||
COPY build.gradle . | ||
COPY gradle gradle | ||
COPY src src | ||
RUN chmod +x ./gradlew | ||
RUN ./gradlew build -x test | ||
|
||
FROM adoptopenjdk:11 | ||
RUN mkdir /opt/app | ||
COPY --from=builder build/libs/*.jar /opt/app/spring-boot-application.jar | ||
EXPOSE 8080 | ||
ENV PROFILE local | ||
ENTRYPOINT ["java", "-jar", "-Dspring.profiles.active=${PROFILE}" ,"/opt/app/spring-boot-application.jar"] | ||
FROM openjdk:11-jdk | ||
|
||
VOLUME /tmp | ||
|
||
ARG JAR_FILE=./build/libs/*.jar | ||
|
||
COPY ${JAR_FILE} app.jar | ||
|
||
ENTRYPOINT ["nohup","java","-jar","-Dspring.profiles.active=prod","app.jar","2>&1","&"] |
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
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,13 @@ | ||
# 가동중인 ssafsound-app 도커 중단 및 삭제 | ||
sudo docker ps -a -q --filter "name=ssafsound-app" | grep -q . && docker stop ssafsound-app && docker rm ssafsound-app | true | ||
|
||
# 기존 이미지 삭제 | ||
sudo docker rmi kimssafy/ssafsound-app:latest | ||
|
||
# 도커허브 이미지 pull | ||
sudo docker pull kimssafy/ssafsound-app:latest | ||
|
||
# 도커 run | ||
docker run -d -p 8080:8080 -e TZ=Asia/Seoul -v /home/ubuntu/logs:/logs --name ssafsound-app kimssafy/ssafsound-app:latest | ||
|
||
docker rmi -f $(docker images -f "dangling=true" -q) || true |