Skip to content
Snippets Groups Projects
Commit 5a4f5566 authored by Lucendio's avatar Lucendio
Browse files

[app] Remove unimportant files

* Dockerfile
* k8s resources
* yarn.lock
parent 7ae957c2
No related branches found
No related tags found
No related merge requests found
FROM node:alpine as todo-app-build
WORKDIR /client
COPY package.json yarn.lock README.md ./
RUN yarn
COPY ./public ./public
COPY ./src ./src
ENV REACT_APP_baseAPIURL=<backend-app-service-ip>:<port>
RUN yarn build
FROM nginx:latest
LABEL maintainer=Aamir-Pinger
COPY --from=todo-app-build /client/build/ /usr/share/nginx/html
EXPOSE 80
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-client-app-deploy
spec:
replicas: 3
selector:
matchLabels:
app: todo-client-app
template:
metadata:
labels:
app: todo-client-app
spec:
containers:
- image: todo-client-kubernetes-app:latest
name: container1
imagePullPolicy: IfNotPresent
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: todo-client-service
spec:
selector:
app: todo-client-app
ports:
- port: 80
targetPort: 80
type: LoadBalancer
\ No newline at end of file
This diff is collapsed.
FROM node:alpine
WORKDIR /server
COPY package*.json yarn.lock ./
RUN yarn
COPY ./src ./src
EXPOSE 5000
CMD [ "yarn", "start" ]
\ No newline at end of file
apiVersion: v1
kind: Pod
metadata:
name: mongodb
labels:
app: todo-mongodb
spec:
volumes:
- name: todo-mongo-vol
persistentVolumeClaim:
claimName: todo-pvc
containers:
- image: mongo
name: container1
command:
- mongod
- "--bind_ip"
- "0.0.0.0"
ports:
- containerPort: 27017
volumeMounts:
- name: todo-mongo-vol
mountPath: /data/db
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
labels:
app: todo-mongodb
name: todo-mongo-service
spec:
ports:
- port: 27017
targetPort: 27017
selector:
app: todo-mongodb
\ No newline at end of file
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: todo-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1G
storageClassName: ""
apiVersion: v1
kind: PersistentVolume
metadata:
name: todo-app-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 1G
hostPath:
path: /tmp/todo-pv
apiVersion: v1
kind: ConfigMap
metadata:
name: server-side-configs
data:
PORT: "5000"
CLIENT: <front-end-app-service-ip>:<port>
MONGODB_URL: mongodb://todo-mongo-service:27017/todo-k8s
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-server-app-deploy
spec:
replicas: 3
selector:
matchLabels:
app: todo-server-app
template:
metadata:
labels:
app: todo-server-app
spec:
containers:
- image: todo-server-kubernetes-app:latest
name: container1
ports:
- containerPort: 5000
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: server-side-configs
- secretRef:
name: server-side-secrets
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: todo-backend-service
spec:
ports:
- port: 5000
targetPort: 5000
selector:
app: todo-server-app
type: LoadBalancer
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment