Skip to content

Commit

Permalink
Merge pull request #2242 from Situphen/static-versioning
Browse files Browse the repository at this point in the history
Versionne les fichiers statiques en production
  • Loading branch information
SpaceFox committed Feb 7, 2015
2 parents 42eeae4 + a2120c1 commit 9b8955b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ source ../bin/activate
pip install --upgrade --use-mirrors -r requirements.txt
python manage.py migrate
python manage.py compilemessages
# Collect all static files from dist/ and python packages to static/
python manage.py collectstatic --noinput
# Collect all staticfiles from dist/ and python packages to static/
python manage.py collectstatic --noinput --clear
deactivate

# Restart zds
Expand Down
13 changes: 13 additions & 0 deletions update.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,16 @@ npm
Lancer la commande `npm -v` et voir le résultat. Si le résultat est 1.x.x, lancer la commande `sudo npm install -g npm`.

Faire pointer nginx sur `static/` au lieu de `dist/`.


Actions à faire pour mettre en prod la version : v1.6
=====================================================

Issue #1724
-----------

Rajouter cette ligne dans le fichier `zds/settings_prod.py` pour versionner les fichier statiques :

```python
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.CachedStaticFilesStorage"
```

0 comments on commit 9b8955b

Please sign in to comment.