1
0
mirror of synced 2024-12-05 03:27:57 +01:00

Add data because I forgor

This commit is contained in:
Luna Nightshade 2023-06-21 22:18:00 +02:00
parent 8668b2e8fc
commit 5f762dc907
2 changed files with 13 additions and 3 deletions

View File

@ -26,7 +26,7 @@
in rec {
packages.bayshore = pkgs.buildNpmPackage {
pname = "bayshore";
version = "1.0.5";
version = "1.0.6";
src = ./.;
npmDepsHash = "sha256-7iVoTJv5rvdiUWyhrDOGEboOo1sdQ7YvZOqbgvz/mF8=";
@ -51,6 +51,9 @@
# THIS IS A MASSIVE BODGE!
cp -r node_modules $out/node_modules
mkdir -p $out/data
cp server_wangan.* $out/data
mkdir -p $out/bin
cat > $out/bin/bayshore <<EOF
#!${pkgs.stdenv.shell}
@ -129,6 +132,7 @@
export DATABASE_URL="${cfg.postgresUrl}"
export POSTGRES_URL="${cfg.postgresUrl}"
export BAYSHORE_CONFIG_PATH="${cfg.configFile}"
export BAYSHORE_DATA_PATH="${pkg}/data"
export BAYSHORE_NIX="true"
# The ports will always be on default

View File

@ -152,8 +152,14 @@ if (useSentry)
}
// Get the wangan key / certificate file
let key = fs.readFileSync('./server_wangan.key');
let cert = fs.readFileSync('./server_wangan.crt');
let dataPathBase = process.env.BAYSHORE_NIX ? process.env.BAYSHORE_DATA_PATH : '.';
if (!dataPathBase)
{
throw new Error('Please set BAYSHORE_DATA_PATH.');
}
let key = fs.readFileSync(path.join(dataPathBase, 'server_wangan.key'));
let cert = fs.readFileSync(path.join(dataPathBase, 'server_wangan.crt'));
// Create the (ALL.Net) server
http.createServer(allnetApp).listen(PORT_ALLNET, '0.0.0.0', 511, () => {