Let's change the db names to proper reference and also check the possibility of db name collision.
https://github.com/ledokku/ledokku/blob/eb8eaf7317370e80dc391babfdb43048ab9f0656/ledokku-bootstrap.sh#L228-L233
Issue Showcase
In the above code, we can see, that the databases created are all named as ledokku, which itself is not an error prone variable assignment => but we can be more explicit in our naming conventions.
My Suggestions
Let's make our database name more explicit and add some logic to check to verify the duplication of databases. It would be something like this:
- Changing Redis db name to:
ledokku-redis-db - Changing Postgress db name to:
ledokku-pg-db
and finally, during the installation process, let's add some logic to check whether there is any name collision => If there is a name collision we will prompt the user that we are about to delete the old databases and install new ones.
Reason => In case of installation failure(in the middle), not everyone might be familiar with dokk-cli to troubleshoot things.
@pradel @Akirtovskis What do you say? Shall I start working on it by creating a template PR?
@akhil-naidu Thanks for the idea, looks good to me! 🚀