feat: add Dockerfile and docker-compose.yml for containerization

This commit is contained in:
V1ck3s
2025-12-13 00:58:23 +01:00
committed by Vickes
parent 3a43196f8a
commit 211f0c617c
2 changed files with 46 additions and 0 deletions

27
Dockerfile Normal file
View File

@@ -0,0 +1,27 @@
# Build stage
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
COPY octo-fiesta.sln .
COPY octo-fiesta/octo-fiesta.csproj octo-fiesta/
COPY octo-fiesta.Tests/octo-fiesta.Tests.csproj octo-fiesta.Tests/
RUN dotnet restore
COPY octo-fiesta/ octo-fiesta/
COPY octo-fiesta.Tests/ octo-fiesta.Tests/
RUN dotnet publish octo-fiesta/octo-fiesta.csproj -c Release -o /app/publish
# Runtime stage
FROM mcr.microsoft.com/dotnet/aspnet:9.0
WORKDIR /app
RUN mkdir -p /app/downloads
COPY --from=build /app/publish .
EXPOSE 8080
ENV ASPNETCORE_URLS=http://+:8080
ENTRYPOINT ["dotnet", "octo-fiesta.dll"]