ipfs-search / ipfs-search-deployment

Ansible playbooks for the deployment of ipfs-search.com
Other
4 stars 2 forks source link

Explicit install_user setting #37

Open dokterbob opened 1 year ago

dokterbob commented 1 year ago

Builds/unzips etc. are currently executed under the user who does the login. As we work towards multi-user deploy this gives problems (e.g. Oleh makes a deploy and now the repo folders are owned by him). Instead, we could sudo to an explicit install user.

Concept:

Example of error:

TASK [services/crawler : clone ipfs-search] ***************************************************************************************************************************************
fatal: [booth]: FAILED! => {"changed": false, "msg": "Failed to set a new url https://github.com/ipfs-search/ipfs-search.git for origin:  fatal: detected dubious ownership in repository at '/tmp/ipfs-crawler'\nTo add an exception for this directory, call:\n\n\tgit config --global --add safe.directory /tmp/ipfs-crawler\n"}
drbob@booth:~$ ls -la /tmp/ipfs-crawler/
total 23532
drwxrwxr-x 12 oleh_p oleh_p     4096 Oct 28 22:50 .
drwxrwxrwt 19 root   root      28672 Nov  4 09:16 ..
-rw-rw-r--  1 oleh_p oleh_p      336 Oct 28 20:56 .codeclimate.yml
drwxrwxr-x  2 oleh_p oleh_p     4096 Oct 28 20:56 commands
[...]