diff --git a/codeforlife/app.py b/codeforlife/app.py index 963dd5a..b46cf1f 100644 --- a/codeforlife/app.py +++ b/codeforlife/app.py @@ -6,6 +6,7 @@ import multiprocessing import typing as t +from django.core.management import call_command from gunicorn.app.base import BaseApplication # type: ignore[import-untyped] @@ -19,6 +20,8 @@ class StandaloneApplication(BaseApplication): """ def __init__(self, app: t.Callable): + call_command("migrate", interactive=False) + self.options = { "bind": "0.0.0.0:8080", # https://docs.gunicorn.org/en/stable/design.html#how-many-workers