"Application Failed to Respond" error when using docker to build
My dockerfile works on my local machine but after deploying to Railway, it seems there might be something wrong with the port? I am still really new to production environments and am having trouble configuring my Dockerfile for a Django production environment that utilizes outside packages not compatible with Nixpacks. Here's what I have in my Dockerfile:
18 Replies
Project ID:
c81346b6-183a-4331-af52-bc960a6108bf
c81346b6-183a-4331-af52-bc960a6108bf
use this dockerfile instead
replace
mysite
with the name of the folder that contains the wsgi.py
file.
make sure you have gunicorn
in your requirements.txt
file.Tysm! what exactly does WORKDIR need to refer to? the folder that holds the Dockerfile? or the main app?
it sets the work directory within the image, has nothing to do with the project itself, but its where the project or project files will be copied into
ohh perfect thank you so much. building the updates now!
did you replace
mysite
?yes I did
thanks for your help! you're a god on here. will let you know if there's any problems! the app takes a while to build because of the huge volume of texlive-full 🥲
sounds good
I got the exact same error ahhh
deploy logs please https://bookmarklets.up.railway.app/log-downloader/
Here's the build log:
do you have a start command set in the service settings?
hmmm no
would that be in .wgsi file?
actually so sorry I do have a start command in my railway.json file
railway.json:
yeah that will overwrite the
CMD
directive in the Dockerfilehmm okay should I take out the startCommand line in that?
in the railway.json* ^
Okay thank you so much!! I took out that line and it is working now 🙂
i mean it wasnt working with that line either lol
but now that im thinking about it, you do want the migrate and collectstatic stuff, so please restore your railway.json to what you sent me.
then run the
manage.py makemigrations
command locally and try to redeploy