feat(infra): add multi-stage dockerfiles for PaaS deployment
This commit is contained in:
@@ -1,4 +1,17 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY build/libs/axhub-gateway-0.0.1-SNAPSHOT.jar app.jar
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle settings.gradle ./
|
||||
COPY axhub-common axhub-common
|
||||
COPY axhub-gateway axhub-gateway
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew :axhub-gateway:build -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY --from=builder /app/axhub-gateway/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY build/libs/axhub-tool-email-0.0.1-SNAPSHOT.jar app.jar
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle settings.gradle ./
|
||||
COPY axhub-common axhub-common
|
||||
COPY axhub-tool-core axhub-tool-core
|
||||
COPY axhub-tool-email axhub-tool-email
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew :axhub-tool-email:build -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY --from=builder /app/axhub-tool-email/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8083
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY build/libs/axhub-tool-other-0.0.1-SNAPSHOT.jar app.jar
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle settings.gradle ./
|
||||
COPY axhub-common axhub-common
|
||||
COPY axhub-tool-core axhub-tool-core
|
||||
COPY axhub-tool-other axhub-tool-other
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew :axhub-tool-other:build -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY --from=builder /app/axhub-tool-other/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8084
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY build/libs/axhub-tool-payment-0.0.1-SNAPSHOT.jar app.jar
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle settings.gradle ./
|
||||
COPY axhub-common axhub-common
|
||||
COPY axhub-tool-core axhub-tool-core
|
||||
COPY axhub-tool-payment axhub-tool-payment
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew :axhub-tool-payment:build -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY --from=builder /app/axhub-tool-payment/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8085
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
FROM eclipse-temurin:21-jdk-alpine
|
||||
FROM eclipse-temurin:21-jdk-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY build/libs/axhub-tool-sms-0.0.1-SNAPSHOT.jar app.jar
|
||||
COPY gradlew .
|
||||
COPY gradle gradle
|
||||
COPY build.gradle settings.gradle ./
|
||||
COPY axhub-common axhub-common
|
||||
COPY axhub-tool-core axhub-tool-core
|
||||
COPY axhub-tool-sms axhub-tool-sms
|
||||
RUN chmod +x gradlew
|
||||
RUN ./gradlew :axhub-tool-sms:build -x test
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Asia/Seoul
|
||||
COPY --from=builder /app/axhub-tool-sms/build/libs/*-SNAPSHOT.jar app.jar
|
||||
EXPOSE 8082
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
@@ -13,7 +13,8 @@ services:
|
||||
|
||||
gateway:
|
||||
build:
|
||||
context: ./axhub-gateway
|
||||
context: .
|
||||
dockerfile: axhub-gateway/Dockerfile
|
||||
ports:
|
||||
- "8281:8081"
|
||||
volumes:
|
||||
@@ -38,7 +39,8 @@ services:
|
||||
|
||||
tool-sms:
|
||||
build:
|
||||
context: ./axhub-tool-sms
|
||||
context: .
|
||||
dockerfile: axhub-tool-sms/Dockerfile
|
||||
ports:
|
||||
- "8282:8082"
|
||||
depends_on:
|
||||
@@ -58,7 +60,8 @@ services:
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
tool-email:
|
||||
build:
|
||||
context: ./axhub-tool-email
|
||||
context: .
|
||||
dockerfile: axhub-tool-email/Dockerfile
|
||||
ports:
|
||||
- "8283:8083"
|
||||
depends_on:
|
||||
@@ -78,7 +81,8 @@ services:
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
tool-other:
|
||||
build:
|
||||
context: ./axhub-tool-other
|
||||
context: .
|
||||
dockerfile: axhub-tool-other/Dockerfile
|
||||
ports:
|
||||
- "8284:8084"
|
||||
depends_on:
|
||||
@@ -98,7 +102,8 @@ services:
|
||||
- GLOW_COMMUNICATION_EAI_PORT=8080
|
||||
tool-payment:
|
||||
build:
|
||||
context: ./axhub-tool-payment
|
||||
context: .
|
||||
dockerfile: axhub-tool-payment/Dockerfile
|
||||
ports:
|
||||
- "8285:8085"
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user