mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-25 08:55:08 +00:00
Update create_site.py
This commit is contained in:
parent
e4d8567de0
commit
3df48fd07c
1 changed files with 21 additions and 22 deletions
|
|
@ -1,27 +1,26 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
def run_docker_command(command):
|
def run_docker_command():
|
||||||
try:
|
command = [
|
||||||
# Execute the command and capture the output
|
"docker", "compose", "--project-name", "erpnext-one", "exec", "backend",
|
||||||
process = subprocess.Popen(command, shell=True)
|
"bench", "new-site", "--no-mariadb-socket", "--mariadb-root-password", "fintech2023",
|
||||||
process.wait()
|
"--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"
|
||||||
|
]
|
||||||
|
|
||||||
# Check the return code
|
try:
|
||||||
if process.returncode == 0:
|
subprocess.run(command, check=True)
|
||||||
print("Docker Compose command executed successfully.")
|
print("Docker Compose command executed successfully.")
|
||||||
else:
|
except subprocess.CalledProcessError as e:
|
||||||
print("Docker Compose command failed.")
|
print(f"Error executing Docker Compose command: {e}")
|
||||||
except Exception as e:
|
|
||||||
print("An error occurred:", str(e))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Define your Docker Compose command
|
run_docker_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)
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue