tethys.backend/config/database.ts
Arno Kaimbacher 8d47a58d29
Some checks failed
CI / container-job (push) Failing after 35s
feat: Update .gitignore and refine TypeScript configuration; clean up commented code and enhance dataset validation; npm updates
- Updated .gitignore to include new patterns
- Refined TypeScript configuration for better performance and readability
- Cleaned up commented code in several files
- Enhanced dataset validation logic
- Updated npm dependencies to the latest versions
2025-01-29 11:26:21 +01:00

57 lines
1.5 KiB
TypeScript

/**
* Config source: https://git.io/JesV9
*
* Feel free to let us know via PR, if you find something broken in this config
* file.
*/
import env from '#start/env';
// import { DatabaseConfig } from "@adonisjs/lucid/database";
import { defineConfig } from "@adonisjs/lucid";
const databaseConfig = defineConfig({
/*
|--------------------------------------------------------------------------
| Connection
|--------------------------------------------------------------------------
|
| The primary connection for making database queries across the application
| You can use any key from the `connections` object defined in this same
| file.
|
*/
connection: env.get('DB_CONNECTION'),
connections: {
/*
|--------------------------------------------------------------------------
| PostgreSQL config
|--------------------------------------------------------------------------
|
| Configuration for PostgreSQL database. Make sure to install the driver
| from npm when using this connection
|
| npm i pg
|
*/
pg: {
client: 'pg',
connection: {
host: env.get('PG_HOST'),
port: env.get('PG_PORT'),
user: env.get('PG_USER'),
password: env.get('PG_PASSWORD', ''),
database: env.get('PG_DB_NAME'),
},
searchPath: ['gba', 'public'],
migrations: {
naturalSort: true,
},
// healthCheck: false,
debug: false,
pool: { min: 1, max: 100 },
},
},
});
export default databaseConfig;