This commit is contained in:
han0
2024-06-05 09:21:00 +08:00
parent a5619836f1
commit e6442b2cf9
4 changed files with 22 additions and 12 deletions

10
docker/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM python:3.7.16
ENV TZ Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN sed -i 's+http://deb.debian.org+http://mirrors.cloud.tencent.com+' /etc/apt/sources.list && sed -i 's+http://security.debian.org+http://mirrors.cloud.tencent.com+' /etc/apt/sources.list
RUN apt-get update && apt-get install -y rsync
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

View File

@@ -1,13 +1,13 @@
# try:
# from web.config import *
# except ModuleNotFoundError as e:
# pass
#
# APP_PATH = os.path.abspath(os.path.dirname(__file__))
#
# SECRET_KEY = "tE7?aS.1-7sP4dfvlE"
# TOKEN_SALT = "hi,_tool"
# QR_CODE_SALT = "code_qr"
#
# # 监听端口
# PORT = 7778
# 监听端口
PORT = 17778
try:
from web.config import *
except ModuleNotFoundError as e:
pass

View File

@@ -40,5 +40,5 @@ def calculate(year=2023, month=8):
if __name__ == '__main__':
from core.factory import ClientApp
with ClientApp().app_context:
calculate()
with ClientApp().app_context():
calculate(2024, 4)

View File

@@ -9,5 +9,5 @@ def collect(year=2023, month=11):
if __name__ == '__main__':
from core.factory import ClientApp
with ClientApp().app_context:
collect()
with ClientApp().app_context():
collect(2024, 4)