Operations grimoire/Login: Difference between revisions

From Nasqueron Agora
(Created page with "Login is handled by Auth Grove == Application information == * Repository: [https://devcentral.nasqueron.org/diffusion/GROVE/ rGROVE] * Maintainer: Dereckson * Written in PHP...")
 
({{Configuration as Code}} done)
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
* Written in PHP, use Laravel, Laravel Socialite and Keruald libraries
* Written in PHP, use Laravel, Laravel Socialite and Keruald libraries


== Deployment information ==
== Run it ==
=== Deployment information ===
* Deployed on [[Operations grimoire/Docker engine|Docker]]
* Deployed on [[Operations grimoire/Docker engine|Docker]]
* Docker image: [https://devcentral.nasqueron.org/diffusion/DGROVE/ rDGROVE]
* Docker image: [https://devcentral.nasqueron.org/diffusion/DGROVE/ rDGROVE]
* Needs MySQL, both for prod and on CI
* Needs MySQL, both for prod and on CI
=== Start a new container ===
<code>salt equatower state.apply roles/paas-docker/containers/auth-grove</code>
=== Upgrade a live container ===
# Enter notifications container as app user : <code>docker exec -it --user=app login bash</code>
# Check we're on the master branch and the history is clean
# Update code rebasing the production branch against origin/master
# If composer has been touched, <code>composer update</code> (could be faster to docker pull, stop this container and start a new container)
# To upgrade database schema, <code>php artisan migrate</code>
# If entered as root, fix ownership with <code>chown -R app:app /var/wwwroot/default</code>
# Restart PHP FPM with <code>sv restart php-fpm</code>
# Run <code>php optimize</code> to refresh compiled class
# Restart again PHP FPM with <code>sv restart php-fpm</code>
For longer upgrade, you can put the application in maintenance mode with <code>php artisan down</code>.
If preferences are updated (in the code or by us), update the cache: <code>php artisan config:cache && sv restart php-fpm</code> is needed.
=== How to rebase against master? ===
# update master to match origin/master
# rebase production against master
<syntaxhighlight lang="console">
$ git fetch
$ git checkout master
$ git rebase origin/master
$ git checkout production
$ git rebase master
</syntaxhighlight>
If there is a merge conflict:
# Edit the conflict files
# <code>git add <edited files></code>
# <code>git rebase --continue</code>


== Troubleshooting ==
== Troubleshooting ==
=== URL issue ===
=== 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.
If URL are in http://localhost, ensure the web server passes proxy forwarding information (include proxy_params in nginx), as the application guess links.
{{Configuration as Code}}

Latest revision as of 10:37, 22 September 2018

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


Troubleshooting

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.