Installing on Raspbian in NFS mounted dirs

Hi,

I’m trying to get a minimal setup up and running on a RPi 3+ with raspbian. As the main server eats sd cards (twice a year) I wanted to install the gitlab-ce version on an nfs mount that served by my NAS.

I found documantation about placing /var/opt/gitlab on nfs, but this only works for the data subdirectories, not the complete tree. (moving /var/opt there works) Installing the software (/opt/gitlab) in a nfs mounted dir fails as well as soon as you softlink the /opt/gitlab dir to for example /nas/gitlab (an automount).

Installing on local mountpoints works, but moving it later breaks the setup again as now it finds settings in /nas/gitlab (where the files really are) and /opt/gitlab (the location hardcoded in the setup)

Is there any way this is possible? I’d even prefer to have everything under 1 nfs mount (so all binaries, config, data, … under /nas/gitlab) , but just moving the separate dirs off the microSD would suffise.

As ce comes bundeled with a lot of dependencies, I doubt breaking it up and using existing postgresql and web server setups is an option to limit the load on the RPi.

Greetings,

Jan Huijsmans