apiVersion: v1
kind: Pod
metadata:
  name: data-loader
  namespace: vorgabenui
spec:
  restartPolicy: Never
  containers:
    - name: loader
      image: adebaumann/vgui-preloader:0.5
      command: ["sh","-c","cp -v --debug --update=none /preload/preload.sqlite3 /data/db.sqlite3; chown -R 999:999 /data; ls -la /data; exit 0"]
      volumeMounts:
        - name: data
          mountPath: /data

  volumes:
    - name: data
      persistentVolumeClaim:
        claimName: django-data-pvc
