Can't find port

I use django and can't use the public port, why I set port in 8000
No description
No description
No description
No description
11 Replies
Percy
Percy10mo ago
Project ID: 7907c068-57d6-4b57-a092-d05420c72c2a
LJ/Full Stack Dev
LJ/Full Stack DevOP10mo ago
7907c068-57d6-4b57-a092-d05420c72c2a
Brody
Brody10mo ago
you are using a development server, this is not fit to run on railway, so let's get you using something better. please add gunicorn to your requirements.txt file. what is the name of the folder that contains your wsgi.py file?
LJ/Full Stack Dev
LJ/Full Stack DevOP10mo ago
yes, I have in my core setting
Brody
Brody10mo ago
do you mean core folder?
LJ/Full Stack Dev
LJ/Full Stack DevOP10mo ago
JH_RestAPI wsgi is in this
Brody
Brody10mo ago
please add gunicorn to your requirements.txt file.
LJ/Full Stack Dev
LJ/Full Stack DevOP10mo ago
OK, I add to pyproject.toml
Brody
Brody10mo ago
ah yeah thats good to add this railway.json file to your project
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn JH_RestAPI.wsgi"
}
}
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"deploy": {
"startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn JH_RestAPI.wsgi"
}
}
LJ/Full Stack Dev
LJ/Full Stack DevOP10mo ago
THX, it can deploy successful
Brody
Brody10mo ago
happy to help
Want results from more Discord servers?
Add your server