From 7fc66c115944b02e7e9dea676f9aad7f8c09daec Mon Sep 17 00:00:00 2001 From: SINeV Date: Sat, 16 Aug 2025 20:43:30 +0000 Subject: [PATCH] chore: Update default database settings and remove unused VSCode configurations --- .DS_Store | Bin 0 -> 8196 bytes development/installer.py | 12 ++-- development/vscode-example/launch.json | 77 ----------------------- development/vscode-example/settings.json | 3 - development/vscode-example/tasks.json | 22 ------- 5 files changed, 6 insertions(+), 108 deletions(-) create mode 100644 .DS_Store delete mode 100644 development/vscode-example/launch.json delete mode 100644 development/vscode-example/settings.json delete mode 100644 development/vscode-example/tasks.json diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..7ca38724e0d434adba95d7debbcdef6e4c128d12 GIT binary patch literal 8196 zcmeI1+fGwK6o&t)RUmkZV#4K)-e?R>c!L5hripkeTq8XQ#Fk|N?=;XE z{X-2w{?^>m2K@?_#*N;f-Rccmc(6mc$)WuE(-$AcJ+wL?FL_@u&M__Bv%}3$B73?erJ6&`K~cO6tXpiC1(flcMcrZT`^0mIcEN*Z zF{}I7?-Sd52jt&l{YP5ov+r3sWj!m@qr6AYVb;n5JG;SZ)>*x#>UnL?T~>RE+%Ji3 z$miJmDMab{$|4q6mn$@FXHD-bI}P_UtSzyh>YSaLc964nFpT98PyD(2q6^}&6BzaY znXkbNEYen}qvF0WK693qJpPOfFX-9ZyFzZpT>)Wd<{bS~e6;mRhtvG!5Vx;mD%dvO zGMe%GpMw!gWZ(uExRv@?wfld4{`>zMh$Om*3`7S076YzaYu4;%oSPFtiSdN`k!r>C oCaLrg8dI@xe;r3&|HF`e66UHwPEyGXCB6voG{hz{aH9h($ literal 0 HcmV?d00001 diff --git a/development/installer.py b/development/installer.py index edd62147..49917346 100755 --- a/development/installer.py +++ b/development/installer.py @@ -103,7 +103,7 @@ def get_args_parser(): action="store", type=str, help="admin password for site, default: admin", # noqa: E501 - default="admin", + default="123", ) parser.add_argument( "-d", @@ -111,7 +111,7 @@ def get_args_parser(): action="store", type=str, help="Database type to use (e.g., mariadb or postgres)", - default="mariadb", # Set your default database type here + default="postgres", # Set your default database type here ) return parser @@ -208,7 +208,7 @@ def create_site_in_bench(args): "bench", "new-site", f"--db-root-username=root", - f"--db-host=mariadb", # Should match the compose service name + f"--db-host=db", # Should match the compose service name f"--db-type={args.db_type}", # Add the selected database type f"--mariadb-user-host-login-scope=%", f"--db-root-password=123", # Replace with your MariaDB password @@ -217,14 +217,14 @@ def create_site_in_bench(args): else: cprint("Set db_host", level=3) subprocess.call( - ["bench", "set-config", "-g", "db_host", "postgresql"], + ["bench", "set-config", "-g", "db_host", "db"], cwd=os.getcwd() + "/" + args.bench_name, ) new_site_cmd = [ "bench", "new-site", - f"--db-root-username=root", - f"--db-host=postgresql", # Should match the compose service name + f"--db-root-username=postgres", + f"--db-host=db", # Should match the compose service name f"--db-type={args.db_type}", # Add the selected database type f"--db-root-password=123", # Replace with your PostgreSQL password f"--admin-password={args.admin_password}", diff --git a/development/vscode-example/launch.json b/development/vscode-example/launch.json deleted file mode 100644 index 7267fcf3..00000000 --- a/development/vscode-example/launch.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Bench Web", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", - "args": [ - "frappe", - "serve", - "--port", - "8000", - "--noreload", - "--nothreading" - ], - "cwd": "${workspaceFolder}/frappe-bench/sites", - "env": { - "DEV_SERVER": "1" - } - }, - { - "name": "Bench Short Worker", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", - "args": ["frappe", "worker", "--queue", "short"], - "cwd": "${workspaceFolder}/frappe-bench/sites", - "env": { - "DEV_SERVER": "1" - } - }, - { - "name": "Bench Default Worker", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", - "args": ["frappe", "worker", "--queue", "default"], - "cwd": "${workspaceFolder}/frappe-bench/sites", - "env": { - "DEV_SERVER": "1" - } - }, - { - "name": "Bench Long Worker", - "type": "debugpy", - "request": "launch", - "program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", - "args": ["frappe", "worker", "--queue", "long"], - "cwd": "${workspaceFolder}/frappe-bench/sites", - "env": { - "DEV_SERVER": "1" - } - }, - { - "name": "Honcho SocketIO Watch Schedule Worker", - "type": "debugpy", - "request": "launch", - "python": "/home/frappe/.pyenv/shims/python", - "program": "/home/frappe/.local/bin/honcho", - "cwd": "${workspaceFolder}/frappe-bench", - "console": "internalConsole", - "args": ["start", "socketio", "watch", "schedule", "worker"], - "postDebugTask": "Clean Honcho SocketIO Watch Schedule Worker" - } - ], - "compounds": [ - { - "name": "Honcho + Web debug", - "configurations": ["Bench Web", "Honcho SocketIO Watch Schedule Worker"], - "stopAll": true - } - ] -} diff --git a/development/vscode-example/settings.json b/development/vscode-example/settings.json deleted file mode 100644 index 1490b727..00000000 --- a/development/vscode-example/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "python.defaultInterpreterPath": "${workspaceFolder}/frappe-bench/env/bin/python" -} diff --git a/development/vscode-example/tasks.json b/development/vscode-example/tasks.json deleted file mode 100644 index 7c0e6739..00000000 --- a/development/vscode-example/tasks.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "label": "Clean Honcho SocketIO Watch Schedule Worker", - "detail": "When stopping the debug process from vscode window, the honcho won't receive the SIGINT signal. This task will send the SIGINT signal to the honcho processes.", - "type": "shell", - "command": "pkill -SIGINT -f bench; pkill -SIGINT -f socketio", - "isBackground": false, - "presentation": { - "echo": true, - "reveal": "silent", - "focus": false, - "panel": "shared", - "showReuseMessage": false, - "close": true - } - } - ] -}