mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 12:45:27 +03:00
dependency-track: don't bundle frontend in jar
Bundling the frontend in the jar is deprecated by upstream and causes the frontend from being serve after weeks of runtime.
This commit is contained in:
parent
28e18569a4
commit
8af0a5abfd
3 changed files with 11 additions and 8 deletions
|
@ -463,6 +463,10 @@
|
||||||
[Prisma ORM upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6)
|
[Prisma ORM upgrade guide](https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-6)
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
|
- `depdendency-track` no longer bundes the UI inside the jar. This bundling
|
||||||
|
functionality is deprecated by upstream and causes UI assets not being served
|
||||||
|
after weeks of runtime.
|
||||||
|
|
||||||
- `nq` was updated to 1.0, which renames the `fq` and `tq` utilities to `nqtail` and `nqterm` respectively.
|
- `nq` was updated to 1.0, which renames the `fq` and `tq` utilities to `nqtail` and `nqterm` respectively.
|
||||||
|
|
||||||
- `zf` was updated to 0.10.2, which includes breaking changes from the [0.10.0 release](https://github.com/natecraddock/zf/releases/tag/0.10.0).
|
- `zf` was updated to 0.10.2, which includes breaking changes from the [0.10.0 release](https://github.com/natecraddock/zf/releases/tag/0.10.0).
|
||||||
|
|
|
@ -509,7 +509,8 @@ in
|
||||||
upstreams.dependency-track.servers."localhost:${toString cfg.port}" = { };
|
upstreams.dependency-track.servers."localhost:${toString cfg.port}" = { };
|
||||||
virtualHosts.${cfg.nginx.domain} = {
|
virtualHosts.${cfg.nginx.domain} = {
|
||||||
locations = {
|
locations = {
|
||||||
"/".proxyPass = "http://dependency-track";
|
"/".alias = "${cfg.package.frontend}/dist/";
|
||||||
|
"/api".proxyPass = "http://dependency-track";
|
||||||
"= /static/config.json".alias = frontendConfigFile;
|
"= /static/config.json".alias = frontendConfigFile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,6 +28,11 @@ let
|
||||||
hash = "sha256-IcahhuWX1Ba7kmyJaNJlY1gcVHOR6uynyr7w5MMwRgo=";
|
hash = "sha256-IcahhuWX1Ba7kmyJaNJlY1gcVHOR6uynyr7w5MMwRgo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir $out
|
||||||
|
cp -R ./dist $out/
|
||||||
|
'';
|
||||||
|
|
||||||
npmDepsHash = "sha256-LeSKSZYtjrZ84RkhGbLEMHVi1fw7FK/137F0V4hjSCE=";
|
npmDepsHash = "sha256-LeSKSZYtjrZ84RkhGbLEMHVi1fw7FK/137F0V4hjSCE=";
|
||||||
forceGitDeps = true;
|
forceGitDeps = true;
|
||||||
makeCacheWritable = true;
|
makeCacheWritable = true;
|
||||||
|
@ -74,17 +79,11 @@ maven.buildMavenPackage rec {
|
||||||
"-Dmaven.test.skip=true"
|
"-Dmaven.test.skip=true"
|
||||||
"-P enhance"
|
"-P enhance"
|
||||||
"-P embedded-jetty"
|
"-P embedded-jetty"
|
||||||
"-P bundle-ui"
|
|
||||||
"-Dservices.bom.merge.skip=false"
|
"-Dservices.bom.merge.skip=false"
|
||||||
"-Dlogback.configuration.file=${src}/src/main/docker/logback.xml"
|
"-Dlogback.configuration.file=${src}/src/main/docker/logback.xml"
|
||||||
"-Dcyclonedx-cli.path=${lib.getExe cyclonedx-cli}"
|
"-Dcyclonedx-cli.path=${lib.getExe cyclonedx-cli}"
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
|
||||||
mkdir -p frontend
|
|
||||||
cp -r ${frontend}/lib/node_modules/@dependencytrack/frontend/dist frontend/
|
|
||||||
'';
|
|
||||||
|
|
||||||
afterDepsSetup = ''
|
afterDepsSetup = ''
|
||||||
mvn cyclonedx:makeBom -Dmaven.repo.local=$mvnDeps/.m2 \
|
mvn cyclonedx:makeBom -Dmaven.repo.local=$mvnDeps/.m2 \
|
||||||
org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom
|
org.codehaus.mojo:exec-maven-plugin:exec@merge-services-bom
|
||||||
|
@ -105,7 +104,6 @@ maven.buildMavenPackage rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# passthru for nix-update
|
|
||||||
inherit frontend;
|
inherit frontend;
|
||||||
tests = {
|
tests = {
|
||||||
inherit (nixosTests) dependency-track;
|
inherit (nixosTests) dependency-track;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue