Skip to content

Point a micro at another database

Goal: have a micro start against another database (the cloud one, a different local one, one from the catalog) without editing its repository.

  1. In the Databases section, create the connection (engine, host, port, user, password as ${creds.x}) and test it (TCP reachability).
  2. In the micro’s editor, inside the startup configuration, open the database selector and choose that connection. Its host:port replaces the one in the URL the micro already declares.

The connection’s user and password go where your micro reads them: into its config keys if it declares them —the usual thing in the JVM family, with spring.datasource.username and its partner— and otherwise inside the URL or connection string itself, which is where a Node, Go or .NET micro gets them from.

Only one case is left uncovered: a jdbc:/r2dbc: URL on a micro that doesn’t declare those keys. There the credentials fit nowhere and Aseptic warns you (only the URL would change); use “Update manifest from the repository” to autodetect them.

In the same selector you can choose directly:

  • Local — the local URL the micro declares (default).
  • Cloud — the cloudUrl the micro declares (may require credentials and a connection to its network).
  • Custom — a JDBC URL you write.

This customization is local and non-versioned (it lives in your settings.local.yml), so each machine points wherever it wants without affecting the rest of the team.