add files

This commit is contained in:
marcel-dempers 2020-03-29 15:19:40 +11:00
parent eeeb23d625
commit 26b1cc8d2d
4 changed files with 51 additions and 6 deletions

View File

@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deploy
labels:
app: example-app
annotations:
spec:
selector:
matchLabels:
app: example-app
replicas: 2
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: example-app
spec:
containers:
- name: example-app
image: aimvector/nodejs:v1
imagePullPolicy: Always
ports:
- containerPort: 5000
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "256Mi"
cpu: "500m"

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: example-service
labels:
app: example-app
spec:
type: ClusterIP
selector:
app: example-app
ports:
- protocol: TCP
name: http
port: 80
targetPort: 5000

View File

View File

@ -1,6 +1,6 @@
FROM node:12.4.0-alpine as dev
RUN mkdir /work/
WORKDIR /work/
COPY ./src/package.json /work/package.json
@ -8,9 +8,4 @@ RUN npm install
COPY ./src/ /work/
###########START NEW IMAGE###################
FROM dev as prod
CMD node .