apiVersion: apps/v1
kind: Deployment
metadata:
  name: capstone-application
  namespace: capstone
spec:
  replicas: 1
  selector:
    matchLabels:
      app: capstone
  template:
    metadata:
      labels:
        app: capstone
    spec:
      terminationGracePeriodSeconds: 10
      containers:
      - image: dipayanp007/capstone:${GIT_COMMIT}-build-${BUILD_NUMBER}
        imagePullPolicy: IfNotPresent
        name: capstone-application
        env:
          - name: MONGODB_TABLE
            value: "Capstone"
          - name: MONGODB_PORT
            value: "27017"
          - name: MONGODB_HOST
            valueFrom:
              configMapKeyRef:
                name: mongo-connect
                key: mongo-url
                