diff --git a/Dockerfile b/Dockerfile index 395ebcc9..4c1a9a66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,3 +27,6 @@ COPY requirements.txt ./ RUN LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "pip install --no-cache-dir -r requirements.txt" COPY ./ . +COPY entrypoint.sh / + +ENTRYPOINT ["/entrypoint.sh" ] diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index f03042dc..b7705e17 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -777,3 +777,9 @@ if DEBUG: from .local import * # flake8: noqa else: from .prod import * # flake8: noqa + +# Try to load dynamic configuration, if it exists +try: + from .dynamic import * # flake8: noqa +except ImportError: + pass diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 00000000..e207a457 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -uex + +cd /usr/src/app/ +cat > dynamicweb/settings/dynamic.py <