CodeForPhilly / prevention-point

Current Functional Product
MIT License
30 stars 15 forks source link

Configure Django production env #442

Open MikeyManoguerra opened 3 years ago

MikeyManoguerra commented 3 years ago

use djangos deploy checklist https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/

note we are on django 2

FlipperPA commented 3 years ago

Hey @MikeyManoguerra! The Django deployment docs are intentionally vague, since there are so many ways to skin that particular cat. That checklist is a good starting point, but there's a lot more that can be done as well.

Do you have a target destination for deployment? Digital Ocean, Divio, AWS?

For most small-to-mid sized projects, I've just used Digital Ocean. Philly AA runs on a $5 / month Droplet, and it is much more straightforward and maintainable than getting into a cloud ecosystem like Azure or AWS. I created an Ansible playbook for fully setting up a Digital Ocean droplet for hosting Django with gunicorn and Apache: https://github.com/FlipperPA/ansible-ubuntu20-python3-django

If you want some support as well, I can highly recommend the team at CodeRed: https://www.codered.cloud/

They're Django specialists, and if you don't feel like running Gunicorn or uWSGI with nginx or Apache, and would like someone to call if things go wrong who really know what they're doing, they start at $25 / month.

FlipperPA commented 3 years ago

(PS: I wish I had more time to pitch in to this project, but my free cycles go to my volunteer work for recovery meeting technology over here: https://github.com/code4recovery/)

MikeyManoguerra commented 3 years ago

Any insight would be welcome, but there is no expectation! We have some dev-ops people working on getting this project into a linode kubrenetes cluster (i think that's what they are doing). I just want to make sure we satisfy django deploy things from an application server perspective, and let people who know what they are doing do the other stuff.