Skip to content

Commit 52f2d00

Browse files
Xavier MetichecchiaXavier Metichecchia
authored andcommitted
Make Cloudgov version of config.js instead of knexfile
1 parent 1c32098 commit 52f2d00

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

.circleci/config.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ 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 knexfile.js
52-
mv knexfile.js.cloudgov knexfile.js
51+
rm ./src/config.js
52+
mv ./src/config.js.cloudgov ./src/config.js
53+
5354

5455
- run:
5556
name: Install CF CLI

src/config.js.cloudgov

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

0 commit comments

Comments
 (0)