apiVersion: batch/v1
kind: Job
metadata:
  name: bootstrap
spec:
  template:
    spec:
      containers:
        - name: main
          command:
            - /bin/bash
          args:
            - -c
            - |
              set -ex
              cd /opt/almond-cloud
              /usr/bin/npm run start:dev -- bootstrap
          env:
            - name: THINGENGINE_ROOTDIR
              value: /home/almond-cloud
          volumeMounts:
            - mountPath: /opt/almond-cloud/src
              name: src
      volumes:
        - name: src
          hostPath:
            type: Directory
            path: //src
