PokemonGoers / PokeData

In this project you will scrape as much data as you can get about the *actual* sightings of Pokemons. As it turns out, players all around the world started reporting sightings of Pokemons and are logging them into a central repository (i.e. a database). We want to get this data so we can train our machine learning models. You will of course need to come up with other data sources not only for sightings but also for other relevant details that can be used later on as features for our machine learning algorithm (see Project B). Additional features could be air temperature during the given timestamp of sighting, location close to water, buildings or parks. Consult with Pokemon Go expert if you have such around you and come up with as many features as possible that describe a place, time and name of a sighted Pokemon. Another feature that you will implement is a twitter listener: You will use the twitter streaming API (https://dev.twitter.com/streaming/public) to listen on a specific topic (for example, the #foundPokemon hashtag). When a new tweet with that hashtag is written, an event will be fired in your application checking the details of the tweet, e.g. location, user, time stamp. Additionally, you will try to parse formatted text from the tweets to construct a new “seen” record that consequently will be added to the database. Some of the attributes of the record will be the Pokemon's name, location and the time stamp. Additional data sources (here is one: https://pkmngowiki.com/wiki/Pok%C3%A9mon) will also need to be integrated to give us more information about Pokemons e.g. what they are, what’s their relationship, what they can transform into, which attacks they can perform etc.
Apache License 2.0
9 stars 6 forks source link

Allow environment variables for db config parameters #115

Closed johartl closed 8 years ago

johartl commented 8 years ago

Hi PokeData team, I'm member of team E and I'm currently in the process of integrating the other projects. For that purpose we will use Docker and as I have already noticed you guys are using Docker as well (which makes things easier for me, so thanks a lot!). We would like to connect the PokeData Docker container to a MongoDB container. This implies that your backend won't be able to reach the MongoDB-instance at localhost anymore (as they live in different containers). The easiest way of working around that issue would be to use environment variables for database parameters (host, user, password and collection) and specify them in the docker-compose file. You are already using environment variables in your config.js so I just added them to the config["database"] object as well.

sacdallago commented 8 years ago

This is a good point and it's good to make it default on the template config :) @PokemonGoers/pokedata this change is alright, if you ask me :)

vivek-sethia commented 8 years ago

@johartl - We are actually already using the remote shared database, for which we also have the environment variables - config["shared_database"] with all the database parameters. config["database"] was just being used for development, so that we could test on our local database.

johartl commented 8 years ago

I understand. However, it would still be nice to have configurable database parameters. There might be occasions when you don't want to use the shared database, for instance when testing or simply when you want to run it locally. As this change doesn't break anything I don't see why we would not want to have that additional functionality :)

vivek-sethia commented 8 years ago

Sure. of course it doesn't break anything :smile: And as you pointed out, we did realize the need to have the local db during development/testing and that is why have it. But with your changes, we will be able to configure it through env variables. So there is no problem merging the PR...