Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Commit 623e548

Browse files
committed
add service to automatically create admin user
1 parent 951c999 commit 623e548

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

compose.dev.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,22 @@ services:
5858
volumes:
5959
- broker_data:/data
6060

61+
createsuperuser:
62+
build:
63+
context: ./app
64+
dockerfile: Dockerfile.dev
65+
restart: on-failure
66+
environment:
67+
- DJANGO_SETTINGS_MODULE=chat_project.settings
68+
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@db:5432/postgres
69+
- DJANGO_SECRET_KEY
70+
- DEBUG=1
71+
volumes:
72+
- ./app:/app
73+
depends_on:
74+
- migrate
75+
command: python manage.py createsuperauto
76+
6177
volumes:
6278
db_data:
6379
broker_data:

0 commit comments

Comments
 (0)