1
0
mirror of synced 2025-01-23 15:02:06 +01:00

BAYSHORE_NIX

This commit is contained in:
Luna Nightshade 2023-06-21 21:45:16 +02:00
parent 393bbf6490
commit 53f64b5276
2 changed files with 9 additions and 2 deletions

View File

@ -26,7 +26,7 @@
in rec {
packages.bayshore = pkgs.buildNpmPackage {
pname = "bayshore";
version = "1.0.0";
version = "1.0.1";
src = ./.;
npmDepsHash = "sha256-7iVoTJv5rvdiUWyhrDOGEboOo1sdQ7YvZOqbgvz/mF8=";
@ -111,6 +111,8 @@
preStart = ''
export DATABASE_URL="${cfg.postgresUrl}"
export POSTGRES_URL="${cfg.postgresUrl}"
export BAYSHORE_NIX="true"
${pkg}/bin/prisma migrate deploy --schema=${pkg}/prisma/schema.prisma
'';
@ -122,6 +124,7 @@
export DATABASE_URL="${cfg.postgresUrl}"
export POSTGRES_URL="${cfg.postgresUrl}"
export BAYSHORE_CONFIG_PATH="${cfg.configFile}"
export BAYSHORE_NIX="true"
# The ports will always be on default
# because they're set through env-vars here.

View File

@ -3,7 +3,11 @@
import process from 'process';
import * as dotenv from "dotenv";
dotenv.config({path: __dirname + '/.env'});
if (!process.env.BAYSHORE_NIX)
{
dotenv.config({path: __dirname + '/.env'});
}
let tracing: any = {};