diff --git a/.github/workflows/docker-build.yml b/.github/workflows/deploy.yml similarity index 100% rename from .github/workflows/docker-build.yml rename to .github/workflows/deploy.yml diff --git a/Dockerfile b/Dockerfile index 6988d3d..5b3b1d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,5 @@ RUN apt-get update WORKDIR /srv/labs-engine/app COPY requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt - EXPOSE 8000 CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] diff --git a/app/labs/views.py b/app/labs/views.py index 95f5ff9..45ddf5d 100644 --- a/app/labs/views.py +++ b/app/labs/views.py @@ -2,6 +2,7 @@ import logging import os +import traceback from django.conf import settings from django.http import HttpResponse from django.shortcuts import render @@ -47,6 +48,7 @@ def export_lab(request): }) context.validate() except LabBuildError as exc: + logger.warning(f"Error building lab: {traceback.format_exc()}") return render(request, 'labs/export-error.html', { 'exc': exc, }, status=400) @@ -66,6 +68,10 @@ def export_lab(request): template_str = t.render(RequestContext(request, context)) i += 1 except Exception as exc: + logger.error( + f"Error rendering template for" + f" content_root={request.GET.get('content_root')}:" + f"\n{traceback.format_exc()}") return report_exception_response(request, exc) response = LabCache.put(request, template_str)