-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange staticfiles behaviour #765
Comments
@kousu I never looked at collectstatic but I doubt if it still works as we have been using gulp for quite a while. I'll let you know. |
Thanks @lingxiaoyang; I think it should be perfectly reproducible if you start from a fresh checkout and run with the production settings
|
@kousu yes, we have a bug there! I will look into it. |
@kousu this bug has been fixed in PR #775
Then add the hostname "souschef.santropolroulant.org" in your /etc/hosts Note: The Hostname http://souschef.santropolroulant.org/ could be changed in the docker-compose.prod.yml I'm closing this issue, you could reopen it if you find any problems. |
I just tried putting sous-chef up again using
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
, which runs/bin/bash -c "cd tools/gulp && npm install && gulp && cd ../../src && python manage.py collectstatic --noinput && /usr/local/bin/gunicorn sous_chef.wsgi:application -w 2 -b :8000
. Strangely, this did not create the staticfiles properly; for example http://localhost:8000/static/images/logo-souschef-coul.png was 404'ing.I re-ran
docker-compose exec web "cd tools/gulp && npm install && gulp"
and then it worked.There are three copies of the static files:
I think, but haven't fully tested yet, that
src/frontend
is the source folder,src/static
is made bycollectstatic
, andsrc/sous_chef/static/
is made by gulp and is the one generated by gulp, and furthermore perhapscollectstatic
is erasing it, which meansgulp && cd ../../src && python manage.py collectstatic --noinput
should rather bepython manage.py collectstatic --noinput && cd ../tools/gulp && gulp
or maybe even justgulp
.Does anyone know what's going on here? The behaviour is very inconsistent and confusing.
The text was updated successfully, but these errors were encountered: