space-custom-apps icon indicating copy to clipboard operation
space-custom-apps copied to clipboard

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

Open im-ashar opened this issue 2 years ago • 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

im-ashar avatar Mar 17 '23 21:03 im-ashar

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

tbdsux avatar Mar 18 '23 01:03 tbdsux

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

tbdsux avatar Apr 01 '23 15:04 tbdsux

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

Bro I will surely try🙌

im-ashar avatar Apr 01 '23 16:04 im-ashar