I'm trying to deploy to Fly.io, but I keep hitting this error:
> [build 5/6] RUN npx convex deploy --cmd 'npm run build':
0.772 ✖ Error: You are not logged in. Log in with `npx convex dev` or set the CONVEX_DEPLOY_KEY environment variable.
I created a deploy key in my prod settings on the Convex dashboard. I read in the Fly docs about adding build secrets, but frankly the instructions feel incomplete/inaccurate:
- It says that I have to first mount the secret via a directive in the Dockerfile. However, after the example code, it says, "This creates a new file when running
docker build"—which it doesn't. I had to create that file myself and put the key into it, or else I just got an error that it couldn't find the file. - The docs then say that I need to also pass the key when calling
fly deploy, which feels redundant. If the key is in the file and the Dockerfile is configured to read it, why must I also pass it via a flag? Also, that doesn't help with the initial deployment usingfly launch.
Command-line tools aren't my strong suit, so I'm not sure what else to try.