Noninteractive first time setup of user via upgrade?


#1

Hey folks!
I’m trying to automate our sentry install, using the docker method described here https://docs.sentry.io/on-premise/server/installation/docker/.

I’m currently stuck on the “upgrade” step (for initialization).

The --no-interactive mode for the sentry upgrade command solves part of my problem, but how can I create an initial superuser without resorting to interactive mode?

Thanks for your help!

Leslie


#2

You can automate creating a user with sentry createuser:

Usage: sentry createuser [OPTIONS]

  Create a new user.

Options:
  --email TEXT
  --password TEXT
  --superuser / --no-superuser
  --no-password
  --no-input
  --help                        Show this message and exit.

#3

Hi Matt

I am Using Docker Compose to automate the Sentry Installation as a Docker Container and I need to pass the prompt yes to create Super user and pass email, Password and Confirm same password during running the docker-compose run --rm web upgrade command.