Problem
GlitchTip deployment doesn't create an initial admin user. Currently relies on ENABLE_OPEN_USER_REGISTRATION: "True" and manual registration, which violates the no-touch server philosophy.
When we went to check error logs today, we found no users existed in GlitchTip at all.
Solution
Add an ansible task that creates a superuser idempotently:
- name: Create GlitchTip superuser
command: >
docker exec glitchtip-web ./manage.py shell -c
"from django.contrib.auth import get_user_model;
User = get_user_model();
User.objects.filter(email='{{ glitchtip_admin_email }}').exists() or
User.objects.create_superuser('{{ glitchtip_admin_email }}', '{{ glitchtip_admin_password }}')"
changed_when: false
Store credentials in vault alongside other secrets.
Also consider
- Should we disable open registration once an admin exists?
- Configure real email (currently
EMAIL_URL: "consolemail://" just logs to console)
Problem
GlitchTip deployment doesn't create an initial admin user. Currently relies on
ENABLE_OPEN_USER_REGISTRATION: "True"and manual registration, which violates the no-touch server philosophy.When we went to check error logs today, we found no users existed in GlitchTip at all.
Solution
Add an ansible task that creates a superuser idempotently:
Store credentials in vault alongside other secrets.
Also consider
EMAIL_URL: "consolemail://"just logs to console)