This is a python port of the s3-volume-docker-plugin https://github.com/chooban/s3-docker-volume-plugin with some differences.
Basically this plugin creates a temporary directory on the host. The directory contents are in turn synchronised to an S3 bucket specified during volume creation.
This plugin makes use of s3cmd to sync with S3 and bottle, cherrypy as the web framework and web server respectively. The server binds by default to localhost and on port 8090. The defaults are trivial to change on the code base.
We also make use of systemd services according to the service file under systemdconfig directory.
- Python 3
- Pip3
- git clone [repo-url]
- cd pyS3-volume
- sudo make install
- Create a docker volume
- Attach docker volume to container
This will create a volume named s3vol and any file added to the directory S3 will be mirrored at the specified bucketname
Debug info can be retrieved from the log file at the working directory of the plugin by default at /opt/pyS3-volume. or /var/log/syslog
If your bucket name has multiple folders make sure to append the trailing slash at the end.
To check the status of the service run systemctl status pyS3-volume.service