gunicorn command not found

Ssyrax5/25/2023
/bin/bash: line 1: gunicorn: command not found

I think this is the ID: L 4ce7919
Ssyrax5/25/2023
where can i find the ID
Ssyrax5/25/2023
Project id: 60924221-1310-40a7-a13f-8a11aa10025f
Ssyrax5/25/2023
I have it to my requirements.txt

gunicorn==20.1.0
Ssyrax5/25/2023
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"
Ssyrax5/25/2023
Project ID: 60924221-1310-40a7-a13f-8a11aa10025f
Ssyrax5/25/2023
/beta
MMantisInABox5/25/2023
Is your project repository public?
Ssyrax5/25/2023
No
Ssyrax5/25/2023
i am searching for that provider screenshot in the app
MMantisInABox5/25/2023
Okay. With python projects you should not need to setup a provider. Are you using Django or Flask?
Ssyrax5/25/2023
so i can add python
Ssyrax5/25/2023
Django
Ssyrax5/25/2023
then i came here because of the mysql error, but chatgtp fixed it haha now i got the unicorn error
MMantisInABox5/25/2023
Try adding this 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 file
Ssyrax5/25/2023
Okay thanks
Ssyrax5/25/2023
I do it now and let ya know:)
MMantisInABox5/25/2023
I host Django apps on Railway all the time and have not had to do anything with providers
Ssyrax5/25/2023
Okay cool i just say that in an other ticket

is the $ a typo or?
Ssyrax5/25/2023
$schema
Ssyrax5/25/2023
Its deploying now so lets see:D
MMantisInABox5/25/2023
No, it is not a typo
Ssyrax5/25/2023
vscode gets crazy by it haha
Ssyrax5/25/2023
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
Ssyrax5/25/2023
so i think it will crash agian
MMantisInABox5/25/2023
Okay, is your requirements.txt file in the root of your repository?
Ssyrax5/25/2023
yes
Ssyrax5/25/2023
an just updated it with freeze
Ssyrax5/25/2023
unicorn is in there
MMantisInABox5/25/2023
It’s optimal if your project is laid out like this https://github.com/railwayapp-templates/Django
MMantisInABox5/25/2023
This has been tested and is a working configuration for railway
Ssyrax5/25/2023
oke no procfile needed i made a procfile
Ssyrax5/25/2023
web: gunicorn seoapi.wsgi --log-file -
Ssyrax5/25/2023
is in there
MMantisInABox5/25/2023
Yes, no procfile.
Ssyrax5/25/2023
oke lets delete that
MMantisInABox5/25/2023
The team has deprecated support for procfiles a while ago
Ssyrax5/25/2023
so i have the wsgi one layer deeper and my manage.py also
Ssyrax5/25/2023
okay
Ssyrax5/25/2023
so i add automaticly the folder name app/ python: can't open file '/app/manage.py':
MMantisInABox5/25/2023
If your manage.py file is in the folder app you should be referencing it like this ./app/manage.py
Ssyrax5/25/2023
I got no app folder
MMantisInABox5/25/2023
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
Ssyrax5/25/2023
Ye and it not only my code, so i need to ask that first takes time ect
Ssyrax5/25/2023
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
Bbrody5/25/2023
okay slow down
Bbrody5/25/2023
let's get something out of the way first
Bbrody5/25/2023
send the table at the very start of the build logs please
Ssyrax5/25/2023
==============
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 ║
╚══════════════════════════════════════════════════════════════════════════════╝
Bbrody5/25/2023
okay we are on the python provider
Ssyrax5/25/2023
I am very slow i got all the time ahahand prob i did
wrong first time i work with your service:D
Bbrody5/25/2023
send your requirements.txt please
Ssyrax5/25/2023
Ye one moment
Ssyrax5/25/2023
rrequirements.txt
Bbrody5/25/2023
you pip freezed your entire system
Ssyrax5/25/2023
hmm i did not think so but i will redo it in my env
Bbrody5/25/2023
is your project using all those packages?
Ssyrax5/25/2023
I just did it agian and i got 70 agian
Ssyrax5/25/2023
Most of them i recognize as a yes.
Bbrody5/25/2023
are you using a virtual environment?
Ssyrax5/25/2023
yes
Bbrody5/25/2023
interesting, you can see why I thought you pip freezed your entire system though right?
Ssyrax5/25/2023
because it are alot?
Ssyrax5/25/2023
i am not sure bro 😛
Bbrody5/25/2023
it sure is a lot
Ssyrax5/25/2023
You can tell me everything haha
Bbrody5/25/2023
I'm looking at the list but I can't see gunicorn in the list?
Ssyrax5/25/2023
it was there for sure today maybe i changed so many to get it work it got lost now let me check
Ssyrax5/25/2023
line 28
Ssyrax5/25/2023
its there
Ssyrax5/25/2023
it fails on the mysql i did follow all the steps in my opinion
Bbrody5/25/2023
Bbrody5/25/2023
text search does not find gunicorn
Ssyrax5/25/2023
frozenlist==1.3.3
gunicorn==20.1.0
idna==3.4
Jinja2==3.1.2
Ssyrax5/25/2023
its there now for sure
Ssyrax5/25/2023
burt got same error
Bbrody5/25/2023
what database adapter do you use with django?
Ssyrax5/25/2023
its deploys fine if i delete mysqlclient==2.1.1
Ssyrax5/25/2023
atm i use xamp with localhost

I setup mysql in railway, and the migration should do the rest right?
Ssyrax5/25/2023
i connected it with the variables
Bbrody5/25/2023
ah okay so you do indeed need the mysqlclient
Ssyrax5/25/2023
yes but when the i check the build log i see it fail right there
Bbrody5/25/2023
okay progress
Ssyrax5/25/2023
so i tested it without the package and it deploys fine ofc it wont work
Bbrody5/25/2023
send the full build logs please
Ssyrax5/25/2023
but for testing it out i must be the package
Ssyrax5/25/2023
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
Bbrody5/25/2023
I'm actually looking for the full build logs please, not just one section
Ssyrax5/25/2023
ye you got it
Bbrody5/25/2023
also, did you have a railway.json file? if so, send that over too please
Ssyrax5/25/2023
{
"$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
}
}
Bbrody5/25/2023
1. in the service settings, set the root directory to /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
  }
}
Ssyrax5/25/2023
==============
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/
Bbrody5/25/2023
you are very bad at following directions
Ssyrax5/25/2023
Why?
Ssyrax5/25/2023
I just did what u said
Bbrody5/25/2023
step 1