Skip to content

Comments

Run API using remote Elastic Search#33

Open
andreformento wants to merge 2 commits intookfn-brasil:mainfrom
andreformento:run-api-using-remote-elastic-search
Open

Run API using remote Elastic Search#33
andreformento wants to merge 2 commits intookfn-brasil:mainfrom
andreformento:run-api-using-remote-elastic-search

Conversation

@andreformento
Copy link
Collaborator

cc @jvanz @giuliocc

Useful for connect on Elastic Search created by querido-diario-data-processing

@andreformento andreformento mentioned this pull request Jun 5, 2021
2 tasks
Comment on lines +147 to +155
run-standalone: build
podman run --rm \
--env QUERIDO_DIARIO_ELASTICSEARCH_INDEX=$(REMOTE_ELASTICSEARCH_INDEX) \
--env QUERIDO_DIARIO_ELASTICSEARCH_HOST=$(REMOTE_ELASTICSEARCH_HOST) \
--env QUERIDO_DIARIO_DATABASE_CSV=$(QUERIDO_DIARIO_DATABASE_CSV) \
--publish $(API_PORT):$(API_PORT) \
--user=$(UID):$(UID) \
$(IMAGE_NAMESPACE)/$(IMAGE_NAME):$(IMAGE_TAG) \
python main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this working in your env? I'm not sure if this will work. With this command, it will run the process inside a container/namespace which is not guarantee to has the Elasticsearch running.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the idea is to use with another Elasticsearch, e.g., when you setup with real data using data processing to create a real scenery.

The problem here is do a make run and try to create another Elasticsearch when you are running Elasticsearch with querido-diario-data-processing. Because of that, you need to run with 2 parameters as you can see at README:

REMOTE_ELASTICSEARCH_INDEX="querido-diario" REMOTE_ELASTICSEARCH_HOST="my.ip" make run-standalone

I think another option is to create all environment in one place. But I don't know if is a good idea.

What you think about this @jvanz ?

set base image

Update Makefile
@andreformento andreformento force-pushed the run-api-using-remote-elastic-search branch from 9c81c01 to 1b3cdb6 Compare July 3, 2021 23:01
@jvanz jvanz self-requested a review July 15, 2021 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants