Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bootstrap_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,19 @@
Django settings for bootstrap_service project.
"""

import importlib
import os
from datetime import timedelta
from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
COMMON_UTILS_DIR = Path(__file__).resolve().parent.parent.parent / "django-common-utils"

spec = importlib.util.find_spec("common")
if spec and spec.submodule_search_locations:
COMMON_UTILS_DIR = Path(list(spec.submodule_search_locations)[0]).parent
else:
raise ImportError

SECRET_KEY = os.getenv(
"SECRET_KEY", "django-insecure-*$0b8ibx7uzk45cm+fxw7*jj(yzi2ye!l4+!dnyxa-u-nbuz=q"
Expand Down
2 changes: 2 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ until nc -z emqx 18083; do
done
echo "EMQX is ready"

python manage.py collectstatic --noinput

echo "Running database migrations..."
python manage.py migrate

Expand Down