Re: In Diego (maybe DEA also) why is $HOME /home/vcap/app and not /home/vcap?


Eric Malm <emalm@...>
 

Hey, Mike,

HOME is also `/home/vcap/app` on the DEAs, and Diego has replicated that
execution contract for buildpack apps (the buildpack-app-lifecycle's
launcher sets HOME to that value before exec'ing the start command).
Spelunking through the DEA codebase, it seems to have been that way since
buildpack support was introduced:
https://github.com/cloudfoundry/dea_ng/commit/43ea42bcbff09175cafa65c2e84bd36fd505be07
is the earliest reference I could find to it. Since /home/vcap/app is also
symlinked to /app, this may be to keep compatibility with Heroku
conventions around the HOME env var. Someone who was around in March 2013
(or who knows Heroku better! :) ) might be able to answer that more
definitively, though.

Best,
Eric

On Thu, May 5, 2016 at 10:00 AM, Mike Youngstrom <youngm(a)gmail.com> wrote:

This burned me today because I was attempting to put fonts into the home
directory identified by the java system property "user.home" (which is
/home/vcap) instead of the environment variable $HOME which is
/var/vcap/app.

This is especially confusing because SSH home is "/home/vcap".

Anyone have any context into why $HOME for the app is /var/vcap/app and
not /var/vcap?

Thanks,
Mike

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.