Merge branch 'main' of https://git.inex-project.net/sabo/LibraryWeb
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,26 +1,30 @@
|
|||||||
|
|
||||||
# Build stage
|
# Build stage
|
||||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN dotnet restore LibraryWeb.csproj
|
RUN dotnet restore LibraryWeb.csproj
|
||||||
RUN dotnet publish -c Release -o /app/publish --no-restore
|
RUN dotnet publish LibraryWeb.csproj -c Release -o /app/publish --no-restore
|
||||||
|
|
||||||
# Runtime stage
|
# Runtime stage
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||||
|
|
||||||
|
# install curl so healthcheck can be run
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y curl wget
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Listen on all interfaces so Coolify can reach the app
|
# Listen on all interfaces so Coolify can reach the app
|
||||||
ENV ASPNETCORE_URLS=http://+:5656
|
# ENV ASPNETCORE_URLS=http://+:5656
|
||||||
|
|
||||||
# Copy published app from build stage
|
# Copy published app from build stage
|
||||||
COPY --from=build /app/out .
|
COPY --from=build /app/publish .
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 5656
|
# EXPOSE 8080
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
ENTRYPOINT ["dotnet", "LibraryWeb.dll"]
|
ENTRYPOINT ["dotnet", "LibraryWeb.dll"]
|
||||||
|
|||||||
Reference in New Issue
Block a user