diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..932e305 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +WORKDIR /app + +COPY src/*.csproj ./ + +WORKDIR /app +RUN dotnet restore + +WORKDIR /app +COPY src/. ./ +WORKDIR /app +RUN dotnet publish -c Release -o out + +FROM mcr.microsoft.com/dotnet/aspnet:7.0 +WORKDIR /app +EXPOSE 5157/tcp +ENV ASPNETCORE_URLS http://*:5157 + +COPY --from=build /app/out ./ +ENTRYPOINT ["dotnet", "Age.dll"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..57ba344 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '3.8' + +services: + api: + build: . + ports: + - 5157:5157 \ No newline at end of file