Skip to content
This repository was archived by the owner on Sep 18, 2024. It is now read-only.
This repository was archived by the owner on Sep 18, 2024. It is now read-only.

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

@im-ashar

Description

@im-ashar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions