User Tools

Site Tools


medal-hub:troubleshooting-guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
medal-hub:troubleshooting-guide [2022/04/13 09:23] Sylvainmedal-hub:troubleshooting-guide [2022/05/18 08:30] (current) Sylvain
Line 28: Line 28:
     * php artisan medical_case:close     * php artisan medical_case:close
         * This command will get every medical cases with a NOT close status and a date value for updated_at being greater than 36h and close them         * This command will get every medical cases with a NOT close status and a date value for updated_at being greater than 36h and close them
 +
 +===== Corrupted git folder or wrong permissions ====
 +
 +Sometimes, if for example the connection is lost during the update of the folder, it is possible that the git folder gets corrupted. Or if the user does not have write permissions to the folder, the git pull command will not work. You can check this by manually running a git pull and looking at the output. If you get an error, then you need to follow **one by one** these commands.
 +
 +<code bash>
 +# First we delete the git folder
 +sudo rm -r .git
 +# Then we initiate a new git folder
 +git init
 +# We set up the origin remote 
 +git remote add origin https://bitbucket.org/wavemind_swiss/liwi-local-data.git
 +# We fetch everything from the git (could take some time depending on the internet connexion)
 +git fetch
 +# we reset the permissions
 +sudo chown -R pirate:pirate /home/pirate/liwi-local-data && sudo chown -R www-data:www-data /home/pirate/liwi-local-data/storage/ && sudo chown -R root:root /home/pirate/liwi-local-data/postgres-data
 +# As we have change the permission of the database folder we need to restart the dokku container
 +docker-compose down
 +docker-compose up -d
 +# We change the branch to the right one
 +git checkout -f feature/socialite
 +# To be sure we're working with the latest commit and that no local changes are being used, we reset the git
 +git reset --hard HEAD
 +# And finally we can do a git pull. Just be sure that the output is "Already up-to-date."
 +git pull
 +</code>
 +
medal-hub/troubleshooting-guide.txt · Last modified: 2022/05/18 08:30 by Sylvain