-
Notifications
You must be signed in to change notification settings - Fork 7
Feat/aws workflow #61
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 migrates the application from GCP to AWS infrastructure and updates the build tooling configuration. The changes disable Google OAuth authentication, update TypeScript compilation settings to use ES2022 modules with path alias resolution, and modify Docker deployment workflows to target EC2 instead of GCP.
Key Changes:
- Disabled Google OAuth authentication by commenting out passport-related code
- Updated TypeScript configuration for ES2022 modules with tsc-alias for path resolution
- Migrated deployment from GCP to AWS EC2 with updated Docker compose configurations
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 aliases and added tsc-alias configuration |
| package.json | Updated build script to include resolve-tspaths, moved jsonwebtoken to dependencies, added Docker scripts |
| docker-compose.yml | Added new base compose file for shared service configuration |
| docker-compose.yaml | Updated production compose configuration |
| docker-compose.dev.yml | Added new development compose override file |
| Dockerfile.prod | Added multi-stage production Dockerfile |
| Dockerfile.dev | Added development Dockerfile |
| .github/workflows/main.yml | Updated CI/CD to deploy to AWS EC2 instead of GCP |
| src/utils/sequelize.ts | Updated error handling with explicit type casting |
| src/utils/seed.ts | Added owner role validation and type assertions |
| src/utils/multer.ts | Fixed multer type imports |
| src/routes/auth-routes.ts | Commented out Google OAuth routes |
| src/controllers/google-auth-controller.ts | Commented out entire Google OAuth controller |
| src/controllers/enquiry-controller.ts | Added explicit type annotations for request handlers |
| src/controllers/ammenities-controller.ts | Changed to fetch hostel by ID instead of using eager loading |
| src/config/passport.ts | Commented out passport configuration |
| src/app.ts | Commented out passport and session middleware |
| src/index.ts | Commented out tsconfig-paths registration and seed import |
| src/models/hostel-model.ts | Added 'available' field to interface |
| src/models/file-model.ts | Added 'userId' field to interface |
Comments suppressed due to low confidence (4)
src/utils/sequelize.ts:1
- Casting error to 'undefined' will lose error information. The Logger.error method should accept unknown or Error type. Remove the type cast or cast to a more appropriate type like 'Error'.
docker-compose.dev.yml:1 - The 'context' field should point to a directory, not a Dockerfile. It should be './' with a separate 'dockerfile' field pointing to 'Dockerfile.dev', or the context should be '.' and dockerfile should be './Dockerfile.dev'.
src/models/hostel-model.ts:1 - The field 'availabe' appears to be a typo. Consider renaming to 'available' to match the newly added field on line 20, or remove the duplicate if this was the intended fix.
src/controllers/ammenities-controller.ts:1 - This creates an N+1 query problem by fetching hostels one at a time inside a loop. Consider collecting all unique hostelIds first, then fetching all hostels in a single query using Hostel.findAll({ where: { id: { [Op.in]: hostelIds } } }).
💡 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 after 'EC2_SSH_KEY' before closing braces. Should be '${{ secrets.EC2_SSH_KEY }}' for consistency with other secret references.
| key: ${{ secrets.EC2_SSH_KEY}} # private key | |
| key: ${{ secrets.EC2_SSH_KEY }} # private key |
No description provided.