This commit is contained in:
ycg 2025-08-25 15:48:48 +08:00
parent a7a3a9a4a8
commit 5e161243ac
3 changed files with 5 additions and 3 deletions

View File

@ -5,5 +5,4 @@ COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt # 禁用缓存减小体积 RUN pip install --no-cache-dir -r requirements.txt # 禁用缓存减小体积
COPY . . COPY . .
EXPOSE 5000 EXPOSE 5000
USER appuser # 切换非 root 用户 CMD ["python3","main.py"]
CMD ["python main.py"]

View File

@ -3,8 +3,10 @@ from flask import Flask
import time import time
import random import random
import requests import requests
from flask_cors import CORS
app = Flask(__name__) app = Flask(__name__)
CORS(app, supports_credentials=True)
cache = set() cache = set()
scheduler = BackgroundScheduler() scheduler = BackgroundScheduler()

View File

@ -1,3 +1,4 @@
requests~=2.32.3 requests~=2.32.3
APScheduler~=3.11.0 APScheduler~=3.11.0
Flask~=2.2.3 Flask~=2.2.3
Flask-Cors~=4.0.1