add policy-ui build

This commit is contained in:
2026-04-15 12:35:50 -05:00
parent ff2d7b18b5
commit 1023f99642
8 changed files with 9168 additions and 13039 deletions

1
.gitignore vendored
View File

@@ -22,3 +22,4 @@ logs
.env .env
.env.* .env.*
!.env.example !.env.example
ops/chart/charts/**

View File

@@ -1,5 +1,5 @@
{ {
description = "test"; description = "policy-ui - Policy management dashboard";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs";
@@ -10,15 +10,88 @@
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in { pname = "policy-ui";
devShell = version = "1.0.0";
pkgs.mkShell {
buildInputs = with pkgs; pnpmDeps = pkgs.fetchPnpmDeps {
[ inherit pname version;
nodejs src = lib.cleanSource ./.;
vue-language-server pnpm = pkgs.pnpm;
]; fetcherVersion = 3;
hash = "sha256-v1vdqb3ruLB9vvPzxjT+11W4jG/MvoCPVXZPHHE9eGs=";
}; };
});
policy-ui = pkgs.stdenv.mkDerivation {
inherit pname version;
src = lib.cleanSource ./.;
nativeBuildInputs = [
pkgs.pnpmConfigHook
pkgs.pnpm
pkgs.nodejs
];
inherit pnpmDeps;
buildPhase = ''
runHook preBuild
export NUXT_TELEMETRY_DISABLED=1
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r ./.output $out/
runHook postInstall
'';
};
dockerImage = pkgs.dockerTools.buildLayeredImage {
name = "policy-ui";
contents = [
policy-ui
pkgs.busybox
pkgs.shadow
];
config = {
Cmd = [
"${pkgs.nodejs}/bin/node"
"${policy-ui}/.output/server/index.mjs"
];
Env = [
"HOST=0.0.0.0"
"PORT=3000"
"NODE_ENV=production"
];
};
};
in
{
packages = {
default = policy-ui;
inherit policy-ui;
dockerImage = dockerImage;
};
devShell =
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
vue-language-server
pnpm
];
};
}
);
} }

6
ops/chart/Chart.lock Normal file
View File

@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://bjw-s-labs.github.io/helm-charts/
version: 4.6.2
digest: sha256:35e8f4e5d15d878c246a04eb51de580291f31203fa10e9e4d2318f16026b2061
generated: "2026-04-14T12:23:59.76714437-05:00"

14
ops/chart/Chart.yaml Normal file
View File

@@ -0,0 +1,14 @@
apiVersion: v2
name: policy-ui
description: Policy UI dashboard
type: application
version: 0.1.0
appVersion: "1.0.0"
keywords:
- nuxt
- vue
- frontend
dependencies:
- name: common
version: "4.6.2"
repository: https://bjw-s-labs.github.io/helm-charts/

View File

@@ -0,0 +1,4 @@
{{/*
Render all resources provided by the common library
*/}}
{{- include "bjw-s.common.loader.all" . -}}

54
ops/chart/values.yaml Normal file
View File

@@ -0,0 +1,54 @@
controllers:
main:
enabled: true
type: deployment
replicas: 1
containers:
main:
image:
repository: gitea.corredorconect.com/software-engineering/policy-ui
tag: '{{ $.Chart.AppVersion }}'
env:
NODE_ENV: production
HOST: "0.0.0.0"
PORT: "3000"
probes:
liveness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readiness:
enabled: true
custom: true
spec:
httpGet:
path: /
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
service:
main:
enabled: true
controller: main
primary: true
type: ClusterIP
ports:
http:
enabled: true
primary: true
port: 3000
protocol: HTTP

13029
package-lock.json generated

File diff suppressed because it is too large Load Diff

9006
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff