Colm3na / polkastats-backend-v3

polkastats.io backend repository
Apache License 2.0
17 stars 15 forks source link

Use dotenv for configuration #112

Closed Bigomby closed 4 years ago

Bigomby commented 4 years ago

We should aim for universal docker images. Currently, our docker image is built with (mostly) static configuration so the result image is not configurable. This renders the image unusable in others environments, since it has the configuration hardcoded.

Following docker good practices, we should avoid static configuration so we can change application parameters without rebuilding the image. Environment variables are the way to go.

In the Node.js ecosystem we have the dotenv package which allows us to merge environment variables with variables from a local file named .env.