Create default django admin user on start up
This commit is contained in:
parent
bb307d34d2
commit
9faf762224
2 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
||||||
FROM python:3.8-slim-bullseye
|
FROM python:3.8-slim-bullseye
|
||||||
|
|
||||||
|
ENV DJANGO_SUPERUSER_USERNAME=admin
|
||||||
|
ENV DJANGO_SUPERUSER_EMAIL=admin@admin.com
|
||||||
|
ENV DJANGO_SUPERUSER_PASSWORD=admin
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./requirements.txt /app/requirements.txt
|
COPY ./requirements.txt /app/requirements.txt
|
||||||
|
|
|
@ -19,6 +19,7 @@ services:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
command: bash -c "./manage.py makemigrations;
|
command: bash -c "./manage.py makemigrations;
|
||||||
./manage.py migrate;
|
./manage.py migrate;
|
||||||
|
./manage.py createsuperuser --noinput;
|
||||||
./manage.py runserver 0.0.0.0:8000"
|
./manage.py runserver 0.0.0.0:8000"
|
||||||
|
|
||||||
react-frontend:
|
react-frontend:
|
||||||
|
|
Loading…
Reference in a new issue