-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #213 from 18F/stage
Creating production workflow
- Loading branch information
Showing
8 changed files
with
334 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
export NEW_RELIC_APP_NAME="analytics-reporter-api" | ||
export NODE_ENV="test" | ||
export PATH="$PATH:/home/vcap/deps/0/bin" | ||
npm start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
const VCAP_SERVICES_JSON = JSON.parse(process.env.VCAP_SERVICES); | ||
|
||
module.exports = { | ||
development: { | ||
client: 'postgresql', | ||
connection: { | ||
database: 'analytics-reporter' | ||
} | ||
}, | ||
production: { | ||
client: 'postgresql', | ||
connection: { | ||
host : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["host"], | ||
user : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["username"], | ||
password : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["password"], | ||
database : VCAP_SERVICES_JSON["aws-rds"][0]["credentials"]["db_name"], | ||
port: 5432, | ||
ssl : true | ||
}, | ||
pool: { | ||
min: 2, | ||
max: 10 | ||
}, | ||
migrations: { | ||
tableName: 'knex_migrations' | ||
} | ||
}, | ||
test: { | ||
client: 'postgresql', | ||
connection: { | ||
user: process.env.CIRCLECI ? 'postgres' : undefined, | ||
database: 'analytics-api-test' | ||
}, | ||
migrations: { | ||
tableName: 'knex_migrations' | ||
} | ||
} | ||
}; |
Oops, something went wrong.