Skip to content

Commit

Permalink
added Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
JensKrumsieck committed Dec 18, 2024
1 parent bfa8cd8 commit 51e218e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ./CHN.Blazor ./
RUN dotnet restore CHN.Blazor.csproj
RUN dotnet build CHN.Blazor.csproj -c Release -o /app/build

FROM build AS publish
RUN dotnet publish CHN.Blazor.csproj -c Release -o /app/publish

FROM nginx:alpine AS final
WORKDIR /usr/share/nginx/html
COPY --from=publish /app/publish/wwwroot .
COPY nginx.conf /etc/nginx/nginx.conf
13 changes: 13 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
events { }
http {
include mime.types;

server {
listen 80;

location / {
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html =404;
}
}
}

1 comment on commit 51e218e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for chn-tool ready!

✅ Preview
https://chn-tool-mgsxg6ene-jens-krumsiecks-projects.vercel.app

Built with commit 51e218e.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.