a year ago
when I try to deploy Django I got this error :
/bin/bash: line 1: python: command not found
15 Replies
a year ago
Yes, I have
a year ago
I got this file from template that i buy, It is included by default, I think it include everything
a year ago
I'd need to see the code to be able to advise on a path forward here, otherwise I'm just left guessing.
a year ago
which file you need to see? package-lock.json ? or additional files?
a year ago
I would like to see the entire repo to get a good understanding of what is going on.
a year ago
now the error :
/usr/local/lib/python3.11/site-packages/environ/environ.py:628: UserWarning: /app/velzon/.env doesn't exist - if you're not configuring your environment separately, create one.
i have .env under my site folder and in setting.py:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': env('MYSQLDATABASE'), 'USER': env('MYSQLUSER'),
'PASSWORD': env('MYSQLPASSWORD'), 'HOST': env('MYSQLHOST'),
'PORT': env('MYSQL_PORT'),
}
}
and i copy content of .env and pasted on railway Variables
but still the site : Application failed to respond
my repo : https://github.com/lehyanis/django
a year ago
You wouldn't want to be using an .env file when deploying to Railway as all environment variables should be set via the service variables.
a year ago
I delete this repo and create other one with gitignore and shared MySQL variables to django but still i have same error:
/usr/local/lib/python3.11/site-packages/environ/environ.py:628: UserWarning: /app/velzon/.env doesn't exist - if you're not configuring your environment separately, create one.
in setting i use :
import environ
env = environ.Env()
environ.Env.readenv() DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': env('MYSQLDATABASE'),
'USER': env('MYSQLUSER'), 'PASSWORD': env('MYSQLPASSWORD'),
'HOST': env('MYSQLHOST'), 'PORT': env('MYSQLPORT'),
}
}
in railway the variables :
MYSQLUSER MYSQLPASSWORD
MYSQLHOST MYSQLPORT
MYSQL_DATABASE
a year ago
You wouldn't want to be using an .env file when deploying to Railway as all environment variables should be set via the service variables.
a year ago
in the repo there is no .env file and the deploying was done without it also I update the Railway environment with MySQL variables, so where the is the issues ?
brody
Your code is looking for an .env file.
4 months ago
hello, i'm experiencing this same issue "command not found". i tried all configurations, no luck. hope you can help me. thanks
ielo1
hello, i'm experiencing this same issue "command not found". i tried all configurations, no luck. hope you can help me. thanks
4 months ago
Please open your own thread.