2

I'm trying to run a Django app on Google Cloud Run. The site itself works nicely, can run migrations and collect static assets via a startup script. The one thing I cannot figure out how to do is create a superuser. This requires interactively typing in a password or at least setting it via a django shell. I currently cannot figure out how to do this and it seems like it might not be possible; which would make Cloud Run unusable for Django. Has anyone been able to achieve this or have a sustainable workaround? Thanks!

Julian25
  • 675
  • 9
  • 19

1 Answers1

1

Instead of Django Shell use the api to create the superuser. Once you have the script make it part of the container build process.

Kunal Deo
  • 2,248
  • 2
  • 18
  • 27