From 256e1bfb39fa633a6e941cecc23331bdad342516 Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Wed, 4 Oct 2023 12:12:01 -0500 Subject: [PATCH] Production DB migration job template --- kubernetes/db-migrate-production.tmpl | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 kubernetes/db-migrate-production.tmpl 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