Skip to content

Commit 7fac56e

Browse files
committed
chore: aws-cicd.yml 변경
1 parent ecee864 commit 7fac56e

File tree

3 files changed

+14
-24
lines changed

3 files changed

+14
-24
lines changed

.github/workflows/aws-cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: actions/checkout@v2
1212

1313
- name: build image
14-
working-directory: .
14+
working-directory: ./layer-api
1515
run: docker build -t clean01/layer-server:latest .
1616

1717
- name: docker hub login

Dockerfile

Lines changed: 0 additions & 16 deletions
This file was deleted.

layer-api/Dockerfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
FROM openjdk:17
2-
3-
ARG JAR_FILE=./build/libs/*.jar
4-
ARG SPRING_PROFILE
1+
FROM openjdk:17 as stage1
2+
WORKDIR /app
3+
COPY gradlew .
4+
COPY gradle gradle
5+
COPY src src
6+
COPY build.gradle .
7+
COPY settings.gradle .
58

6-
COPY ${JAR_FILE} layer-server.jar
9+
RUN chmod 777 ./gradlew
10+
RUN ./gradlew bootJar
711

8-
ENV SPRING_PROFILE=${SPRING_PROFILE}
912

10-
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul","-Dspring.profiles.active=${SPRING_PROFILE}" ,"-jar" ,"layer-server.jar"]
13+
FROM openjdk:17
14+
WORKDIR /app
15+
COPY --from=stage1 /app/build/libs/*.jar app.jar
16+
ENTRYPOINT ["java", "-jar", "layer.jar"]

0 commit comments

Comments
 (0)