mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Fix devel awx, awx_devel, awx_kube_devel build (#16219)
* Fix ARM64 build failure by upgrading dev container Node.js to 18 Node.js 16.13.1 fails to extract on ARM64 in Docker BuildKit's overlay filesystem during multi-arch builds. Upgrade to Node 18 which is already used by the UI builder stage and has proper ARM64 support. * Fix collectstatic failure by setting AWX_MODE=default AWX_MODE=defaults is an intentionally "invalid" environment name that: 1. Loads only defaults.py - the base settings file without any environment-specific overrides (development_defaults.py, production_defaults.py, etc.) 2. Bypasses production checks - since "production" not in "defaults", it skips the assertion that requires /etc/tower/settings.py to exist 3. Bypasses development mode - since is_development_mode would be false This is perfect for collectstatic during container build because: - No database connection needed - No secret key needed (hence SKIP_SECRET_KEY_CHECK) - No PostgreSQL version check (hence SKIP_PG_VERSION_CHECK) - Just need minimal Django settings to collect static files
This commit is contained in:
parent
cfe0b367b5
commit
d018096cae
@ -102,7 +102,11 @@ COPY --from=ui-builder /tmp/src/awx/ui/build /tmp/src/awx/ui/build
|
||||
RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz
|
||||
|
||||
{% if not headless|bool %}
|
||||
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
|
||||
RUN AWX_MODE=defaults \
|
||||
SKIP_SECRET_KEY_CHECK=yes \
|
||||
SKIP_PG_VERSION_CHECK=yes \
|
||||
AWX_SKIP_CREDENTIAL_TYPES_DISCOVER=yes \
|
||||
/var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
@ -179,7 +183,7 @@ RUN dnf -y install \
|
||||
wget \
|
||||
diffutils \
|
||||
unzip && \
|
||||
npm install -g n && n 16.13.1 && npm install -g npm@8.5.0 && dnf remove -y nodejs
|
||||
npm install -g n && n 18 && dnf remove -y nodejs
|
||||
|
||||
RUN pip3.12 install -vv git+https://github.com/coderanger/supervisor-stdout.git@973ba19967cdaf46d9c1634d1675fc65b9574f6e
|
||||
RUN pip3.12 install -vv black setuptools-scm build
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user