-
Notifications
You must be signed in to change notification settings - Fork 6
fix: update database URL configuration to use environment variable #137
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
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -57,13 +57,13 @@ export function PageHeader({ | |||||
| initial={{ opacity: 0, scale: 0.8 }} | ||||||
| animate={{ opacity: 0.15, scale: 1 }} | ||||||
| transition={{ duration: 1.5, ease: 'easeOut' }} | ||||||
| className="absolute left-1/2 top-0 -z-10 h-[400px] w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/30 blur-[100px]" | ||||||
| className="absolute left-1/2 top-0 -z-10 h-100 w-100 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/30 blur-[100px]" | ||||||
| /> | ||||||
| <motion.div | ||||||
| initial={{ opacity: 0 }} | ||||||
| animate={{ opacity: 0.1 }} | ||||||
| transition={{ duration: 2, delay: 0.3 }} | ||||||
| className="absolute bottom-0 right-0 -z-10 h-[300px] w-[300px] translate-x-1/4 translate-y-1/4 rounded-full bg-blue-500/30 blur-[80px]" | ||||||
| className="absolute bottom-0 right-0 -z-10 h-75 w-75 translate-x-1/4 translate-y-1/4 rounded-full bg-blue-500/30 blur-[80px]" | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The classes
Suggested change
Comment on lines
+60
to
+66
|
||||||
| /> | ||||||
| </> | ||||||
| )} | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ import { createGraphRAGTool, createVectorQueryTool } from '@mastra/rag' | |||||
|
|
||||||
| export const libsqlstorage = new LibSQLStore({ | ||||||
| id: 'libsql-storage', | ||||||
| url: 'file:./database.db', | ||||||
| url: process.env.DB ?? 'file:./database.db', | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The database URL fallback logic |
||||||
| maxRetries: 5, // Optional retry configuration for transient errors | ||||||
| initialBackoffMs: 100, // Initial backoff for retries | ||||||
| //disableInit: process.env.DB_DISABLE_INIT === 'true', // Disable auto-init if specified | ||||||
|
Comment on lines
+13
to
16
|
||||||
|
|
@@ -22,7 +22,7 @@ export const libsqlstorage = new LibSQLStore({ | |||||
| // Create a new vector store instance | ||||||
| export const libsqlvector = new LibSQLVector({ | ||||||
| id: 'libsql-vector', | ||||||
| url: 'file:./database.db', | ||||||
| url: process.env.DB ?? 'file:./database.db', | ||||||
| // Optional: for Turso cloud databases | ||||||
| authToken: process.env.TURSO_AUTH_TOKEN, | ||||||
| syncInterval: 10000, // Sync every 10 seconds (optional) | ||||||
|
|
@@ -126,8 +126,8 @@ export const LibsqlMemory = new Memory({ | |||||
| }) | ||||||
|
|
||||||
| log.info('LibSQLStore and Memory initialized with LibSQLVector support', { | ||||||
| storage: 'file:./database.db', | ||||||
| vector: 'file:./database.db', | ||||||
| storage: process.env.DB ?? 'file:./database.db', | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CRITICAL: Potential security vulnerability - logging database URL may expose credentials The database URL logged here may contain sensitive information like usernames and passwords if
Suggested change
|
||||||
| vector: process.env.DB ?? 'file:./database.db', | ||||||
|
Comment on lines
+129
to
+130
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
128
to
+130
|
||||||
| // schema: process.env.DB_SCHEMA ?? 'mastra', | ||||||
| // maxConnections: parseInt(process.env.DB_MAX_CONNECTIONS ?? '20'), | ||||||
| memoryOptions: { | ||||||
|
|
||||||
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.
These changes to the CSS classes are unrelated to the PR's objective of updating database configuration. Additionally,
h-100andw-100are not standard Tailwind CSS utilities (the default scale ends at96). Unless these are custom-defined in your configuration, this change will likely cause the decorative orb to have no height or width.