-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix docker-compose setup #711
Conversation
@@ -155,6 +155,10 @@ | |||
] | |||
STATICFILES_STORAGE = "whitenoise.django.CompressedManifestStaticFilesStorage" | |||
|
|||
# TODO: Fix the missing manifest issues. This is a workaround. | |||
# https://github.com/cardinalitypuzzles/cardboard/issues/712 | |||
WHITENOISE_MANIFEST_STRICT = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should probably just leave this alone, the collectstatic
change should almost certainly fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, if I remove this, I still see the ValueError: Missing staticfiles manifest entry for 'favicon.ico'
message at run time. So I think there's a couple layers to this problem:
- Actually generating static files and associated paths, which was covered by
collectstatic
. - Configuring the manifest correctly. I'm not sure how to debug that bit, but turning off
WHITENOISE_MANIFEST_STRICT
does seem to workaround it until we properly fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To unblock devs, I think we should submit this workaround, but then try to fix the manifest issue ASAP. I'm happy to keep digging into it for #712 (can add it to MITMH 2024 milestone and assign myself), unless you have other ideas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I think the problem is that you need to run collectstatic
on your machine. If you're saying that the docker change doesn't actually fix that for you, then we should undo the docker change, although I'm surprised that isn't enough--did you restart the container?
In any case, when the container is running, you can also run docker-compose exec web python manage.py collectstatic
to run collectstatic manually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well I think the problem is that you need to run collectstatic on your machine.
I'm fairly certain that this is only half of the problem (item 1 in my comment earlier).
If you're saying that the docker change doesn't actually fix that for you, then we should undo the docker change, although I'm surprised that isn't enough--did you restart the container?
I tested each change in isolation (making sure to stop, prune, and restart containers each time) and found that we need both changes to avoid the issue.
But in any case, it looks like @kcaze found the proper fix for item 2 in #715, so we can close this PR and merge that one.
See #715 |
The
docker-compose
workflow seems broken without these updates.