When locally deploying the Form.io Platform, an S3 compatible storage solutionis the preferred method for local file storage. SeaweedFS is an open-source distributed object storage server written in Go, designed for Private Cloud infrastructure providing AWS S3 storage functionality. This server is best suited for storing unstructured data and files such as photos and videos within the local environment.
SeaweedFS can be used on an Enterprise level, however many customers opt to use storage provided by an existing component of their technology stack, or other storage methods when deploying to the Cloud or their own On-Premise environment.
Installing SeaweedFS
If the Form.io Platform was deployed to the environment with the docker-compose methodology, SeaweedFS is already included in the deployment, and manual installation is not required.
Pre-Requisites
To deploy a new SeaweedFS server, complete the following pre-requisite steps:
Install Dockereither on the local machine, or on a private cloud server.
Create the necessary directories to store files using the file browser, or by executing the following commands:
mkdir ~/seaweedfs/data
Run the following command to pull the SeaweedFS container from Docker Hub:
docker pull chrislusf/seaweedfs
Deploying the SeaweedFS Container
Execute the following command to start the SeaweedFS container:
Note that the sample credentials "CHANGEME" should be updated to reflect the credentials intended for access to the file storage.
In this example, note that SeadweedFS is mounting the folder ~/seaweedfs. This can be changed to any drive on the system machine where SeaweedFS should store files.
Verify the formio-seaweedfs container is running by executing the following command:
The result should look similar to the following:
Modify the hosts file to allow easy access to SeaweedFS:
On MacOS/Linux: From the terminal run the following command, logging in if prompted:
On Windows: Use Notepad as an Administrator to open the file C:\Windows\System32\Drivers\etc\hostsOnce the file is open, modify the appropriate line to read:
Start the admin portal with the command:
In a browser, navigate to http://seaweedfs:23646/ ( or http://localhost:23646) to view the SeaweedFS interface.
After successfully loading the SeaweedFS dashboard, navigate to Buckets under the Object Store tools on the left-hand menu.
Create a new Bucket by clicking on the +Create Bucket button. Give the bucket a descriptive name and record the choice for future configurations.