Deploy Django to Nodion

Deploying a Flask application is straight-forward. We have a native Python environment, you can specify the Python version in the nodion.yml file, as well as some other settings. You can run pip install -r requirements.txt as build_command if you have a requirements.txt file. You can also specify a path to a bash script to keep the build_command clean. Afterwards you can start your Flask app with the start_command.

Example nodion.yml for Django applications

  env: python
  build_command: poetry install && python collectstatic && python migrate
  start_command: gunicorn app:app
  port: 8000

Example nodion.yml with a Bash script as build_command

  env: python
  build_command: ./
  start_command: gunicorn django.wsgi:application

The file could look like this

#!/usr/bin/env bash

poetry install
python collectstatic
python migrate