#How do I share my dev deployment with another team member
11 messages · Page 1 of 1 (latest)
Hi @prisma hatch. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Yes, you can share your dev deployment with another team member. Here's how you can do it:
- Navigate to your Convex Dashboard.
- Navigate to your dev deployment if you're not already there.
- Copy the URL in your address bar.
- Share it out.
If your team member wants to develop locally against your development deployment, they can change the environment variables in their .env.local to the deployment you want to target.
However, it's important to note that sharing dev deployments can be tricky because you'll race each other to push up conflicting code changes. An alternative approach could be to take a snapshot of your dev deployment and have your team member import that into his. This can be done using the npx convex export and npx convex import commands.
Remember, they have to be a member of your Convex team to be able to view the link to your dev deployment dashboard.
Sources:
- Discord support thread: Creating more than one environment > Answers (https://discord.com/channels/1019350475847499849/1240081030434783232)
- Discord support thread: Do geographically distant developers experience different errors? > Answers Part 1 (https://discord.com/channels/1019350475847499849/1272995270698991717)
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@prisma hatch kapa.ai is still learning and improving, please let us know how it did by reacting below
@swift shale once my changes are good, how do I push my changes to the main development branch?
Let me check the knowledge base for you. One moment! :books:
To push your changes to the main development branch, you would typically use Git. Here's a general workflow:
- Stage your changes:
git add . - Commit your changes:
git commit -m "Your commit message" - Push your changes to your branch:
git push origin your-branch-name - Open a pull request to the
mainbranch on your Git hosting platform (like GitHub, GitLab, or Bitbucket). - After the pull request is reviewed and approved, you can merge it into the
mainbranch.
Once your changes are in the main branch, you can deploy to production. This can happen automatically when changes get merged to the designated branch (like main). Alternatively, one of the team members can deploy to production manually by running npx convex deploy.
Remember, you should only be deploying to your production deployment once you have tested your changes on your local deployment.
Sources:
- Deploying Your App to Production > Typical team development workflow (https://docs.convex.dev/production#typical-team-development-workflow)
- Production > Project Configuration (https://docs.convex.dev/production/project-configuration)
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@prisma hatch kapa.ai is still learning and improving, please let us know how it did by reacting below
@swift shale I meant how do I push my development deployment to the production deployment or a staging one. What is the order I should do it in?
Let me check the knowledge base for you. One moment! :books:
To push your development deployment to the production deployment, you can follow these steps:
- Test your changes thoroughly in your development deployment.
- Once you're ready to deploy to production, you can use the
npx convex deploycommand. This command will ask for a confirmation and then deploy to the production deployment in the same project as your configured developmentCONVEX_DEPLOYMENT.
Here's the command:
npx convex deploy
If you're deploying via a hosting/CI provider, you can follow the hosting docs. The npx convex deploy command run by the CI pipeline will use the CONVEX_DEPLOY_KEY, and the frontend build command will use the deployment URL variable, both configured in your CI environment.
If you want to deploy to a staging environment, you can create a separate project for staging. You can run the same codebase on multiple different prod deployments belonging to different projects.
Sources:
- Production > Project Configuration (https://docs.convex.dev/production/project-configuration)
- Deploying Your App to Production (https://docs.convex.dev/production)