Skip to content

Commit b44bb98

Browse files
authored
Dockerfile: Fix collectstatic command (#15035)
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>
1 parent 8cafdf0 commit b44bb98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/ansible/roles/dockerfile/templates/Dockerfile.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ WORKDIR /tmp/src/
9090
RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz
9191

9292
{% if not headless|bool %}
93-
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
93+
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
9494
{% endif %}
9595

9696
{% endif %}

0 commit comments

Comments
 (0)