do something when fastapi start

This commit is contained in:
qiaofeng1227 2023-08-02 11:05:06 +08:00
parent 473efe528c
commit 0d614fe891
2 changed files with 2 additions and 2 deletions

View file

@ -11,7 +11,7 @@ COPY static ./static
COPY requirements.txt main.py database.sqlite ./
RUN apt update
# Install supervisords
# Install supervisord
RUN apt install -y supervisor
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY config/cmd.sh /cmd.sh

View file

@ -15,7 +15,7 @@ app = FastAPI(docs_url=None, redoc_url=None, openapi_url="/")
@app.on_event("startup")
async def startup_event():
print("应用程序已启动!")
myLogger.info_logger("应用程序已启动!")
def get_app():
origins = [