From 65692330c130049fbb83a3bafd2fa08ee0460b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <git@imaniti.org> Date: Tue, 18 Apr 2023 23:04:09 +0200 Subject: [PATCH] add run.sh --- run.sh | 10 ++++++++++ ucebnice/wsgi.py | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 run.sh diff --git a/run.sh b/run.sh new file mode 100644 index 0000000..35f9c53 --- /dev/null +++ b/run.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# exit on error +set -e + +# Migrate database +python manage.py migrate + +# Start webserver +exec gunicorn -c gunicorn.conf.py ucebnice.wsgi diff --git a/ucebnice/wsgi.py b/ucebnice/wsgi.py index bf93aed..c699493 100644 --- a/ucebnice/wsgi.py +++ b/ucebnice/wsgi.py @@ -1,5 +1,5 @@ """ -WSGI config for registry project. +WSGI config for the ucebnice project. It exposes the WSGI callable as a module-level variable named ``application``. @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "registry.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ucebnice.settings.production") application = get_wsgi_application() -- GitLab