Skip to content

Commit

Permalink
Create build scripts for notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkStrendin committed Sep 30, 2024
1 parent 3a25d4e commit bafa51a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- dockerfile: src/Dockerfile-FrontEnd
image: ghcr.io/livingskyschooldivision/subnotify-frontend
context: ./src/
- dockerfile: src/Dockerfile-Notifier
image: ghcr.io/livingskyschooldivision/subnotify-notifier
context: ./src/
permissions:
contents: read
packages: write
Expand Down
24 changes: 24 additions & 0 deletions src/Dockerfile-Notifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["SubNotify.Notifier/SubNotify.Notifier.csproj", "SubNotify.Notifier/"]
COPY ["SubNotify.Core/SubNotify.Core.csproj", "SubNotify.Core/"]
COPY ["LSSD.MongoDB/LSSD.MongoDB.csproj", "LSSD.MongoDB/"]
RUN dotnet restore "SubNotify.Notifier/SubNotify.Notifier.csproj"
COPY . .
WORKDIR "/src/SubNotify.Notifier"
RUN dotnet build "SubNotify.Notifier.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "SubNotify.Notifier.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "SubNotify.Notifier.dll"]

0 comments on commit bafa51a

Please sign in to comment.