I have a home Proxmox hypervisor that serves up every aspect of my home and business data. One of these functions is as a Samba server, which I have in an LXC container. This serves up CIFS shares to the rest of my containers and VM's, as well as machines on my local network, which includes my document scanner. When something is scanned, it goes off to the Samba LXC container for storage on the array. I also have another VM on the server which runs Crashplan to handle offsite backup all content in the Samba shares.
I really wanted Mayan to run in an LXC container, however with the move to Docker, I now have to use a VM, which I can get over. However, this adds a layer of complexity in creation of the VM, mounting the CIFS share in the VM's directory, then passing that mounted directory through to the Docker container. In addition, the Mayan document store directory in the Docker container needs to be passed to the VM host, which is mounted via CIFS, then passed to the Samba LXC for storage and subsequent offsite backup by my Crashplan VM.
Starting off with a fresh Debian-based Virtual machine, I created a directory to mount my Samba share:
Code: Select all
$ mkdir ~/edms_share
Code: Select all
sudo apt-get install cifs-utils
Code: Select all
/files.local/edms /home/(username)/edms_share cifs credentials=/home/(username)/.smbcredentials,uid=mayan,gid=users,_netdev 0 0
Code: Select all
nano ~/.smbcredentials
Code: Select all
username=(samba username)
password=(samba password)
Code: Select all
chmod 600 ~/.smbcredentials
Code: Select all
sudo mount -a
Code: Select all
nano ~/docker-compose.yml
Save, close, and restart the Docker container. Now simply go into Mayan and change the storage folder to /edms_share/doc_store and create the# Optional volumes to access external data like staging or watch folders
- /home/(username)/edms_share:/edms_share
watch and stage sources as /edms_share/watch and /edms_share/stage, respectively.
Now when my scanner scans to the Samba share /EDMS/watch, it is picked up by Mayan and ingested. When Mayan stores it, it is passed to my Samba server for filing in my array and backed up offsite by my Crashplan VM.
Hopefully this helps someone out. I fought with it for a couple weeks and finally get everything working. It's not the best in terms of performance, but it works great for a home user with a modest workload. If anyone has any suggestions, please let me know!