-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/mcp #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/mcp #4
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,8 @@ import { PrismaPg } from "@prisma/adapter-pg"; | |||||||||||||||||||||||||||||||||||
| import { Pool } from "pg"; | ||||||||||||||||||||||||||||||||||||
| import { PrismaClient } from "./generated/client"; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| const connectionString = process.env.DATABASE_URL; | ||||||||||||||||||||||||||||||||||||
| const connectionString = | ||||||||||||||||||||||||||||||||||||
| process.env.DATABASE_URL || "postgresql://root:root@localhost:5432/myhouse"; | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
Comment on lines
+5
to
7
|
||||||||||||||||||||||||||||||||||||
| const connectionString = | |
| process.env.DATABASE_URL || "postgresql://root:root@localhost:5432/myhouse"; | |
| let connectionString: string; | |
| if (process.env.DATABASE_URL) { | |
| connectionString = process.env.DATABASE_URL; | |
| } else if ( | |
| process.env.NODE_ENV === "development" || | |
| process.env.NODE_ENV === "test" | |
| ) { | |
| // Development/test fallback connection string | |
| connectionString = "postgresql://root:root@localhost:5432/myhouse"; | |
| } else { | |
| throw new Error( | |
| "DATABASE_URL environment variable is not set. Please configure it before starting the application.", | |
| ); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copying
.env.exampleto.envin the Docker container is problematic. The.env.examplefile is meant to be a template showing which environment variables need to be set, not actual configuration values to be used in production. Docker containers should receive environment variables through proper mechanisms like docker-compose environment variables, Kubernetes secrets, or runtime environment injection. This approach could lead to using example/placeholder values in production deployments.