Skip to content

krishna-gbu/jenkins_docker_ec2_reactjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#jenkins docker ec2 reactjs

launch ec2 instance , here I am using ubuntu(22.04lts)

image

connect instance with jenkins

image

create reactjs repo

image

npx create-react-app jenkins_docker_ec2_reactjs

push to github

git add .
git commit -m first 
git remote add origin https://github.com/krishna-gbu/jenkins_docker_ec2_reactjs.git
git push --set-upstream origin main
git push

add repo to jenkins github-webhook

image

image

docker installation on target os

image

add key

image

image

image

image

image

image

approach 1

first install nodejs on machine

npm install

npm run build

docker file

FROM nginx:latest
COPY build/ /usr/share/nginx/html/

image

image

image

image

image

approche 2

No need nodejs on host machine

everything in docker file

image

image

image

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published