26 lines
610 B
TypeScript
26 lines
610 B
TypeScript
import { defineConfig } from '@adonisjs/lucid'
|
|
import env from '#start/env'
|
|
|
|
const dbConfig = defineConfig({
|
|
connection: 'postgres',
|
|
connections: {
|
|
postgres: {
|
|
client: 'pg',
|
|
connection: {
|
|
host: env.get('PG_HOST'),
|
|
port: env.get('PG_PORT', 5432),
|
|
user: env.get('PG_USER', 'postgres'),
|
|
password: env.get('PG_PASSWORD', 'postgres'),
|
|
database: env.get('PG_DB_NAME', 'postgres'),
|
|
},
|
|
useNullAsDefault: true,
|
|
migrations: {
|
|
naturalSort: true,
|
|
paths: ['database/migrations'],
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
export default dbConfig
|