This commit is contained in:
76487013@qq.com 2023-06-05 16:10:46 +08:00
parent 2c927f2f84
commit 42412226ba
2 changed files with 5 additions and 2 deletions

View file

@ -10,7 +10,7 @@ COPY static ./static
COPY requirements.txt main.py ./
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

@ -144,6 +144,8 @@ def check_app_compose(app_name, customer_name):
s = s1 + '\n' + s2 + '\n' + s3
shell_execute.execute_command_output_all("cp -r " + library_path + " " + install_path)
env_path = install_path + "/.env"
get_map(env_path)
for port_name in port_dic:
port_value = get_start_port(s, port_dic[port_name])
modify_env(install_path + '/.env', port_name, port_value)
@ -158,7 +160,8 @@ def check_app_compose(app_name, customer_name):
new_password = shell_execute.execute_command_output_all("docker run --name pwgen backplane/pwgen 15")["result"].rstrip('\n') + "!"
modify_env(install_path + '/.env', 'POWER_PASSWORD', new_password)
shell_execute.execute_command_output_all("docker rm -f pwgen")
env_path = install_path + "/.env"
get_map(env_path)
myLogger.info_logger("Port check complete")
return