A Golang service that streams tweets, saves in MongoDB, and indexes in ElasticSearch
- Install Docker with Compose, according to the instructions for your operating system.
- Update configuration as desired in
config.yml
- e.g., select terms to send to filter API - Set up a
.env
file in the repository root with the following values from your Twitter API account (or provide them in thedocker-compose up
command below)- TWITTER_API_KEY
- TWITTER_API_SECRET
- TWITTER_ACCESS_TOKEN
- TWITTER_ACCESS_TOKEN_SECRET
- Run
docker-compose up
with optional-d
If using visual studio code, you can use the Remote - Containers extension with the included configuration to open the project in a container. You can then run the app in debug mode in the editor.
- The docker-compose file will create a cerebro container and map the port at
localhost:9000
. Usees01
as the host, notlocalhost
. - Kibana will also be running at
localhost:5601
.
You can also consume elasticsearch API directly or with another tool, through the localhost mapped port (localhost:9200
).
- Connect any MongoDB client to
localhost:27017
if you have a preferred tool (e.g. Compass) - Run
docker exec -it tweetstorm_mongo_1 mongo
(possibly replacing the container name with a value fromdocker ps
) to open a mongodb CLI without the need to install anything.