diff --git a/docker-compose.yml b/docker-compose.yml index 9d530b9543ca2607e492dd216afe1bb43f47f074..e4f69f08eb87001e4529239f69ec88bf0a938341 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,8 @@ services: python manage.py makemigrations python manage.py migrate --no-input python manage.py initdb + python manage.py createsuperuser --noinput --settings server.settings + python manage.py import-galaxy-workflow python manage.py runserver 0.0.0.0:8000 volumes: - ./server:/app @@ -24,6 +26,9 @@ services: - "8888:8000" environment: DEBUG: "true" + DJANGO_SUPERUSER_USERNAME: admin + DJANGO_SUPERUSER_PASSWORD: password + DJANGO_SUPERUSER_EMAIL: admin@example.com depends_on: - postgresql # - galaxy @@ -80,6 +85,7 @@ services: depends_on: - server - client + - postgresql volumes: - ./nginx/dev/nginx.conf:/etc/nginx/nginx.conf:ro - cc-qtl-django-static:/usr/src/app/static diff --git a/server/server/settings.py b/server/server/settings.py index e506bd29596868195acbe4bb5d71db7b33fce362..b57b14a89a05ed15c50440abdd35af0e05a44fca 100644 --- a/server/server/settings.py +++ b/server/server/settings.py @@ -32,6 +32,10 @@ SECRET_KEY = config( ) HOSTLABEL = config("HOSTLABEL", default="local") +# django superuser conf +DJANGO_SUPERUSER_USERNAME = config("DJANGO_SUPERUSER_USERNAME", default="admin") +DJANGO_SUPERUSER_PASSWORD = config("DJANGO_SUPERUSER_PASSWORD", default="password") +DJANGO_SUPERUSER_EMAIL = config("DJANGO_SUPERUSER_EMAIL", default="admin@example.com") # GALAXY CONF GALAXY_API_KEY = config("GALAXY_API_KEY", default="") GALAXY_BASE_URL = config("GALAXY_BASE_URL", default="http://0.0.0.0:9090/")