Question

How do I deploy my Mezzanine site?

  • Posted on December 22, 2014
  • jpaskarukAsked by jpaskaruk

I have a working blog site running on Mezzanine in the development server.

I’ve been attempting to piece together how I switch this to an nginx/gunicorn, but there doesn’t seem to be a complete tutorial for this.

If there is a tutorial that explains how to deploy a Mezzanine site using the one-click Django droplet, that would also be fine. As it is, I’m attempting to set it up on an Ubuntu server.

This tutorial purports to explain the process, but has some serious gaps:

https://www.digitalocean.com/community/tutorials/how-to-install-and-get-started-with-django-based-mezzanine-cms-on-ubuntu

For starters, it does not touch installing the Database backend, or configuring it in the Django app. I “solved” this by using sqlite, but that is not a workable production solution, as I understand it.

Further, the tutorial only takes you as far as setting up the dev server.

It then passes you off to this document:

https://www.digitalocean.com/community/tutorials/how-to-set-up-ubuntu-cloud-servers-for-python-web-applications

…which contains a “Hello World,” but does not explain how to deploy a Mezzanine/Django site on DigitalOcean, which is currently what I’m trying to do.

Can someone help with this? I’m at jpaskaruk@gmail.com.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Mezzanine projects should come with a fabfile.py that will automate setting up a stanadrd Nginx/Gunicorn/Postgres stack using using Fabric. Check out the Mezzanine docs.

You’ll need to add some server specific configurable variables in the project’s settings.py module. Here’s an example:

FABRIC = {
    "SSH_USER": "", # SSH username for host deploying to
    "HOSTS": ALLOWED_HOSTS[:1], # List of hosts to deploy to (eg, first host)
    "DOMAINS": ALLOWED_HOSTS, # Domains for public site
    "REPO_URL": "ssh://hg@bitbucket.org/user/project", # Project's repo URL
    "VIRTUALENV_HOME":  "", # Absolute remote path for virtualenvs
    "PROJECT_NAME": "", # Unique identifier for project
    "REQUIREMENTS_PATH": "requirements.txt", # Project's pip requirements
    "GUNICORN_PORT": 8000, # Port gunicorn will listen on
    "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8"
    "DB_PASS": "", # Live database password
    "ADMIN_PASS": "", # Live admin user password
    "SECRET_KEY": SECRET_KEY,
    "NEVERCACHE_KEY": NEVERCACHE_KEY,
}