RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

Add build-time configuration of the vcs/ssh user #42

Closed neomantra closed 8 years ago

neomantra commented 8 years ago

We use Mercurial as our primary DSCM. It was awkward ssh'ing our hg repos using git@server. This changeset makes this user configurable at container build-time.

If you like this, I can add some docs to the Advanced Configuration...

hach-que commented 8 years ago

Why does this do a __PHABRICATOR_VCS_USER__ replace instead of just writing the setting into /config.saved?

neomantra commented 8 years ago

I missed config.saved, thanks. The PHABRICATOR_VCS_USER should definitely be saved there. I fixed it up so that all the init files use the environment variable. However, the config files still need templating; I was on the fence about phabricator-ssh-hook.sh and left it templated.

hach-que commented 8 years ago

I added some notes; basically I want to get rid of the build time configuration dependency entirely because I don't want yet another way of configuring the template (and one that requires you to build the image just to change this option).

neomantra commented 8 years ago

Thanks for the pronto review. As currently structured, doesn't it have to be a build-time configuration? setup.sh is run only at build-time, creates a user with PHABRICATOR_VCS_USER and builds a directory tree as that user.

Perhaps the phabricator cloning can happen as root and then in 10-boot, the user is created and the tree is chown'd ?

hach-que commented 8 years ago

Oh right. Maybe let everything run through setup.sh as it currently does (maybe rename the user to phabricator), and then at the start of boot, run sed over /etc/passwd to rename the user?

neomantra commented 8 years ago

Oh good point, as long as the uid stays 2000, then it will all work. Ok I will rework this with your comments. Thanks!

hach-que commented 8 years ago

Thanks