Skip to content
Open
Show file tree
Hide file tree
Changes from 15 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
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM node:18-alpine AS builder

# Add metadata for authorship and app identification
LABEL maintainer="Amitabh Soni <amitabhdevops2024@gmail.com>" \
LABEL maintainer="Shubham Tayde <devshubh2204@gmail.com>" \
app="gemini" \
stage="build"

Expand All @@ -27,7 +27,7 @@ RUN rm -rf node_modules && npm cache clean --force
FROM node:18-alpine AS production

# Add metadata for the final image
LABEL maintainer="Amitabh Soni <amitabhdevops2024@gmail.com>" \
LABEL maintainer="Shubham Tayde <devshubh2204@gmail.com>" \
app="gemini" \
stage="production"

Expand All @@ -47,4 +47,4 @@ ENV NODE_ENV=production

EXPOSE 3000

CMD ["npm", "start"]
CMD ["npm", "start"]
14 changes: 7 additions & 7 deletions GitOps/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@Library('Shared')_

pipeline {
agent { label 'dev-server' }
agent any

parameters {
string(name: 'GEMINI_DOCKER_TAG', defaultValue: 'v1', description: 'Docker tag for gemini image')
Expand All @@ -16,7 +16,7 @@ pipeline {

stage("Git: Code Checkout") {
steps {
clone("https://github.com/Amitabh-DevOps/dev-gemini-clone.git", "DevOps")
clone("https://github.com/AWS-DevOps-shubh/dev-gemini-clone.git", "dev-shubh")
}
}

Expand All @@ -29,7 +29,7 @@ pipeline {
stage("Update: Kubernetes Manifest") {
steps {
dir('kubernetes') {
sh "sed -i 's|amitabhdevops/geminiamit.*|amitabhdevops/geminiamit:${params.GEMINI_DOCKER_TAG}|' gemini-deployment.yml"
sh "sed -i 's|devshubh2204/geminishubham.*|devshubh2204/geminishubham:${params.GEMINI_DOCKER_TAG}|' gemini-deployment.yml"
}
}
}
Expand All @@ -48,7 +48,7 @@ pipeline {
git commit -m "Update gemini image to ${GEMINI_DOCKER_TAG}"

echo "Pushing changes to github: "
git push https://github.com/Amitabh-DevOps/dev-gemini-clone.git DevOps
git push https://github.com/AWS-DevOps-shubh/dev-gemini-clone.git dev-shubh
'''
}
}
Expand Down Expand Up @@ -106,7 +106,7 @@ pipeline {
</p>
</div>
""",
to: "amitabhdevops2024@gmail.com",
to: "shubhamtayde2409@gmail.com",
from: "jenkins@example.com",
mimeType: 'text/html'
)
Expand Down Expand Up @@ -158,7 +158,7 @@ pipeline {
</p>
</div>
""",
to: "amitabhdevops2024@gmail.com",
to: "shubhamtayde2409@gmail.com",
from: "jenkins@example.com",
mimeType: 'text/html'
)
Expand All @@ -167,4 +167,4 @@ pipeline {
cleanWs()
}
}
}
}
4 changes: 2 additions & 2 deletions kubernetes/cert-issuer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: <your-email-address> # Replace with your email address
email: devshubh2204@gmail.com # Replace with your email address
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: letsencrypt-prod-key
Expand All @@ -18,4 +18,4 @@ spec:
ingress:
class: nginx



5 changes: 4 additions & 1 deletion kubernetes/configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ metadata:
name: gemini-config
namespace: gemini-namespace
data:
NEXTAUTH_URL: <enter-your-domain-url> # Enter your NextAuth URL here(Domain name/URL)
GOOGLE_ID: 103384355930-outj5vptfg6lf5jc4kcfklhfa1sljuum.apps.googleusercontent.com
MONGODB_URI: mongodb://mongodb-service:27017/gemini
NEXTAUTH_URL: https://34.251.105.234.nip.io
MONGO_INITDB_ROOT_USERNAME: admin
4 changes: 2 additions & 2 deletions kubernetes/gemini-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: gemini
image: amitabhdevops/geminiprod:v1
image: devshubh2204/geminiclonenip:20
ports:
- containerPort: 3000
resources:
Expand Down Expand Up @@ -57,4 +57,4 @@ spec:
valueFrom:
secretKeyRef:
name: gemini-secret
key: NEXT_PUBLIC_API_KEY
key: NEXT_PUBLIC_API_KEY
6 changes: 3 additions & 3 deletions kubernetes/gemini-ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ metadata:
spec:
tls:
- hosts:
- geminiamitabh.letsdeployit.com
- geminishubh.34.251.105.234.nip.io
secretName: gemini-tls-secret
ingressClassName: nginx
rules:
- host: "geminiamitabh.letsdeployit.com"
- host: geminishubh.34.251.105.234.nip.io
http:
paths:
- path: /
Expand All @@ -31,4 +31,4 @@ spec:
service:
name: nginx-service
port:
number: 80
number: 80
9 changes: 4 additions & 5 deletions kubernetes/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ metadata:
namespace: gemini-namespace
type: Opaque
data:
GOOGLE_ID: <enter-your-google-id> # Enter your Google ID here in base64 encoded format
GOOGLE_SECRET: <enter-your-google-secret> # Enter your Google secret here in base64 encoded format
NEXTAUTH_SECRET: <enter-your-nextauth-secret> # Enter your NextAuth secret here in base64 encoded format
NEXT_PUBLIC_API_KEY: <enter-your-next-public-api-key> # Enter your API key here in base64 encoded format
MONGODB_URI: <enter-your-mongodb-uri> # Enter your MongoDB URI here in base64 encoded format
GOOGLE_SECRET: R09DU1BYLXhtMGNvLUZFbEtuV0JhYzgybVpQUzVqUG9ZdFc= # Enter your Google secret here in base64 encoded format
NEXTAUTH_SECRET: p2aQyMyvv4EQifX4i3GkAYRypTszDHxHE0aZr8GiHzg # Enter your NextAuth secret here in base64 encoded format
NEXT_PUBLIC_API_KEY: QUl6YVN5QmFqRG83LU9wNVB4UHRJQWVHbS1POVZOMVpxWktONzNV # Enter your API key here in base64 encoded format
MONGO_INITDB_ROOT_PASSWORD: c2h1YmhhbUAxMjM0