Skip to content

Commit 1aa380d

Browse files
authored
chore(Config): update project toolchain (#4811)
* chore: 移除 wasn 脚本 * chore: 更新 bug 模板 * chore: 更新部署脚本 * chore: 更新 nginx 配置文件 * chore: 移除 wasm 脚本
1 parent 8b9a4a8 commit 1aa380d

File tree

5 files changed

+50
-39
lines changed

5 files changed

+50
-39
lines changed

.github/ISSUE_TEMPLATE/10_bug_report.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ body:
6666
description: Include the exception you get when facing this issue.
6767
validations:
6868
required: false
69-
- type: input
69+
- type: dropdown
7070
attributes:
7171
label: .NET Version
72-
description: |
73-
Run `dotnet --version`
72+
options:
73+
- NET9.0
74+
- NET8.0
75+
- NET7.0
76+
- NET6.0
77+
default: 1
7478
validations:
7579
required: true
7680
- type: textarea

BootstrapBlazor.sln

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux", "linux", "{EA765165
1515
ProjectSection(SolutionItems) = preProject
1616
scripts\linux\ba.blazor.service = scripts\linux\ba.blazor.service
1717
scripts\linux\deploy-blazor.sh = scripts\linux\deploy-blazor.sh
18-
scripts\linux\deploy-wasm.sh = scripts\linux\deploy-wasm.sh
1918
scripts\linux\nginx.conf = scripts\linux\nginx.conf
2019
EndProjectSection
2120
EndProject

scripts/linux/deploy-blazor.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
#! /bin/bash
22

33
cd ~/BootstrapBlazor
4-
curl https://www.blazor.zone/api/dispatch?token=BootstrapBlazor-Publish
5-
64
git pull
5+
6+
curl https://www.blazor.zone/api/dispatch?token=BootstrapBlazor-Publish
77
dotnet build src/BootstrapBlazor.Server
8-
dotnet publish src/BootstrapBlazor.Server -c Release
8+
99
curl https://www.blazor.zone/api/dispatch?token=BootstrapBlazor-Reboot
10+
dotnet publish src/BootstrapBlazor.Server -c Release
1011

1112
systemctl stop ba.blazor
12-
\cp -fr ~/BootstrapBlazor/src/BootstrapBlazor.Server/bin/Release/net8.0/publish/* /usr/local/ba/blazor
13+
\cp -fr ~/BootstrapBlazor/src/BootstrapBlazor.Server/bin/Release/net9.0/publish/* /usr/local/ba/blazor
1314
systemctl start ba.blazor
1415
systemctl status ba.blazor -l --no-pager

scripts/linux/deploy-wasm.sh

-6
This file was deleted.

scripts/linux/nginx.conf

+38-25
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#user nobody;
22
worker_processes 1;
33

4-
#error_log logs/error.log;
5-
#error_log logs/error.log notice;
6-
#error_log logs/error.log info;
7-
8-
#pid logs/nginx.pid;
4+
error_log logs/error.log;
95

106
events {
117
worker_connections 1024;
@@ -19,38 +15,48 @@ http {
1915

2016
server {
2117
listen 80;
22-
server_name www.blazor.zone;
18+
server_name blazor.zone;
2319
client_max_body_size 20m;
24-
rewrite ^(.*)$ https://$host$1 redirect;
25-
error_page 404 500 /50x.html;
20+
rewrite ^(.*)$ https://www.blazor.zone$1 redirect;
2621
proxy_redirect off;
2722
proxy_set_header Host $host;
2823
proxy_set_header X-Real-IP $remote_addr;
2924
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
30-
location / {
31-
proxy_connect_timeout 1;
32-
proxy_pass http://localhost:50853;
33-
}
34-
35-
location /_blazor {
36-
proxy_http_version 1.1;
37-
proxy_set_header Upgrade $http_upgrade;
38-
proxy_set_header Connection "upgrade";
39-
proxy_pass http://localhost:50853/_blazor;
40-
}
25+
}
4126

42-
location = /50x.html {
43-
root html;
44-
}
27+
server {
28+
listen 443 ssl;
29+
server_name blazor.zone;
30+
rewrite ^(.*)$ https://www.blazor.zone$1 redirect;
31+
ssl_certificate ./cert/blazor.zone.cer;
32+
ssl_certificate_key ./cert/blazor.zone.key;
33+
ssl_session_cache shared:SSL:1m;
34+
ssl_session_timeout 5m;
35+
ssl_ciphers HIGH:!aNULL:!MD5;
36+
ssl_prefer_server_ciphers on;
37+
proxy_set_header Host $host;
38+
proxy_set_header X-Real-IP $remote_addr;
39+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
40+
proxy_set_header X-Forwarded-Proto $scheme;
41+
add_header X-Frame-Options SAMEORIGIN;
42+
}
4543

46-
error_page 404 500 502 503 504 /50x.html;
44+
server {
45+
listen 80;
46+
server_name www.blazor.zone;
47+
client_max_body_size 20m;
48+
rewrite ^(.*)$ https://$host$1 redirect;
49+
proxy_redirect off;
50+
proxy_set_header Host $host;
51+
proxy_set_header X-Real-IP $remote_addr;
52+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
4753
}
4854

4955
server {
5056
listen 443 ssl;
5157
server_name www.blazor.zone;
52-
ssl_certificate blazor_zone.crt;
53-
ssl_certificate_key blazor_zone.key;
58+
ssl_certificate ./cert/www.blazor.zone.cer;
59+
ssl_certificate_key ./cert/www.blazor.zone.key;
5460
ssl_session_cache shared:SSL:1m;
5561
ssl_session_timeout 5m;
5662
ssl_ciphers HIGH:!aNULL:!MD5;
@@ -60,6 +66,8 @@ http {
6066
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
6167
proxy_set_header X-Forwarded-Proto $scheme;
6268
add_header X-Frame-Options SAMEORIGIN;
69+
proxy_intercept_errors on;
70+
error_page 404 500 502 /502.html;
6371

6472
location / {
6573
proxy_connect_timeout 1;
@@ -72,5 +80,10 @@ http {
7280
proxy_set_header Connection "upgrade";
7381
proxy_pass http://localhost:50853/_blazor;
7482
}
83+
84+
location = /502.html {
85+
root html;
86+
internal;
87+
}
7588
}
7689
}

0 commit comments

Comments
 (0)