Cloud Storage Production Setup
Before you begin, make sure that your server's Python version is:
- Latest 3.8 for Frappe's version 13
- Latest 3.10 for Frappe's version 14.
- First, set up a new bench and substitute a path to the python version to use. These instructions use pyenv for managing environments.
# Version 13
bench init --frappe-branch version-13 {{ bench name }} --python ~/.pyenv/versions/3.8.12/bin/python3
# Version 14
bench init --frappe-branch version-14 {{ bench name }} --python ~/.pyenv/versions/3.10.3/bin/python3
- Create a new site in that bench
cd {{ bench name }}
bench new-site {{ site name }} --force --db-name {{ site name }}
- Download the Cloud Storage application
bench get-app cloud_storage [email protected]:agritheory/cloud_storage.git
- Install the app to your site
bench --site {{site name}} install-app cloud_storage
# Optional: Check that the app installed on your site
bench --site {{ site name }} list-apps
- Make sure to configure your S3 instance to access your files. You can do this by setting the permissions defined in the configuration guide.
- Install the libmagic C library. The documentation for the python-magic package (a Cloud Storage dependency) notes that the package is a wrapper around the libmagic C library, which needs to be installed on the system as well.
# Debian/Ubuntu
sudo apt-get install libmagic1
# Windows
pip install python-magic-bin
# OSX Homebrew
brew install libmagic
# OSX macports
port install file
- Once everything is set up, launch your bench.
bench start