build tweaks.

This commit is contained in:
corsacca 2026-05-20 13:06:31 +01:00
parent 73b6343a43
commit a8998bbed8
2 changed files with 5 additions and 1 deletions

View file

@ -35,6 +35,10 @@ class MultiFolderMigrationProvider implements MigrationProvider {
}
export default defineNitroPlugin(async () => {
// Skip during build-time prerender — the builder isn't attached to the VPC,
// so connecting to the private DB host would time out. Migrations run at runtime.
if (import.meta.prerender) return
const cfg = useRuntimeConfig()
const databaseUrl = cfg.databaseUrl || process.env.DATABASE_URL
if (!databaseUrl) {

View file

@ -17,7 +17,7 @@ function getDb(): Kysely<Database> {
dialect: new PostgresJSDialect({
postgres: postgres(databaseUrl, {
ssl: isLocal ? false : 'require',
max: 10,
max: 5,
idle_timeout: 20,
connect_timeout: 30,
onnotice: () => {},