Operations grimoire/Login

From Nasqueron Agora

Login is handled by Auth Grove

Application information

  • Repository: rGROVE
  • Maintainer: Dereckson
  • Written in PHP, use Laravel, Laravel Socialite and Keruald libraries

Run it

Deployment information

  • Deployed on Docker
  • Docker image: rDGROVE
  • Needs MySQL, both for prod and on CI

Start a new container

salt equatower state.apply roles/paas-docker/containers/auth-grove

Upgrade a live container

  1. Enter notifications container as app user : docker exec -it --user=app login bash
  2. Check we're on the master branch and the history is clean
  3.  Update code rebasing the production branch against origin/master
  4. If composer has been touched, composer update (could be faster to docker pull, stop this container and start a new container)
  5. To upgrade database schema, php artisan migrate
  6.  If entered as root, fix ownership with chown -R app:app /var/wwwroot/default
  7.  Restart PHP FPM with sv restart php-fpm
  8. Run php optimize to refresh compiled class
  9.  Restart again PHP FPM with sv restart php-fpm

For longer upgrade, you can put the application in maintenance mode with php artisan down.

If preferences are updated (in the code or by us), update the cache: php artisan config:cache && sv restart php-fpm is needed.

How to rebase against master?

  1. update master to match origin/master
  2. rebase production against master
$ git fetch
$ git checkout master
$ git rebase origin/master
$ git checkout production
$ git rebase master

If there is a merge conflict:

  1. Edit the conflict files
  2. git add <edited files>
  3. git rebase --continue


URL issue

If URL are in http://localhost, ensure the web server passes proxy forwarding information (include proxy_params in nginx), as the application guess links.