diff --git a/deployments/home-server/database.yaml b/deployments/home-server/database.yaml index 77be256..2fbfb59 100644 --- a/deployments/home-server/database.yaml +++ b/deployments/home-server/database.yaml @@ -11,3 +11,24 @@ spec: storage: size: 5Gi + + podTemplate: + spec: + volumes: + - name: init-sql-volume + configMap: + name: init-sql + initContainers: + - name: copy-init-sql + image: busybox + command: ["sh", "-c", "cp /config/init.sql /mnt/initdb/init.sql"] + volumeMounts: + - name: init-sql-volume + mountPath: /config + - name: data + mountPath: /mnt/initdb + containers: + - name: mariadb + volumeMounts: + - name: data + mountPath: /docker-entrypoint-initdb.d