mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: use nextjs.js standalone output for improvised docker image (#338)
This commit is contained in:
@ -23,6 +23,11 @@ export const getDatabaseUrl = () => {
|
||||
process.env.NEXT_PRIVATE_DIRECT_DATABASE_URL = process.env.POSTGRES_URL_NON_POOLING;
|
||||
}
|
||||
|
||||
// If we don't have a database URL, we can't normalize it.
|
||||
if (!process.env.NEXT_PRIVATE_DATABASE_URL) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// We change the protocol from `postgres:` to `https:` so we can construct a easily
|
||||
// mofifiable URL.
|
||||
const url = new URL(process.env.NEXT_PRIVATE_DATABASE_URL.replace('postgres://', 'https://'));
|
||||
|
||||
Reference in New Issue
Block a user