Skip to content

Instantly share code, notes, and snippets.

@IhostVlad
Created September 7, 2020 10:35
Show Gist options
  • Save IhostVlad/e5c97fc6d104dada393fba34054e6a9f to your computer and use it in GitHub Desktop.
Save IhostVlad/e5c97fc6d104dada393fba34054e6a9f to your computer and use it in GitHub Desktop.
HackerNews Inline Ledger in Cloud
import { declareRuntimeEnv } from 'resolve-scripts'
export default {
target: 'cloud',
mode: 'production',
staticPath: declareRuntimeEnv('RESOLVE_CLOUD_STATIC_URL'),
eventstoreAdapter: {
module: 'resolve-eventstore-postgresql-serverless',
options: {
awsSecretStoreArn: declareRuntimeEnv('RESOLVE_ES_SECRET_ARN'),
dbClusterOrInstanceArn: declareRuntimeEnv('RESOLVE_ES_CLUSTER_ARN'),
databaseName: declareRuntimeEnv('RESOLVE_ES_DATABASE'),
eventsTableName: declareRuntimeEnv('RESOLVE_ES_EVENTS_TABLE'),
secretsTableName: declareRuntimeEnv('RESOLVE_ES_SECRETS_TABLE'),
region: declareRuntimeEnv('AWS_REGION'),
snapshotBucketSize: 100,
},
},
schedulers: {
scheduler: {
adapter: {
module: 'resolve-scheduler-cloud',
options: {},
},
connectorName: 'default',
},
},
readModelConnectors: {
default: {
module: 'resolve-readmodel-postgresql-serverless',
options: {
dbClusterOrInstanceArn: declareRuntimeEnv(
'RESOLVE_READMODEL_CLUSTER_ARN'
),
awsSecretStoreArn: declareRuntimeEnv('RESOLVE_READMODEL_SECRET_ARN'),
databaseName: declareRuntimeEnv('RESOLVE_READMODEL_DATABASE_NAME'),
region: declareRuntimeEnv('AWS_REGION'),
preferInlineLedger: true
},
},
hackerNews: {
module: 'resolve-readmodel-postgresql-serverless',
options: {
dbClusterOrInstanceArn: declareRuntimeEnv(
'RESOLVE_READMODEL_CLUSTER_ARN'
),
awsSecretStoreArn: declareRuntimeEnv('RESOLVE_READMODEL_SECRET_ARN'),
databaseName: declareRuntimeEnv('RESOLVE_READMODEL_DATABASE_NAME'),
region: declareRuntimeEnv('AWS_REGION'),
preferInlineLedger: true
},
},
comments: {
module: 'resolve-readmodel-postgresql-serverless',
options: {
dbClusterOrInstanceArn: declareRuntimeEnv(
'RESOLVE_READMODEL_CLUSTER_ARN'
),
awsSecretStoreArn: declareRuntimeEnv('RESOLVE_READMODEL_SECRET_ARN'),
databaseName: declareRuntimeEnv('RESOLVE_READMODEL_DATABASE_NAME'),
region: declareRuntimeEnv('AWS_REGION'),
preferInlineLedger: true
},
},
elasticSearch: {
module: 'common/read-models/elastic-search-connector.js',
options: {
/*
node: "<your-cloud-elastic-search-host>:port",
auth: {
username: 'name',
password: 'pass'
}
*/
},
},
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment