-
Notifications
You must be signed in to change notification settings - Fork 2
[#47] Railway 배포 자동화 설정 #48
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR sets up automated Railway deployment for both backend and frontend services with separate development and production environments. The deployment flow has been changed from automatic branch-based triggers to manual workflow dispatch for better control.
- Refactored GitHub Actions workflows to use manual triggers instead of automatic branch pushes
- Added Railway configuration files and updated Next.js configuration for environment-specific backend URL handling
- Improved Dockerfile with multi-stage builds and optimized test code formatting
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/deploy-*.yml |
Changed from automatic to manual deployment triggers and updated Railway CLI usage |
weski-admin/railway.json |
Added Railway deployment configuration for frontend |
weski-admin/next.config.js |
Enhanced backend URL configuration for different environments |
weski-admin/.railwayignore |
Added ignore file for Railway deployments |
Dockerfile |
Improved with multi-stage build and security enhancements |
| Test files | Code formatting improvements and method signature updates |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow_dispatch trigger should include input parameters or documentation explaining when and how this manual deployment should be used, especially since it replaced automatic main branch deployment.
| push: | ||
| branches: | ||
| - develop | ||
| workflow_dispatch: |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow_dispatch trigger should include input parameters or documentation explaining when and how this manual deployment should be used, especially since it replaced automatic develop branch deployment.
| // 정적 생성 최적화 (기존 experimental 설정과 병합) | ||
| experimental: { | ||
| optimizePackageImports: ['antd'], | ||
| // SSG 관련 설정 |
Copilot
AI
Sep 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ISR memory cache is disabled (set to 0) but there's no comment explaining why this optimization was chosen for Railway deployment. Consider adding a comment to clarify the reasoning.
| // SSG 관련 설정 | |
| // SSG 관련 설정 | |
| // Railway 환경에서는 메모리 캐시가 요청 간에 유지되지 않으므로, isrMemoryCacheSize를 0으로 설정하여 메모리 캐시를 비활성화합니다. |
[Admin] 스키장 슬로프 현황 조회 및 업데이트 기능 개발
[Feature] App version 강제 업데이트 3.1.2
[Admin] page 무한 로딩 에러 수정
[Admin] 스키장 웹캠 현황 업데이트 기능 추가
배포 flow chart
graph TD A[개발자 코드 Push] --> B{브랜치 확인} B -->|develop 브랜치| C[Backend Dev Workflow] B -->|main 브랜치| D[Backend Prod Workflow] B -->|weski-admin/ 변경| E[Frontend Dev Workflow] B -->|weski-admin/ 변경| F[Frontend Prod Workflow] B -->|수동 실행| G[Manual Workflow Dispatch] %% Backend Development Flow C --> C1[Checkout Code] C1 --> C2[Setup JDK 17] C2 --> C3[Setup Gradle Cache] C3 --> C4[Run Tests] C4 --> C5[Install Railway CLI] C5 --> C6[Deploy to Railway Dev] C6 --> C7[weski-server-dev.railway.app] %% Backend Production Flow D --> D1[Checkout Code] D1 --> D2[Setup JDK 17] D2 --> D3[Setup Gradle Cache] D3 --> D4[Run Tests] D4 --> D5[Install Railway CLI] D5 --> D6[Deploy to Railway Prod] D6 --> D7[weski-server-production.railway.app] %% Frontend Development Flow E --> E1[Checkout Code] E1 --> E2[Setup Node.js 18] E2 --> E3[Install Dependencies] E3 --> E4[Type Check] E4 --> E5[Lint Check] E5 --> E6[Build Next.js App] E6 --> E7[Install Railway CLI] E7 --> E8[Deploy to Railway Dev] E8 --> E9[weski-admin-dev.railway.app] %% Frontend Production Flow F --> F1[Checkout Code] F1 --> F2[Setup Node.js 18] F2 --> F3[Install Dependencies] F3 --> F4[Type Check] F4 --> F5[Lint Check] F5 --> F6[Build Next.js App] F6 --> F7[Install Railway CLI] F7 --> F8[Deploy to Railway Prod] F8 --> F9[weski-admin-production.railway.app] %% Manual Dispatch G --> G1{선택한 워크플로우} G1 -->|Backend Dev| C G1 -->|Backend Prod| D G1 -->|Frontend Dev| E G1 -->|Frontend Prod| F %% Railway Services C7 --> R1[Railway Dev Environment] D7 --> R2[Railway Prod Environment] E9 --> R1 F9 --> R2 %% Styling classDef backendFlow fill:#e1f5fe classDef frontendFlow fill:#f3e5f5 classDef railwayService fill:#fff3e0 classDef manualFlow fill:#e8f5e8 class C,C1,C2,C3,C4,C5,C6,D,D1,D2,D3,D4,D5,D6 backendFlow class E,E1,E2,E3,E4,E5,E6,E7,E8,F,F1,F2,F3,F4,F5,F6,F7,F8 frontendFlow class R1,R2,C7,D7,E9,F9 railwayService class G,G1 manualFlowAdmin 배포 flow chart
graph TD A[코드 Push to develop] --> B[GitHub Actions 트리거] B --> C[Node.js 환경 설정] C --> D[의존성 설치] D --> E[코드 검증] E --> F[Next.js 빌드] F --> G[Railway CLI 설치] G --> H[Railway 인증] H --> I[서비스 ID로 서비스 식별] I --> J[소스 코드 업로드] J --> K[Nixpacks 빌드] K --> L[컨테이너 배포] L --> M[헬스체크] M --> N[트래픽 라우팅]