Store Git LFS Files on AWS S3
Git LFS files can be large, and may occupy lots of disk space. In the same time, they are accessed less frequently compared to other files. So it is a good idea to store them on AWS S3 for cost effective reason. This tutorial demonstrates how to do it.
Install s3fs on OneDev Server
Firstable we need to install s3fs on OneDev server. Follow its guide to mount a S3 bucket to a path, say /s3fs. Create a subfolder inside it to hold git LFS files, say /s3fs/lfs.
If you are runnig a cluster, make sure to perform this step on all clustered servers.
Request a Trial Subscription
Separate LFS and artifact storage requires a subscription to use. Switch to menu item Administration / Subscription Management, request a trial subscription key and install it into OneDev if you do not have a subscription yet:
Configure LFS Storage at OneDev Side
Switch to menu item Administration / Storage Setting ((will be available after subscription is activated above)), and specify Lfs Store as /s3fs/lfs (if you are running OneDev as a docker container, you will need to mount the host path /s3fs/lfs as a container path, and specify Lfs Store as that container path instead):