Skip to content

Commit 858d980

Browse files
Merge pull request #210 from 18F/develop
Database Fixes
2 parents 57773fd + b4b4f62 commit 858d980

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ jobs:
4646
sed -i 's@NEW_RELIC_APP_NAME="analytics-reporter-api"@NEW_RELIC_APP_NAME="analytics-reporter-api-develop"@g' entrypoint.sh
4747
4848
- run:
49-
name: Delete Knexfile.js and drop sufffix on Knexfile.js.cloudgov
49+
name: Delete Config.js and drop sufffix on Config.js.cloudgov
5050
command: |
51+
rm ./src/config.js
52+
mv ./src/config.js.cloudgov ./src/config.js
5153
rm knexfile.js
52-
mv knexfile.js.cloudgov knexfile.js
54+
mv knexfile.js.cloudgov knexfile.js
5355
5456
- run:
5557
name: Install CF CLI

src/config.js.cloudgov

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const knexfile = require('../knexfile');
2+
const VCAP_SERVICES_JSON = JSON.parse(process.env.VCAP_SERVICES);
3+
4+
module.exports = {
5+
api_data_gov_secret: process.env.API_DATA_GOV_SECRET,
6+
port: process.env.PORT || 4444,
7+
postgres: {
8+
host : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["host"],
9+
user : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["username"],
10+
password : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["password"],
11+
database : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["db_name"],
12+
port: 5432,
13+
ssl : true
14+
},
15+
log_level: process.env.LOG_LEVEL || 'info'
16+
};
17+

0 commit comments

Comments
 (0)