Skip to content

How to deploy

This is how we deploy

This page describes how the main instance is deployed, and is mainly meant as a way to share the knowledge. You can obviously do things differently.


"La chariotte" uses different domains:

  •, the docs you are reading now. It's handled by
  •, the main instance. It's deployed on Alwaysdata
  •, our blog. It's a static website deployed on Gitlab pages.

The main instance

Alwaysdata, our hosting provider

Alwaysdata offers a free plan for open source projects, which we are using for the main instance of la chariotte.

Thanks to them for supporting open source!

Getting access

To get access, you'll need to generate an ssh keypair, and give your public key to a known admin.


This will generate a private a public key. You need to share the public key. On unix systems, it's stored under ~/.ssh/ by default.

Connecting to ssh

Once your key is generated and you're known to the server, you can connect there.


Configuration file

The chariotte application is run by uwsgi, managed by AlwaysData.

The production settings are stored in ~/ la_chariotte/, and the secrets are defined in the admin console.

Here are the settings, with some comments that might be useful.
SECRET_KEY = "YOUR SECRET KEY HERE, used to hash the passwords. CHANGE IT."

# We're connecting to a psql server, AD manages the access and the backups.
    "default": {
        "ENGINE": "django.db.backends.postgresql",
        "NAME": "chariotte_prod",
        "USER": "chariotte_prod",
        "PASSWORD": "",
        "HOST": "host",

DEBUG = False

# We're sending mails using AD infrastructure
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

    "DJANGO_DEFAULT_FROM_EMAIL", "La Chariotte <>"


# We're collecting the static files on this specific folder.
STATIC_ROOT = "/home/chariotte/static/"

We're using sentry ( to be alerted when an error happens on the server
import sentry_sdk

    dsn="PUT YOUR DSN HERE",
    # Set traces_sample_rate to 1.0 to capture 100%
    # of transactions for performance monitoring.
    # Set profiles_sample_rate to 1.0 to profile 100%
    # of sampled transactions.
    # We recommend adjusting this value in production.

The different sites

In the AD console, here are the defined sites:

  •, redirecting to
  •, hosting the static files, it just serves the collected static files stored in /static/
  •, the main website, defined in the next section is configured as a Python WSGI app:

  • application path: /la_chariotte/la_chariotte/
  • working directory: /la_chariotte
  • venv location: /venv

Environment variables:


How to deploy

To deploy a new version, we'll need to:

  • get the new code
  • update the database
  • collect the static files
  • restart the daemon

Here's how:

# Activate the venv
source venv/bin/activate
cd la_chariotte

# Get the code
git fetch
git checkout tag # if we're using a tag, otherwise, just checkout the main branch
pip install -e .
npm install

python migrate --settings=prod_settings
python compilescss --settings=prod_settings
python collectstatic --settings=prod_settings

Then you'll need to restart the server from AD's interface.

What about SSL certificates?

The SSL certificates are issued directly by AlwaysData (they use [Let's Encrypt] ( behind the scenes)


Mails are hosted by alwaysdata, as part of their opensource plan.