Expand description

Shuttle Shared Databases

This plugin manages databases that are shared with other services on shuttle.

Usage

Add shuttle-shared-db to the dependencies for your service. Every type of shareable database is behind the following feature flag and attribute path (*-rustls uses rustls for TLS, the default uses native-tls).

EngineFeature flagsAttribute path
Postgrespostgres / postgres-rustlsshuttle_shared_db::Postgres
MongoDBmongodbshuttle_shared_db::MongoDb

An example using the Rocket framework can be found on GitHub

Postgres

This resource has the following options

OptionTypeDescription
local_uri&strDon’t spin a local docker instance of Postgres, but rather connect to this URI instead for cargo shuttle run

MongoDB

This resource has the following options

OptionTypeDescription
local_uri&strDon’t spin a local docker instance of MongoDB, but rather connect to this URI instead for cargo shuttle run