chore: Update default database settings and remove unused VSCode configurations

This commit is contained in:
SINeV 2025-08-16 20:43:30 +00:00
parent 315d427689
commit 7fc66c1159
5 changed files with 6 additions and 108 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View file

@ -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}",

View file

@ -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
}
]
}

View file

@ -1,3 +0,0 @@
{
"python.defaultInterpreterPath": "${workspaceFolder}/frappe-bench/env/bin/python"
}

View file

@ -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
}
}
]
}