diff --git a/.dockerignore b/.dockerignore index a9b114d..5840d0f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,4 +6,8 @@ node_modules .env +.env.example .github +README.md + +nginx/ diff --git a/.github/workflows/github-action.yaml b/.github/workflows/github-action.yaml index d73a839..173b728 100644 --- a/.github/workflows/github-action.yaml +++ b/.github/workflows/github-action.yaml @@ -15,21 +15,21 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 with: platforms: 'arm64' # support AWS EC2 t4g - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v2 + uses: aws-actions/configure-aws-credentials@v4 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ap-northeast-2 - name: Login to Amazon ECR - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Determine Prod/Dev Stage run: | if [[ ${{ github.event_name }} == 'release' ]]; then @@ -42,13 +42,14 @@ jobs: echo "NEXT_PUBLIC_ENV=dev" >> $GITHUB_ENV fi - name: Build and Push - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . platforms: linux/arm64 # support AWS EC2 t4g tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }} build-args: | "NEXT_PUBLIC_ENV=${{ env.NEXT_PUBLIC_ENV }}" + "POPO_VERSION=${{ github.event.release.tag_name || github.sha }}" cache-from: type=gha cache-to: type=gha,mode=max push: true diff --git a/Dockerfile b/Dockerfile index aabd235..1a50c20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,6 @@ # Buile Step FROM node:18.18-alpine AS builder -# dev, prod -ARG NEXT_PUBLIC_ENV -ENV NEXT_PUBLIC_ENV ${NEXT_PUBLIC_ENV} - WORKDIR /usr/src/app COPY package*.json ./ @@ -13,11 +9,19 @@ RUN npm ci --ignore-scripts --legacy-peer-deps COPY . . +# dev, prod +ARG NEXT_PUBLIC_ENV +ENV NEXT_PUBLIC_ENV ${NEXT_PUBLIC_ENV} + +# popo version +ARG POPO_VERSION +ENV NEXT_PUBLIC_POPO_VERSION ${POPO_VERSION} + RUN npm run build RUN npm prune --production # Run Step -FROM node:18.17-alpine AS runner +FROM node:18.18-alpine AS runner WORKDIR /usr/src/app diff --git a/components/navbar/menu.item.user.jsx b/components/navbar/menu.item.user.jsx index 71bfc2d..ce7e4ec 100644 --- a/components/navbar/menu.item.user.jsx +++ b/components/navbar/menu.item.user.jsx @@ -38,7 +38,13 @@ const MenuItemUser = () => { border: 'none', boxShadow: '0 2px 5px 0px rgba(0, 0, 0, 0.2)', }}> - + + diff --git a/pages/login.jsx b/pages/login.jsx index 80d23d3..9442758 100644 --- a/pages/login.jsx +++ b/pages/login.jsx @@ -1,6 +1,6 @@ import { useState } from 'react' import { useRouter } from 'next/router' -import { Form, Image, Message } from 'semantic-ui-react' +import { Form, Image } from 'semantic-ui-react' import styled from 'styled-components' import LoginLayout from '@/components/layout.raw' @@ -34,9 +34,6 @@ const LoginPage = () => { 관리자 페이지 - - 2023.08.13부터 POPO 로그인 방식이 ID/PW에서 Email/PW로 변경 됩니다. -