Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 34 additions & 4 deletions .cfignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
node_modules
.nyc_output
build/coverage
build/test-results
.codeclimate.yml
.csslintrc
.dockerignore
.env
.env-example
.eslintrc
.eslintignore
.jshintrc
.gitignore
.gitallowed

BRANCHING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
ISSUE_TEMPLATE.md
LICENSE.md
procedures.md
PULL_REQUEST_TEMPLATE.md
README.md
STYLEGUIDE.md
TROUBLESHOOTING.md
test-results.xml
docker-compose.yml
Dockerfile

.circleci/
.github/
.gitignore
.nyc_output/
.vscode/
build/*
docs/
node_modules/
test-results/
6 changes: 5 additions & 1 deletion config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const jsonfile = require('jsonfile');
*/
function getElasticsearchUri(cloudFoundryEnv) {
if(!cloudFoundryEnv.isLocal){
const elasticSearchCredentials = cloudFoundryEnv.getServiceCreds("code_gov_elasticsearch");
const serviceName = process.env.ELASTICSEARCH_SERVICE_NAME
? process.env.ELASTICSEARCH_SERVICE_NAME
: 'code_gov_elasticsearch';

const elasticSearchCredentials = cloudFoundryEnv.getServiceCreds(serviceName);

return elasticSearchCredentials.uri
? elasticSearchCredentials.uri
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion indexes/term/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"number_of_shards": 1,
"analysis": {
"filter": {
"autocomplete_filter": {
Expand Down
6 changes: 4 additions & 2 deletions manifest-staging.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
applications:
- name: code-api
memory: 512M
instances: 1
instances: 2
disk_quota: 1024M
health-check-type: http
health-check-http-endpoint: /api
Expand All @@ -13,7 +13,9 @@ applications:
CF_STAGING_TIMEOUT: 15
CF_STARTUP_TIMEOUT: 15
NODE_ENV: production
NEW_RELIC_APP_NAME: code-api-staging
ELASTICSEARCH_SERVICE_NAME: code_gov_elasticsearch56
services:
- code_gov_elasticsearch
- code_gov_elasticsearch56
stack: cflinuxfs2
command: npm start
2 changes: 0 additions & 2 deletions scripts/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class Indexer {

}

// If we are running this module directly from Node this code will execute.
// This will index all items taking our default input.
if (require.main === module) {
const config = getConfig(process.env.NODE_ENV);
let indexer = new Indexer(config);
Expand Down