Skip to content

Commit

Permalink
remove vcap
Browse files Browse the repository at this point in the history
  • Loading branch information
bau123 authored and marijnkampf committed Jun 17, 2024
1 parent c062ccf commit 030872e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 41 deletions.
5 changes: 3 additions & 2 deletions docker-compose.e2e.backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:
postgres:
image: postgres:16
ports:
- "5432:5432"
- '5432:5432'
environment:
POSTGRES_DB: datahub
POSTGRES_USER: user
Expand Down Expand Up @@ -91,7 +91,8 @@ services:
- 8082:8082
environment:
- PORT=8082
- 'VCAP_SERVICES={"redis":[{"credentials":{"uri":"redis://redis:6379"}}],"opensearch":[{"credentials":{"uri":"http://some-id:some-secret@opensearch:9200"}, "plan": "123-123-123" } ] }'
- REDIS_URL=redis://redis:6379
- OPENSEARCH=http://some-id:some-secret@opensearch:9200
- SENTRY_ENVIRONMENT=test
- SENTRY_DSN=http://abc:cvb@localhost:9872/123
- FEEDS__1__UNIQUE_ID=verification_feed_app
Expand Down
24 changes: 0 additions & 24 deletions src/config/__test__/envSchema.test.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/config/envSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ const envSchema = Joi.object({
.integer()
.default(2 * 60 * 60 * 1000),

// Configuration object (JSON) of Cloud Foundry services
VCAP_SERVICES: ExtendedJoi.json().default({}),

// Zendesk field ID used to capture user's browser
ZEN_BROWSER: Joi.string(),
// Zendesk username used for API queries
Expand Down
12 changes: 0 additions & 12 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ const isTest = envVars.NODE_ENV === 'test'
const root = path.normalize(`${__dirname}/../..`)

const buildRedisConfig = () => {
const vcap = envVars.VCAP_SERVICES

if (vcap && vcap.hasOwnProperty('redis')) {
return {
metadataTtl: envVars.METADATA_TTL,
url: vcap.redis[0].credentials.uri,
port: vcap.redis[0].credentials.port,
host: vcap.redis[0].credentials.host,
useTLS: vcap.redis[0].credentials.tls_enabled,
}
}

return {
metadataTtl: envVars.METADATA_TTL,
url: envVars.REDIS_URL || envVars.REDISTOGO_URL,
Expand Down

0 comments on commit 030872e

Please sign in to comment.