ConceptsEnvironment & env groups
References to a datastore
A reference to a datastore gives its connection string, or one part of it.
connectionString gives the full URL: postgresql://app_db:…@app-db:5432/app_db.
1 / 6
The kind is datastore. You can also write db or database.
ferry env set api 'DATABASE_URL=${{datastore.app-db.connectionString}}'The properties
| Property | Aliases | Value |
|---|---|---|
connectionString | url, internalUrl | URL on the private network, for example postgresql://app_db:…@app-db:5432/app_db |
externalConnectionString | externalUrl | URL through the port published on the server, with the --advertise-host host |
host | hostname | The datastore name, for example app-db |
port | 5432 (Postgres) or 6379 (Redis) | |
user | username | The Postgres user, or default for Redis |
password | The generated password | |
database | databaseName | The Postgres database name (Redis has none) |
A connection string is the URL that your app uses to connect to the datastore. See Datastores and Datastore ports.