From 15e75ec3c107b6dcfeea121cb1398c508d048a4d Mon Sep 17 00:00:00 2001 From: kangjuhyup Date: Wed, 30 Oct 2024 23:04:42 +0900 Subject: [PATCH] test --- .github/workflows/ci-cd.yml | 7 +++++-- Dockerfile | 21 ++------------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e07fd94..4144c9f 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -57,10 +57,13 @@ jobs: echo "REDIS_HOST=${{ secrets.REDIS_HOST }}" >> .env echo "REDIS_PORT=${{ secrets.REDIS_PORT }}" >> .env echo "REDIS_PWD=${{ secrets.REDIS_PWD }}" >> .env - + - name: Display .env file content run: cat .env - + - name: builder push + run: docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.repository }}/builder:latest --push . + - name: builder push + run: docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.repository }}/release:latest --push . - name: docker build & push run: docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/${{ github.repository }}/service:latest --push . diff --git a/Dockerfile b/Dockerfile index 7a86267..996b07c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,18 @@ # 빌드 스테이지 -FROM node:20-bullseye-slim AS builder +FROM ghcr.io/kangjuhyup/invite-service/builder:latest AS builder WORKDIR /usr/src/app -# 필요한 패키지 설치 -RUN apt-get update && apt-get install -y \ - python3 \ - build-essential \ - libc6-dev \ - libvips-dev - -# Yarn 버전 설정 -RUN yarn set version 4.5.0 - COPY . . RUN yarn install RUN yarn build # 프로덕션 스테이지 -FROM node:20-bullseye-slim AS production +FROM ghcr.io/kangjuhyup/invite-service/release:latest AS production WORKDIR /usr/src/app -RUN apt-get update && apt-get install -y \ - libvips-dev \ - libc6-dev - -# Yarn 버전 설정 -RUN yarn set version 4.5.0 - COPY --from=builder /usr/src/app/.yarn/ .yarn/ COPY --from=builder /usr/src/app/.yarnrc.yml .yarnrc.yml COPY --from=builder /usr/src/app/package.json /usr/src/app/yarn.lock ./