-
Notifications
You must be signed in to change notification settings - Fork 363
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
[Migrated] Getting GeoDjango Working #392
Comments
Update for 2021. The neatest, lightest way I could find was to use these layers (these are minimalist and conveniently supplied in all aws regions which is not the case for geolambda). Concretely: zappa_settings.json
settings.py:
To find where the library paths to put in zappa_settings.json actually are:
|
thanks for this, only difference for me was that I had to set |
Update for 2023 - IMO the best way to deploy GeoDjango with Zappa is via a custom Docker image. This knocks the socks off previous solutions. See #967 and https://ianwhitestone.work/zappa-serverless-docker/. For example (there are lots of ways to do this but this worked for me): Dockerfile
settings.py (in this exact case)
|
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed. |
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue. |
Originally from: Miserlou/Zappa#985 by bahoo
Update September 2019: This issue + comment originally laid out a proposal to make project directory a configurable setting in Zappa, as a way of getting GeoDjango to work more seamlessly in Zappa across different projects. I've found a better solution to my original problem, laid out in a comment below, but I'm going to leave this issue as-is in case it offers guidance for someone else with a similar issue. Mods / maintainer folks, if you've got better solutions for next steps / what to do with this ticket, I'm all ears. 👍
A suggestion: make the project directory a configurable option within a stage.
Context
Following davepretty's comment on Slack for getting GeoDjango working, I hardcoded the rpath in one of my libraries I needed.
To make this approach more re-usable for future GeoDjango / Zappa projects, I thought that having the option for a consistent path for the project directory would be helpful. Then, future projects can use the same library files, specify the same path (something generic like
/tmp/code/
in my case) and Bob's your uncle.Currently, Zappa uses
/tmp/{0!s}'.format(self.settings.PROJECT_NAME)
which a good and fine default for most cases, but being able to use the same directory across different projects would be more portable.Possible Fix
I've made this change in a branch, here: https://github.com/bahoo/Zappa/commits/specify_project_directory
Your Environment
pip freeze
:zappa_settings.py
:The text was updated successfully, but these errors were encountered: