How to Deploy a React Web Application to Google Cloud?

Опубликовано: 28 Октябрь 2024
на канале: Cloud Guru
6,298
43

This video will walk you through creating a ReactJS web application, dockerizing it with Docker and Nginx and deploying it to Google Cloud Provider.

GitHub Repository: https://github.com/dgonzo27/react-doc...

Steps:
1. Create React App
2. Push React App to Git Repo
3. Create Google Account trail version
4. create a project
5. create appengine application
6. git clone project
7. npm i & npm run build
8. remove other files expect build folder
9. create app.yaml file and insert the content there
10. gcloud app deploy
11. gcloud app browse

Copy paste the app.yaml content
---------------------------------------------------------------------------
runtime: nodejs12
handlers:
Serve all static files with url ending with a file extension
url: /(.*\..+)$
static_files: build/\1
upload: build/(.*\..+)$
Catch all handler to index.html
url: /.*
static_files: build/index.html
upload: build/index.html
---------------------------------------------------------------------------

Please like, share and subscribe if you find the video useful.

#react #reactjs #gcp #docker