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.
Option A: a connection from the catalog
Section titled “Option A: a connection from the catalog”- In the Databases section, create the connection (engine, host, port, user,
password as
${creds.x}) and test it (TCP reachability). - In the micro’s editor, inside the startup configuration, open the database
selector and choose that connection. Its
host:portreplaces 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.
Option B: local, cloud or custom
Section titled “Option B: local, cloud or custom”In the same selector you can choose directly:
- Local — the local URL the micro declares (default).
- Cloud — the
cloudUrlthe 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.