Merge pull request #109 from midoks/dev

添加telegram讨论频道
This commit is contained in:
Mr Chen
2022-06-28 15:23:55 +08:00
committed by GitHub
12 changed files with 70 additions and 94 deletions
+45
View File
@@ -0,0 +1,45 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: MW APP MySQL80
on:
push:
branches: [ "master","dev" ]
pull_request:
branches: [ "master","dev" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install MW
run: |
sudo bash scripts/install_dev.sh
- name: Install MySQL80
run: |
sudo mkdir -p /tmp
sudo echo '' > /tmp/t.log
sudo chmod 777 /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
sudo cat /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh > /tmp/t.log
sudo echo "export MAKEJN=-j12\n" >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
sudo cat /tmp/t.log >> /www/server/mdserver-web/plugins/mysql/versions/8.0/install.sh
cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 8.0
- name: Start DEBUG
run: |
gunicorn -c setting.py app:app
python3 task.py &
-36
View File
@@ -1,36 +0,0 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: MW APP
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Start DEBUG
run: |
gunicorn -c setting.py app:app
python3 task.py &
-36
View File
@@ -1,36 +0,0 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: MW APP 3.6.8
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
#runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.6.8
uses: actions/setup-python@v3
with:
python-version: "3.6.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
- name: Start DEBUG
run: |
gunicorn -c setting.py app:app
python3 task.py &
+9 -3
View File
@@ -129,6 +129,12 @@ pyvenv.cfg
include
data/api_login.txt
data/sessions
data/ssl.pl
plugins/gdrive/
plugins/openlitespeed/
data/ssl.pl
data/port.pl
plugins/openlitespeed
plugins/gdrive/
data/ipv6.pl
data/restart.pl
pip-selfcheck.json
data/ssl.pl
+2 -5
View File
@@ -18,6 +18,8 @@
基本上可以使用,后续会继续优化!欢迎提供意见!
- https://t.me/+ZYXZ20VaKVQxYzM1
### 主要插件介绍
* OpenResty - 轻量级,占有内存少,并发能力强。
@@ -38,11 +40,6 @@
* swap插件[虚拟内存]。
### 问题
- OP防火墙,暂不要开启。
### GW使用
- 自动安装
+6 -6
View File
@@ -85,9 +85,9 @@ class site_api:
name = request.form.get('name', '')
import time
# 清理旧的
defaultSite = mw.readFile('data/defaultSite.pl')
if defaultSite:
path = self.getHostConf(defaultSite)
default_site = mw.readFile('data/default_site.pl')
if default_site:
path = self.getHostConf(default_site)
if os.path.exists(path):
conf = mw.readFile(path)
rep = "listen\s+80.+;"
@@ -105,7 +105,7 @@ class site_api:
conf = re.sub(rep, 'listen 443 ssl default_server;', conf, 1)
mw.writeFile(path, conf)
mw.writeFile('data/defaultSite.pl', name)
mw.writeFile('data/default_site.pl', name)
mw.restartWeb()
return mw.returnJson(True, '设置成功!')
@@ -113,7 +113,7 @@ class site_api:
data = {}
data['sites'] = mw.M('sites').field(
'name').order('id desc').select()
data['defaultSite'] = mw.readFile('data/defaultSite.pl')
data['default_site'] = mw.readFile('data/default_site.pl')
return mw.getJson(data)
def setPsApi(self):
@@ -1624,7 +1624,7 @@ class site_api:
if not mw.isAppleSystem():
mw.execShell('chown -R www:www ' + path)
mw.writeFile(path + '/index.html', '已经开始工作!!!')
mw.writeFile(path + '/index.html', 'Work has started!!!')
mw.execShell('chmod -R 755 ' + path)
def nginxAddDomain(self, webname, domain, port):
-1
View File
@@ -1 +0,0 @@
t.vvv
Regular → Executable
View File
+2 -2
View File
@@ -41,7 +41,7 @@ Install_mysql()
fi
if [ ! -f ${mysqlDir}/mysql-boost-8.0.25.tar.gz ];then
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
fi
#检测文件是否损坏.
@@ -53,7 +53,7 @@ Install_mysql()
else
# 重新下载
rm -rf ${mysqlDir}/mysql-8.0.25
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
wget -O ${mysqlDir}/mysql-boost-8.0.25.tar.gz --tries=3 https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-8.0.25.tar.gz
fi
fi
+3 -3
View File
@@ -922,7 +922,7 @@ function setIndex(id){
//设置默认站点
function setDefaultSite(){
var name = $("#defaultSite").val();
var name = $("#default_site").val();
var loadT = layer.msg('正在处理,请稍候...',{icon:16,time:0,shade: [0.3, '#000']});
$.post('/site/set_default_site','name='+name,function(rdata){
layer.closeAll();
@@ -938,7 +938,7 @@ function getDefaultSite(){
var selected = '';
for(var i=0;i<rdata.sites.length;i++){
selected = '';
if(rdata.defaultSite == rdata.sites[i].name) selected = 'selected';
if(rdata.default_site == rdata.sites[i].name) selected = 'selected';
opt += '<option value="' + rdata.sites[i].name + '" ' + selected + '>' + rdata.sites[i].name + '</option>';
}
@@ -952,7 +952,7 @@ function getDefaultSite(){
content:'<div class="bt-form ptb15 pb70">\
<p class="line">\
<span class="tname text-right">默认站点</span>\
<select id="defaultSite" class="bt-input-text" style="width: 300px;">'+opt+'</select>\
<select id="default_site" class="bt-input-text" style="width: 300px;">'+opt+'</select>\
</p>\
<ul class="help-info-text c6 plr20">\
<li>设置默认站点后,所有未绑定的域名和IP都被定向到默认站点</li>\
-1
View File
@@ -56,7 +56,6 @@ if [ ! -f /etc/init.d/iptables ];then
firewall-cmd --permanent --zone=public --add-port=888/tcp
firewall-cmd --permanent --zone=public --add-port=7200/tcp
# firewall-cmd --permanent --zone=public --add-port=3306/tcp
# firewall-cmd --permanent --zone=public --add-port=1723/tcp
# firewall-cmd --permanent --zone=public --add-port=30000-40000/tcp
+3 -1
View File
@@ -40,7 +40,9 @@ pip3 install mysqlclient
chmod 755 $DEV/server/mdserver-web/data
if [ -f $DEV/server/mdserver-web/bin/activate ];then
cd $DEV/server/mdserver-web && python3 -m venv $DEV/server/mdserver-web && source $DEV/server/mdserver-web/bin/activate && pip3 install -r $DEV/server/mdserver-web/requirements.txt
cd $DEV/server/mdserver-web && python3 -m venv $DEV/server/mdserver-web
source $DEV/server/mdserver-web/bin/activate
pip3 install -r $DEV/server/mdserver-web/requirements.txt
else
cd $DEV/server/mdserver-web && pip3 install -r $DEV/server/mdserver-web/requirements.txt
fi