Error: Docker build failed
Anonymous
TRIALOP

2 years ago

Deployment id:- 4fd045c7-ba05-4851-96e6-458e0541bb2b

Trying to deploy a flask app and iam facing this issue while deploying.

96 Replies

2 years ago

build logs please


Anonymous
TRIALOP

2 years ago

<@539512869780455445> here is the build logs


Anonymous
TRIALOP

2 years ago


2 years ago

please remove all pip based commands that you have set yourself


Anonymous
TRIALOP

2 years ago

k


Anonymous
TRIALOP

2 years ago

<@539512869780455445> getting error no start command found


Anonymous
TRIALOP

2 years ago

Error: No start command could be found


2 years ago

put your start command back please


Anonymous
TRIALOP

2 years ago


2 years ago

please remove all pip based commands that you have set yourself


Anonymous
TRIALOP

2 years ago

latest error logs after adding the build command <@539512869780455445>


Anonymous
TRIALOP

2 years ago

<@539512869780455445> removed all except the build command


2 years ago

no need for the pings, we are the only two here


Anonymous
TRIALOP

2 years ago

here is my custom build command pip install gunicorn && pip install -r requirements.txt && python -m pip install pywin32 && gunicorn templates.app:app


2 years ago

please remove all pip based commands that you have set yourself


Anonymous
TRIALOP

2 years ago

ok, what should i set for the build command


2 years ago

why do you think you need a build command?


Anonymous
TRIALOP

2 years ago

otherwise iam getting module error build command not found if not specified


Anonymous
TRIALOP

2 years ago

first time deploying so i don't have much knowledge


2 years ago

you are getting errors regardless, please remove all pip based commands that you have set yourself


Anonymous
TRIALOP

2 years ago


2 years ago

you need a start command


Anonymous
TRIALOP

2 years ago

what should i specify, iam unaware as iam new to it


Anonymous
TRIALOP

2 years ago

please help me out


2 years ago

as mentioned before, no pip based commands please, that would leave you with gunicorn templates.app:app


Anonymous
TRIALOP

2 years ago

k brody its in process


Anonymous
TRIALOP

2 years ago


2 years ago

okay good, next step


2 years ago

add this nixpacks.toml file to your project

[phases.setup]
    aptPkgs = ['...', 'python3-dev', 'default-libmysqlclient-dev', 'build-essential', 'pkg-config']

Anonymous
TRIALOP

2 years ago

k


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

after adding the .toml file


2 years ago

these logs dont indicate that you added the nixpacks.toml file


2 years ago

please show me how/where you added the file


Anonymous
TRIALOP

2 years ago


2 years ago

is that the correct repo


Anonymous
TRIALOP

2 years ago

Yes brody


2 years ago

did you push to the correct branch


Anonymous
TRIALOP

2 years ago

yes brody


Anonymous
TRIALOP

2 years ago

do you want the repo info ?


2 years ago

yes



Anonymous
TRIALOP

2 years ago

Brody is there any issue with repo or the file ?


2 years ago

im checking


Anonymous
TRIALOP

2 years ago

k


2 years ago

what do you have the root directory set to in the service settings?


Anonymous
TRIALOP

2 years ago

service settings of the railway?


2 years ago

yes


Anonymous
TRIALOP

2 years ago

its not set to anything


2 years ago

what does the providers section say?


Anonymous
TRIALOP

2 years ago

python


Anonymous
TRIALOP

2 years ago


2 years ago

show me the source settings?


Anonymous
TRIALOP

2 years ago


2 years ago

delete the service and deploy it again


Anonymous
TRIALOP

2 years ago

k


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

failed again


Anonymous
TRIALOP

2 years ago


2 years ago

i suggest moving to mysql-connector-python instead


Anonymous
TRIALOP

2 years ago

u mean the code changes in my repo ?


Anonymous
TRIALOP

2 years ago

that's what iam using


2 years ago

you are not using mysql-connector-python


Anonymous
TRIALOP

2 years ago

import mysql.connector as connection in my code it mentioned


2 years ago



Anonymous
TRIALOP

2 years ago

line 24 has it


2 years ago

yes but you are also installing the unneeded packages


Anonymous
TRIALOP

2 years ago

are u suggesting me to remove that ?


Anonymous
TRIALOP

2 years ago

because iam bit confuse


2 years ago

yes of course


Anonymous
TRIALOP

2 years ago


Anonymous
TRIALOP

2 years ago

is it deployed now ?


2 years ago

indeed


Anonymous
TRIALOP

2 years ago


2 years ago

that's the same screenshot?


Anonymous
TRIALOP

2 years ago

idk why the ss its coming like this


Anonymous
TRIALOP

2 years ago


2 years ago

what are you trying to show me?


Anonymous
TRIALOP

2 years ago

[2024-02-24 06:20:54 +0000] [7] [INFO] Starting gunicorn 19.7.1

[2024-02-24 06:20:54 +0000] [7] [INFO] Listening at: http://0.0.0.0:6797 (7)

[2024-02-24 06:20:54 +0000] [7] [INFO] Using worker: sync

/root/.nix-profile/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used

return io.open(fd, *args, **kwargs)

[2024-02-24 06:20:54 +0000] [11] [INFO] Booting worker with pid: 11


Anonymous
TRIALOP

2 years ago

the deploy logs


2 years ago

yes that's the same text that's in your screenshot


Anonymous
TRIALOP

2 years ago

what's my api link then ?


Anonymous
TRIALOP

2 years ago

how i will find that


2 years ago

please read that blue banner


Anonymous
TRIALOP

2 years ago


2 years ago

please look at the blue banner


Anonymous
TRIALOP

2 years ago

ok cool got it


Anonymous
TRIALOP

2 years ago

thanks brody'


2 years ago

no problem


Anonymous
TRIALOP

2 years ago

Thanks for all the help and support very much appericiated


Anonymous
TRIALOP

2 years ago

Brody the api is not working it seems


Anonymous
TRIALOP

2 years ago

while trying to call via postman its not giving the expected result as it was showing running on my local


2 years ago

because your code is trying to connect to a database that you have running locally, you need to run a database on railway and have your code connect to that instead


Anonymous
TRIALOP

2 years ago

oh k


Anonymous
TRIALOP

2 years ago

thanks once again


Loading...