From c6bf20a9db70ed09a67eb641e6853e65bfa7f08a Mon Sep 17 00:00:00 2001 From: fal7w <147312030+fal7w@users.noreply.github.com> Date: Thu, 30 Nov 2023 21:53:10 +0300 Subject: [PATCH] Create creat_site.py --- fintechsys/creat_site.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 fintechsys/creat_site.py diff --git a/fintechsys/creat_site.py b/fintechsys/creat_site.py new file mode 100644 index 00000000..202b1d0a --- /dev/null +++ b/fintechsys/creat_site.py @@ -0,0 +1,31 @@ +import subprocess + +def run_docker_command(command): + try: + # Execute the command and capture the output + process = subprocess.Popen(command, shell=True) + process.wait() + + # Check the return code + if process.returncode == 0: + print("Docker Compose command executed successfully.") + else: + print("Docker Compose command failed.") + except Exception as e: + print("An error occurred:", str(e)) + +if __name__ == "__main__": + # Define your Docker Compose command + docker_command = "docker compose --project-name erpnext-one exec backend \ + bench new-site --no-mariadb-socket --mariadb-root-password fintech2023 \ + --install-app hrms --set-default --install-app rule_management \ + --install-app remittance_base --install-app remittance --install-app bulk_remittance \ + --install-app remittance_stellar_integration --install-app client_account_management \ + --install-app teller_for_erpnext --install-app teller_for_agent \ + --install-app remittance_agent_service --install-app payment_management \ + --install-app bank_services --install-app remittance_customize \ + --install-app remittance_network_manager --install-app erpnext_theme \ + --install-app remittance_website --admin-password fintech2023 agent.fintechsys.net" + + # Call the function with your Docker Compose command + run_docker_command(docker_command)