.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
Percy
Percy2y ago
Project ID: 370f4ec5-bf5b-4bd2-a750-7a7d09608f92
Percy
Percy2y ago
⚠️ experimental feature
tebzito176
tebzito176OP2y ago
Project ID: 370f4ec5-bf5b-4bd2-a750-7a7d09608f92 The other issues didn't help. My app is .NET 6. Can you help @Percy ?
Adam
Adam2y ago
Percy is a bot, just fyi Please post your logs + the github repo you’re deploying from
tebzito176
tebzito176OP2y ago
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
tebzito176
tebzito176OP2y ago
Here's my dockerfile:
tebzito176
tebzito176OP2y ago
Here are the build logs
tebzito176
tebzito176OP2y ago
Lol @Adam thanks @Adam Can you help?
Adam
Adam2y ago
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
tebzito176
tebzito176OP2y ago
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?
Adam
Adam2y ago
It shouldn't be cached across deployments. Create a new commit if you're having issues both
tebzito176
tebzito176OP2y ago
Ok cool thanks @Adam Is it possible to change the directory of Start procedure from ./out -> ./app/out?
Adam
Adam2y ago
./out is a file is it not?
tebzito176
tebzito176OP2y ago
It looks like a directory
Adam
Adam2y ago
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
Want results from more Discord servers?
Add your server