...
This commit is contained in:
@@ -104,11 +104,9 @@ builder.Services.AddCors(options =>
|
||||
options.AddPolicy(origins,
|
||||
policy =>
|
||||
{
|
||||
policy.AllowAnyOrigin()
|
||||
//.WithOrigins("https://localhost:7224", "http://localhost:5107"
|
||||
// , "http://195.88.208.142", "http://moadiran.ir"
|
||||
// , "https://195.88.208.142", "http://156.255.1.229:3101"
|
||||
//, "https://195.88.208.142:440", "http://156.255.1.229:3101:440", "https://localhost:44346")
|
||||
policy
|
||||
//.AllowAnyOrigin()
|
||||
.WithOrigins("https://app.moadiran.ir", "https://moadiran.ir", "http://156.255.1.229:3101", "http://156.255.1.229:3102/")
|
||||
.AllowAnyHeader()
|
||||
.WithHeaders(HeaderNames.ContentType)
|
||||
.AllowAnyMethod();
|
||||
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Base": "Data Source=195.88.208.142;Initial Catalog=TaxPayer020713;User ID=sa;Password=M439610m@;TrustServerCertificate=True"
|
||||
|
||||
},
|
||||
"Fixedvalues": {
|
||||
"Jwt_Lifetime_Minutes": "144000"
|
||||
},
|
||||
"CreateReportFileName": "E:\\CreateReport\\CreateReport.exe",
|
||||
"ReportLog": "E:\\Report\\log.txt"
|
||||
}
|
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Base": "Data Source=.;Initial Catalog=TaxPayer020713;User ID=sa;Password=M439610m@;TrustServerCertificate=True"
|
||||
|
||||
},
|
||||
"Fixedvalues": {
|
||||
"Jwt_Lifetime_Minutes": "144000"
|
||||
},
|
||||
"CreateReportFileName": "E:\\CreateReport\\CreateReport.exe",
|
||||
"ReportLog": "E:\\Report\\log.txt"
|
||||
}
|
@@ -1,86 +1,65 @@
|
||||
# مرحله ۱: Build پروژه Blazor WASM با .NET 9
|
||||
# اینجا باید از SDK استفاده کنید نه aspnet
|
||||
# مرحله ۱: Build با caching بهتر
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# نصب وابستگیها برای emscripten (python3 + سایر ابزارها)
|
||||
# نصب dependencyها (apt-get) در یک layer
|
||||
RUN apt-get update && apt-get install -y python3 make cmake clang zlib1g-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# کپی کردن فایلهای پروژه
|
||||
# کپی csprojها جداگانه برای cache بهتر
|
||||
COPY TaxPayerFull/Front.csproj Front/
|
||||
COPY Shared/Shared.csproj Shared/
|
||||
COPY . .
|
||||
|
||||
# پاکسازی workloadهای قدیمی (اختیاری)
|
||||
RUN dotnet workload clean
|
||||
|
||||
# نصب wasm-tools برای Blazor
|
||||
# نصب wasm-tools (فقط اگر تغییر کند cache میماند)
|
||||
RUN dotnet workload install wasm-tools
|
||||
|
||||
# انتشار (Publish) خروجی در حالت Release
|
||||
# restore تنها بر اساس csprojها
|
||||
RUN dotnet restore Front/Front.csproj
|
||||
|
||||
# کپی باقی پروژه
|
||||
COPY TaxPayerFull/. TaxPayerFull/
|
||||
COPY Shared/. Shared/
|
||||
|
||||
# انتشار Blazor WASM
|
||||
RUN dotnet publish "TaxPayerFull/Front.csproj" -c Release -o /app \
|
||||
-p:TreatWarningsAsErrors=false \
|
||||
-p:RunAOTCompilation=false \
|
||||
-p:PublishTrimmed=false
|
||||
|
||||
# مرحله ۲: سرو کردن با Nginx
|
||||
# مرحله ۲: Nginx
|
||||
FROM nginx:alpine AS final
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# حذف محتوای پیشفرض nginx
|
||||
RUN rm -rf ./*
|
||||
|
||||
# کپی خروجی Blazor WASM
|
||||
COPY --from=build /app/wwwroot ./
|
||||
|
||||
# فقط بلوک server داخل default.conf
|
||||
# کانفیگ Nginx
|
||||
RUN printf 'server {\n\
|
||||
listen 5107;\n\
|
||||
server_name localhost;\n\
|
||||
\n\
|
||||
root /usr/share/nginx/html;\n\
|
||||
index index.html;\n\
|
||||
\n\
|
||||
location / {\n\
|
||||
try_files $uri $uri/ /index.html;\n\
|
||||
}\n\
|
||||
|
||||
\n\
|
||||
location /_framework/ {\n\
|
||||
expires 1y;\n\
|
||||
add_header Cache-Control "public, immutable";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /_content/ {\n\
|
||||
expires 1y;\n\
|
||||
add_header Cache-Control "public, immutable";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /assets/ {\n\
|
||||
expires 7d;\n\
|
||||
add_header Cache-Control "public";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /css/ {\n\
|
||||
expires 7d;\n\
|
||||
add_header Cache-Control "public";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /fonts/ {\n\
|
||||
expires 7d;\n\
|
||||
add_header Cache-Control "public";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /img/ {\n\
|
||||
expires 7d;\n\
|
||||
add_header Cache-Control "public";\n\
|
||||
}\n\
|
||||
\n\
|
||||
location /js/ {\n\
|
||||
expires 7d;\n\
|
||||
add_header Cache-Control "public";\n\
|
||||
}\n\
|
||||
location /css/ { expires 7d; add_header Cache-Control "public"; }\n\
|
||||
location /fonts/ { expires 7d; add_header Cache-Control "public"; }\n\
|
||||
location /img/ { expires 7d; add_header Cache-Control "public"; }\n\
|
||||
location /js/ { expires 7d; add_header Cache-Control "public"; }\n\
|
||||
\n\
|
||||
location ~ \\.dll$ { add_header Content-Type application/octet-stream; }\n\
|
||||
location ~ \\.wasm$ { add_header Content-Type application/wasm; }\n\
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"BaseAddress": "http://156.255.1.229:3201/api/",
|
||||
"BaseAddress": "https://service.moadiran.ir/api/",
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
|
@@ -37,7 +37,15 @@
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
<script>navigator.serviceWorker.register('service-worker.js');</script>
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/service-worker.js')
|
||||
.then(reg => console.log('Service Worker registered', reg))
|
||||
.catch(err => console.error('Service Worker registration failed:', err));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
||||
<!-- Add chart.js reference if chart components are used in your application. -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
|
@@ -21,8 +21,8 @@
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="@Item?.PageTitle" />
|
||||
<meta property="og:description" content="@description" />
|
||||
<meta property="og:image" content="http://156.255.1.229:3101/img/blog/@Item?.Photo" />
|
||||
<meta property="og:url" content="http://156.255.1.229:3101/BlogDetails/@ItemID" />
|
||||
<meta property="og:image" content="https://moadiran.irimg/blog/@Item?.Photo" />
|
||||
<meta property="og:url" content="https://moadiran.irBlogDetails/@ItemID" />
|
||||
<meta property="og:site_name" content="Moadiran" />
|
||||
|
||||
<meta name="author" content="مهدی ربیع نژاد">
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="سامانه مؤدیران" />
|
||||
<meta property="og:description" content="مدیریت صورتحساب های الکترونیکی" />
|
||||
<meta property="og:image" content="http://156.255.1.229:3101/img/logo/moadiran.png" />
|
||||
<meta property="og:image" content="https://moadiran.irimg/logo/moadiran.png" />
|
||||
<meta property="og:url" content="http://156.255.1.229:3101" />
|
||||
<meta property="og:site_name" content="Moadiran" />
|
||||
</HeadContent>
|
||||
@@ -56,7 +56,7 @@
|
||||
مدیریت صورتحساب ها و ارسال به سامانه مودیان
|
||||
</p>
|
||||
|
||||
<NavLink class="tp-btn" href="http://156.255.1.229:3102/Sign-in">
|
||||
<NavLink class="tp-btn" href="https://app.moadiran.ir/Sign-in">
|
||||
<span>شروع کنید</span>
|
||||
<b></b>
|
||||
</NavLink>
|
||||
@@ -221,7 +221,7 @@
|
||||
</div>
|
||||
<div class="tp-about__btn">
|
||||
|
||||
<NavLink class="tp-btn" href="http://156.255.1.229:3102/Sign-in">
|
||||
<NavLink class="tp-btn" href="https://app.moadiran.ir/Sign-in">
|
||||
<span>شروع کنید</span>
|
||||
<b></b>
|
||||
</NavLink>
|
||||
@@ -351,7 +351,7 @@
|
||||
<div class="tp-service__top-content">
|
||||
<p>راه حلی برای مدیریت بهتر صورتحساب ها</p>
|
||||
|
||||
<NavLink class="tp-btn-orange" href="http://156.255.1.229:3102/Sign-in">
|
||||
<NavLink class="tp-btn-orange" href="https://app.moadiran.ir/Sign-in">
|
||||
<span>شروع کنید</span>
|
||||
<b></b>
|
||||
</NavLink>
|
||||
|
@@ -17,8 +17,8 @@
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="دانشنامه سامانه مؤدیران" />
|
||||
<meta property="og:description" content="دانشنامه هایی درباره صورتحساب های الکترونیکی" />
|
||||
<meta property="og:image" content="http://156.255.1.229:3101/img/logo/moadiran.png" />
|
||||
<meta property="og:url" content="http://156.255.1.229:3101/ListBlog" />
|
||||
<meta property="og:image" content="https://moadiran.irimg/logo/moadiran.png" />
|
||||
<meta property="og:url" content="https://moadiran.irListBlog" />
|
||||
<meta property="og:site_name" content="Moadiran" />
|
||||
</HeadContent>
|
||||
|
||||
|
@@ -2,4 +2,4 @@
|
||||
Allow: /
|
||||
|
||||
User-Agent: *
|
||||
DisAllow : http://156.255.1.229:3102/Sign-in
|
||||
DisAllow : https://app.moadiran.ir/Sign-in
|
Reference in New Issue
Block a user