833 B
833 B
1. Frontend Application Changes
- 1.1 In
frontend/src/api.js, modify the logic to useprocess.env.REACT_APP_BACKEND_URLfor the API base URL. - 1.2 Implement a fallback to
http://localhost:3001in the same file for when the environment variable is not set.
2. Docker Configuration
- 2.1 In
docker-compose.yml, update thefrontendservice definition to pass theREACT_APP_BACKEND_URLenvironment variable. - 2.2 Add comments to
docker-compose.ymlto clarify the purpose and usage of the new environment variable. - 2.3 In
frontend/Dockerfile, addARGandENVto pass theREACT_APP_BACKEND_URLto the build process.
3. Documentation
- 3.1 Update the main
README.mdto document the newREACT_APP_BACKEND_URLenvironment variable, explaining its purpose and how to use it.