Local Convex Backend on remote server?
Hi all,
Thanks for the amazing software! I'm new to Convex and I've been trying to setup a Docker container to run https://github.com/a16z-infra/ai-town on Hugging Face Spaces, and I'm almost there! The idea is to have the ai-town running on a single container, so folks can have an easy start duplicating it as a Space, setting up their own LLMs, etc. It's a demo on dev and not production. I have everything running already, locally on my docker env, however when I set
VITE_CONVEX_URL
to the final space docker, in my case https://radames-ai-town.hf.space/backend
it trows an error on validateDeploymentUrl
https://github.com/get-convex/convex-backend/blob/13337fd5fe4ead354962df8b9c94fc22b5ab6ace/npm-packages/convex/src/common/index.ts#L23-L61
Thanks! looking forward to share about it when it works!3 Replies
Ah that check is to help regular convex users from entering a bad url. For now it looks like you’d have to work around it or fork the client. Could you have your url be /backend/localhost or /backend.convex.cloud? I wonder if /backend#localhost would work or if internally it would try to concatenate from there. Sorry you’re running into this
amazing! smart workaround thanks! I didn't noticed it was only checking the end of the string! since I have control over the proxy, I could change that route! 👏
but now I got another issue, not sure why, maybe i need to compile the backend on this remote machine?
going to try the latest https://github.com/get-convex/convex-backend/releases/download/precompiled-2024-05-07-13337fd/convex-local-backend-x86_64-unknown-linux-gnu.zip
Another potential issue is my Docker space user doesn't have root privileged access
thanks it's all resolved now!
great! When you have it in a good place to share, I'm sure others would love to see your Dockerfile / etc.