Ruby: File storage
This documentation is part of the Advanced usages guide. You can view the complete guide here: Going further with your Ruby deployments.
👋 Welcome to the Stackhero documentation!
Stackhero offers a ready-to-use Ruby cloud solution that provides a host of benefits, including:
- Deploy your application in seconds with a simple
git push.- Use your own domain name and benefit from the automatic configuration of HTTPS certificates for enhanced security.
- Enjoy peace of mind with automatic backups, one-click updates, and straightforward, transparent, and predictable pricing.
- Get optimal performance and robust security thanks to a private and dedicated VM.
Save time and simplify your life: it only takes 5 minutes to try Stackhero's Ruby cloud hosting solution!
For storing files such as user photos or documents, using an object storage solution is highly recommended. Object storage allows you to share files across multiple services and instances and decouples the storage layer from your code. This is considered a best practice.
We recommend MinIO as an easy, fast, and powerful solution that is compatible with the Amazon S3 protocol.
If you choose local file storage, you can use the persistent storage provided with your Ruby instance. This local storage is available under the directory /persistent/storage/.
However, local file storage is generally not recommended as it may not be the best practice for long-term scalability and reliability.
WARNING: Never store data outside the
/persistent/storage/folder!Storing data in any location other than the persistent storage folder can result in data loss when your instance is rebooted, updated, or when you push new code.