Fix deployment - run thumbnail migrations
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 8s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 8s

- Add migrate thumbnail command after copying database
- Ensures thumbnail_kvstore table exists for sorl-thumbnail
This commit is contained in:
2025-12-29 00:34:16 +01:00
parent 2a2d3ead0b
commit 4d3ace5395

View File

@@ -21,7 +21,7 @@ spec:
image: git.baumann.gr/adebaumann/labhelper-data-loader:0.008 image: git.baumann.gr/adebaumann/labhelper-data-loader:0.008
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
command: [ "sh","-c","cp -n preload/preload.sqlite3 /data/db.sqlite3; mkdir -p /data/media/cache /data/media/things; chmod -R 775 /data/media; exit 0" ] command: [ "sh","-c","cp -n preload/preload.sqlite3 /data/db.sqlite3; cd /app && python manage.py migrate thumbnail --run-syncdb; mkdir -p /data/media/cache /data/media/things; chmod -R 775 /data/media; exit 0" ]
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: /data mountPath: /data