apiVersion: batch/v1
kind: Job
metadata:
  name: laravel-migrations
spec:
  template:
    spec:
      containers:
        - name: laravel-kubernetes-demo
          image: skeletondocker/laravel-kubernetes-demo:latest
          command: ['php', 'artisan', 'migrate', '--force']
          envFrom:
          - configMapRef:
              name: laravel-app-backend
          imagePullPolicy: IfNotPresent
      restartPolicy: Never
  backoffLimit: 5