Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run API using remote Elastic Search #33

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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 +157
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
Collaborator

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