This repository was archived by the owner on Jul 6, 2025. It is now read-only.
Prepare deployment #14
Open
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.
This pull request includes significant updates to the Docker configuration, environment variables, and various parts of the codebase to enhance development and production workflows, as well as improve code quality and maintainability.
Docker and Environment Configuration:
.dockerignore: Updated to include various directories and files that should be ignored by Docker, such asnode_modules,dist,build,.env, and others.Dockerfile: Added environment variables and build arguments forNODE_ENVand API URLs, and included a command to run the application. [1] [2]docker-compose.prod.yml: Removed all services and volumes, simplifying the production Docker Compose configuration.docker-compose.yml: Updated to includecommercify-webandcommercify-apiservices with relevant environment variables and ports.Environment Variables:
.env.example: Updated environment variables for database configuration, removing hardcoded values forSPRING_DATASOURCE_USERNAMEandSPRING_DATASOURCE_PASSWORD.Codebase Improvements:
ProductDetailscomponent to handle loading state and errors, and moved it to a new file path. (src/app/(client)/products/[productId]/page.tsxL3-R3, src/app/(client)/products/[productId]/page.tsxL17-R64, src/app/(client)/products/[productId]/page.tsxL41-R117, src/app/(client)/products/[productId]/page.tsxR132-R144, src/app/(client)/products/[productId]/page.tsxL142-L143)AuthContextto setisLoadingtofalseby default.Service and API Enhancements:
src/services/authService.ts: Updated the base URL handling to include an endpoint and removed unnecessary console logs. [1] [2]src/types/apiBase.ts: Enhanced theBaseApiServiceconstructor to dynamically set the base URL and endpoint based on the environment.