diff --git a/docs/admin/config.rst b/docs/admin/config.rst index b3337ccfb562..a0210958bdc2 100644 --- a/docs/admin/config.rst +++ b/docs/admin/config.rst @@ -278,6 +278,17 @@ network filesystem. The Docker container uses a separate volume for this, see :ref:`docker-volume`. +The following subdirectories usually exist: + +:file:`fonts` + :program:`font-config` cache for :ref:`fonts`. +:file:`avatar` + Cached user avatars, see :ref:`avatars`. +:file:`static` + Default location for static Django files, specified by :setting:`django:STATIC_ROOT`. See :ref:`static-files`. +:file:`tesseract` + OCR trained data for :ref:`screenshots`. + .. setting:: CSP_SCRIPT_SRC .. setting:: CSP_IMG_SRC .. setting:: CSP_CONNECT_SRC @@ -404,10 +415,6 @@ The following subdirectories usually exist: Home directory used for invoking scripts. :file:`ssh` SSH keys and configuration. -:file:`static` - Default location for static Django files, specified by :setting:`django:STATIC_ROOT`. See :ref:`static-files`. - - The Docker container uses a separate volume for this, see :ref:`docker-volume`. :file:`media` Default location for Django media files, specified by :setting:`django:MEDIA_ROOT`. Contains uploaded screenshots, see :ref:`screenshots`. :file:`vcs` diff --git a/docs/admin/install.rst b/docs/admin/install.rst index 4a26d0570bf8..f71ed14af753 100644 --- a/docs/admin/install.rst +++ b/docs/admin/install.rst @@ -1215,14 +1215,14 @@ Serving static files Django needs to collect its static files in a single directory. To do so, execute :samp:`weblate collectstatic --noinput`. This will copy the static files into a directory specified by the :setting:`django:STATIC_ROOT` setting (this defaults to -a ``static`` directory inside :setting:`DATA_DIR`). +a ``static`` directory inside :setting:`CACHE_DIR`). It is recommended to serve static files directly from your web server, you should use that for the following paths: :file:`/static/` Serves static files for Weblate and the admin interface - (from defined by ``STATIC_ROOT``). + (from defined by :setting:`django:STATIC_ROOT`). :file:`/media/` Used for user media uploads (e.g. screenshots). :file:`/favicon.ico` diff --git a/docs/changes/v4.rst b/docs/changes/v4.rst index f8a20530938e..a188c7424818 100644 --- a/docs/changes/v4.rst +++ b/docs/changes/v4.rst @@ -175,6 +175,7 @@ Please follow :ref:`generic-upgrade-instructions` in order to perform update. * The deprecated VCS setting for credentials is no longer supported, see :ref:`up-4-14`. * Upgrade of `django-crispy-forms` requires changes in :setting:`django:INSTALLED_APPS`. * Integration of `django-cors-headers` requires changes in :setting:`django:INSTALLED_APPS` and :setting:`django:MIDDLEWARE`. +* Introduction of :setting:`CACHE_DIR` changed default value of :setting:`django:STATIC_ROOT`. You might need to adjust :ref:`static-files` accordingly. Weblate 4.15.2 -------------- diff --git a/weblate/examples/apache-path.conf b/weblate/examples/apache-path.conf index 93ec9043537c..4b1de3a7cc64 100644 --- a/weblate/examples/apache-path.conf +++ b/weblate/examples/apache-path.conf @@ -18,11 +18,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /weblate/favicon.ico /home/weblate/data/static/favicon.ico + Alias /weblate/favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /weblate/static/ /home/weblate/data/static/ - + Alias /weblate/static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/apache.conf b/weblate/examples/apache.conf index de59024c081e..11383454f418 100644 --- a/weblate/examples/apache.conf +++ b/weblate/examples/apache.conf @@ -14,11 +14,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /favicon.ico /home/weblate/data/static/favicon.ico + Alias /favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /static/ /home/weblate/data/static/ - + Alias /static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/apache.gunicorn.conf b/weblate/examples/apache.gunicorn.conf index 2c5f04611e60..b2157b3a479a 100644 --- a/weblate/examples/apache.gunicorn.conf +++ b/weblate/examples/apache.gunicorn.conf @@ -13,11 +13,11 @@ ServerName weblate.example.org # DATA_DIR/static/favicon.ico - Alias /favicon.ico /home/weblate/data/static/favicon.ico + Alias /favicon.ico /home/weblate/data/cache/static/favicon.ico # DATA_DIR/static/ - Alias /static/ /home/weblate/data/static/ - + Alias /static/ /home/weblate/data/cache/static/ + Require all granted diff --git a/weblate/examples/weblate.nginx.conf b/weblate/examples/weblate.nginx.conf index 5271311a7f67..23f58505794b 100644 --- a/weblate/examples/weblate.nginx.conf +++ b/weblate/examples/weblate.nginx.conf @@ -17,13 +17,13 @@ server { location ~ ^/favicon.ico$ { # DATA_DIR/static/favicon.ico - alias /home/weblate/data/static/favicon.ico; + alias /home/weblate/data/cache/static/favicon.ico; expires 30d; } location /static/ { # DATA_DIR/static/ - alias /home/weblate/data/static/; + alias /home/weblate/data/cache/static/; expires 30d; }