Clean up debugging artefacts and add thumbnail clear on startup
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 34s
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

This commit is contained in:
2025-12-28 22:26:30 +01:00
parent 51c4fed8fe
commit 06cbae93dc
3 changed files with 3 additions and 6 deletions

View File

@@ -47,5 +47,5 @@ RUN rm -rvf /app/Dockerfile* \
/app/*.json \
/app/test_*.py && \
python3 /app/manage.py collectstatic --noinput
CMD ["gunicorn","--bind","0.0.0.0:8000","--workers","3","labhelper.wsgi:application"]
CMD ["sh", "-c", "python manage.py thumbnail clear && gunicorn --bind 0.0.0.0:8000 --workers 3 labhelper.wsgi:application"]

View File

@@ -21,13 +21,13 @@ spec:
image: git.baumann.gr/adebaumann/labhelper-data-loader:0.007
securityContext:
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; ls -la /data /data/media; exit 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" ]
volumeMounts:
- name: data
mountPath: /data
containers:
- name: web
image: git.baumann.gr/adebaumann/labhelper:0.021
image: git.baumann.gr/adebaumann/labhelper:0.022
imagePullPolicy: Always
ports:
- containerPort: 8000

View File

@@ -129,6 +129,3 @@ MEDIA_ROOT = BASE_DIR / 'data' / 'media'
# https://docs.djangoproject.com/en/5.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# sorl-thumbnail settings
THUMBNAIL_DEBUG = True # Show errors instead of failing silently