42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
rm /etc/nginx/sites-available/default
|
|
echo "
|
|
map \$http_upgrade \$connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
upstream grafana {
|
|
server localhost:3000;
|
|
}
|
|
|
|
server {
|
|
listen 1234;
|
|
server_name localhost;
|
|
location /grafana {
|
|
proxy_pass http://localhost:3000;
|
|
rewrite ^/grafana/(.*) /\$1 break;
|
|
proxy_set_header Host \$host;
|
|
}
|
|
location /grafana/api/live/ {
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade \$http_upgrade;
|
|
proxy_set_header Connection \$connection_upgrade;
|
|
proxy_set_header Host \$http_host;
|
|
proxy_pass http://grafana;
|
|
rewrite ^/grafana/(.*) /\$1 break;
|
|
}
|
|
location / {
|
|
proxy_set_header X-Forwarded-For \$remote_addr;
|
|
proxy_set_header Host \$http_host;
|
|
proxy_pass "http://127.0.0.1:6666";
|
|
}
|
|
|
|
}
|
|
" >> /etc/nginx/sites-available/default
|
|
service nginx restart
|
|
|
|
sqlite3 /app/MsRewards-Reborn/MsRewards.db "CREATE TABLE daily (id INTEGER PRIMARY KEY,compte TEXT,points int,date TEXT);"
|
|
sqlite3 /app/MsRewards-Reborn/MsRewards.db "CREATE TABLE comptes (id INTEGER PRIMARY KEY,compte TEXT,last_pts int, banned int);"
|
|
|
|
cp /app/MsRewards-Reborn/grafana-config/grafana.ini /etc/grafana/
|
|
grafana-cli plugins install frser-sqlite-datasource |