Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
lvnilesh committed Feb 28, 2024
1 parent 1e7c16c commit 9b5cea0
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pnpm create next-app --example with-docker nextjs-docker
## Using Docker

1. [Install Docker](https://docs.docker.com/get-docker/) on your machine.
1. Build your container: `docker build -t nextjs-docker .`.
1. Build your container: `docker build -t cloudgenius/nextjs-docker .`.
1. Run your container: `docker run -p 3000:3000 nextjs-docker`.

You can view your images created with `docker images`.
Expand Down
29 changes: 29 additions & 0 deletions manifests/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextjs
spec:
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
replicas: 1
# replicas: 10000
selector:
matchLabels:
role: nextjs
template:
metadata:
labels:
role: nextjs
spec:
terminationGracePeriodSeconds: 30
containers:
- name: nextjs
image: docker.io/cloudgenius/nextjs-docker
imagePullPolicy: Always
ports:
- containerPort: 3000
protocol: TCP
24 changes: 24 additions & 0 deletions manifests/ing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nextjs
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
rules:
- host: nextjs.boeing.internal.cloudgenius.app
http:
paths:
- backend:
service:
name: nextjs
port:
number: 80
path: /
pathType: Prefix
tls:
- hosts:
- "nextjs.boeing.internal.cloudgenius.app"
secretName: nextjs-tls
12 changes: 12 additions & 0 deletions manifests/svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
apiVersion: v1
kind: Service
metadata:
name: nextjs
spec:
ports:
- name: http
port: 80
targetPort: 3000
selector:
role: nextjs
2 changes: 1 addition & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Home() {

<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js</a> on Docker!
Welcome to <a href="https://nextjs.org">Next.js</a> on Cloud Genius®!
</h1>

<p className={styles.description}>
Expand Down

0 comments on commit 9b5cea0

Please sign in to comment.