From 3ebb15cbab3f9dba36058813721fa0e632d8daba Mon Sep 17 00:00:00 2001 From: Petr Date: Sun, 15 Mar 2026 00:12:46 +0100 Subject: [PATCH] Make project_dir, ssh_key configurable in Get Started UI Read server.project_dir from instance.yaml (default: 'data-analyst'). Replace hardcoded 'data-analyst' folder name and 'data_analyst_server' SSH key name in dashboard template with Jinja variables. --- webapp/app.py | 2 ++ webapp/config.py | 1 + webapp/templates/dashboard.html | 14 +++++++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/webapp/app.py b/webapp/app.py index e5ce408..f20272d 100644 --- a/webapp/app.py +++ b/webapp/app.py @@ -822,6 +822,7 @@ def register_routes(app: Flask) -> None: bootstrap_yaml = bootstrap_yaml.replace("{server_hostname}", Config.SERVER_HOSTNAME) bootstrap_yaml = bootstrap_yaml.replace("{ssh_alias}", Config.SSH_ALIAS) bootstrap_yaml = bootstrap_yaml.replace("{ssh_key}", Config.SSH_KEY) + bootstrap_yaml = bootstrap_yaml.replace("{project_dir}", Config.PROJECT_DIR) webapp_url = f"https://{Config.SERVER_HOSTNAME}" if Config.SERVER_HOSTNAME else "" bootstrap_yaml = bootstrap_yaml.replace("{webapp_url}", webapp_url) @@ -874,6 +875,7 @@ def register_routes(app: Flask) -> None: server_hostname=Config.SERVER_HOSTNAME, ssh_alias=Config.SSH_ALIAS, ssh_key=Config.SSH_KEY, + project_dir=Config.PROJECT_DIR, bootstrap_yaml=bootstrap_yaml, telegram_status=telegram_status, desktop_status=desktop_status, diff --git a/webapp/config.py b/webapp/config.py index adc1b5b..6ee9285 100644 --- a/webapp/config.py +++ b/webapp/config.py @@ -91,6 +91,7 @@ class Config: _get(_instance, "server", "hostname", default="")) SSH_ALIAS = _get(_instance, "server", "ssh_alias", default="data-analyst") SSH_KEY = _get(_instance, "server", "ssh_key", default="~/.ssh/data_analyst_server") + PROJECT_DIR = _get(_instance, "server", "project_dir", default="data-analyst") # Session config SESSION_TYPE = "filesystem" diff --git a/webapp/templates/dashboard.html b/webapp/templates/dashboard.html index 8583180..b5ef4ed 100644 --- a/webapp/templates/dashboard.html +++ b/webapp/templates/dashboard.html @@ -1878,7 +1878,7 @@

Set up your local environment

Run Claude Code in your project folder and paste the setup instructions to configure SSH, sync data, and initialize DuckDB.

- cd data-analyst && claude + cd {{ project_dir }} && claude + mkdir -p {{ project_dir }} && cd {{ project_dir }} +
$ - ssh-keygen -t ed25519 -f ~/.ssh/data_analyst_server -N '' - + ssh-keygen -t ed25519 -f {{ ssh_key }} -N '' +
$ - cat ~/.ssh/data_analyst_server.pub - + cat {{ ssh_key }}.pub +
# Copy the output above and paste it below