.NET 6 postgres container deployment crashes because of directory not found
My deployment gets built and published, but crashes when looking for the data directory for migrations. Can anyone help?
15 Replies
Project ID:
370f4ec5-bf5b-4bd2-a750-7a7d09608f92
You might find these helpful:
- i have error deployment has crashed
- Deployment Crash
- Django app continually crashes on deployment
⚠️ experimental feature
Project ID: 370f4ec5-bf5b-4bd2-a750-7a7d09608f92
The other issues didn't help. My app is .NET 6. Can you help @Percy ?
Percy is a bot, just fyi
Please post your logs + the github repo you’re deploying from
So my issue is similar to "Deployment Crash", but my deployment error is "/bin/bash: line 1: ./out/Upartna.Data: No such file or directory", but the code is in ./app/out
Here's my dockerfile:
Here are the build logs
Lol @Adam thanks
@Adam Can you help?
No, I'm not familiar with .NET apps, sorry.
Although it looks to me like you’re creating ./out in one folder and moving it over to a different folder. Could it by that by doing so you’re causing ./out to look in the incorrect location for the files it needs?
Try creating it in root
or /app, wherever you want it to run
Ok cool thanks
Are you talking about the build or publish?
How do clean the nixpacks cache? I still get the error after I change the directory
@Adam , how do you clean nixpacks cache?
It shouldn't be cached across deployments. Create a new commit if you're having issues
both
Ok cool thanks
@Adam Is it possible to change the directory of Start procedure from ./out -> ./app/out?
./out is a file is it not?
It looks like a directory
I was going off of my assumptions from C, it looks like you're right
It looks to me like all those extra lines in your Dockerfile aren't being helpful. Have you tried simplifying them?
As in delete all the mkdir, cd commands. Just dotnet build and publish