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

View File

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