This project has a workflow that deploys changes to a production development in https://cloud-pipeline-demo.onrender.com/ on every push to main.
Workflow logic can be found in the project under .github/workflows
This project is created to help learn docker configurations for frontend projects. The README starting from "Prerequisites" is written without Docker in mind so student has to figure out how to construct their configuration based on the README. However, there are some additional helpers added in the README and in the exercise description.
Notice, that all the information is not needed in all the exercises. Don't just copy-paste.
Install node.
Example node install instructions for LTS node 16.x:
curl -sL https://deb.nodesource.com/setup_16.x | bash
sudo apt install -y nodejs
Check your install with node -v && npm -v
Install all packages with npm install
First, you need to build the static files with npm run build
This will generate them into build folder.
An example for serving static files:
Use npm package called serve to serve the project in port 5001:
- install:
npm install -g serve - serve:
serve -s -l 5001 build
Test that the project is running by going to http://localhost:5001
By default, the expected path to backend is /api. This is where the application will send requests.
To manually configure API path, build with REACT_APP_BACKEND_URL environment value set, for example REACT_APP_BACKEND_URL=http://example.com npm run build