Skip to content

Commit

Permalink
Merge pull request #2 from YerangPark/dev
Browse files Browse the repository at this point in the history
fix: 도커 명령어 옵션 순서 변경
  • Loading branch information
YerangPark authored Oct 10, 2024
2 parents 22f7093 + c1ad8da commit a887abd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,5 @@ jobs:
docker rm frontend-container || true
docker run -d --name frontend-container \
-p 3000:3000 ${{ secrets.DOCKERHUB_USERNAME }}/folio-frontend:latest \
-e NEXT_PUBLIC_API_BASE_URL=http://yrpark.duckdns.org:8080
-e NEXT_PUBLIC_API_BASE_URL=http://yrpark.duckdns.org:8080 \
-p 3000:3000 ${{ secrets.DOCKERHUB_USERNAME }}/folio-frontend:latest
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ RUN npm install --legacy-peer-deps
# 소스 코드 복사
COPY . .

# 빌드 수행 (NEXT_PUBLIC_API_BASE_URL을 빌드 시점에 주입)
ARG NEXT_PUBLIC_API_BASE_URL
ENV NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL

# 빌드 수행
RUN npm run build

Expand All @@ -22,6 +26,8 @@ FROM node:20-alpine
# 앱 디렉토리 생성 및 설정
WORKDIR /app

ENV NEXT_PUBLIC_API_BASE_URL=http://yrpark.duckdns.org:8080

# 빌드된 결과물(.next)을 최종 컨테이너에 복사
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
Expand Down
4 changes: 2 additions & 2 deletions src/components/organisms/SignupModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ const SignupModal: React.FC<SignupModalProps> = ({ isOpen, onClose, openLoginMod

// 폼 제출 시 처리할 로직
const handleSubmit = async () => {
if (!Object.values(formData).some((value) => value === null || value === '')) {
if (Object.values(formData).some((value) => value === null || value === '')) {
setErrorMessage('입력되지 않은 항목이 있습니다.')
return
}
if (validatePassword(formData.password)) {
if (!validatePassword(formData.password)) {
setErrorMessage('비밀번호는 8~16자의 영문 대/소문자, 숫자, 특수문자를 포함해야 합니다.')
return
}
Expand Down

0 comments on commit a887abd

Please sign in to comment.