-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support building on S3 vs just publishing #95
Comments
I have never considered this model. The standard assumption is that a newbie developer will build locally and push to s3, a use case that can handle most one-off and simple sites. Our more complex deployment scheme at the LA Times Data Desk handles this by having the TravisCI buildbot do the building and S3 syncing. A GitHub hook triggers the job there. Travis pulls the repo, builds the pages, and syncs the HTML with S3. If you've got another model in mind, I'm of course open to it. |
Well the model in mind was that the production code would only be served in AWS lambda functions and the production database would only be accessible inside the AWS environment. Lambda functions don't really have filesystems that can be used for writing hence the need to allow them to write to S3. The reason to host the site publicly would be to allow multiple people to create content through the admin. I don't really want to run additional servers or processes but I guess I could spin up a docker container or allow my local machine (or build server) to access the DB to build and publish. The challenge with that approach then is being able to react to realtime changes with celery tasks. |
I'm totally open to expanding the library to better support Lambda. I just don't have the personal expertise with that platform to have a clear idea of how to approach it. |
OK, good to know. I'm probably going to start with another route like just building somewhere else but if I feel inspired I'll put something together for building on S3 and let you know. |
Is there any reason why django bakery shouldn't support building on S3 as well as publishing? I was trying to deploy this on a serverless architecture using https://github.com/Miserlou/Zappa but hit a snag when I realized that building required a local file system.
I'm thinking about adding support for this but wanted to get input first. My idea was to have settings specify a build bucket and a publish bucket and then update all code that writes to the file system to write to a S3 bucket.
As far as code design seems like you'd then want some sort of file system backend to be able to do this. Was thinking about trying to use django storages but that might be a little too much plus it introduces another dependency.
The text was updated successfully, but these errors were encountered: