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
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 \
12 12
 {{ copy_sources("openstack/murano-dashboard", "/murano-dashboard") }}
13 13
 {{ copy_sources("openstack/searchlight-ui", "/searchlight-ui") }}
14 14
 
15
-RUN mkdir -p /etc/openstack-dashboard /home/horizon /var/www/cgi-bin/horizon \
15
+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 \
16
+             /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf \
16 17
     && cp -a /sahara-dashboard/sahara_dashboard/enabled/* /horizon/openstack_dashboard/local/enabled/ \
17 18
     && cp -a /searchlight-ui/searchlight_ui/enabled/_1001_project_search_panel.py /horizon/openstack_dashboard/local/enabled/ \
18 19
     && (if [ -d /murano-dashboard/muranodashboard/conf ]; then \
19
-       cp -r /murano-dashboard/muranodashboard/conf/* /horizon/openstack_dashboard/conf/; fi) \
20
+       cp -r /murano-dashboard/muranodashboard/conf/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/; fi) \
20 21
     && (if [ -d /murano-dashboard/muranodashboard/local/enabled ]; then \
21 22
         cp -a /murano-dashboard/muranodashboard/local/enabled/* /horizon/openstack_dashboard/local/enabled/; else \
22 23
         cp /murano-dashboard/muranodashboard/local/_50_murano.py /horizon/openstack_dashboard/local/enabled/;  fi) \
23
-    && (if [-d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
24
-       cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /horizon/openstack_dashboard/local/local_settings.d/ \
25
-       && sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" /horizon/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
24
+    && (if [ -d /murano-dashboard/muranodashboard/local/local_settings.d ]; then \
25
+       cp -a /murano-dashboard/muranodashboard/local/local_settings.d/* /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/ \
26
+       && sed -i "s/^SESSION_ENGINE = .*/SESSION_ENGINE = 'django.contrib.sessions.backends.cache'/g" \
27
+          /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.d/_50_murano.py; fi) \
26 28
     && (if [ -f /searchlight-ui/searchlight_ui/conf/searchlight_policy.json ]; then \
27
-        cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /horizon/openstack_dashboard/conf/; fi) \
29
+        cp -a /searchlight-ui/searchlight_ui/conf/searchlight_policy.json /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/conf/; fi) \
28 30
     && (if [ -f /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py ]; then \
29
-        cp -a /searchlight-ui/searchlight_ui/local_settings.d/_1001_search_settings.py /horizon/openstack_dashboard/local/local_settings.d/; fi) \
31
+        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) \
30 32
     && /var/lib/microservices/venv/bin/pip install --upgrade /horizon /sahara-dashboard /murano-dashboard /searchlight-ui \
31 33
     && useradd --user-group horizon \
32 34
     && ln -s /etc/openstack-dashboard/local_settings /var/lib/microservices/venv/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py \
33 35
     && cp -r /horizon/openstack_dashboard/conf/* /etc/openstack-dashboard/ \
34 36
     && cp /horizon/manage.py /var/lib/microservices/venv/bin/manage.py \
35 37
     && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py collectstatic --noinput --clear \
36
-    && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon \
37
-    && /var/lib/microservices/venv/bin/python /var/lib/microservices/venv/bin/manage.py compress --force
38
+    && chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/microservices/venv/lib/python2.7/site-packages/static /horizon
38 39
 
39 40
 ENV PATH /var/lib/venv/bin:$PATH
40 41
 

Loading…
Cancel
Save