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
.
nodion:
env: python
build_command: poetry install && python manage.py collectstatic && python manage.py migrate
start_command: gunicorn app:app
port: 8000
nodion:
env: python
build_command: ./deploy.sh
start_command: gunicorn django.wsgi:application
#!/usr/bin/env bash
poetry install
python manage.py collectstatic
python manage.py migrate