Reset the sentry password

If you have locked yourself out of sentry but still have ssh access to the server, you can reset the password in the shell

  1. Open the shell in the sentry docker:

    cd /data/grape/config/sentry
    docker-compose exec grapesentry-sentry bash
    
  2. open the sentry/django shell:

    sentry shell
    
  3. Change the password (make sure to use a better password than 12345):

    from sentry.models import User
    user = User.objects.get(id=1)
    user.set_password("12345")
    user.save()
    
  4. press Ctrl+D twice to exit