Compare commits

...

3 Commits

Author SHA1 Message Date
centdix
4a40ff041a config 2026-03-11 12:26:12 +01:00
centdix
0edd611232 chore: webmux config 2026-03-10 16:37:22 +01:00
centdix
34748a87b9 change 2026-03-10 16:29:18 +01:00
4 changed files with 37 additions and 15 deletions

View File

@@ -32,7 +32,7 @@ services:
portStep: 10
profiles:
default:
full:
runtime: host
yolo: true
envPassthrough: []
@@ -44,7 +44,9 @@ profiles:
- Pane 2: frontend (npm run dev)
To check logs, use: \`tmux capture-pane -t .1 -p -S -50\` (backend) or \`tmux capture-pane -t .2 -p -S -50\` (frontend).
When restarting backend or frontend, make sure to use ${BACKEND_PORT} and ${FRONTEND_PORT}.
To connect to the database, use this connection string: ${DATABASE_URL}
Because we are running backend with cargo watch, to verify your changes, just check the logs in the backend pane. No need for cargo check.
IMPORTANT: Read docs/autonomous-mode.md before starting any work.
panes:
- id: agent
kind: agent
@@ -57,9 +59,22 @@ profiles:
kind: command
split: bottom
command: ROOT="$(git rev-parse --show-toplevel)"; [ -f "$ROOT/.env.local" ] && source "$ROOT/.env.local"; cd "$ROOT/frontend" && npm run generate-backend-client && REMOTE=${REMOTE:-http://localhost:${BACKEND_PORT:-8000}} npm run dev -- --port ${FRONTEND_PORT:-3000} --host 0.0.0.0
minimal:
runtime: host
yolo: true
envPassthrough: []
systemPrompt: >
IMPORTANT: Read docs/autonomous-mode.md before starting any work.
panes:
- id: agent
kind: agent
focus: true
integrations:
github:
linkedRepos: []
linkedRepos:
- repo: windmill-labs/windmill-ee-private
alias: ee-private
dir: ../windmill-ee-private__worktrees
linear:
enabled: true

View File

@@ -7,7 +7,7 @@ backend_port="${BACKEND_PORT:-}"
frontend_port="${FRONTEND_PORT:-}"
if [[ -z "$backend_port" || -z "$frontend_port" ]]; then
echo "Missing BACKEND_PORT or FRONTEND_PORT in hook environment" >&2
echo "Missing BACKEND_PORT or FRONTEND_PORT in hook environment" >> /home/farhad/Desktop/windmill/hello.txt
exit 1
fi
@@ -21,5 +21,5 @@ if [[ -n "${CARGO_FEATURES:-}" ]]; then
echo "CARGO_FEATURES=$CARGO_FEATURES" >> .env.local
fi
echo "Created .env.local with ports: backend=$backend_port, frontend=$frontend_port"
echo "Created .env.local with ports: backend=$backend_port, frontend=$frontend_port" >> /home/farhad/Desktop/windmill/hello.txt
wm_shared_post_create "$(pwd)"

View File

@@ -3,5 +3,6 @@ set -euo pipefail
source "$(dirname "${BASH_SOURCE[0]}")/worktree-common.sh"
echo "pre-remove" >> /home/farhad/Desktop/windmill/hello.txt
wm_kill_processes_from_env_file "$(pwd)/.env.local"
wm_shared_pre_remove "$(pwd)"

View File

@@ -23,42 +23,42 @@ wm_setup_database() {
db_conn="postgres://postgres:changeme@127.0.0.1:5432"
if ! command -v psql >/dev/null 2>&1; then
echo "WARNING: psql not found, skipping per-worktree database creation" >&2
echo "WARNING: psql not found, skipping per-worktree database creation" >> /home/farhad/Desktop/windmill/hello.txt
return
fi
if psql "$db_conn/postgres" -tc "SELECT 1 FROM pg_database WHERE datname = '${db_name}'" 2>/dev/null | grep -q 1; then
echo "Database $db_name already exists"
echo "Database $db_name already exists" >> /home/farhad/Desktop/windmill/hello.txt
else
if wm_is_true "${WM_CLONE_DB:-}"; then
psql "$db_conn/postgres" -c "SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname = 'windmill' AND pid <> pg_backend_pid();" 2>/dev/null || true
psql "$db_conn/postgres" -c "CREATE DATABASE ${db_name} TEMPLATE windmill" 2>/dev/null \
&& echo "Created database $db_name (template: windmill)" \
|| echo "WARNING: Could not create database $db_name from template windmill" >&2
&& echo "Created database $db_name (template: windmill)" >> /home/farhad/Desktop/windmill/hello.txt \
|| echo "WARNING: Could not create database $db_name from template windmill" >> /home/farhad/Desktop/windmill/hello.txt
else
psql "$db_conn/postgres" -c "CREATE DATABASE ${db_name}" 2>/dev/null \
&& echo "Created database $db_name" \
|| echo "WARNING: Could not create database $db_name (is PostgreSQL running?)" >&2
&& echo "Created database $db_name" >> /home/farhad/Desktop/windmill/hello.txt \
|| echo "WARNING: Could not create database $db_name (is PostgreSQL running?)" >> /home/farhad/Desktop/windmill/hello.txt
fi
fi
db_url="${db_conn}/${db_name}?sslmode=disable"
DATABASE_URL="$db_url" sqlx migrate run --source "${repo_root}/backend/migrations" \
&& echo "Migrations applied to $db_name" \
|| echo "WARNING: Could not run migrations on $db_name" >&2
|| echo "WARNING: Could not run migrations on $db_name" >> /home/farhad/Desktop/windmill/hello.txt
license_key="$(psql "$db_conn/windmill" -t -A -c "SELECT value FROM global_settings WHERE name = 'license_key'" 2>/dev/null || true)"
if [[ -n "$license_key" ]]; then
psql "$db_url" -c "INSERT INTO global_settings (name, value) VALUES ('license_key', '${license_key}'::jsonb) ON CONFLICT (name) DO UPDATE SET value = EXCLUDED.value" 2>/dev/null \
&& echo "Copied license_key to $db_name" \
|| echo "WARNING: Could not copy license_key to $db_name" >&2
&& echo "Copied license_key to $db_name" >> /home/farhad/Desktop/windmill/hello.txt \
|| echo "WARNING: Could not copy license_key to $db_name" >> /home/farhad/Desktop/windmill/hello.txt
fi
cat >> "$env_file" <<EOF
export DATABASE_URL=$db_url
WM_DB_NAME=$db_name
EOF
echo "Added DATABASE_URL for database $db_name to .env.local"
echo "Added DATABASE_URL for database $db_name to .env.local" >> /home/farhad/Desktop/windmill/hello.txt
}
wm_copy_dependencies() {
@@ -86,7 +86,7 @@ wm_allow_direnv() {
local repo_root=$1
if command -v direnv >/dev/null 2>&1 && [[ -f "${repo_root}/.envrc" ]]; then
(cd "$repo_root" && direnv allow)
echo "direnv allowed"
echo "direnv allowed" >> /home/farhad/Desktop/windmill/hello.txt
fi
}
@@ -202,11 +202,17 @@ wm_shared_post_create() {
local main_repo_root
main_repo_root="$(wm_main_repo_root "$repo_root")"
echo "main_repo_root: $main_repo_root" >> /home/farhad/Desktop/windmill/hello.txt
wm_allow_direnv "$repo_root"
echo "allowed direnv" >> /home/farhad/Desktop/windmill/hello.txt
wm_setup_database "$repo_root" "${repo_root}/.env.local"
echo "setup database" >> /home/farhad/Desktop/windmill/hello.txt
wm_copy_dependencies "$repo_root" "$main_repo_root"
echo "copied dependencies" >> /home/farhad/Desktop/windmill/hello.txt
wm_trust_claude "$repo_root"
echo "trusted claude" >> /home/farhad/Desktop/windmill/hello.txt
wm_setup_ee_worktree "$repo_root" "$main_repo_root"
echo "setup ee worktree" >> /home/farhad/Desktop/windmill/hello.txt
}
wm_kill_processes_from_env_file() {