tbdsux/space-custom-apps

Can You Provide Tutorial On How I Can Write Spacefile For ASP.NET App?

im-ashar opened this issue · 3 comments

Hi Bro,
I really liked your work. I need a little bit of help. I am new to deta space and having problems writing spacefile for dotnet web apps.

I am sharing my Dockerfile for your help.

Docker File:

`
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["MoviesMafia.csproj", "."]
RUN dotnet restore "./MoviesMafia.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "MoviesMafia.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "MoviesMafia.csproj" -c Release -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MoviesMafia.dll"]
`

Waiting for your reply

For now, I don't think its possible to deploy an ASP.net project to Deta Space. Will try to see in future...

Hello @im-ashar , can you please check this pull (#4 ) if it works on your case

Hello @im-ashar , can you please check this pull (#4 ) if it works on your case

Bro I will surely try🙌