What's the 'standard' directory location to use when cloning a Git repo onto a LINUX machine -


while spend of career on microsoft stack full-stack web developer - have, on occasion, made way *nix side of things.. built out freebsd web server here, played caldera linux once on there, , doing web deployment using google cloud vm running ubuntu...

tl,dr so, if forked repo onto github account- purposes of cloning ubuntu server i'll compile , run web application..

what professionally expected location should put 'cloned' source code? googled around bit better grasp of various linux directories for.. but.. need answer... so... put it?

/usr/src/mygitrepos ..that sounded me.. but.. do?

what professionally expected location

if you're deploying app that's compiled source, there's no such location. in professional environment sources don't go on servers.

from professional "it works" solutions:

  1. build system packages outside of production environment. means have repository of both deployed versions , have package manifest including both build , runtime dependencies. means can rebuild app same way every time. installation, install built package. (this applies deb, rpm, etc.)

  2. build tarballs binaries in predictable environment (developer's box). means run (for example, if you're using autotools) ./configure --prefix=/opt/your_app && make install destdir=/tmp/somedirectory - can pack /tmp/somedirectory/opt/your_app contents, copy server , unpack /opt/your_app.

  3. clone wherever (your home directory), build, install in destination. popular destinations /opt/app_name , /usr/local.

the solution depends on how professional deployment is, how many servers you've got, have got test/production environment, etc.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -