diff --git a/kubernetes/db-migrate-production.tmpl b/kubernetes/db-migrate-production.tmpl new file mode 100644 index 0000000..a33fbd0 --- /dev/null +++ b/kubernetes/db-migrate-production.tmpl @@ -0,0 +1,23 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: __JOB_NAME__ +spec: + template: + spec: + containers: + - name: eras-db-migrate-production + image: ghcr.io/zooniverse/eras:__IMAGE_TAG__ + command: ["bundle", "exec", "rails", "db:migrate"] + env: + - name: RAILS_LOG_TO_STDOUT + value: "true" + - name: RAILS_ENV + value: staging + - name: RAILS_MASTER_KEY + valueFrom: + secretKeyRef: + name: eras-production + key: rails-master-key + restartPolicy: Never + backoffLimit: 1 \ No newline at end of file