diff --git a/.env.example b/.env.example index d8fed15..6fb20c9 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ DOMAIN=localhost DEMO=true # note that with DEBUG=true, logs are more verbose (include tracebacks) DEBUG=true -ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1, +ALLOWED_HOSTS=${DOMAIN},${DOMAIN}:8000,127.0.0.1,127.0.0.1:8000 DPP=false STATIC_ROOT=/tmp/static/ diff --git a/device/views.py b/device/views.py index 3c66d30..c8ab8ed 100644 --- a/device/views.py +++ b/device/views.py @@ -116,7 +116,7 @@ class DetailsView(DashboardView, TemplateView): 'snapshot': self.object.get_last_evidence(), 'lot_tags': lot_tags, 'impact': get_device_environmental_impact(), - 'dpps': dpps + 'dpps': dpps, }) return context diff --git a/docker-reset.sh b/docker-reset.sh index 825e91c..8bbc229 100755 --- a/docker-reset.sh +++ b/docker-reset.sh @@ -21,6 +21,8 @@ main() { fi # remove old database rm -vfr ./db/* + # deactivate configured flag + rm -vfr ./already_configured docker compose down -v docker compose build docker compose up ${detach_arg:-} diff --git a/docker/devicehub-django.Dockerfile b/docker/devicehub-django.Dockerfile index 6f5ec95..0f0d408 100644 --- a/docker/devicehub-django.Dockerfile +++ b/docker/devicehub-django.Dockerfile @@ -28,9 +28,6 @@ compile = no no-cache-dir = True END -# upgrade pip, which might fail on lxc, then remove the "corrupted file" -RUN python -m pip install --upgrade pip || (rm -rf /usr/local/lib/python3.11/site-packages/pip-*.dist-info && python -m pip install --upgrade pip) - COPY ./requirements.txt /opt/devicehub-django RUN pip install -r requirements.txt # TODO hardcoded, is ignored in requirements.txt diff --git a/docker/devicehub-django.entrypoint.sh b/docker/devicehub-django.entrypoint.sh index d6d7bb2..1b9f548 100644 --- a/docker/devicehub-django.entrypoint.sh +++ b/docker/devicehub-django.entrypoint.sh @@ -50,13 +50,12 @@ API_RESOLVER=${API_RESOLVER} ID_FEDERATED=${ID_FEDERATED} END )" - fi - # generate config using env vars from docker # TODO rethink if this is needed because now this is django, not flask cat > .env <