Skip to content

Commit

Permalink
hotfix: karrio images first startup default super user creation and d…
Browse files Browse the repository at this point in the history
…eployment tag
  • Loading branch information
danh91 committed Dec 12, 2024
1 parent 034e646 commit 97d73ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ REDIS_PORT=6379
# API - Configuration for the Nginx Reverse proxy.
############

KARRIO_TAG=2024.12rc
KARRIO_TAG=2024.12rc5
KARRIO_HTTP_PORT=5002

############
Expand Down
6 changes: 4 additions & 2 deletions docker/api/entrypoint
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

export SECRET_KEY=${SECRET_KEY:="0/zfUEetNIle3iNekk4npo4T1pLFAWOyBFgbAu0afB4="}
export ADMIN_EMAIL=${ADMIN_EMAIL:="admin@example.com"}
export ADMIN_PASSWORD=${ADMIN_PASSWORD:="demo"}

# Setup DB and static files
karrio migrate || exit
Expand All @@ -11,8 +13,8 @@ karrio collectstatic --noinput 1>/dev/null || exit
from decouple import config
from django.contrib.auth import get_user_model
if not any(get_user_model().objects.all()):
ADMIN_EMAIL = config('ADMIN_EMAIL')
ADMIN_PASSWORD = config('ADMIN_PASSWORD')
ADMIN_EMAIL = config('ADMIN_EMAIL', default="admin@example.com")
ADMIN_PASSWORD = config('ADMIN_PASSWORD', default="demo")
get_user_model().objects.create_superuser(ADMIN_EMAIL, ADMIN_PASSWORD)
" | karrio shell) || exit

Expand Down
6 changes: 4 additions & 2 deletions docker/insiders/entrypoint
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

export SECRET_KEY=${SECRET_KEY:="0/zfUEetNIle3iNekk4npo4T1pLFAWOyBFgbAu0afB4="}
export ADMIN_EMAIL=${ADMIN_EMAIL:="admin@example.com"}
export ADMIN_PASSWORD=${ADMIN_PASSWORD:="demo"}

# Setup DB and static files
karrio migrate || exit
Expand All @@ -11,8 +13,8 @@ karrio collectstatic --noinput 1>/dev/null || exit
from decouple import config
from django.contrib.auth import get_user_model
if not any(get_user_model().objects.all()):
ADMIN_EMAIL = config('ADMIN_EMAIL')
ADMIN_PASSWORD = config('ADMIN_PASSWORD')
ADMIN_EMAIL = config('ADMIN_EMAIL', default="admin@example.com")
ADMIN_PASSWORD = config('ADMIN_PASSWORD', default="demo")
get_user_model().objects.create_superuser(ADMIN_EMAIL, ADMIN_PASSWORD)
" | karrio shell) || exit

Expand Down

0 comments on commit 97d73ad

Please sign in to comment.