Browse Source

Fixing settings, policies and remove compression

* remove extra compression from docker image build
* move policy's and local settings to the right places

Change-Id: Ic1b27062703b9db6118d1632ff14bb0733b18adb
changes/43/425043/2
Andrey Pavlov 2 years ago
parent
commit
456add09c9
1 changed files with 10 additions and 9 deletions
  1. 10
    9
      docker/horizon/Dockerfile.j2

+ 10
- 9
docker/horizon/Dockerfile.j2 View File

@@ -12,29 +12,30 @@ RUN apt-get update \
{{ copy_sources("openstack/murano-dashboard", "/murano-dashboard") }}
{{ copy_sources("openstack/searchlight-ui", "/searchlight-ui") }}

RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d \
/var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf \
&& cp -a /sahara-dashboard/sahara_dashboard/enabled/* /horizon/openstack_dashboard/local/enabled/ \
&& cp -a /searchlight-ui/searchlight_ui/enabled/_1001_project_search_panel.py /horizon/openstack_dashboard/local/enabled/ \
&& (if [ -d /murano-dashboard/muranodashboard/conf ]; then \
cp -r /murano-dashboard/muranodashboard/conf/* /horizon/openstack_dashboard/conf/; fi) \
cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/; fi) \
&& (if [ -d /murano-dashboard/muranodashboard/local/enabled ]; then \
cp -a /murano-dashboard/muranodashboard/local/enabled/* /horizon/openstack_dashboard/local/enabled/; else \
cp /murano-dashboard/muranodashboard/local/_50_murano.py /horizon/openstack_dashboard/local/enabled/; fi) \
&& (if [-d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /horizon/openstack_dashboard/local/local_settings.d/ \
&& sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /horizon/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
&& (if [ -d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
&& sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" \
/var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
&& (if [ -f /searchlight-ui/searchlight_ui/conf/searchlight_policy.json ]; then \
cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/; fi) \
&& (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/; fi) \
cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/; fi) \
&& /var/lib/microservices/venv/bin/pip install --upgrade /horizon /sahara-dashboard /murano-dashboard /searchlight-ui \
&& useradd --user-group horizon \
&& ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
&& cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
&& cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
&& /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
&& chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
&& /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py compress --force
&& chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon

ENV PATH /var/lib/venv/bin:$PATH


Loading…
Cancel
Save