compress after collecting static files
This commit is contained in:
		
							parent
							
								
									1454b26b34
								
							
						
					
					
						commit
						b9fe93ed7a
					
				
					 3 changed files with 7 additions and 2 deletions
				
			
		|  | @ -5,6 +5,6 @@ set -o pipefail | ||||||
| set -o nounset | set -o nounset | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| python /app/manage.py compress |  | ||||||
| python /app/manage.py collectstatic --noinput | python /app/manage.py collectstatic --noinput | ||||||
|  | python /app/manage.py compress | ||||||
| /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app | /usr/local/bin/gunicorn config.wsgi --bind 0.0.0.0:5000 --chdir=/app | ||||||
|  |  | ||||||
|  | @ -142,7 +142,7 @@ STATIC_ROOT = str(ROOT_DIR("staticfiles")) | ||||||
| STATIC_URL = "/static/" | STATIC_URL = "/static/" | ||||||
| # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS | # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS | ||||||
| STATICFILES_DIRS = [str(APPS_DIR.path("static"))] | STATICFILES_DIRS = [str(APPS_DIR.path("static"))] | ||||||
| STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' | STATICFILES_STORAGE = 'schickmacher.storage.WhiteNoiseStaticFilesStorage' | ||||||
| 
 | 
 | ||||||
| # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders | # https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#staticfiles-finders | ||||||
| STATICFILES_FINDERS = [ | STATICFILES_FINDERS = [ | ||||||
|  |  | ||||||
							
								
								
									
										5
									
								
								schickmacher/storage.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								schickmacher/storage.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | from whitenoise.storage import CompressedManifestStaticFilesStorage | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | class WhiteNoiseStaticFilesStorage(CompressedManifestStaticFilesStorage): | ||||||
|  |     manifest_strict = False | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue