Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying

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

example-frontend.

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.

Prerequisites

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

Starting in production mode

Exercise 1.12 -> to run the project

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

Exercise 1.14 -> to connect to backend

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

About

Course work on how to deploy to cloud automatically on every push. Code is copied from course site DevOps with Docker at University of Helsinki to use as an example.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages