Figure out how to run collectstatic
in the build process
#17
Comments
Does PR#21/22 solve this? (added collectstatic in cloudbuild.yaml) |
In CPHO, I experimented with a few approaches to this. A number of them worked, but ultimately had to make The biggest constraint was that I was specifically keeping the production env file ( The I didn't investigate this too deeply (the problem disappears when Note: for any project not using whitenoise, the static files need to be served from a separate CDN. We'll probably want to try and standardize on one approach or the other, because that means additional infrastructure and probably a different set of issues like this to deal with. |
Closing, addressed in CPHO |
It's common for Django libraries to include static files (html/css/js/images) which then need to be "collected" into a public folder for that library to work properly.
Graphene Django does exactly this: it includes the web based GraphQL IDE GraphiQL.
Typically GraphiQL would be available at
/graphql
but without runningmanage.py collectstatic
step in the build process, loading/graphql
will produce a404
.Django's build process depends on many environmental variables that might not be known at build time.
We'll need to figure out a way (or a convention) for successfully building Django apps that include these static files.
The text was updated successfully, but these errors were encountered: