diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..7ca38724 Binary files /dev/null and b/.DS_Store differ 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 - } - } - ] -}