-
Notifications
You must be signed in to change notification settings - Fork 7
Add production modifications to staging #62
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
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 adds production environment configurations and modifications from production to the staging branch. The changes primarily involve updating TypeScript build configuration, adding Docker support for development and production environments, commenting out Google OAuth functionality, and refining type safety across several files.
Key Changes:
- Migrated from
NodeNexttoES2022module system with updated path resolution and addedtsc-aliasfor build-time path resolution - Added Docker compose configurations for development and production environments with separate Dockerfiles
- Commented out Google OAuth authentication code and dependencies while maintaining the codebase structure
- Enhanced type safety by adding explicit type annotations and fixing type-related issues
Reviewed Changes
Copilot reviewed 31 out of 180 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updated module system to ES2022, adjusted path mappings, and added tsc-alias configuration |
| tsc-alias.config.json | Added standalone tsc-alias configuration file for path resolution |
| package.json | Reorganized scripts for Docker workflows, moved jsonwebtoken to dependencies, updated package versions |
| docker-compose.yml | Added new base Docker compose configuration |
| docker-compose.yaml | Refactored existing compose file for production setup with nginx and certbot |
| docker-compose.dev.yml | Added development-specific Docker compose configuration |
| Dockerfile.prod | Created multi-stage production Docker build |
| Dockerfile.dev | Created development Docker configuration |
| src/utils/sequelize.ts | Added explicit type annotation for error handling |
| src/utils/seed.ts | Added null check for ownerRole and type assertions |
| src/utils/multer.ts | Updated type imports to use Express types |
| src/routes/auth-routes.ts | Commented out Google OAuth routes |
| src/models/hostel-model.ts | Added 'available' field to interface |
| src/models/file-model.ts | Added 'userId' field to interface |
| src/index.ts | Commented out tsconfig-paths and passport imports |
| src/controllers/index.ts | Commented out googleAuthController export |
| src/controllers/google-auth-controller.ts | Commented out entire file content |
| src/controllers/enquiry-controller.ts | Added explicit type annotations for request handlers |
| src/controllers/ammenities-controller.ts | Refactored hostel lookup logic |
| src/config/passport.ts | Commented out entire file content |
| src/app.ts | Commented out session and passport middleware |
| .github/workflows/main.yml | Updated deployment target from GCP to EC2 |
| nodemon.json | Changed package manager from pnpm to npm |
Comments suppressed due to low confidence (3)
src/utils/sequelize.ts:1
- Casting error to undefined prevents proper error logging. The Logger.error likely expects the actual error object for meaningful error reporting. Remove the 'as undefined' cast to pass the error object correctly.
src/models/hostel-model.ts:1 - Corrected spelling of 'availabe' to 'available'.
docker-compose.dev.yml:1 - The build context should point to a directory, not a Dockerfile. Change 'context: ./Dockerfile.dev' to 'context: .' and add 'dockerfile: Dockerfile.dev' on the next line.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| jobs: | ||
| deploy: | ||
| deploy-to-production: | ||
| enviornment: production |
Copilot
AI
Oct 24, 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.
Corrected spelling of 'enviornment' to 'environment'.
| enviornment: production | |
| environment: production |
| with: | ||
| host: ${{ secrets.EC2_HOST }} # 34.57.111.25 | ||
| username: ${{ secrets.EC2_USER }} # Shravan | ||
| key: ${{ secrets.EC2_SSH_KEY}} # private key |
Copilot
AI
Oct 24, 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.
Missing space before closing braces in template expression. Change '${{ secrets.EC2_SSH_KEY}}' to '${{ secrets.EC2_SSH_KEY }}' for consistency with other template expressions in the file.
| key: ${{ secrets.EC2_SSH_KEY}} # private key | |
| key: ${{ secrets.EC2_SSH_KEY }} # private key |
No description provided.