v1.0.0
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.direnv
|
||||||
|
.envrc
|
||||||
|
vssm
|
||||||
29
README.md
29
README.md
@@ -1,2 +1,31 @@
|
|||||||
# vssm_full
|
# vssm_full
|
||||||
|
|
||||||
|
Build script that produces a single `vssm` binary with the web dashboard (`vssm_web`) embedded.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Go
|
||||||
|
- Node.js + npm
|
||||||
|
- git
|
||||||
|
|
||||||
|
***A `flake.nix` is provided for Nix users, run `nix develop` for a shell with all dependencies available.***
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```sh
|
||||||
|
./build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
This clones `vssm` and `vssm_web` at the versions pinned in `versions.txt`, builds the frontend, embeds it into the Go binary, and outputs `./vssm`.
|
||||||
|
|
||||||
|
## Versions
|
||||||
|
|
||||||
|
Edit `versions.txt` to pin specific tagged releases of `vssm` and `vssm_web`.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
See the [vssm README](https://git.bellsworne.tech/chrisbell/vssm) for configuration details, including the config file format, auth tokens, and instance setup.
|
||||||
|
|
||||||
|
## Running as a background service
|
||||||
|
|
||||||
|
*WIP* — instructions for setting up `vssm daemon` as a systemd service (or equivalent) will be added here in the future.
|
||||||
|
|||||||
32
build.sh
Executable file
32
build.sh
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ORIGINAL_DIR=$(pwd)
|
||||||
|
source versions.txt
|
||||||
|
|
||||||
|
WORKDIR=$(mktemp -d)
|
||||||
|
trap "rm -rf $WORKDIR" EXIT
|
||||||
|
|
||||||
|
echo "Cloning vssm @ $VSSM_VERSION..."
|
||||||
|
git clone --branch "$VSSM_VERSION" --depth 1 https://git.bellsworne.tech/chrisbell/vssm "$WORKDIR/vssm"
|
||||||
|
|
||||||
|
echo "Cloning vssm_web @ $VSSM_WEB_VERSION..."
|
||||||
|
git clone --branch "$VSSM_WEB_VERSION" --depth 1 https://git.bellsworne.tech/chrisbell/vssm_web "$WORKDIR/vssm_web"
|
||||||
|
|
||||||
|
echo "Building web frontend..."
|
||||||
|
cd "$WORKDIR/vssm_web/vssm_web"
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
echo "Copying frontend into vssm..."
|
||||||
|
rm -rf "$WORKDIR/vssm/web/dist"
|
||||||
|
cp -r dist "$WORKDIR/vssm/web/dist"
|
||||||
|
|
||||||
|
echo "Building vssm binary..."
|
||||||
|
cd "$WORKDIR/vssm"
|
||||||
|
go build -o vssm
|
||||||
|
|
||||||
|
echo "Copying binary to output..."
|
||||||
|
cp vssm "$ORIGINAL_DIR/vssm"
|
||||||
|
|
||||||
|
echo "Done. Binary at ./vssm"
|
||||||
61
flake.lock
generated
Normal file
61
flake.lock
generated
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781074563,
|
||||||
|
"narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"utils": "utils"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
47
flake.nix
Normal file
47
flake.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
description = "Dev shell";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, utils }:
|
||||||
|
utils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
dotnetRuntime = pkgs.dotnet-runtime_10.passthru.unwrapped;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
go
|
||||||
|
gopls
|
||||||
|
gotools
|
||||||
|
delve
|
||||||
|
golangci-lint
|
||||||
|
|
||||||
|
nodejs_22
|
||||||
|
pnpm
|
||||||
|
|
||||||
|
pkgs.dotnet-runtime_10
|
||||||
|
patchelf
|
||||||
|
];
|
||||||
|
|
||||||
|
shellHook = ''
|
||||||
|
export DOTNET_ROOT="${dotnetRuntime}/share/dotnet"
|
||||||
|
export DOTNET_ROOT_X64="${dotnetRuntime}/share/dotnet"
|
||||||
|
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib:/run/opengl-driver/lib:$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
|
echo " == Dev shell loaded == "
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
2
versions.txt
Normal file
2
versions.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
VSSM_VERSION=v1.0.0
|
||||||
|
VSSM_WEB_VERSION=v1.0.0
|
||||||
Reference in New Issue
Block a user