From a1764d7143e1cee272e7db75934bc65887a1152a Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 18 Aug 2020 08:45:49 +0200 Subject: [PATCH] Move collected staticfiles to other dir --- .gitignore | 2 +- blog/settings.py | 2 +- docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index ae9d7f6..b7b79d2 100644 --- a/.gitignore +++ b/.gitignore @@ -272,4 +272,4 @@ dmypy.json # End of https://www.toptal.com/developers/gitignore/api/osx,pycharm,python .idea -static/ +staticfiles/ diff --git a/blog/settings.py b/blog/settings.py index d68e737..dd21303 100644 --- a/blog/settings.py +++ b/blog/settings.py @@ -130,7 +130,7 @@ USE_TZ = True # https://docs.djangoproject.com/en/3.1/howto/static-files/ STATIC_URL = "/static/" -STATIC_ROOT = BASE_DIR / "static" +STATIC_ROOT = BASE_DIR / "staticfiles" if TESTING: # ManifestStaticFilesStorage requires collectstatic to be run # and collectstatic is not run for tests diff --git a/docker-compose.yml b/docker-compose.yml index a8a6763..faf6e0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,6 @@ services: volumes: - ./db:/db # - /srv/blog/db:/db - - ./static:/app/static + - ./static:/app/staticfiles # - /srv/blog/static:/app/static restart: on-failure