Error: Docker build failed

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