Add Dockerfile and nginx config
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
# Build stage
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||
WORKDIR /src
|
||||
|
||||
COPY UI.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
COPY . ./
|
||||
RUN dotnet build -c Release -o /build
|
||||
RUN dotnet publish -c Release -o /app/publish /p:BlazorWebAssemblyLoadAllGlobalizationData=true
|
||||
|
||||
# Serve with nginx
|
||||
FROM nginx:alpine AS runtime
|
||||
COPY --from=build /app/publish/wwwroot /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://masstech-api:80/api/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||
}
|
||||
}
|
||||
+4
-7
@@ -33,19 +33,16 @@
|
||||
<script src="_content/MudBlazor/MudBlazor.min.js?v=1"></script>
|
||||
|
||||
<!-- Media Component Assets -->
|
||||
<link href="_content/Media/lib/cropper.min.css" rel="stylesheet" />
|
||||
<script src="_content/Media/lib/cropper.min.js"></script>
|
||||
<link href="_content/Media.RCL/lib/cropper.min.css" rel="stylesheet" />
|
||||
<script src="_content/Media.RCL/lib/cropper.min.js"></script>
|
||||
<!-- <script src="_content/LayoutLib/Resources"></script>
|
||||
<script src="_content/LayoutLib"></script> -->
|
||||
|
||||
<script src="_content/Media/"></script>
|
||||
<script src="_content/Media/lib/cropper.min.js"></script>
|
||||
|
||||
<script src="_content/Media/js/mediaInterop.js"></script>
|
||||
<script src="_content/Media.RCL/js/mediaInterop.js"></script>
|
||||
|
||||
<!-- Carousel Scripts -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js"></script>
|
||||
<script src="_content/Common/css/carousal.js"></script>
|
||||
<script src="_content/Common.RCL/css/carousal.js"></script>
|
||||
|
||||
<script>
|
||||
window.cultureInfo = {
|
||||
|
||||
Reference in New Issue
Block a user