forked from WeMakeDevs/wemakedevs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Deployment initiations (WeMakeDevs#83)
* feat: Added Dockerfile * feat: K8s config files added * feat: Docker file architecture update * feat: Docker file architecture update * feat: Pod config file reverted back
- Loading branch information
1 parent
ac1aff3
commit ad8a47f
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM --platform=linux/amd64 node:16-alpine | ||
WORKDIR ./ | ||
COPY . . | ||
EXPOSE 3000 | ||
CMD [ "npm", "start" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: commclassroom-deploy | ||
namespace: default | ||
spec: | ||
## Set to 5 for start of lab | ||
replicas: 5 | ||
selector: | ||
matchLabels: | ||
env: commclassroom | ||
progressDeadlineSeconds: 300 | ||
minReadySeconds: 10 | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 1 | ||
maxSurge: 1 | ||
template: | ||
metadata: | ||
labels: | ||
env: commclassroom | ||
spec: | ||
containers: | ||
- name: commclassroom-ctr | ||
image: kaiwalyakoparkar/commclassroom:1.0 | ||
ports: | ||
- containerPort: 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: commclassroom-pod | ||
namespace: default | ||
labels: | ||
env: commclassroom | ||
spec: | ||
restartPolicy: OnFailure | ||
containers: | ||
- name: commclassroom-ctr | ||
imagePullPolicy: Always | ||
image: kaiwalyakoparkar/commclassroom:1.0 | ||
ports: | ||
- containerPort: 3000 | ||
resources: | ||
requests: | ||
memory: "128Mi" | ||
cpu: "500m" | ||
limits: | ||
memory: "512Mi" | ||
cpu: "1000m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: commclassroom | ||
spec: | ||
type: LoadBalancer | ||
ports: | ||
- port: 9000 | ||
targetPort: 3000 | ||
selector: | ||
env: commclassroom |