other container name

This commit is contained in:
qiaofeng1227 2023-08-02 14:02:52 +08:00
parent e23011d9c1
commit 0554bd61ae
2 changed files with 2 additions and 1 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

@ -17,6 +17,7 @@ app = FastAPI(docs_url=None, redoc_url=None, openapi_url="/")
@app.on_event("startup")
async def startup_event():
myLogger.info_logger("start to write hostname")
shell_execute.execute_command_output_all("echo $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage) websoft9-redis >> /tmp/test")
shell_execute.execute_command_output_all("echo $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage) websoft9-appmanage >> /tmp/test")
def get_app():