mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
63c5938a43
* fix: Allow new DATABASE_ env variables to work with migrations/db creation * Revert
24 lines
551 B
JavaScript
24 lines
551 B
JavaScript
const shared = {
|
|
use_env_variable: process.env.DATABASE_URL ? "DATABASE_URL" : undefined,
|
|
dialect: "postgres",
|
|
host: process.env.DATABASE_HOST,
|
|
port: process.env.DATABASE_PORT || 5432,
|
|
username: process.env.DATABASE_USER,
|
|
password: process.env.DATABASE_PASSWORD || undefined,
|
|
database: process.env.DATABASE_NAME,
|
|
};
|
|
|
|
module.exports = {
|
|
development: shared,
|
|
test: shared,
|
|
"production-ssl-disabled": shared,
|
|
production: {
|
|
...shared,
|
|
dialectOptions: {
|
|
ssl: {
|
|
rejectUnauthorized: false,
|
|
},
|
|
},
|
|
},
|
|
};
|