Error: Docker build failed
Deployment id:- 4fd045c7-ba05-4851-96e6-458e0541bb2b
Trying to deploy a flask app and iam facing this issue while deploying.
74 Replies
Project ID:
4fd045c7-ba05-4851-96e6-458e0541bb2b
build logs please https://bookmarklets.up.railway.app/log-downloader/
@Brody here is the build logs
please remove all pip based commands that you have set yourself
k
@Brody getting error no start command found
Error: No start command could be found
put your start command back please
please remove all pip based commands that you have set yourself
latest error logs after adding the build command @Brody
@Brody removed all except the build command
no need for the pings, we are the only two here
here is my custom build command pip install gunicorn && pip install -r requirements.txt && python -m pip install pywin32 && gunicorn templates.app:app
please remove all pip based commands that you have set yourself
ok, what should i set for the build command
why do you think you need a build command?
otherwise iam getting module error build command not found if not specified
first time deploying so i don't have much knowledge
you are getting errors regardless, please remove all pip based commands that you have set yourself
you need a start command
what should i specify, iam unaware as iam new to it
please help me out
as mentioned before, no pip based commands please, that would leave you with
gunicorn templates.app:app
k brody its in process
okay good, next step
add this nixpacks.toml file to your project
k
after adding the .toml file
these logs dont indicate that you added the nixpacks.toml file
please show me how/where you added the file
is that the correct repo
Yes brody
did you push to the correct branch
yes brody
do you want the repo info ?
yes
GitHub
GitHub - chiragpattanaik/flask-api-test
Contribute to chiragpattanaik/flask-api-test development by creating an account on GitHub.
Brody is there any issue with repo or the file ?
im checking
k
what do you have the root directory set to in the service settings?
service settings of the railway?
yes
its not set to anything
what does the providers section say?
python
show me the source settings?
delete the service and deploy it again
k
failed again
i suggest moving to
mysql-connector-python
insteadu mean the code changes in my repo ?
that's what iam using
import mysql.connector as connection in my code it mentioned
GitHub
flask-api-test/requirements.txt at master · chiragpattanaik/flask-a...
Contribute to chiragpattanaik/flask-api-test development by creating an account on GitHub.
line 24 has it
yes but you are also installing the unneeded packages
are u suggesting me to remove that ?
because iam bit confuse
yes of course
is it deployed now ?
indeed
that's the same screenshot?
idk why the ss its coming like this
what are you trying to show me?
[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
the deploy logs
yes that's the same text that's in your screenshot
what's my api link then ?
how i will find that
please read that blue banner
please look at the blue banner
ok cool got it
thanks brody'
no problem
Thanks for all the help and support very much appericiated
Brody the api is not working it seems
while trying to call via postman its not giving the expected result as it was showing running on my local
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
oh k
thanks once again