Is it possible to connect to existing databases?

We have an application that’s already deployed on AWS, with a production database.

Is it possible to tell Qovery to talk to this database, instead of creating a new one?

Hello @bobbyrenwick, surely it is possible to connect IF the database is publicly available. So it may depend on your current AWS configuration.

If you don’t have any strict network restriction/rules, then you could set up secrets (passwords, URL, etc.) in your project in Qovery and use those to connect to your database in the app deployed with Qovery.

Hi @pjeziorowski, thanks for the super quick response.

The only networking requirement at the moment is that the production database is only available to EC2 machines with a particular security group. I guess the worry there is that by having that security group on the Qovery kube cluster, any version of the app could access the production database.

The other thing I’m questioning is that we’d like the database to be handled by Qovery in every environment other than the production environment. I can’t see anything in the docs about having amendments to .qovery.yml depending on the environment.

I’m also wondering where database migrations fit into the deployment model, but perhaps that’s another topic!

Hi @bobbyrenwick ,

I’m not sure to get your question, but I’ll try to answer from what I guess. With a Qovery business version, yes, access is limited to any applications in the same security group from a network perspective. Then authentication is required for any apps to access it. Please let me know if this is the answer your expected.

Today, one database is handled by one application in an environment (production or not). Applications from other environments can have access if you share the credentials with them (E.g. with environment variables). But by default, to avoid unexpected environment application to access another database (ex dev app accessible prod database), Qovery uses dedicated apps and DBS.

Database migration doesn’t fit in our deployment model as we don’t know the nature of the business (how to migrate data, when, how to decide to switch, can we have downtime or not…). Internally, we had a few discussions about this topic. It is a tough one, and we are still looking for appropriate solutions.

1 Like