do something when fastapi start
This commit is contained in:
parent
473efe528c
commit
0d614fe891
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Reference in a new issue