deploiement 3
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
parent
3b96126e7d
commit
0875452004
@ -1,17 +1,22 @@
|
||||
# Étape de base avec l'image runtime ASP.NET
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
# Étape de build pour publier l'application
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
||||
# Étape 1 : Build de l'application
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Copier les fichiers de solution et restaurer les dépendances
|
||||
COPY WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj ./WF-WebAdmin/WF-WebAdmin/
|
||||
RUN dotnet restore ./WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj
|
||||
|
||||
# Copier tout le reste et publier
|
||||
COPY . .
|
||||
RUN dotnet restore "WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj"
|
||||
RUN dotnet publish "WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj" -c Release -o /app/publish
|
||||
RUN dotnet publish ./WF-WebAdmin/WF-WebAdmin/WF-WebAdmin.csproj -c Release -o /app/publish
|
||||
|
||||
# Étape finale : copie des fichiers publiés et définition du point d'entrée
|
||||
FROM base AS final
|
||||
# Étape 2 : Image runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/publish .
|
||||
|
||||
# Exposer le port utilisé par l'application
|
||||
EXPOSE 5000
|
||||
|
||||
# Lancer l'application
|
||||
ENTRYPOINT ["dotnet", "WF-WebAdmin.dll"]
|
||||
|
Loading…
Reference in new issue