Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Backend-MECRED
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MECRED
Backend-MECRED
Commits
d4b1b175
Commit
d4b1b175
authored
1 month ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#69
: ElasticSearch client and env commented
parent
7c907aac
No related branches found
No related tags found
1 merge request
!66
Issue #69: ElasticSearch client and env commented
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.env.example
+19
-8
19 additions, 8 deletions
.env.example
bun.lockb
+0
-0
0 additions, 0 deletions
bun.lockb
src/search/index.ts
+6
-1
6 additions, 1 deletion
src/search/index.ts
with
25 additions
and
9 deletions
.env.example
+
19
−
8
View file @
d4b1b175
NODE_ENV=development
NODE_ENV=development
# db config
# db config
# Machine that hosts the database
DB_HOST=localhost
DB_HOST=localhost
MAILER_HOST=smtp.c3sl.ufpr.br
MAILER_PORT=25
DB_USER=postgres
DB_USER=postgres
DB_PASSWORD=postgres
DB_PASSWORD=postgres
DB_NAME=hono_db
DB_NAME=hono_db
DB_PORT=5433
DB_PORT=5433
# Usually a URL is used for connections
DB_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
DB_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
URL=https://mecred.c3sl.ufpr.br/
# secret
# Mailer config
APP_SECRET=
# Mailer service address
MAILER_HOST=smtp.c3sl.ufpr.br
# Mailer service port
MAILER_PORT=25
# URL used for email riderecting, this should be the frontend site name like "https://mecred.c3sl.ufpr.br"
URL=EmailURL
# secret used for JWT and crypt
APP_SECRET=VeryLongUniqueSecret
#s3
#s3
config
AWS_ACCESS_KEY_ID=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=default
AWS_REGION=default
S3_BUCKET=
mecredtest
e
S3_BUCKET=
BucketNam
e
# ElasticSearch config
ELASTICSEARCH_USER=elastic
ELASTICSEARCH_USER=elastic
ELASTICSEARCH_PASSWORD=
123
ELASTICSEARCH_PASSWORD=
ChangeThis
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_HOST=localhost
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_PORT=9200
ELASTICSEARCH_URL=http://${ELASTICSEARCH_USER}:${ELASTICSEARCH_PASSWORD}@${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
ELASTICSEARCH_URL=http://${ELASTICSEARCH_USER}:${ELASTICSEARCH_PASSWORD}@${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}
# ES Index config
# Index can be anything, as long as it identifies who is indexing
ELASTIC_INDEX_PREFIX=
ELASTIC_INDEX_PREFIX=
ELASTIC_INDEX_RESOURCES=${ELASTIC_INDEX_PREFIX}_resources
ELASTIC_INDEX_RESOURCES=${ELASTIC_INDEX_PREFIX}_resources
ELASTIC_INDEX_COLLECTIONS=${ELASTIC_INDEX_PREFIX}_collections
ELASTIC_INDEX_COLLECTIONS=${ELASTIC_INDEX_PREFIX}_collections
...
...
This diff is collapsed.
Click to expand it.
bun.lockb
+
0
−
0
View file @
d4b1b175
No preview for this file type
This diff is collapsed.
Click to expand it.
src/search/index.ts
+
6
−
1
View file @
d4b1b175
...
@@ -6,6 +6,11 @@ import { Container } from 'typedi'
...
@@ -6,6 +6,11 @@ import { Container } from 'typedi'
export
const
es
=
new
Client
({
export
const
es
=
new
Client
({
node
:
env
.
ELASTICSEARCH_URL
,
node
:
env
.
ELASTICSEARCH_URL
,
Connection
:
HttpConnection
,
Connection
:
HttpConnection
,
tls
:
{
// This ignores TLS. This can only be used when ES is protected behind
// a firewall, like in c3sl. Otherwise this has to use certs.
rejectUnauthorized
:
false
}
})
})
// Register the Elasticsearch client in the DI container
// Register the Elasticsearch client in the DI container
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment