aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-05-23 16:41:43 +0000
committerGerrit Code Review <review@openstack.org>2016-05-23 16:41:44 +0000
commit6d047e5c3159d774f24b9b74489b6d5497d67904 (patch)
tree7f2ac1c8c73da2e1488e1b2a32aff4a892787a20 /docker
parentfdca053c350ca7880186df2d1ffad72bdeb02d32 (diff)
parent669d735ae87ce3d0f70ddf9a7bb54a5d4ba81ca5 (diff)
downloadkolla-6d047e5c3159d774f24b9b74489b6d5497d67904.tar.gz
kolla-6d047e5c3159d774f24b9b74489b6d5497d67904.zip
Merge "Compile the messages in the horizon"
Diffstat (limited to 'docker')
-rw-r--r--docker/horizon/Dockerfile.j214
1 files changed, 12 insertions, 2 deletions
diff --git a/docker/horizon/Dockerfile.j2 b/docker/horizon/Dockerfile.j2
index f1e8e4f3c..94a7962e3 100644
--- a/docker/horizon/Dockerfile.j2
+++ b/docker/horizon/Dockerfile.j2
@@ -8,6 +8,7 @@ RUN yum -y install \
openstack-dashboard \
httpd \
mod_wsgi \
+ gettext \
&& yum clean all \
&& useradd --user-group horizon \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf \
@@ -18,7 +19,9 @@ RUN yum -y install \
RUN sed -i "s|WEBROOT = '/dashboard/'|WEBROOT = '/'|" /etc/openstack-dashboard/local_settings \
&& cp /usr/share/openstack-dashboard/manage.py /usr/bin/manage.py \
- && /usr/bin/python /usr/bin/manage.py collectstatic --noinput --clear
+ && /usr/bin/python /usr/bin/manage.py collectstatic --noinput --clear \
+ && (cd /usr/lib/python2.7/site-packages/horizon && /usr/bin/python /usr/bin/manage.py compilemessages) \
+ && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages)
{% elif base_distro in ['ubuntu'] %}
@@ -26,6 +29,7 @@ RUN apt-get install -y --no-install-recommends \
openstack-dashboard \
apache2 \
libapache2-mod-wsgi \
+ gettext \
&& echo > /etc/apache2/ports.conf \
&& apt-get clean \
&& ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load
@@ -40,7 +44,9 @@ RUN cp /usr/share/openstack-dashboard/openstack_dashboard/conf/*.json /etc/opens
&& rm /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py \
&& ln -s /etc/openstack-dashboard/local_settings /usr/share/openstack-dashboard/openstack_dashboard/local/local_settings.py \
&& ln -s /usr/share/openstack-dashboard/openstack_dashboard /usr/lib/python2.7/site-packages/openstack_dashboard \
- && ln -s /usr/share/openstack-dashboard/static /usr/lib/python2.7/site-packages/static
+ && ln -s /usr/share/openstack-dashboard/static /usr/lib/python2.7/site-packages/static \
+ && (cd /usr/lib/python2.7/site-packages/horizon && /usr/bin/python /usr/bin/manage.py compilemessages) \
+ && (cd /usr/lib/python2.7/site-packages/openstack_dashboard && /usr/bin/python /usr/bin/manage.py compilemessages)
{% endif %}
{% elif install_type == 'source' %}
@@ -49,6 +55,7 @@ RUN cp /usr/share/openstack-dashboard/openstack_dashboard/conf/*.json /etc/opens
RUN yum install -y \
httpd \
mod_wsgi \
+ gettext \
&& yum clean all \
&& sed -i -r 's,^(Listen 80),#\1,' /etc/httpd/conf/httpd.conf
@@ -57,6 +64,7 @@ RUN yum install -y \
RUN apt-get install -y --no-install-recommends \
apache2 \
libapache2-mod-wsgi \
+ gettext \
&& echo > /etc/apache2/ports.conf \
&& apt-get clean \
&& ln -s ../mods-available/headers.load /etc/apache2/mods-enabled/headers.load
@@ -73,6 +81,8 @@ RUN ln -s horizon-source/* horizon \
&& cp /horizon/openstack_dashboard/local/local_settings.py.example /etc/openstack-dashboard/local_settings \
&& cp /horizon/manage.py /var/lib/kolla/venv/bin/manage.py \
&& /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py collectstatic --noinput --clear \
+ && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/horizon && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \
+ && (cd /var/lib/kolla/venv/lib/python2.7/site-packages/openstack_dashboard && /var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py compilemessages) \
&& chown -R horizon: /etc/openstack-dashboard /home/horizon /var/lib/kolla/venv/lib/python2.7/site-packages/static
{% endif %}