@@ -20,7 +20,7 @@ env:
|
|||||||
SSH_KEY: ${{ secrets.AWS }}
|
SSH_KEY: ${{ secrets.AWS }}
|
||||||
# TG通知
|
# TG通知
|
||||||
TG_BOT_TOKEN: 8114337882:AAHkEx03HSu7RxN4IHBJJEnsK9aPPzNLIk0
|
TG_BOT_TOKEN: 8114337882:AAHkEx03HSu7RxN4IHBJJEnsK9aPPzNLIk0
|
||||||
TG_CHAT_ID: "-49402438031"
|
TG_CHAT_ID: "-4940243803"
|
||||||
# Go构建变量
|
# Go构建变量
|
||||||
SERVICE: vpn
|
SERVICE: vpn
|
||||||
SERVICE_STYLE: vpn
|
SERVICE_STYLE: vpn
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
upstream api_backend {
|
||||||
|
server 127.0.0.1:8080;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
server_name api.hifast.biz 4d3vsw888xgaen.hifast.biz;
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
root /var/www/html;
|
||||||
|
allow all;
|
||||||
|
}
|
||||||
|
location / {
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name api.hifast.biz;
|
||||||
|
client_max_body_size 150M;
|
||||||
|
ssl_certificate /etc/nginx/ssl/hifast.biz/_.hifast.biz.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/hifast.biz/_.hifast.biz.key; # managed by Certbot
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||||
|
add_header X-Frame-Options "DENY";
|
||||||
|
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
if ($http_user_agent ~* '(9999|91\.78)') {
|
||||||
|
return 444;
|
||||||
|
}
|
||||||
|
location ~ ^/v1/common/client/download/file/(?<download_name>Hi快VPN-(?<os>windows|mac|android)-1.0.0-ic-.*\.(?<ext>exe|dmg|apk))$ {
|
||||||
|
alias /var/www/download/Hi快VPN-$os-1.0.0.$ext;
|
||||||
|
charset utf-8;
|
||||||
|
add_header Content-Disposition 'attachment; filename="$download_name"';
|
||||||
|
add_header Content-Type application/octet-stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /v1/common/client/download/file/ {
|
||||||
|
alias /var/www/download/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://api_backend;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
server_name 4d3vsw888xgaen.hifast.biz;
|
||||||
|
client_max_body_size 150M;
|
||||||
|
ssl_certificate /etc/nginx/ssl/hifast.biz/_.hifast.biz.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/nginx/ssl/hifast.biz/_.hifast.biz.key; # managed by Certbot
|
||||||
|
|
||||||
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
|
||||||
|
add_header X-Frame-Options DENY;
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
|
||||||
|
gzip on;
|
||||||
|
gzip_vary on;
|
||||||
|
gzip_min_length 1024;
|
||||||
|
gzip_types text/plain text/css text/xml text/javascript application/javascript application/xml+rss application/json image/svg+xml;
|
||||||
|
root /var/www/admin;
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
},
|
},
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"options": {
|
"options": {
|
||||||
"content": "<b>AWS CloudWatch overview</b><br/>Region: ap-east-1 (Hong Kong)<br/>RDS DBInstanceIdentifier: database-1<br/>Redis ReplicationGroupId: hifastapp-redis<br/><br/>Note: Redis panels are configured using <code>ReplicationGroupId</code>. If a panel shows no data in your account, switch that dimension to the concrete <code>CacheClusterId</code> in Grafana query editor.",
|
"content": "<b>AWS CloudWatch overview</b><br/>Region: ap-east-1 (Hong Kong)<br/>RDS DBInstanceIdentifier: hifast-mysql-prod-v2<br/>Redis: current production uses a local Docker Redis container (<code>hifast-redis</code>) on EC2 rather than AWS ElastiCache.<br/><br/>This dashboard keeps the RDS CloudWatch panels. Redis should be observed from the local ops dashboard via Prometheus/cAdvisor instead of ElastiCache metrics.",
|
||||||
"mode": "html"
|
"mode": "html"
|
||||||
},
|
},
|
||||||
"pluginVersion": "11.0.0",
|
"pluginVersion": "11.0.0",
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "CPUUtilization",
|
"metricName": "CPUUtilization",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "DatabaseConnections",
|
"metricName": "DatabaseConnections",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "FreeStorageSpace",
|
"metricName": "FreeStorageSpace",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "ReadLatency",
|
"metricName": "ReadLatency",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "WriteLatency",
|
"metricName": "WriteLatency",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -278,7 +278,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "ReadIOPS",
|
"metricName": "ReadIOPS",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -293,7 +293,7 @@
|
|||||||
"uid": "cloudwatch"
|
"uid": "cloudwatch"
|
||||||
},
|
},
|
||||||
"dimensions": {
|
"dimensions": {
|
||||||
"DBInstanceIdentifier": "database-1"
|
"DBInstanceIdentifier": "hifast-mysql-prod-v2"
|
||||||
},
|
},
|
||||||
"metricName": "WriteIOPS",
|
"metricName": "WriteIOPS",
|
||||||
"namespace": "AWS/RDS",
|
"namespace": "AWS/RDS",
|
||||||
@@ -350,7 +350,7 @@
|
|||||||
"statistic": "Average"
|
"statistic": "Average"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Redis Host CPU",
|
"title": "Redis Host CPU (Legacy ElastiCache)",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -397,7 +397,7 @@
|
|||||||
"statistic": "Average"
|
"statistic": "Average"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Redis Engine CPU",
|
"title": "Redis Engine CPU (Legacy ElastiCache)",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@
|
|||||||
"statistic": "Average"
|
"statistic": "Average"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Redis Connections",
|
"title": "Redis Connections (Legacy ElastiCache)",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -491,7 +491,7 @@
|
|||||||
"statistic": "Average"
|
"statistic": "Average"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"title": "Redis Memory Usage %",
|
"title": "Redis Memory Usage % (Legacy ElastiCache)",
|
||||||
"type": "timeseries"
|
"type": "timeseries"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
"uid": "P8E80F9AEF21F6940"
|
"uid": "P8E80F9AEF21F6940"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(count_over_time({container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"${level:raw}\" [5m]))",
|
"expr": "sum(count_over_time({compose_service=\"ppanel-server\"}[5m]))",
|
||||||
"queryType": "range",
|
"queryType": "range",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
"uid": "P8E80F9AEF21F6940"
|
"uid": "P8E80F9AEF21F6940"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "sum(count_over_time({container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"(?i)(error|panic|fatal)\" [5m]))",
|
"expr": "sum(count_over_time({compose_service=\"ppanel-server\"} |~ \"(?i)(error|panic|fatal)\" [5m]))",
|
||||||
"queryType": "range",
|
"queryType": "range",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
"uid": "P8E80F9AEF21F6940"
|
"uid": "P8E80F9AEF21F6940"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "{container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"${level:raw}\"",
|
"expr": "{compose_service=\"ppanel-server\"}",
|
||||||
"queryType": "range",
|
"queryType": "range",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
"uid": "P8E80F9AEF21F6940"
|
"uid": "P8E80F9AEF21F6940"
|
||||||
},
|
},
|
||||||
"editorMode": "code",
|
"editorMode": "code",
|
||||||
"expr": "{container=\"ppanel-server\"} |~ \"${user_id:raw}\" |~ \"${email:raw}\" |~ \"${order:raw}\" |~ \"${keyword:raw}\" |~ \"(?i)(error|panic|fatal)\"",
|
"expr": "{compose_service=\"ppanel-server\"} |~ \"(?i)(error|panic|fatal)\"",
|
||||||
"queryType": "range",
|
"queryType": "range",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"time": {
|
"time": {
|
||||||
"from": "now-7d",
|
"from": "now-1h",
|
||||||
"to": "now"
|
"to": "now"
|
||||||
},
|
},
|
||||||
"timepicker": {},
|
"timepicker": {},
|
||||||
|
|||||||
Reference in New Issue
Block a user