Heroku GitHub Deployment CICD

npm install nodemon –save-dev

GitHub


git init
git remote add origin https://github.com/abcuser/BlogDemo.git
git clone https://github.com/abcuser/BlogDemo.git

git config  --global user.name kprabha
git config  --global user.email abcuser@gmail.com

git add .
git commit -m "Initial Index File"
git pull

Change a remote Git repository

git remote set-url origin https://github.com/****/****.git/

How to git revert a commit

Heroku


heroku create abc-xyz-qr
https://abc-xyz-qr.herokuapp.com/ | https://git.heroku.com/abc-xyz-qr.git
git add -A
git commit -m "Initial Commit on Heroku"
git push
> username : ***
> Password : ****
	done on https://github.com/abcuser/BlogDemo.git

> heroku git:remote -a abc-xyz-qr

> git push heroku master ( or main )

! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to ‘https://git.heroku.com/abc-xyz-qr.git’


> git remote -v
heroku  https://git.heroku.com/abc-xyz-qr.git (fetch)
heroku  https://git.heroku.com/abc-xyz-qr.git (push)
origin  https://github.com/abcuser/BlogDemo.git (fetch)
origin  https://github.com/abcuser/BlogDemo.git (push)

> heroku git:remote -a abc-xyz-qr
set git remote heroku to https://git.heroku.com/abc-xyz-qr.git

Do changes
Commit

> git push heroku main

When you execute the above command, if you got below warning :
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the
buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks

Add the php file to initiate the html static page


git commit -m "Php file added for html"

git push heroku main

How to Run a Simple HTML/CSS/Javascript Application on Heroku

Heroku URL : https://abc-xyz-qr.herokuapp.com/
https://github.com/abcuser/BlogDemo

CICD : Continuous Integration and Continuous Delivery

In the Hreoku application account

Navigate to “Deploy” ->
Select “Deployment method” : GitHub ->
Configure “App connected to GitHub”:
Enable “Automatic deploys”
Select “Deploy Branch”

Deploying with Git


git checkout -b day_1
git add -A
git commit -m "Day 1 First Commit"
git push origin day_1

git checkout main (or master)
git merge day_1
git push origin main

Advance Deployment Configuration : NGNIX, Service Files

Passportjs authentication with Reactjs

How to deploy a MERN Stack App to Heroku

Deploying MERN Stack to Heroku – Git

How to build a MERN stack app from scratch with MongoDB Atlas with automatic deployment to Heroku

Build a MERN (MongoDB | Express | ReactJS | Nodejs) stack app from scratch [Git and Video]

How to decouple your MERN app

“scripts”: {
“start”: “node server.js”,
“client”: “cd client && npm start”,
“dev”: “concurrently -n ‘server,client’ -c ‘red,green’ \”nodemon server.js\” \”npm run client\””
}
npm install nodemon –save-dev

“axios concurrently express mongoose morgan dotenv”

heroku create

heroku addons -all
heroku addons:create mongolab:sandbox
[heroku addons:docs mongolab]

git add -A
git commit -m “Initial Commit”
git push heroku master
heroku local
git add -A

git remote add origin
To Verify : git remote -v
git push origin master

Blog ReactJS NodeJS #21 Proxy Concurrently

Lot of servers will have multiple host names on the same IP address , we have to tells the server software which host name is actually requesting
This is not true HTTP proxy, until it will work with any software or browser. Sorry guys.

Leave a Reply

Your email address will not be published. Required fields are marked *