create
create a SphereDB database
Create a SphereDB PostgreSQL database in an environment.
Pick an instance type by name or id (see csph db instance-types): Free,
Flex 256 MB / 512 MB / 1 GB (shared CPU), Standard N or Plus N (N vCPU; Plus
has twice the memory). Add high availability from 1 vCPU: a standby in another
zone. The default is Standard 1.
Services in the environment get DATABASE_URL injected; --no-inject turns that off.
--engine and --version pick the engine and its version; without --version the engine's default version is used.
Usage
csph db create <name> [flags]
Options
Command Specific
Formatting
For more information about formatting options, see Formatting.
Inherited
Examples
csph db create orders --instance-type "Standard 2" --storage 20
csph db create orders --engine postgresql --version 17
csph db create orders --instance-type pg-2c-8g --high-availability standby
csph db create scratch --instance-type free --environment <id> --no-inject
See also
- csph db — manage SphereDB databases
- csph db list — list databases
- csph db get — show a database
- csph db delete — delete a database
- csph db instance-types — list database instance types and prices
- csph db resize — change a database's instance type, high availability or storage
- csph db connection-string — print a connection string
- csph db credentials — manage database credentials
- csph db connect — open psql on a database
- csph db tunnel — open a local port to a database
- csph db public — manage the public endpoint (IP allowlist)