👷(helm) command createsuperuser

We need a superuser in the Django
application, to have access to the admin part.
This commit create a superuser on the pods.
This commit is contained in:
Anthony LC
2024-06-19 10:39:18 +02:00
committed by Anthony LC
parent 9a7a8e4a34
commit 3c481e75bb
6 changed files with 151 additions and 13 deletions

View File

@@ -57,6 +57,13 @@ backend:
- "people.wsgi:application"
- "--reload"
createsuperuser:
command:
- "/bin/sh"
- "-c"
- python manage.py createsuperuser --admin_email admin@example.com --password admin
restartPolicy: Never
frontend:
envVars:
PORT: 8080

View File

@@ -16,6 +16,10 @@ backend:
name: backend
key: DJANGO_SECRET_KEY
DJANGO_SETTINGS_MODULE: people.settings
DJANGO_SUPERUSER_EMAIL:
secretKeyRef:
name: backend
key: DJANGO_SUPERUSER_EMAIL
DJANGO_SUPERUSER_PASSWORD:
secretKeyRef:
name: backend
@@ -81,6 +85,13 @@ backend:
name: redis.redis.libre.sh
key: url
createsuperuser:
command:
- "/bin/sh"
- "-c"
- python manage.py createsuperuser --admin_email $DJANGO_SUPERUSER_EMAIL --password $DJANGO_SUPERUSER_PASSWORD
restartPolicy: Never
frontend:
image:
repository: lasuite/people-frontend

View File

@@ -16,6 +16,10 @@ backend:
name: backend
key: DJANGO_SECRET_KEY
DJANGO_SETTINGS_MODULE: people.settings
DJANGO_SUPERUSER_EMAIL:
secretKeyRef:
name: backend
key: DJANGO_SUPERUSER_EMAIL
DJANGO_SUPERUSER_PASSWORD:
secretKeyRef:
name: backend
@@ -81,6 +85,13 @@ backend:
name: redis.redis.libre.sh
key: url
createsuperuser:
command:
- "/bin/sh"
- "-c"
- python manage.py createsuperuser --admin_email $DJANGO_SUPERUSER_EMAIL --password $DJANGO_SUPERUSER_PASSWORD
restartPolicy: Never
frontend:
image:
repository: lasuite/people-frontend