lidofinance / lido-keys-api

Api for fetching node operators keys from modules
MIT License
19 stars 15 forks source link

fix: docker-compose DB config #267

Closed AlexanderLukin closed 5 months ago

AlexanderLukin commented 7 months ago

Setting custom values for Postgres user credentials did not work if the application running inside the container because by default the Postgres container creates only a default user with default credentials. Previously these custom credentials specified in the env variables were passed to the Postgres image and it led to an error, because this user didn't exist in the default configuration, so, containers crashed in this case.

Now if the app runs in containers, user credentials specified in the env variables are ignored and the default user credentials are used.

We already have similar adjustments in other reops and folks like the idea https://github.com/lidofinance/node-operators-widget-backend-ts/pull/80 https://github.com/lidofinance/ethereum-validators-monitoring/pull/242

AlexanderLukin commented 5 months ago

As the database is correctly created with the name and credentials specified in the .env file in the existing version of the docker-compose file if the app's containers are created from scratch, it has been decided to keep the existing version of the docker-compose file and not to hardcode pre-defined DB name and credentials there. Closing this Pull Request.