Spectivis Cloud
Databases and Redis
Add a MySQL database or Redis to an environment, how storage works and how to remove them.
An environment can have a MySQL database and Redis. Only that environment can reach them. Connections from outside Cloud are not available. Use import and export and phpMyAdmin to move and edit data.
Add a database
Section titled “Add a database”You can add a MySQL 8.4 database at any time, not only when you create the app or environment:
- On the environment’s Overview, choose Add resource, then MySQL.
- Or open the Database page of an environment that has none and choose Add a database.
Choose Add database. Leave Deploy now ticked to deploy straight away. The database is ready at once. Your app gets its settings (DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD) with its next deploy, and plain PHP apps also get the mysqli and pdo_mysql extensions then. Until you deploy, the Database page reminds you. The password is shown to you once on the Database page. See Backups.
Storage
Section titled “Storage”A database has no size to pick and costs nothing extra. It shares its environment’s storage with your files and the live build: the storage your instance size includes, for example 20 GB with a 1 GB instance. The database grows into whatever is free. The Database page shows how much it holds and how much of the environment’s storage is in use.
When the environment’s storage is full, the database only accepts reads: your app stays up and can still read and delete, but cannot add or change rows until you free space or add storage. The Database page says so. To add storage, open Settings, then Storage, and pick extra storage in steps of 5 GB. It costs $0.10 per GB a month, charged by the hour from your credit, and applies at once with no restart. You can remove it again once the environment holds less than it would have left.
Remove a database
Section titled “Remove a database”On the Database page, under Size, choose Remove database and type its name. Cloud takes a final backup first, kept for 7 days (ask support to restore it), then deletes the database and everything in it. If the final backup fails, nothing is deleted. Your running app loses the database at once, and its settings leave the app’s variables with the next deploy.
Redis is offered as Redis (Valkey). Valkey is an open-source, Redis-compatible server, so Redis clients and libraries work with it. Add it from Add resource on the Overview, for any framework. Your app gets REDIS_HOST, REDIS_PORT, REDIS_PASSWORD and REDIS_URL with its next deploy. Laravel apps also move their cache and sessions to it, and the queue stays on the database. It sleeps and wakes with the environment and is charged like the app’s memory, at $2.50 a month for each GB.