Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: chmod +x ./gradlew
working-directory: ./backend

- name: Build JAR with Gradle
- name: Build JAR without tests
run: ./gradlew build -x test --no-daemon
working-directory: ./backend

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
- name: Grant execute permission to Gradle wrapper
run: chmod +x gradlew

- name: Build without tests
- name: Build JAR without tests
run: ./gradlew build -x test --no-daemon
12 changes: 4 additions & 8 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# backend/Dockerfile

# --- Stage 1: Build the JAR using Gradle ---
FROM gradle:7.6.0-jdk17 AS builder
WORKDIR /app
COPY . .
RUN gradle clean build -x test --no-daemon

# --- Stage 2: Run the app using OpenJDK ---
FROM openjdk:17-slim
WORKDIR /app
COPY --from=builder /app/build/libs/*.jar app.jar

# CI에서 빌드된 JAR을 그대로 사용
COPY build/libs/*.jar app.jar

EXPOSE 80
ENTRYPOINT ["java", "-jar", "app.jar"]