Merge branch 'master' into feature/cases
This commit is contained in:
@@ -12,16 +12,15 @@ import {
|
||||
buildProsthesisStepCodes,
|
||||
} from './catalog-seed-data';
|
||||
|
||||
// Load environment variables from the correct path
|
||||
const envPath = path.join(__dirname, '..', '.env');
|
||||
console.log('Loading .env from:', envPath);
|
||||
config({ path: envPath });
|
||||
// Load .env when running locally; Docker injects DATABASE_URL via env_file.
|
||||
if (!process.env.DATABASE_URL) {
|
||||
const envPath = path.join(__dirname, '..', '.env');
|
||||
console.log('Loading .env from:', envPath);
|
||||
config({ path: envPath });
|
||||
}
|
||||
|
||||
// Verify DATABASE_URL is loaded
|
||||
if (!process.env.DATABASE_URL) {
|
||||
console.error('❌ DATABASE_URL is not set in environment');
|
||||
console.log('Current directory:', process.cwd());
|
||||
console.log('.env path:', envPath);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user