Having issue deploying for the first time with Dockerfile
Hey! I just deployed my application successfully and the instance logs say it is running on port 8000 (which I get locally too so it is working as expected).
But when I go to the domain I setup -- https://api.wriggly.io/ -- I get the following message "Application error: a client-side exception has occurred (see the browser console for more information)."
This is my deploymentID 456ea53
Additionally, is this potentially an issue with my Dockerfile? I know when I run the dockerfile locally I run
docker run -p 8000:8000 {containername} to map it to the external port 8000. does that matter?
18 Replies
Project ID:
cccc72dc-c205-4c79-80cb-eb2f054ee9d1
You might find these helpful:
- Error when using QUERY MYSQL
- MySQL database return wrong time (+7, my current timezone is GMT+7)
⚠️ experimental feature
Project ID: cccc72dc-c205-4c79-80cb-eb2f054ee9d1
you want your app to listen on $PORT not 8000
oh got it
do I configure this in environment variables?
also since my dockerfile sets it up to run on port 8000 will I need to update my dockerfile to read this var ?
send the dockerfile?
one sec
thats broken
logs look good though
i know
oh got it -- what looks wrong ?
few things
you are using the root as the workdir
you want
WORKDIR /app
remove the EXPOSE
and in app.js have it listen on process.env.PORT || 8000
ok trying to deploy this
thank you
Cool my new std out is
looks good
wow this is working
thanks so much for all the help here!!!
🙌
you've changed the workdir right?
uhhh this is the new docker file
I need to make some requests against the service to ensure it works but it looks correct
looks good enough to me