Skip to content

Commit 13e465e

Browse files
committed
feat(ui): dockerfile, deployment and service added
1 parent 1dfdf7e commit 13e465e

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

materials/ui/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM node:8.9.4-alpine
2+
3+
ENV PORT 3000
4+
5+
COPY package.json package.json
6+
RUN npm install
7+
8+
COPY . .
9+
10+
EXPOSE $PORT
11+
CMD ["npm", "start"]

materials/ui/deployment.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: apps/v1beta2 # for versions after 1.9.0 use apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: ui
5+
labels:
6+
app: ui
7+
spec:
8+
replicas: 1
9+
selector:
10+
matchLabels:
11+
app: ui
12+
template:
13+
metadata:
14+
labels:
15+
app: ui
16+
spec:
17+
containers:
18+
- name: ui
19+
image: k8s/ui:v1
20+
ports:
21+
- containerPort: 3000

materials/ui/service.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
kind: Service
2+
apiVersion: v1
3+
metadata:
4+
name: ui
5+
spec:
6+
selector:
7+
app: ui
8+
type: NodePort
9+
ports:
10+
- protocol: TCP
11+
port: 3000

0 commit comments

Comments
 (0)