Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netflix #12

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@
- Finally, if you use v3 of TMDB API, create a file named `.env`, and copy and paste the content of `.env.example`.
And then paste the API Key you just created.

https://www.themoviedb.org/

Login to TMDB Account

https://www.themoviedb.org/u/anirudhadak02%40gmail.com

https://developer.themoviedb.org/docs/authentication-application

https://www.themoviedb.org/settings/api

https://www.themoviedb.org/u/anirudhadak02%40gmail.com

https://www.themoviedb.org/settings/api





## Which features this project deal with

- How to create and use [Custom Hooks](https://reactjs.org/docs/hooks-custom.html)
Expand Down
21 changes: 21 additions & 0 deletions deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: netflix-app
labels:
app: netflix-app
spec:
replicas: 2
selector:
matchLabels:
app: netflix-app
template:
metadata:
labels:
app: netflix-app
spec:
containers:
- name: netflix-app
image: anirudhadak2/new-app:netflix-clone
ports:
- containerPort: 80
7 changes: 7 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: '3.9'

services:
web:
image: "anirudhadak2/new-app:netflix-clone"
ports:
- "80:80"
35 changes: 35 additions & 0 deletions jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pipeline {
agent any
stages{
stage("Git Clone"){
steps{
git url: "https://github.com/anirudhadak2/netflix-clone-Docker-Kubernetes.git", branch: "main"
}
}
stage("Create Docker Image"){
steps{
echo "Build and Test"
withCredentials([usernamePassword(credentialsId:"dockerhub",passwordVariable:"dockerHubPass",usernameVariable:"dockerHubUser")]){
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPass}"
sh "docker build --build-arg TMDB_V3_API_KEY=adb1bdd5c4493c7c944db22009ff2d46 -t netflix-clone ."
# Pate Api Key
}
}
}
stage("Push DockerImage to DockrHub"){
steps{
withCredentials([usernamePassword(credentialsId:"dockerhub",passwordVariable:"dockerHubPass",usernameVariable:"dockerHubUser")]){
sh "docker login -u ${env.dockerHubUser} -p ${env.dockerHubPass}"
sh "docker images"
sh " docker tag netflix-clone anirudhadak2/new-app:netflix-clone"
sh "docker push anirudhadak2/new-app:netflix-clone"
}
}
}
stage("Deploy Using DOcker Compose"){
steps{
sh "docker-compose down && docker-compose up -d"
}
}
}
}
14 changes: 14 additions & 0 deletions service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: netflix-app
labels:
app: netflix-app
spec:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 30007
selector:
app: netflix-app
Loading