Skip to content

Commit

Permalink
chore: profile arg
Browse files Browse the repository at this point in the history
  • Loading branch information
essential2189 committed Jan 22, 2024
1 parent 5ea31a5 commit a48ee6a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
#######################################
FROM openjdk:17-alpine AS builder

ARG PROFILE
ARG PROFILE=local
ENV PROFILE=${PROFILE}

WORKDIR /build
WORKDIR /app

# Gradle Wrapper와 설정 파일 복사
COPY gradlew /build/
COPY gradle /build/gradle
COPY build.gradle settings.gradle /build/
COPY gradlew /app/
COPY gradle /app/gradle
COPY build.gradle settings.gradle /app/

# Gradle Wrapper 실행 권한 부여
RUN chmod +x /build/gradlew
RUN chmod +x /app/gradlew

# 종속성 다운로드 및 캐싱
RUN ./gradlew dependencies || true

# 소스 코드 복사 후 애플리케이션 빌드
COPY src /build/src
COPY src /app/src
RUN ./gradlew build -x test --parallel --stacktrace

#######################################
Expand All @@ -29,7 +29,7 @@ RUN ./gradlew build -x test --parallel --stacktrace
FROM openjdk:17-alpine

# 빌더 이미지에서 JAR 파일 복사
COPY --from=builder /build/build/libs/*.jar /app.jar
COPY --from=builder /app/build/libs/*.jar /app.jar

# 8080 포트 노출
EXPOSE 8080
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.today-popup'
version = '0.0.1-SNAPSHOT'
version = '0.0.1'

java {
sourceCompatibility = '17'
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
ports:
- "8080:8080"
environment:
env: dev
PROFILE: dev
depends_on:
- db_mysql
networks:
Expand Down

0 comments on commit a48ee6a

Please sign in to comment.