Commit 4ebf786d authored by Jure's avatar Jure

Merge branch 'database_url' into 'master'

Support for DATABASE_URL override

See merge request !500
parents 3e0845a3 2610a88e
......@@ -4,10 +4,10 @@
"private": true,
"license": "MIT",
"devDependencies": {
"@babel/preset-env": "^7.0.0",
"@commitlint/cli": "^6.0.5",
"@commitlint/config-conventional": "^6.0.4",
"babel-eslint": "^10.0.1",
"@babel/preset-env": "^7.0.0",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.1.0",
"eslint": "^4.13.1",
......@@ -24,8 +24,8 @@
"lerna": "^3.4.3",
"lint-staged": "^6.0.0",
"prettier": "^1.8.2",
"stylelint": "^8.2.0",
"stylelint-config-prettier": "^2.0.0",
"stylelint": "^9.10.1",
"stylelint-config-prettier": "^4.0.0",
"stylelint-config-pubsweet": "^0.0.3"
},
"scripts": {
......@@ -150,7 +150,9 @@
"setupFilesAfterEnv": [
"<rootDir>/test/setup/enzyme.js"
],
"snapshotSerializers": ["enzyme-to-json/serializer"]
"snapshotSerializers": [
"enzyme-to-json/serializer"
]
},
{
"rootDir": "<rootDir>/packages/base-model",
......
......@@ -9,7 +9,7 @@
],
"main": "index.js",
"dependencies": {
"archiver": "^2.1.1",
"archiver": "^3.0.0",
"aws-sdk": "^2.185.0",
"body-parser": "^1.17.2",
"dotenv": "^6.2.0",
......
......@@ -12,7 +12,7 @@
"@pubsweet/logger": "^0.2.13",
"cheerio": "^1.0.0-rc.2",
"highlight.js": "^9.13.1",
"html-epub": "git+https://git@gitlab.coko.foundation/pubsweet/html-epub#updated-libtidy",
"html-epub": "^1.0.0",
"mkdirp": "^0.5.1",
"unzipper": "^0.8.9"
},
......
......@@ -2,7 +2,9 @@ const knex = require('knex')
const config = require('config')
const { knexSnakeCaseMappers } = require('objection')
const connection = config['pubsweet-server'] && config['pubsweet-server'].db
const connection =
process.env.DATABASE_URL ||
(config['pubsweet-server'] && config['pubsweet-server'].db)
const pool = config['pubsweet-server'] && config['pubsweet-server'].pool
const db = knex({
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment