This middleware is used to synchronize AWS S3 compatible storage objects with filesystem. Also it provides web UI for browsing files.
-
File Synchronization
DubStack is a server side of team collaboration apps. There are Windows, Android and IOS apps. Windows app synchronizes files in background and allows file lock/unlock, delete/undelete, copy/move, differential sync and automated conflict resolution.
-
Thumbnails, watermarks
Thumbnails are generated on demand by dedicated gen_server process. It applies watermark on thumbnails, if watermark.png found in bucket.
-
File and directory sharing API key is used for signing sharing requests. This feature can be used, for example, for selling digital content.
-
Action log and changelog
It records history of upload, copy, move, rename and delete operations.
-
Multi-tenancy
Objects are stored in "buckets" with names like "the-tenant-group-res" Only users from tenant's group can access that bucket.
-
IOS and Windows apps
You can manage objects, users, their groups and tenants using Web UI browser. You can manage objects using IOS App.
-
API Easy to embed into your application for file sharing. See API reference
- Erlang applications are very resilient: processes are restarted as soon as they terminate.
- Excellent inter-node communication.
- Code is running inside Erlang Virtual Machine (BEAM), isolating segment of code and segment of data for security purpose.
DubStack supports multiple tenants per installation
DubStack is very cheap to run on AWS S3 compatible service. It requires minimum maintenance.
You will need the following dependencies.
-
Erlang >= 23, < 25
-
coreutils (
"/usr/bin/head"
,/bin/mktemp
commands ) -
imagemagick-6.q16
-
libmagickwand-dev
See Riak CS Installation Manual for installation and configuration instructions.
Clone this repository and execute the following commands.
make fetch-deps
make deps
make
In order to use specific version of Erlang, you should set environment variables C_INCLUDE_PATH and LIBRARY_PATH. For example:
export C_INCLUDE_PATH=/usr/lib/erlang/usr/include:/usr/include/ImageMagick-6:/usr/include/x86_64-linux-gnu/ImageMagick-6
export LIBRARY_PATH=/usr/lib/erlang/usr/lib:/usr/include/ImageMagick-6
The following imagemagic packages are required: imagemagick-6.q16 libmagickcore-6-arch-config libmagickwand-6.q16-dev
You need to change api_config
in include/storage.hrl
.
Locate riak-cs.conf
in Riak CS directory. Copy admin.key
value from riak-cs.conf
and paste it to access_key_id
in riak_api_config
.
Then locate riak.conf
in Riak directory and place value of riak_control.auth.user.admin.password
to include/riak.hrl
, to the secret_access_key
option.
In order to add first user, authentication should be temporary disabled.
Then start DubStack by executing make run
.
Now you should change general_settings
in include/general.hrl
and set
domain
option to IP address or domain name that you use.
Otherwise login won't work.
You can login now using credentials of staff user that you have just created. Staff user has permission to add other users.
Please feel free to send me bug reports, possible securrity issues, feature requests or questions.