-
Notifications
You must be signed in to change notification settings - Fork 165
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
Add static #65
Add static #65
Conversation
Note that this PR is part of my efforts at creating a k8s version of this, which requires a |
Hey Phil 👋 Thanks for your efforts here. From what I understand, you're having a similar issue to #51 in that you'd like to serve static files using another webserver, and need to put these files somewhere. You were pretty close with the command, but the script you actually want to run is
I think we'd be reluctant to vendor these files as part of the repository itself, as they're somewhat dynamic and liable to change (especially if a user customises them), and vendoring would mean we'd need an extra step on every PR to make sure we keep files in sync. As for a static Docker container in the In #57 we moved the docker-compose setup into a |
100% of what I'm doing is trying to "productionise" this, so anything you do to make that possible I'll be extremely excited to hear about. I don't mind if this PR isn't accepted, but putting what you wrote into the docs so no-one else has to spend 3hr collecting assets from the demo app by examining page source would be kind! And also, giving an example of how to generate a static container would also be kind. Basically, I wish this PR had existed Friday of last week for me to steal ideas from. Finally,
|
Ah, Python 2 vs 3. Still, in 3...
So, basically, same problem as running Django directly. It can't figure out |
As I've said above, at some point we'll be writing some docs with guidance for deploying to production, and the ideas you've got here are useful 👍 However in future I'd definitely suggest raising a Github issue with problems like these first - that way we can discuss the approach before committing to any potentially wasted work.
Hmm, that's probably worth documenting too - we're consciously only supporting Python 3.6 for the moment (the new
|
I'm going to close this anyhow. If you have any more trouble setting things up, please raise an issue and I'll get back to you 🙂 |
I had to run the demo and just randomly go to various pages, examine source, and pull out any CSS, JS, or PNG assets I found. I couldn't list directories, so couldn't get an exhaustive list.
This was after I spent a few hours trying to figure out how to make Django collect static assets. I could never succeed in that. Some Django doc claimed if I did
django-admin collectstatic
(or something like that) it'd do it.So I installed Django, ran the command, and couldn't get past finally:
There is also obviously nothing about collecting static resources in that list of commands.