Add data because I forgor
This commit is contained in:
parent
8668b2e8fc
commit
5f762dc907
@ -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
|
||||
|
10
src/index.ts
10
src/index.ts
@ -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, () => {
|
||||
|
Loading…
Reference in New Issue
Block a user