Skip to content
Snippets Groups Projects
Commit 23c1894b authored by drebs's avatar drebs
Browse files

Collect static files on weblate installation.

parent e75ab859
No related branches found
No related tags found
No related merge requests found
......@@ -72,17 +72,6 @@ COPY weblate/settings_proposed_2.10.1.py /var/lib/weblate/config/settings.py
RUN mkdir -p /var/lib/weblate/config
COPY apache/apache-vhost.conf /var/lib/weblate/config/apache-vhost.conf
# TODO: The following is necessary because Weblate's STATIC_ROOT currently
# points to /var/www/weblate/static, and there's nothing that puts
# Weblate stuff there. I need to understand why this is so.
RUN sudo -u weblate cp -r \
/usr/local/share/weblate/weblate/static/* \
/var/www/weblate/static/
# TODO: And this is necessary otherwise the admin page is ugly.
RUN sudo -u weblate cp -r \
/usr/share/python-django-common/django/contrib/admin/static/* \
/var/www/weblate/static/
# Some stuff need to be set up so the server can work succesfully (i.e. mysql,
# rsyslog, etc).
COPY docker/setup-server.sh /usr/local/sbin/
......@@ -90,8 +79,8 @@ COPY docker/setup-server.sh /usr/local/sbin/
# Install Weblate
RUN /usr/local/sbin/setup-server.sh; \
sudo -u weblate /usr/local/share/weblate/manage.py migrate --noinput; \
sudo -u weblate /usr/local/share/weblate/manage.py createadmin --password 123
sudo -u weblate /usr/local/share/weblate/manage.py createadmin --password 123; \
sudo -u weblate /usr/local/share/weblate/manage.py collectstatic --noinput
# Setup server and serve Weblate using Apache
CMD /usr/local/sbin/setup-server.sh; \
/usr/sbin/apache2ctl -D FOREGROUND
CMD /usr/local/sbin/run-server.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment