Moving from WebFaction

I need to move a django app from WebFaction. There are two domains using the same code, each is its own 'app' in WebFaction parlance. Each talks to its own database schema (MySQL).

The code is the same, so for updates I'd go to the local copy of the repo and fetch/pull and then rsync into each apps directory:

webapps/
copy1/django app with unique local_settings.py
copy2/identical code with unique local_settings.py

And this app is old enough (first added in 2008) I'm using apache.

It seems like this is the time to move to nginx and uWSGI/gunicorn.

My google-fu gets me close, but most of what I find assume multi-tenant (same database) using the sites framework or some such.

This stack overflow feels like the closest to what I need.
https://stackoverflow.com/questions/48419372/how-to-run-multi-domainname-in-one-django-with-nginx-and-uwsgi

The default linode django installer page doesn't clarify exactly what gets installed, but I'm thinking start with that and start tweaking.

Any feedback or pointers would be welcome.

1 Reply

Hi @leehinde

As you're moving from another provider to Linode, I first wanted to provide you with some of our guides on migrating to Linode. These provide more general information to consider when changing providers, although I wanted to include these resources just in case.

Our Django One-Click App from the Marketplace simply installs Django along with Python. You can see exactly what's installed with this One-Click App by navigating here. Please note you'll need to be logged into your Cloud Manager account to view the previous link. Here's our Django One-Click App guide as well.

The One-Click Apps from the Marketplace use Debian 10 as the distribution. We do have a guide for uWSGI and Nginx for Debian 6. Please keep in mind that that this guide is deprecated and no longer being maintained, however this may help point you in the right direction in configuring your Linode with these services.

I reviewed the Stack Overflow post you linked and agree that it does provide good information, albeit for hosting multiple sites rather than multiple database instances, in configuring the server block with Nginx. This post from the Community Questions site on hosting multiple websites from a single Linode links to the server block section in our 'How to Configure Nginx' guide.

I was able to find some official documentation from Django on using multiple databases, I'm not sure if this is the exact information you're looking for, but I wanted to pass it along nonetheless.

I hope you find this information helpful!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct