aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2024-02-08 13:34:31 +0000
committerGerrit Code Review <review@openstack.org>2024-02-08 13:34:31 +0000
commit9ad6332b1390ca2ec93ab70c5c23ad61ad4c2b02 (patch)
treecf4ef97b0ad175762e8ae68cc190589e0839d9dd /docker
parent410fafa8f0b3487d0bb1737d0f6965bc9cbcacb9 (diff)
parentfde9264e66882fea6e4e6d1e4e01339e04ec1a68 (diff)
downloadkolla-9ad6332b1390ca2ec93ab70c5c23ad61ad4c2b02.tar.gz
kolla-9ad6332b1390ca2ec93ab70c5c23ad61ad4c2b02.zip
Merge "Rework horizon image to support local_settings.d"
Diffstat (limited to 'docker')
-rw-r--r--docker/horizon/Dockerfile.j212
1 files changed, 11 insertions, 1 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index 70f64548f..cec72a177 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -46,12 +46,22 @@ ADD plugins-archive /
COPY extend_start.sh /usr/local/bin/kolla_extend_start
# NOTE(hrw): to install horizon from unpacked sources we cannot have it in upper-constraints.txt
+# NOTE(kevko): This dance with local settings python paths below is needed
+# because we are using different distros with different python version and we need to
+# know to which path symlink should point to.
RUN ln -s horizon-source/* horizon \
&& {{ macros.upper_constraints_remove("horizon") }} \
&& {{ macros.install_pip(horizon_pip_packages | customizable("pip_packages")) }} \
&& mkdir -p /etc/openstack-dashboard \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
- && cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \
+ && cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings.py \
+ && local_settings=$(python -c 'import os;import openstack_dashboard;settings=os.path.dirname(openstack_dashboard.__file__) + "/local/local_settings.py";print(settings);') \
+ && rm -f $local_settings \
+ && ln -s /etc/openstack-dashboard/local_settings.py $local_settings \
+ && mkdir -p /etc/openstack-dashboard/local_settings.d \
+ && local_settings_d=$(python -c 'import os;import openstack_dashboard;settings_d=os.path.dirname(openstack_dashboard.__file__) + "/local/local_settings.d";print(settings_d);') \
+ && rm -rf $local_settings_d \
+ && ln -s /etc/openstack-dashboard/local_settings.d $local_settings_d \
&& cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \
&& if [ "$(ls /plugins)" ]; then \
{{ macros.install_pip(horizon_plugins_pip_packages) }}; \