.k8s/live/jobs/migrate.yaml
apiVersion: batch/v1
kind: Job
metadata:
name: db-migrate
spec:
template:
metadata:
name: db-migrate
spec:
restartPolicy: Never
containers:
- name: cccd-job
image: 754256621582.dkr.ecr.eu-west-2.amazonaws.com/laa-get-paid/cccd:app-latest
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
command:
- bundle
- exec
- rake
- db:migrate
envFrom:
- configMapRef:
name: cccd-app-config
- secretRef:
name: cccd-secrets
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: cccd-rds
key: url