Skip to content
Snippets Groups Projects
Commit d4b1b175 authored by Richard Fernando Heise Ferreira's avatar Richard Fernando Heise Ferreira
Browse files

Issue #69: ElasticSearch client and env commented

parent 7c907aac
No related branches found
No related tags found
1 merge request!66Issue #69: ElasticSearch client and env commented
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=mecredteste S3_BUCKET=BucketName
# 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
......
No preview for this file type
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment