Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM node:14.16.1-alpine3.13
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD ["node", "index.js"]
36 changes: 36 additions & 0 deletions k8s/web/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-conversao
spec:
selector:
matchLabels:
app: api-conversao
template:
metadata:
labels:
app: api-conversao
spec:
containers:
- name: movies
image: thglex/api-conversao:v1
ports:
- containerPort: 8080
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-conversao
spec:
selector:
matchLabels:
app: api-conversao
template:
metadata:
labels:
app: api-conversao
spec:
containers:
- name: movies
image: thglex/api-conversao:v1
ports:
- containerPort: 8080
24 changes: 24 additions & 0 deletions k8s/web/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v1
kind: Service
metadata:
name: api-conversao
spec:
selector:
app: api-conversao
ports:
- port: 8080
targetPort: 8080
nodePort: 30000
type: NodePort
apiVersion: v1
kind: Service
metadata:
name: api-conversao
spec:
selector:
app: api-conversao
ports:
- port: 8080
targetPort: 8080
nodePort: 30000
type: NodePort