ConceptsDatastores
Connection strings
A datastore has two URLs. The internal URL is for your services. The external URL is for the server itself.
Terminal
$ ferry db show app-dbName: app-dbID: dbs-be901a454ec7413aa1a2Kind: postgres 16Status: availableDatabase: app_dbUser: app_dbPassword: 6dd99f93338045919b9e682913c3c6a4Internal host: app-db:5432Internal URL: postgresql://app_db:6dd99f93338045919b9e682913c3c6a4@app-db:5432/app_dbExternal URL: postgresql://app_db:6dd99f93338045919b9e682913c3c6a4@127.0.0.1:62975/app_dbMemory limit: server default (512 MiB)CPU limit: server default (1 CPU)Created: just nowA connection string is one URL with the user, the password, the host, the port and the database. The two URLs go to the same datastore. Only the host and the port are different.
The two URLs
| URL | Format | Use it from |
|---|---|---|
| Internal | postgresql://USER:PASSWORD@NAME:5432/DATABASE redis://default:PASSWORD@NAME:6379 | Services and jobs, on the private network |
| External | The same, with 127.0.0.1:<host port> | The server itself, or your machine through an SSH tunnel |
Use them
- For a service, see Connect a service.
- For your machine, see Connect from your machine.