Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's change the db names to proper reference and also check the possibility of db name collision. #400

Open
akhil-naidu opened this issue Aug 3, 2021 · 1 comment

Comments

@akhil-naidu
Copy link
Contributor

# We create the required databases
echo "=> ${YELLOW}Creating databases${END}"
dokku redis:create ledokku
dokku redis:link ledokku ledokku
dokku postgres:create ledokku
dokku postgres:link ledokku ledokku

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?

@Akirtovskis
Copy link
Contributor

@akhil-naidu Thanks for the idea, looks good to me! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants