mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
add files
This commit is contained in:
parent
eeeb23d625
commit
26b1cc8d2d
35
nodejs/deployment/deployment.yaml
Normal file
35
nodejs/deployment/deployment.yaml
Normal 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"
|
15
nodejs/deployment/service copy.yaml
Normal file
15
nodejs/deployment/service copy.yaml
Normal 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
|
0
nodejs/deployment/service.yaml
Normal file
0
nodejs/deployment/service.yaml
Normal file
@ -1,6 +1,6 @@
|
|||||||
FROM node:12.4.0-alpine as dev
|
FROM node:12.4.0-alpine as dev
|
||||||
|
|
||||||
RUN mkdir /work/
|
|
||||||
WORKDIR /work/
|
WORKDIR /work/
|
||||||
|
|
||||||
COPY ./src/package.json /work/package.json
|
COPY ./src/package.json /work/package.json
|
||||||
@ -8,9 +8,4 @@ RUN npm install
|
|||||||
|
|
||||||
COPY ./src/ /work/
|
COPY ./src/ /work/
|
||||||
|
|
||||||
|
|
||||||
###########START NEW IMAGE###################
|
|
||||||
|
|
||||||
FROM dev as prod
|
|
||||||
|
|
||||||
CMD node .
|
CMD node .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user