Closed johartl closed 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 :)
@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.
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 :)
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...
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 yourconfig.js
so I just added them to theconfig["database"]
object as well.