This commit is contained in:
qiaofeng1227 2023-08-02 17:02:16 +08:00
parent 8c6dde9fc3
commit 9bed8592f2
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -1,5 +1,7 @@
from api.utils.common_log import myLogger
from api.utils import shell_execute
shell_execute.execute_command_output_all("echo 11111 >> /tmp/test")
shell_execute.execute_command_output_all("docker ps >> /tmp/test")
shell_execute.execute_command_output_all("sed -i '/websoft9-appmanage/d' /etc/hosts")
shell_execute.execute_command_output_all("echo $(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' websoft9-appmanage) websoft9-appmanage >> /etc/hosts")