add policy-ui build
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -22,3 +22,4 @@ logs
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
ops/chart/charts/**
|
||||
|
||||
91
flake.nix
91
flake.nix
@@ -1,5 +1,5 @@
|
||||
{
|
||||
description = "test";
|
||||
description = "policy-ui - Policy management dashboard";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs";
|
||||
@@ -10,15 +10,88 @@
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = pkgs.lib;
|
||||
|
||||
in {
|
||||
devShell =
|
||||
pkgs.mkShell {
|
||||
buildInputs = with pkgs;
|
||||
[
|
||||
nodejs
|
||||
vue-language-server
|
||||
pname = "policy-ui";
|
||||
version = "1.0.0";
|
||||
|
||||
pnpmDeps = pkgs.fetchPnpmDeps {
|
||||
inherit pname version;
|
||||
src = lib.cleanSource ./.;
|
||||
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
6
ops/chart/Chart.lock
Normal 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
14
ops/chart/Chart.yaml
Normal 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/
|
||||
4
ops/chart/templates/common.tpl
Normal file
4
ops/chart/templates/common.tpl
Normal 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
54
ops/chart/values.yaml
Normal 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
13029
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
9006
pnpm-lock.yaml
generated
Normal file
9006
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user