Volumes e bancos de dados
Persistent volumes for services, one-click Postgres, MySQL, Redis and MongoDB from templates, connecting with `skiffly connect`, and backups.
Volumes#
A volume is a persistent disk mounted into a service at a path. Data survives redeploys, restarts and image changes; it is deleted with the service or the environment.
skiffly volume add --mount-path /data --size 5 # GB
skiffly volume list- Volumes are per service and environment;
staginggets its own empty volume. - A service with a volume runs one replica (block storage cannot be shared).
- Creating a volume redeploys the service so the mount appears.
- Volumes are billed per provisioned GB-month while they exist, including while the service sleeps.
- Resizing is not supported yet: create a larger volume, copy the data over with
skiffly ssh, then delete the old one.volumeInstanceUpdatechanges the mount path or the service.
Databases#
Databases are ordinary services created from templates: an official image, a volume at the data directory, a generated password and a connection string that other services reference.
| Template | Image | Port | Volume | Variable to reference |
|---|---|---|---|---|
postgres (also postgres-16, postgis, pgvector, timescaledb) | postgres:17 | 5432 | /var/lib/postgresql/data, 10 GB | ${{Postgres.DATABASE_URL}} |
mysql, mariadb | mysql:8.4 | 3306 | /var/lib/mysql, 10 GB | ${{MySQL.MYSQL_URL}} |
redis (also valkey, keydb, dragonfly) | redis:7-alpine | 6379 | /data, 2 GB | ${{Redis.REDIS_URL}} |
mongodb | mongo:7 | 27017 | /data/db, 10 GB | ${{MongoDB.MONGO_URL}} |
More engines in the catalog: ClickHouse, CockroachDB, Cassandra, ScyllaDB, Neo4j, SurrealDB, InfluxDB, QuestDB, Meilisearch, Typesense, Qdrant, Weaviate, Elasticsearch, RabbitMQ, NATS, Kafka/Redpanda, MinIO.
New service → Template → PostgreSQL. The service, the volume and the variables are created together and the first deployment starts.
The database listens on the private network only. Give it more memory in Settings → Resources when the workload grows (1 vCPU / 1 GiB is the template default).
Connecting from your machine#
skiffly connect opens a TCP proxy and the matching client with the service's credentials:
skiffly connect postgres # psql
skiffly connect mysql # mysql
skiffly connect redis # redis-cli
skiffly connect mongo # mongosh
skiffly connect postgres --print # only print the connection URLThe client must be installed locally. The proxy stays until you delete it (skiffly proxy delete), so keep the password strong. Import a dump through the proxy:
pg_restore -h edge.skiffly.cloud -p 21543 -U postgres -d app backup.dumpor from inside the container with skiffly ssh:
skiffly ssh -s postgres -T -- pg_dump -U postgres app > backup.sqlBackups#
Every volume is snapshotted daily (03:00 UTC) with restic to encrypted S3-compatible storage in the EU, keeping 7 daily, 4 weekly and 3 monthly snapshots. Postgres and MySQL services additionally get a logical dump (pg_dumpall / mysqldump) in the same run, so a restore is consistent even if the file-level snapshot caught a write in progress.
Restores are done by support today: write to support@skiffly.dev with the project, service and the point in time. Self-service restore from the dashboard and on-demand snapshots are on the roadmap. Keep your own dumps for anything you cannot afford to lose; skiffly ssh and skiffly connect make that a one-liner in a cron job.