Skip to content

Commit

Permalink
Merge pull request #3333 from thematters/feat/retire-elasticsearch
Browse files Browse the repository at this point in the history
feat(search): deprecate search version in api and retire elasticsearch
  • Loading branch information
gary02 authored May 12, 2023
2 parents 02fca33 + 907eaff commit 746f5fa
Show file tree
Hide file tree
Showing 34 changed files with 102 additions and 1,973 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ MATTERS_JWT_SECRET=QsNmu9
MATTERS_MATTY_ID=6
MATTERS_MATTY_CHOICE_TAG_ID=3906
MATTERS_EMAIL_FROM_ASK=Matters<ask@matters.town>
MATTERS_ELASTICSEARCH_HOST=elasticsearch
MATTERS_ELASTICSEARCH_PORT=9200
MATTERS_MEILISEARCH_SERVER=http://meili.dev.vpc:7700
MATTERS_MEILISEARCH_APIKEY=masterKey

# the IPFS_HOST & IPFS_PORT will be deprecated
MATTERS_IPFS_HOST=ipfs
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
### Local

- Install dependencies: `npm install`
- Start Postgres, Redis, ElasticSearch, stripe-mock, and IPFS daemon
- Start Postgres, Redis, stripe-mock, and IPFS daemon
- Setup Environments: `cp .env.example .env`
- Run all migrations: `npm run db:migrate`
- Populate all seeds data if needed: `npm run db:seed`
Expand Down Expand Up @@ -51,5 +51,4 @@ AWS resources that we need to put in the same VPC
- Pub/Sub
- Cache
- Queue
- ElasticSearch EC2 instances
- IPFS cluster EC2 instances
21 changes: 0 additions & 21 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ services:
- db
- redis
- s3
- elasticsearch
- ipfs
- stripe
ports:
Expand Down Expand Up @@ -49,25 +48,6 @@ services:
- '8080:8080'
- '4001:4001'
- '5001:5001'
elasticsearch:
image: matterslab/elasticsearch:latest
container_name: elasticsearch
environment:
- 'ES_JAVA_OPTS=-Xms750m -Xmx750m'
- 'discovery.type=single-node'
- 'xpack.security.enabled=false'
volumes:
- elasticsearch_data:/usr/share/elasticsearch/data
ports:
- '9200:9200'
- '9300:9300'
kibana:
container_name: kibana
image: kibana:5.4
ports:
- '5601:5601'
depends_on:
- elasticsearch
stripe:
container_name: stripe
image: stripemock/stripe-mock:latest
Expand All @@ -77,4 +57,3 @@ services:

volumes:
postgres_data:
elasticsearch_data:
111 changes: 0 additions & 111 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"prepare": "husky install"
},
"dependencies": {
"@elastic/elasticsearch": "^8.2.1",
"@ethersproject/abstract-provider": "^5.7.0",
"@google-cloud/translate": "^6.2.6",
"@graphql-tools/schema": "^7.1.5",
Expand Down
4 changes: 3 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2005,8 +2005,10 @@ input SearchInput {
record: Boolean
oss: Boolean

"""use the api version; omit to use latest version"""
"""deprecated, make no effect"""
version: SearchAPIVersion

"""deprecated, make no effect"""
coefficients: String
quicksearch: Boolean
}
Expand Down
5 changes: 0 additions & 5 deletions src/common/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ export const environment = {
awsLikecoinUpdateCivicLikerCache:
process.env.MATTERS_AWS_LIKECOIN_UPDATE_CIVIC_LIKER_CACHE_QUEUE_URL || '',
awsArticlesSnsTopic: process.env.MATTERS_AWS_ARTICLES_SNS_TOPIC || '',
esHost: process.env.MATTERS_ELASTICSEARCH_HOST,
esPort: process.env.MATTERS_ELASTICSEARCH_PORT,
meiliSearch_Server:
process.env.MATTERS_MEILISEARCH_SERVER || 'http://meili.dev.vpc:7700',
meiliSearch_apiKey: process.env.MATTERS_MEILISEARCH_APIKEY || '',
awsCloudFrontEndpoint: process.env.MATTERS_AWS_CLOUD_FRONT_ENDPOINT,
cloudflareAccountId: process.env.MATTERS_CLOUDFLARE_ACCOUNT_ID,
cloudflareAccountHash: process.env.MATTERS_CLOUDFLARE_ACCOUNT_HASH,
Expand Down
Loading

0 comments on commit 746f5fa

Please sign in to comment.