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 provides a ready-to-use Ruby cloud solution that delivers numerous advantages, including:
- Deploy your application in just a few seconds with a simple
git push.- Use your own domain name and take advantage of automatic configuration of HTTPS certificates for enhanced security.
- Benefit from automatic backups, one-click updates, and clear, transparent, and predictable pricing.
- Enjoy optimal performance and enhanced security thanks to a private, dedicated VM.
Save time and make your life easier: 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.