#what are all these keys?

14 messages · Page 1 of 1 (latest)

uneven zodiac
#

Which keys are needed for app builds?

CONVEX_DEPLOYMENT
EXPO_PUBLIC_CONVEX_URL
EXPO_PUBLIC_CONVEX_SITE
AUTH_RESEND_KEY

muted estuaryBOT
#

Hi @uneven zodiac. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the provided knowledge sources, I can explain the keys you've mentioned:

  1. CONVEX_DEPLOYMENT: This is the name of your development deployment where your functions are pushed to and served from during local development. It's stored in the .env.local file and used by commands like npx convex dev Production > Project Configuration (https://docs.convex.dev/production/project-configuration).

  2. EXPO_PUBLIC_CONVEX_URL: This is the URL of your Convex deployment that your client app connects to. It's specific to each developer and should be different for each one Discord support thread: Use personal dev deployment instead of other team members. (https://discord.com/channels/1019350475847499849/1247541897967177779).

  3. EXPO_PUBLIC_CONVEX_SITE: While not explicitly explained in the provided sources, this likely refers to the site URL of your Convex deployment, similar to the CONVEX_SITE_URL system environment variable Production > Environment Variables > System environment variables (https://docs.convex.dev/production/environment-variables#system-environment-variables).

  4. AUTH_RESEND_KEY: This is an API key for the Resend email service, used when configuring email authentication with Convex Auth > Config > OTPs (https://labs.convex.dev/auth/config/otps).

For app builds, the key needed depends on your setup:

#

Remember to set these environment variables appropriately for your development and production environments.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@uneven zodiac Kapa.ai is still learning and improving, please let me know how I did by reacting below.

uneven zodiac
#

@muted estuary for an expo app with eas builds, I just need the EXPO_PUBLIC_CONVEX_URL, EXPO_PUBLIC_CONVEX_SITE, and AUTH_RESEND_KEY

muted estuaryBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

Based on the information provided in the knowledge sources, I can't definitively confirm that those are the only keys you need for an Expo app with EAS builds. However, I can provide some insights based on the available information:

  1. EXPO_PUBLIC_CONVEX_URL: This is indeed necessary for your client app to connect to your Convex deployment Discord support thread: Use personal dev deployment instead of other team members. (https://discord.com/channels/1019350475847499849/1247541897967177779).

  2. EXPO_PUBLIC_CONVEX_SITE: While this isn't explicitly mentioned in the provided sources for Expo apps, it might be related to the SITE_URL environment variable, which is sometimes required for authentication in React Native apps Discord support thread: Convex Auth Missing SITE_URL in Expo App (https://discord.com/channels/1019350475847499849/1287155640594071583).

  3. AUTH_RESEND_KEY: This is necessary if you're using Resend for email authentication Auth > Config > OTPs (https://labs.convex.dev/auth/config/otps).

However, it's important to note that the exact keys needed can depend on your specific setup and the features you're using. For example:

#

For the most accurate information about the keys needed for your specific Expo app with EAS builds, I recommend consulting the Convex documentation or reaching out to Convex support directly, as the provided knowledge sources don't give a complete picture for this specific use case.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@uneven zodiac Kapa.ai is still learning and improving, please let me know how I did by reacting below.

uneven zodiac
#

@muted estuary How do I CLI set an env variable for production vs dev? currently it's jsut going to dev.

muted estuaryBOT
#

Let me check the knowledge base for you again. One moment! :books:

#

To set environment variables for production versus development using the Convex CLI, you can use different commands depending on which environment you're targeting. Here's how you can do it:

  1. For development (dev) environment:

    npx convex env set <name> <value>
    
  2. For production environment:

    npx convex env set --prod <name> <value>
    

The --prod flag is used to specify that you want to set the environment variable for the production deployment.

You can also list, get, and remove environment variables using similar commands:

npx convex env list
npx convex env get <name>
npx convex env remove <name>

These commands will work for the development environment by default. To perform these actions for the production environment, add the --prod flag.

It's important to note that Convex maintains separate environment variables for development and production deployments. This allows you to have different configurations for each environment CLI > Develop > Read and write environment variables (https://docs.convex.dev/cli#read-and-write-environment-variables).

If you're finding that your commands are only affecting the dev environment, make sure you're using the --prod flag when you want to target the production deployment.

Additionally, you can use the Convex dashboard to manage environment variables for both development and production environments. You can access the dashboard using:

npx convex dashboard

This will open the dashboard where you can set, view, and manage environment variables for both environments Discord support thread: Unable to push deployment config to ... > Answers (https://discord.com/channels/1019350475847499849/1253496491226697798).

#

Remember, it's a best practice to have different configurations for dev and prod environments to maintain separation and avoid potential issues.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: