A data container is the read/write database engine that you connect to for working with your databases. All data containers are based off a data image, providing you access to any databases and data in the original image, but taking just seconds to create. All data containers that you create are isolated from any others, allowing you or your team members to make changes without worrying about impacting anything else.
Spawn is currently in beta. Apply for the beta programme to get access.
This is part of a series of short guides for getting up and running quickly with Spawn.
Create a data container
To create the data container, we simply run a spawnctl command referencing our data image using the
spawnctl create data-container --image dev
Connecting to your data container
Once the data container has been created successfully, the command will return with both the container name (auto generated if not specified) and a connection string. You can use this connection string in an application that needs to connect to the database, or use the values such as
Password to connect to your data container using your usual client tools.
Data container 'dev-uxhdaoap' created! -> Host=instances.spawn.cc;Port=xxxxx;Username=xxxx;Database=postgres;Password=xxxxxxxxx
Seeing your data containers
View all your data containers using the following command.
spawnctl get data-containers
ID Name Revision Status Engine CreatedAt 00001 dev-cxmwgjeo rev.0 Completed PostgreSQL 15 minutes ago 00002 dev-eukjbnkm rev.0 Completed PostgreSQL 10 minutes ago 00003 dev-uchdwpkp rev.0 Completed PostgreSQL 7 minutes ago
If you need the connection string again for a data container, add
spawnct get data-containers -o wide
To return your data containers, including connection details in a format more suitable for parsing programmatically, add
spawnctl get data-containers -o json