R
Join ServerRailway
✋|help
gunicorn command not found
/bin/bash: line 1: gunicorn: command not found
I think this is the ID: L 4ce7919
I think this is the ID: L 4ce7919
where can i find the ID
Project id: 60924221-1310-40a7-a13f-8a11aa10025f
I have it to my requirements.txt
gunicorn==20.1.0
gunicorn==20.1.0
and it looks like i cant use this option? https://railway.app/changelog/2022-11-11-multiple-provider-support#multiple-provider-support-priority-boarding
and add python as an provider because i no where see this option"
and add python as an provider because i no where see this option"
Project ID: 60924221-1310-40a7-a13f-8a11aa10025f
/beta
Is your project repository public?
No
i am searching for that provider screenshot in the app
Okay. With python projects you should not need to setup a provider. Are you using Django or Flask?
so i can add python
Django
then i came here because of the mysql error, but chatgtp fixed it haha now i got the unicorn error
Try adding this
Just make sure you rename the
railway.json
file to the root of your repository{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn mysite.wsgi",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
Just make sure you rename the
my site.wsgi
line to reflect your projects wsgi fileOkay thanks
I do it now and let ya know:)
I host Django apps on Railway all the time and have not had to do anything with providers
Okay cool i just say that in an other ticket
is the $ a typo or?
is the $ a typo or?
$schema
Its deploying now so lets see:D
No, it is not a typo
vscode gets crazy by it haha
so under the build i get the error: /bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
/bin/bash: line 1: gunicorn: command not found
so i think it will crash agian
Okay, is your requirements.txt file in the root of your repository?
yes
an just updated it with freeze
unicorn is in there
It’s optimal if your project is laid out like this https://github.com/railwayapp-templates/Django
This has been tested and is a working configuration for railway
oke no procfile needed i made a procfile
web: gunicorn seoapi.wsgi --log-file -
is in there
Yes, no procfile.
oke lets delete that
The team has deprecated support for procfiles a while ago
so i have the wsgi one layer deeper and my manage.py also
okay
so i add automaticly the folder name app/ python: can't open file '/app/manage.py':
If your manage.py file is in the folder
app
you should be referencing it like this ./app/manage.py
I got no app folder
I hate to say it, but it would be easier to assist if you were able to share your repo. But I understand the need for private repos
Ye and it not only my code, so i need to ask that first takes time ect
For now i am back to my first error:
#11 11.84 Collecting mysqlclient==2.1.1
#11 11.84 Using cached mysqlclient-2.1.1.tar.gz (88 kB)
#11 11.87 Preparing metadata (setup.py): started
#11 12.22 Preparing metadata (setup.py): finished with status 'error'
#11 12.23 error: subprocess-exited-with-error
#11 12.23
#11 12.23 × python setup.py egg_info did not run successfully.
#11 12.23 │ exit code: 1
#11 12.23 ╰─> [18 lines of output]
#11 12.23 mysql_config --version
#11 11.84 Collecting mysqlclient==2.1.1
#11 11.84 Using cached mysqlclient-2.1.1.tar.gz (88 kB)
#11 11.87 Preparing metadata (setup.py): started
#11 12.22 Preparing metadata (setup.py): finished with status 'error'
#11 12.23 error: subprocess-exited-with-error
#11 12.23
#11 12.23 × python setup.py egg_info did not run successfully.
#11 12.23 │ exit code: 1
#11 12.23 ╰─> [18 lines of output]
#11 12.23 mysql_config --version
okay slow down
let's get something out of the way first
send the table at the very start of the build logs please
==============
Using Nixpacks
==============
context: 4d8484ab189e5e588ae4dc9905876955
╔═══════════════════════════════ Nixpacks v1.5.1 ══════════════════════════════╗
║ setup │ python311, postgresql, gcc ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ python -m venv /opt/venv && . /opt/venv/bin/activate && pip ║
║ │ install -r requirements.txt ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ python /app/seoapi/manage.py migrate && python ║
║ │ /app/seoapi/manage.py collectstatic --noinput && gunicorn ║
║ │ seoapi/seoapi.wsgi ║
╚══════════════════════════════════════════════════════════════════════════════╝
Using Nixpacks
==============
context: 4d8484ab189e5e588ae4dc9905876955
╔═══════════════════════════════ Nixpacks v1.5.1 ══════════════════════════════╗
║ setup │ python311, postgresql, gcc ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ python -m venv /opt/venv && . /opt/venv/bin/activate && pip ║
║ │ install -r requirements.txt ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ python /app/seoapi/manage.py migrate && python ║
║ │ /app/seoapi/manage.py collectstatic --noinput && gunicorn ║
║ │ seoapi/seoapi.wsgi ║
╚══════════════════════════════════════════════════════════════════════════════╝
okay we are on the python provider
I am very slow i got all the time ahahand prob i did
wrong first time i work with your service:D
wrong first time i work with your service:D
send your requirements.txt please
Ye one moment
rrequirements.txt
you pip freezed your entire system
hmm i did not think so but i will redo it in my env
is your project using all those packages?
I just did it agian and i got 70 agian
Most of them i recognize as a yes.
are you using a virtual environment?
yes
interesting, you can see why I thought you pip freezed your entire system though right?
because it are alot?
i am not sure bro 😛
it sure is a lot
You can tell me everything haha
I'm looking at the list but I can't see gunicorn in the list?
it was there for sure today maybe i changed so many to get it work it got lost now let me check
line 28
its there
it fails on the mysql i did follow all the steps in my opinion
text search does not find gunicorn
frozenlist==1.3.3
gunicorn==20.1.0
idna==3.4
Jinja2==3.1.2
gunicorn==20.1.0
idna==3.4
Jinja2==3.1.2
its there now for sure
burt got same error
what database adapter do you use with django?
its deploys fine if i delete mysqlclient==2.1.1
atm i use xamp with localhost
I setup mysql in railway, and the migration should do the rest right?
I setup mysql in railway, and the migration should do the rest right?
i connected it with the variables
ah okay so you do indeed need the mysqlclient
yes but when the i check the build log i see it fail right there
okay progress
so i tested it without the package and it deploys fine ofc it wont work
send the full build logs please
but for testing it out i must be the package
this part are you looking for
#11 11.84 Collecting mysqlclient==2.1.1
#11 11.84 Using cached mysqlclient-2.1.1.tar.gz (88 kB)
#11 11.87 Preparing metadata (setup.py): started
#11 12.22 Preparing metadata (setup.py): finished with status 'error'
#11 12.23 error: subprocess-exited-with-error
#11 12.23
#11 12.23 × python setup.py egg_info did not run successfully.
#11 12.23 │ exit code: 1
#11 12.23 ╰─> [18 lines of output]
#11 12.23 mysql_config --version
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mysql_config: command not found
#11 12.23 mariadb_config --version
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mariadb_config: command not found
#11 12.23 mysql_config --libs
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mysql_config: command not found
#11 12.23 Traceback (most recent call last):
#11 12.23 File "<string>", line 2, in <module>
#11 12.23 File "<pip-setuptools-caller>", line 34, in <module>
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup.py", line 15, in <module>
#11 12.23 metadata, options = get_config()
#11 12.23 ^^^^^^^^^^^^
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup_posix.py", line 70, in get_config
#11 12.23 libs = mysql_config("libs")
#11 12.23 ^^^^^^^^^^^^^^^^^^^^
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup_posix.py", line 31, in mysql_config
#11 12.23 raise OSError("{} not found".format(_mysql_config_path))
#11 12.23 OSError: mysql_config not found
#11 12.23 [end of output]
#11 12.23
#11 11.84 Collecting mysqlclient==2.1.1
#11 11.84 Using cached mysqlclient-2.1.1.tar.gz (88 kB)
#11 11.87 Preparing metadata (setup.py): started
#11 12.22 Preparing metadata (setup.py): finished with status 'error'
#11 12.23 error: subprocess-exited-with-error
#11 12.23
#11 12.23 × python setup.py egg_info did not run successfully.
#11 12.23 │ exit code: 1
#11 12.23 ╰─> [18 lines of output]
#11 12.23 mysql_config --version
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mysql_config: command not found
#11 12.23 mariadb_config --version
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mariadb_config: command not found
#11 12.23 mysql_config --libs
#11 12.23 /nix/store/4xw8n979xpivdc46a9ndcvyhwgif00hz-bash-5.1-p16/bin/sh: line 1: mysql_config: command not found
#11 12.23 Traceback (most recent call last):
#11 12.23 File "<string>", line 2, in <module>
#11 12.23 File "<pip-setuptools-caller>", line 34, in <module>
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup.py", line 15, in <module>
#11 12.23 metadata, options = get_config()
#11 12.23 ^^^^^^^^^^^^
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup_posix.py", line 70, in get_config
#11 12.23 libs = mysql_config("libs")
#11 12.23 ^^^^^^^^^^^^^^^^^^^^
#11 12.23 File "/tmp/pip-install-e_7h03j6/mysqlclient_552f355f69174fcbb7a378a05825b188/setup_posix.py", line 31, in mysql_config
#11 12.23 raise OSError("{} not found".format(_mysql_config_path))
#11 12.23 OSError: mysql_config not found
#11 12.23 [end of output]
#11 12.23
I'm actually looking for the full build logs please, not just one section
ye you got it
also, did you have a railway.json file? if so, send that over too please
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "python /seoapi/manage.py migrate && python /seoapi/manage.py collectstatic --noinput && gunicorn seoapi/seoapi.wsgi",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS"
},
"deploy": {
"startCommand": "python /seoapi/manage.py migrate && python /seoapi/manage.py collectstatic --noinput && gunicorn seoapi/seoapi.wsgi",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
1. in the service settings, set the root directory to
2. replace your railway.json file with this
/seoapi
(cancel the re-deploy popup)2. replace your railway.json file with this
{
"$schema": "https://railway.app/railway.schema.json",
"build": {
"builder": "NIXPACKS",
"nixpacksPlan": {
"phases": {
"setup": {
"nixPkgs": ["...", "mysql80"]
}
}
}
},
"deploy": {
"startCommand": "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn seoapi.wsgi",
"restartPolicyType": "ON_FAILURE",
"restartPolicyMaxRetries": 10
}
}
==============
Using Nixpacks
==============
context: 4d8484ab189e5e588ae4dc9905876955
Nixpacks build failed
Nixpacks was unable to generate a build plan for this app.
Please check the documentation for supported languages: https://nixpacks.com
The contents of the app directory are:
staticfiles/
.env
blogmanager/
users/
manage.py
seoapi/
templates/
Using Nixpacks
==============
context: 4d8484ab189e5e588ae4dc9905876955
Nixpacks build failed
Nixpacks was unable to generate a build plan for this app.
Please check the documentation for supported languages: https://nixpacks.com
The contents of the app directory are:
staticfiles/
.env
blogmanager/
users/
manage.py
seoapi/
templates/
you are very bad at following directions
Why?
I just did what u said
step 1