jeevanpillay
jeevanpillay3mo ago

git worktree setup with convex

i'm struggling to figure out how to have distinct convex cloud dev environments for each of my worktree during my dev phase. i have tried local dev also, but that doesnt seem to work either.
5 Replies
jeevanpillay
jeevanpillayOP3mo ago
okay i think i fiugred out a method using by using convex local deployments after removing the CONVEX_DEPLOYMENT field. however, it seems this only works in interactive terminal mode. would be much easier if we can just pass in the deployment name using --name feature/123
jeevanpillay
jeevanpillayOP3mo ago
GitHub
Support custom deployment names via CLI arguments · Issue #51 · g...
Description Currently, when creating local Convex deployments, there's no way to specify a custom deployment name via CLI arguments. This feature would allow developers to pass deployment names...
()
()3mo ago
i scripted a solution ~ before launching convex check if the file .env.local exists if it doesnt create it and set
CONVEX_SITE_URL=http://localhost:5173
CONVEX_DEPLOYMENT=anonymous:anonymous-your-project-name
SETUP_COMPLETE=true
CONVEX_SITE_URL=http://localhost:5173
CONVEX_DEPLOYMENT=anonymous:anonymous-your-project-name
SETUP_COMPLETE=true
this starts it locally without a interactive terminal
jeevanpillay
jeevanpillayOP2mo ago
legend.
()
()2mo ago
this isnt enough though ~ if works if this DEPLOYMENT was used before (it then gets persisted in ~/.convex) but if this is the first time convex sees this deployment on this machine it also prompts for some stuff, and i found no way to bypass these prompts for those i wrote an expect script https://phoenixnap.com/kb/linux-expect

Did you find this page helpful?