apiVersion: batch/v1
kind: Job
metadata:
  name: demo-settings
spec:
  template:
    spec:
      containers:
        - name: demo-settings
          env:
            - name: DATABASE_URL
              valueFrom:
                secretKeyRef:
                  key: CATARSE_DB_URI
                  name: catarse-secrets
            - name: RAILS_ENV
              value: development
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: DB_PASSWORD
                  name: catarse-secrets
          image: 892910702142.dkr.ecr.us-east-1.amazonaws.com/catarse-deploy/catarse
          command:
            - bundle
            - exec
            - rake
            - dev_seed:demo_settings
      restartPolicy: OnFailure
