Feat/docker - #243
Merged
Merged
Conversation
This commit introduces Sentry for application monitoring and updates the Next.js project configuration. Key changes include: - Integrated Sentry for error tracking and performance monitoring across client, server, and edge environments. - Added Sentry-specific configuration files (`sentry.client.config.ts`, `sentry.server.config.ts`, `sentry.edge.config.ts`, `sentry.properties`). - Migrated the Next.js configuration from `next.config.ts` to `next.config.mjs`. - Introduced the `pages/` directory. - Updated `.gitignore` to handle new configurations. - Modified the E2E testing workflow to align with the updated project structure. - Removed the `.env.example` file.
Problem: The frontend client forces withCredentials: true for all API requests, but the backend did not have a corresponding CORS configuration to handle this. This would cause requests from different origins to fail. Solution: Modified next.config.mjs to dynamically configure CORS headers for API routes. The Access-Control-Allow-Origin header is now populated from the CORS_ALLOWLIST environment variable, which should contain a comma-separated list of allowed origins. The Access-Control-Allow-Credentials header is set to true to support credentialed requests. Updated docs/API.md to document the new CORS_ALLOWLIST environment variable and provide an example for developers. This change allows for flexible configuration of allowed origins for different environments (e.g., localhost, staging, production) directly through environment variables.
…ase workflow - Add multi-stage Dockerfile with deps, builder, and runner stages - Enable Next.js standalone output for optimized container deployment - Create .dockerignore to exclude unnecessary files from build context - Add GitHub workflow to build and push images on tag pushes - Support multi-arch builds (amd64, arm64) with semantic version tagging - Run application as non-root user for enhanced security - Expose port 3000 as required for production deployment
|
@DevMuhdishaq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #144
Description
Closes #145
Type of Change
Closes [Refactor] Use TypeScript template literal types for HTTP method whitelists #146
Related Issue
Testing
Closes [Refactor] Make
KPIValuemore than a string — type-safe KPI value variants #147Checklist
npm run test)npm run build)npm run lint)Screenshots
Additional Notes