diff --git a/Dockerfile.sandbox b/Dockerfile.sandbox index 6ef3416900..205f9acca1 100644 --- a/Dockerfile.sandbox +++ b/Dockerfile.sandbox @@ -41,9 +41,11 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ chmod -R a+rwX /opt/rustup /opt/cargo && \ ln -s /opt/cargo/bin/* /usr/local/bin/ -# Install sqlx-cli (for database migrations) +# Install sqlx-cli (for database migrations) and cargo-watch (for auto-reload) RUN cargo install sqlx-cli --no-default-features --features native-tls,postgres && \ + cargo install cargo-watch && \ ln -sf /opt/cargo/bin/sqlx /usr/local/bin/sqlx && \ + ln -sf /opt/cargo/bin/cargo-watch /usr/local/bin/cargo-watch && \ chmod -R a+rwX /opt/cargo # Embed network init script (sets up iptables firewall, then drops privileges) diff --git a/dev-dashboard/backend/src/workmux.ts b/dev-dashboard/backend/src/workmux.ts index 058e41a2a2..f7dfca188e 100644 --- a/dev-dashboard/backend/src/workmux.ts +++ b/dev-dashboard/backend/src/workmux.ts @@ -93,7 +93,7 @@ function buildSystemPrompt(profile: Profile, env: Record): strin } lines.push(`This worktree is configured with the following ports:`); - lines.push(`- Backend: port ${backendPort}. Start with: cd backend && DATABASE_URL=postgres://postgres:changeme@localhost:5432/windmill cargo run -- --port ${backendPort}`); + lines.push(`- Backend: port ${backendPort}. Start with: cd backend && PORT=${backendPort} DATABASE_URL=postgres://postgres:changeme@localhost:5432/windmill cargo watch -x run`); lines.push(`- Frontend: port ${frontendPort}. Start with: cd frontend && REMOTE=http://localhost:${backendPort} npm run dev -- --port ${frontendPort} --host 0.0.0.0`); return lines.join(" ");