Merge branch 'main' into feature/f31-device-enviromental-impact
This commit is contained in:
commit
60ccbec369
|
@ -2,7 +2,7 @@ DOMAIN=localhost
|
||||||
DEMO=true
|
DEMO=true
|
||||||
# note that with DEBUG=true, logs are more verbose (include tracebacks)
|
# note that with DEBUG=true, logs are more verbose (include tracebacks)
|
||||||
DEBUG=true
|
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
|
DPP=false
|
||||||
|
|
||||||
STATIC_ROOT=/tmp/static/
|
STATIC_ROOT=/tmp/static/
|
||||||
|
|
|
@ -116,7 +116,7 @@ class DetailsView(DashboardView, TemplateView):
|
||||||
'snapshot': self.object.get_last_evidence(),
|
'snapshot': self.object.get_last_evidence(),
|
||||||
'lot_tags': lot_tags,
|
'lot_tags': lot_tags,
|
||||||
'impact': get_device_environmental_impact(),
|
'impact': get_device_environmental_impact(),
|
||||||
'dpps': dpps
|
'dpps': dpps,
|
||||||
})
|
})
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ main() {
|
||||||
fi
|
fi
|
||||||
# remove old database
|
# remove old database
|
||||||
rm -vfr ./db/*
|
rm -vfr ./db/*
|
||||||
|
# deactivate configured flag
|
||||||
|
rm -vfr ./already_configured
|
||||||
docker compose down -v
|
docker compose down -v
|
||||||
docker compose build
|
docker compose build
|
||||||
docker compose up ${detach_arg:-}
|
docker compose up ${detach_arg:-}
|
||||||
|
|
|
@ -28,9 +28,6 @@ compile = no
|
||||||
no-cache-dir = True
|
no-cache-dir = True
|
||||||
END
|
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
|
COPY ./requirements.txt /opt/devicehub-django
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
# TODO hardcoded, is ignored in requirements.txt
|
# TODO hardcoded, is ignored in requirements.txt
|
||||||
|
|
|
@ -50,13 +50,12 @@ API_RESOLVER=${API_RESOLVER}
|
||||||
ID_FEDERATED=${ID_FEDERATED}
|
ID_FEDERATED=${ID_FEDERATED}
|
||||||
END
|
END
|
||||||
)"
|
)"
|
||||||
fi
|
|
||||||
|
|
||||||
# generate config using env vars from docker
|
# generate config using env vars from docker
|
||||||
# TODO rethink if this is needed because now this is django, not flask
|
# TODO rethink if this is needed because now this is django, not flask
|
||||||
cat > .env <<END
|
cat > .env <<END
|
||||||
${dpp_env_vars:-}
|
${dpp_env_vars:-}
|
||||||
END
|
END
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
handle_federated_id() {
|
handle_federated_id() {
|
||||||
|
|
|
@ -11,6 +11,7 @@ xlrd==2.0.1
|
||||||
odfpy==1.4.1
|
odfpy==1.4.1
|
||||||
pytz==2024.2
|
pytz==2024.2
|
||||||
json-repair==0.30.0
|
json-repair==0.30.0
|
||||||
setuptools==75.5.0
|
setuptools==65.5.1
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
wheel==0.45.0
|
wheel==0.45.1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue