Prepare Coolify deployment
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
.vs
|
||||||
|
**/bin
|
||||||
|
**/obj
|
||||||
|
**/*.user
|
||||||
|
**/*.suo
|
||||||
|
README*
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY QRPay/QRPay.csproj QRPay/
|
||||||
|
RUN dotnet restore QRPay/QRPay.csproj \
|
||||||
|
--source https://api.nuget.org/v3/index.json
|
||||||
|
|
||||||
|
COPY QRPay/ QRPay/
|
||||||
|
RUN dotnet publish QRPay/QRPay.csproj \
|
||||||
|
--configuration Release \
|
||||||
|
--output /app/publish \
|
||||||
|
--no-restore
|
||||||
|
|
||||||
|
FROM nginx:1.27-alpine AS final
|
||||||
|
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY --from=build /app/publish/wwwroot /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
||||||
|
CMD wget --quiet --spider http://127.0.0.1:8080/ || exit 1
|
||||||
|
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(?:css|js|json|wasm|png|jpg|jpeg|gif|ico|svg|woff2?)$ {
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public, no-transform";
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /index.html {
|
||||||
|
add_header Cache-Control "no-cache";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user