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