diff --git a/api/room.py b/api/room.py index 7ead52b..7ff5ac0 100644 --- a/api/room.py +++ b/api/room.py @@ -6,7 +6,7 @@ class Room(object): - @inject(indexer=ElasticSearchIndex) + @inject def post(self, indexer: ElasticSearchIndex, room: dict) -> dict: """ This wil return a location, kind of 'Camden, London'. @@ -24,4 +24,5 @@ def post(self, indexer: ElasticSearchIndex, room: dict) -> dict: return room, 201 + class_instance = Room() diff --git a/docker-compose.yml b/docker-compose.yml index f02b8da..d65fed7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,17 +5,19 @@ services: our-app: build: . environment: - - MODE=dev - - ELASTICSEARCH_HOST=127.0.0.1 + - ELASTICSEARCH_HOST=elasticsearch - ELASTICSEARCH_PORT=9200 volumes: - .:/code depends_on: - elasticsearch - rabbitmq + links: + - elasticsearch + - rabbitmq ports: - "9091:9090" - + rabbitmq: image: rabbitmq:3.6.1-management environment: diff --git a/requirements.txt b/requirements.txt index 43e1975..c93d179 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ Flask -connexion +connexion[swagger-ui] Flask-Injector fastavro elasticsearch -boto \ No newline at end of file +boto