apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: v1commerce_api
          ports:
            - containerPort: 4000
          env:
            - name: DB_HOST
              valueFrom:
                secretKeyRef:
                  name: dbhost
                  key: DB_HOST
            - name: DB_PORT
              value: "3306"
            - name: DB_USERNAME
              value: root
            - name: DB_DATABASE
              value: v1commerce
            - name: DB_SYNC
              value: "true"
            - name: APP_SECRET
              value: zxmn495it094lsfdhsdhf
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: dbpassword
                  key: DB_PASSWORD
