Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1642dbc0c | ||
|
|
747c2ebd0a | ||
|
|
957981c2c3 |
No files matched your search
@@ -34,4 +34,5 @@ inst_module "waf" # waf 在 gateway 之前编译,部署时由 core 先拉起 w
|
|||||||
inst_module "static"
|
inst_module "static"
|
||||||
inst_module "dnfs"
|
inst_module "dnfs"
|
||||||
inst_module "db"
|
inst_module "db"
|
||||||
|
inst_module "smtp"
|
||||||
inst_module "core" # core last
|
inst_module "core" # core last
|
||||||
Regular → Executable
File mode changed.
@@ -1,6 +1,7 @@
|
|||||||
bash /opt/micro_servers/db/_run.sh
|
bash /opt/micro_servers/db/_run.sh
|
||||||
bash /opt/micro_servers/ai_review/_run.sh
|
bash /opt/micro_servers/ai_review/_run.sh
|
||||||
bash /opt/micro_servers/dnfs/_run.sh
|
bash /opt/micro_servers/dnfs/_run.sh
|
||||||
|
bash /opt/micro_servers/smtp/_run.sh
|
||||||
bash /opt/micro_servers/static/_run.sh
|
bash /opt/micro_servers/static/_run.sh
|
||||||
bash /opt/micro_servers/waf/_run.sh
|
bash /opt/micro_servers/waf/_run.sh
|
||||||
bash /opt/micro_servers/gateway/_run.sh
|
bash /opt/micro_servers/gateway/_run.sh
|
||||||
|
|||||||
+2
-1
@@ -1,2 +1,3 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
.env/
|
.env
|
||||||
|
venv/
|
||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd "$(dirname "$0")" || exit
|
cd "$(dirname "$0")" || exit
|
||||||
python3 -m venv .env
|
python3 -m venv venv
|
||||||
#sudo chmod +x .env/bin/activate
|
#sudo chmod +x .env/bin/activate
|
||||||
source .env/bin/activate
|
source venv/bin/activate
|
||||||
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||||
#nuitka --standalone smtp.py
|
#nuitka --standalone smtp.py
|
||||||
@@ -3,4 +3,5 @@ flask
|
|||||||
flask-cors
|
flask-cors
|
||||||
flask_sqlalchemy
|
flask_sqlalchemy
|
||||||
#gunicorn
|
#gunicorn
|
||||||
waitress
|
waitress
|
||||||
|
python-dotenv
|
||||||
+5
-5
@@ -4,10 +4,15 @@ from flask import Flask, request, jsonify
|
|||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
from email import header
|
from email import header
|
||||||
from log_client import logs
|
from log_client import logs
|
||||||
|
from dotenv import load_dotenv
|
||||||
import waitress
|
import waitress
|
||||||
import smtplib
|
import smtplib
|
||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
|
import sys, os
|
||||||
|
|
||||||
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
load_dotenv(os.path.join(os.path.dirname(os.path.abspath(__file__)), ".env"))
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
captchas: dict[str, list[str, str]] = {}
|
captchas: dict[str, list[str, str]] = {}
|
||||||
@@ -22,11 +27,6 @@ def send_email():
|
|||||||
captcha += str(digit)
|
captcha += str(digit)
|
||||||
return captcha
|
return captcha
|
||||||
|
|
||||||
SMTP_SERVER: str = ""
|
|
||||||
SMTP_PORT: str = 0
|
|
||||||
SMTP_USER: str = ""
|
|
||||||
__PASSWORD: str = ""
|
|
||||||
|
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
|
||||||
recipient: str = data.get("email")
|
recipient: str = data.get("email")
|
||||||
|
|||||||
Reference in new issue
Block a user