mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-21 23:35:09 +00:00
chore: Update default database settings and remove unused VSCode configurations
This commit is contained in:
parent
315d427689
commit
7fc66c1159
5 changed files with 6 additions and 108 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
|
@ -103,7 +103,7 @@ def get_args_parser():
|
||||||
action="store",
|
action="store",
|
||||||
type=str,
|
type=str,
|
||||||
help="admin password for site, default: admin", # noqa: E501
|
help="admin password for site, default: admin", # noqa: E501
|
||||||
default="admin",
|
default="123",
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d",
|
"-d",
|
||||||
|
|
@ -111,7 +111,7 @@ def get_args_parser():
|
||||||
action="store",
|
action="store",
|
||||||
type=str,
|
type=str,
|
||||||
help="Database type to use (e.g., mariadb or postgres)",
|
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
|
return parser
|
||||||
|
|
||||||
|
|
@ -208,7 +208,7 @@ def create_site_in_bench(args):
|
||||||
"bench",
|
"bench",
|
||||||
"new-site",
|
"new-site",
|
||||||
f"--db-root-username=root",
|
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"--db-type={args.db_type}", # Add the selected database type
|
||||||
f"--mariadb-user-host-login-scope=%",
|
f"--mariadb-user-host-login-scope=%",
|
||||||
f"--db-root-password=123", # Replace with your MariaDB password
|
f"--db-root-password=123", # Replace with your MariaDB password
|
||||||
|
|
@ -217,14 +217,14 @@ def create_site_in_bench(args):
|
||||||
else:
|
else:
|
||||||
cprint("Set db_host", level=3)
|
cprint("Set db_host", level=3)
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
["bench", "set-config", "-g", "db_host", "postgresql"],
|
["bench", "set-config", "-g", "db_host", "db"],
|
||||||
cwd=os.getcwd() + "/" + args.bench_name,
|
cwd=os.getcwd() + "/" + args.bench_name,
|
||||||
)
|
)
|
||||||
new_site_cmd = [
|
new_site_cmd = [
|
||||||
"bench",
|
"bench",
|
||||||
"new-site",
|
"new-site",
|
||||||
f"--db-root-username=root",
|
f"--db-root-username=postgres",
|
||||||
f"--db-host=postgresql", # 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"--db-type={args.db_type}", # Add the selected database type
|
||||||
f"--db-root-password=123", # Replace with your PostgreSQL password
|
f"--db-root-password=123", # Replace with your PostgreSQL password
|
||||||
f"--admin-password={args.admin_password}",
|
f"--admin-password={args.admin_password}",
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"python.defaultInterpreterPath": "${workspaceFolder}/frappe-bench/env/bin/python"
|
|
||||||
}
|
|
||||||
|
|
@ -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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue