#Trouble understanding team workflow using Convex.

14 messages · Page 1 of 1 (latest)

pure dagger
#

I've created the project in my team and invited all members. How can we work on the project at the same time if we all share the same dashboard? I read an answer from @late fiber that says "You might want to be collaborating around the "Prod" instance instead, so you can locally develop and he can work off of the last backend functions you pushed" I'm just a bit confused about what this means and how to go about using the prod/dev workflow.

late fiber
#

Every team member has their own dev deployment. There is a single prod deployment. Running npx convex dev syncs to your dev. npx convex deploy deploys to prod

#

Make sense?

pure dagger
#

Gotcha, so when I initially share the app through github and they run npx convex dev it creates their own dev instance?

late fiber
#

That way everyone can be working with their own schema and functions.

pure dagger
#

Thank you, that makes sense, my only question then is how do you resolve conflicts when deploying separate dev instances to prod?

late fiber
#

When you deploy to prod you are replacing the functions and schema. So you should probably just deploy from origin/main or something

pure dagger
#

And also are env keys shared across dev instances or do those need to be manually added each time

late fiber
#

If the data doesn’t match the schema you are pushing it will reject the push and tell you a document that doesn’t match

#

Env variables are separate. You can set defaults for preview deploys though. And you can copy from prod to dev on your own

#

So you can be working with different api keys etc

#

There’s now a cli command to get and set env variables too

pure dagger
#

Sweet, thank you!

late fiber
#

Enjoy!