Commit ee2e107b authored by Ben Anderson's avatar Ben Anderson

Created deployment file

parent bf59eb91
FROM node:14.16-alpine3.13 as build FROM node:13.12.0-alpine as build
WORKDIR /app WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH ENV PATH /app/node_modules/.bin:$PATH
COPY . . COPY package.json ./
RUN yarn RUN npm ci
RUN yarn build RUN npm install react-scripts@3.4.1 -g
COPY . ./
RUN npm run build
FROM nginx:stable-alpine FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/nginx/nginx.conf /etc/nginx/conf.d/default.conf COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80 EXPOSE 80
CMD ["nginx", "-g", "daemon off;"] CMD ["nginx", "-g", "daemon off;"]
apiVersion: apps/v1
kind: Deployment
metadata:
name: afp-inventory-ui-deployment
spec:
replicas: 2
selector:
matchLabels:
app: afp-inventory-ui
template:
metadata:
labels:
app: afp-inventory-ui
spec:
containers:
- name: afp-inventory-ui-container
image: nexus.mynisum.com/afp-inventory-ui:1
imagePullPolicy: Always
ports:
- containerPort: 8081
imagePullSecrets:
- name: registry-creds
---
apiVersion: v1
kind: Service
metadata:
name: afp-inventory-ui-service
spec:
type: LoadBalancer
ports:
- port: 8081
targetPort: 80
selector:
app: afp-inventory-ui
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment