Browse Source

Move collected staticfiles to other dir

pull/2/head
Gabriel Augendre 2 years ago
parent
commit
a1764d7143
  1. 2
      .gitignore
  2. 2
      blog/settings.py
  3. 2
      docker-compose.yml

2
.gitignore vendored

@ -272,4 +272,4 @@ dmypy.json
# End of https://www.toptal.com/developers/gitignore/api/osx,pycharm,python
.idea
static/
staticfiles/

2
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

2
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

Loading…
Cancel
Save