At this point, we can only talk to our microservice using AMQP, or by using the Nameko shell or a Nameko ClusterRPCProxy class. So let's put our Flask-RESTful API into another container, run that alongside the other containers, and make REST calls. This will also require that we run an Elasticsearch container, as that API code also communicates with Elasticsearch.
Creating an API container
Getting ready
First let's start up Elasticsearch in a container that is attached to the scraper-net network. We can kick that off with the following command:
$ docker run -e ELASTIC_PASSWORD=MagicWord --name=elastic --network scraper-net -p 9200:9200 -p 9300:9300 docker.elastic.co/elasticsearch/elasticsearch:6.1.1
Elasticsearch...