FerryDocs
Reference

Env var references

A reference points a variable at a datastore or a service. Ferry puts the real value there at start.

Edit on GitHub
Saved value${{…}}FerryContainerapp-dbdatastore

You save a reference as the value of DATABASE_URL. Ferry keeps it as you wrote it.

1 / 5

The value of an can be a to a or to a different . You do not copy an address or a password.

Ferry saves the reference as you wrote it. When Ferry starts containers, it replaces the reference with the real value. Thus the value always agrees with its target.

Set a reference

Terminal
ferry db create app-db --kind postgres
ferry env set api 'DATABASE_URL=${{datastore.app-db.connectionString}}'

The container of api then gets DATABASE_URL=postgresql://app_db:<password>@app-db:5432/app_db.

Use single quotes

Always put a value with a reference between single quotes. If not, your tries to expand $.

In this section

On this page