Merge branch 'main' into feature/f31-device-enviromental-impact

This commit is contained in:
Sergio Giménez Antón 2024-12-17 08:03:31 +01:00
commit 60ccbec369
6 changed files with 8 additions and 9 deletions

View file

@ -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/

View file

@ -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

View file

@ -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:-}

View file

@ -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

View file

@ -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 <<END
${dpp_env_vars:-}
END
fi
}
handle_federated_id() {

View file

@ -11,6 +11,7 @@ xlrd==2.0.1
odfpy==1.4.1
pytz==2024.2
json-repair==0.30.0
setuptools==75.5.0
setuptools==65.5.1
requests==2.32.3
wheel==0.45.0
wheel==0.45.1