diff options
author | Dimitri Savineau <dsavinea@redhat.com> | 2024-03-26 19:19:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-26 19:19:51 +0100 |
commit | b44bb98c7e6f4236543c9156fe51cd955269189f (patch) | |
tree | 3e08014495ccab4c409009dc02d84eb9f7d9292b | |
parent | Fix wsrelay KeyboardInteruption not respected (#15036) (diff) | |
download | awx-b44bb98c7e6f4236543c9156fe51cd955269189f.tar.xz awx-b44bb98c7e6f4236543c9156fe51cd955269189f.zip |
Dockerfile: Fix collectstatic command (#15035)24.1.0
Recent changes in awx and/or django ansible base cause the django
collectstatic command to fail when using an empty settings file.
Instead, use the defaults settings file from controller via
DJANGO_SETTINGS_MODULE=awx.settings.defaults
[linux/amd64 builder 13/13] RUN AWX_SETTINGS_FILE=/dev/null
SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes
/var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear
Traceback (most recent call last):
(...)
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly
configured. Please supply the ENGINE value. Check settings documentation for
more details.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
-rw-r--r-- | tools/ansible/roles/dockerfile/templates/Dockerfile.j2 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 index 12e791f07d..f2538990c1 100644 --- a/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 +++ b/tools/ansible/roles/dockerfile/templates/Dockerfile.j2 @@ -90,7 +90,7 @@ WORKDIR /tmp/src/ RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz {% if not headless|bool %} -RUN AWX_SETTINGS_FILE=/dev/null SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear +RUN DJANGO_SETTINGS_MODULE=awx.settings.defaults SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear {% endif %} {% endif %} |