Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 도커 명령어 옵션 순서 변경 #2

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading