tbdsux / space-custom-apps

Custom Spacefile templates for Deta Space
MIT License
22 stars 2 forks source link

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

Open im-ashar opened 1 year ago

im-ashar commented 1 year ago

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

tbdsux commented 1 year ago

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

tbdsux commented 1 year ago

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

im-ashar commented 1 year ago

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

Bro I will surely try🙌