apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: easy-notes
  name: easy-notes
spec:
  replicas: 1
  selector:
    matchLabels:
      app: easy-notes-pod
  template:
    metadata:
      labels:
        app: easy-notes-pod
    spec:
      containers:
      - name: easy-notes
        env:
        - name: MONGO_URL
          value: mongodb://mongodb-service:27017/easy-notes #point connection to mongodb
        image: wshihadeh/node-easy-notes-app:latest
        ports:
        - containerPort: 3000
      restartPolicy: Always
