Back

Can't Override APPWRITE_FUNCTION_API_ENDPOINT on macos

  • 0
  • Self Hosted
  • Functions
Vincent Berthoumieux
5 Nov, 2024, 10:58

I'm trying to override the APPWRITE_FUNCTION_API_ENDPOINT variable set to localhost/v1 on my local appwrite instance.

I've tried a functions/.env file as stated in https://appwrite.io/blog/post/announcing-local-development

TypeScript
APPWRITE_FUNCTION_API_ENDPOINT=http://host.docker.internal/v1

and also export APPWRITE_FUNCTION_API_ENDPOINT=http://host.docker.internal/v1

but Platform.environment['APPWRITE_FUNCTION_API_ENDPOINT'] always resolves to "localhost/v1"

what am I missing ?

TL;DR
Developers on macOS are having trouble overriding the APPWRITE_FUNCTION_API_ENDPOINT variable in their local Appwrite instance, despite trying different approaches like creating a .env file in the functions folder and exporting the variable. The issue seems to persist as the variable always resolves to "localhost/v1."
Vincent Berthoumieux
5 Nov, 2024, 10:59

the top level .env is the docker compose env file

Vincent Berthoumieux
5 Nov, 2024, 10:59

Can't Override APPWRITE_FUNCTION_API_ENDPOINT on macos

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more