mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
data_path
This commit is contained in:
parent
e7f107dec2
commit
694965a582
4 changed files with 9 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -12,7 +12,7 @@ class App(BaseModel):
|
|||
official_app: bool
|
||||
app_version: str
|
||||
create_time: str
|
||||
volume_data = []
|
||||
volume_data = str
|
||||
config_path = str
|
||||
image_url: str
|
||||
app_https: bool
|
||||
|
|
|
@ -319,7 +319,7 @@ def get_apps_from_compose():
|
|||
official_app = False
|
||||
app_version = ""
|
||||
create_time = ""
|
||||
volume_data = []
|
||||
volume_data = ""
|
||||
config_path = app_path
|
||||
app_https = False
|
||||
app_replace_url = False
|
||||
|
@ -360,10 +360,10 @@ def get_apps_from_compose():
|
|||
else:
|
||||
default_domain = domain
|
||||
except IndexError:
|
||||
pass
|
||||
pass
|
||||
try:
|
||||
app_version = env_map.get("APP_VERSION")
|
||||
volume_data = ["/var/lib/docker/volumes"]
|
||||
volume_data = "/data/apps/" + customer_name + "/data"
|
||||
user_name = env_map.get("APP_USER","")
|
||||
password = env_map.get("POWER_PASSWORD","")
|
||||
|
||||
|
|
|
@ -151,6 +151,10 @@ def check_app_compose(app_name, customer_name):
|
|||
# set random password
|
||||
power_password = shell_execute.execute_command_output_all("cat /data/apps/" + customer_name +"/.env")["result"]
|
||||
if "POWER_PASSWORD" in power_password:
|
||||
try:
|
||||
shell_execute.execute_command_output_all("docker rm -f pwgen")
|
||||
except Exception:
|
||||
pass
|
||||
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")
|
||||
|
|
Loading…
Reference in a new issue