41
loading...
This website collects cookies to deliver better user experience
settings.py
file, or wherever you have ALLOWED_HOSTS
defined, and add the domain used in the previous step to the list of allowed hosts.ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'c2lbzu22oxujfgnr2848.cleaver.rocks']
armgitaar/django-helloworld
to the repo and keep branch as master
.from django.core.management.commands.runserver import Command as runserver
runserver.default_port = os.environ.get('PORT', 8000)
8000
and the above configuration will first check what the environment port is and will select that port if available.manage.py
and Arguments to runserver
."interpreter": "/usr/bin/python3",
"instances": "max",
"exec_mode": "cluster_mode",
{
"name": "your.domain.com",
"script": "manage.py",
"args": "runserver",
"log_type": "json",
"cwd": "/home/cleavr/your.domain.com/current",
"interpreter": "/usr/bin/python3",
"env": {
"PORT": assigned port number,
"CI": 1,
}
}
pip install -r requirements.txt
python3 manage.py migrate
python3 manage.py createsuperuser --username admin --email [email protected]