Configuration
View SourceRequired keys
| Key | Description |
|---|---|
project_id | Your Appwrite project ID |
secret | Your Appwrite API key |
root_uri | Appwrite endpoint (default: https://cloud.appwrite.io/v1) |
Compile-time config
Add to config/config.exs:
config :appwrite,
project_id: System.get_env("APPWRITE_PROJECT_ID"),
secret: System.get_env("APPWRITE_SECRET"),
root_uri: System.get_env("APPWRITE_ENDPOINT", "https://cloud.appwrite.io/v1")Runtime config (recommended for production)
In config/runtime.exs:
import Config
if config_env() == :prod do
config :appwrite,
project_id: System.fetch_env!("APPWRITE_PROJECT_ID"),
secret: System.fetch_env!("APPWRITE_SECRET"),
root_uri: System.get_env("APPWRITE_ENDPOINT", "https://cloud.appwrite.io/v1")
endTest config
In config/test.exs:
import Config
config :appwrite,
project_id: System.get_env("APPWRITE_TEST_PROJECT_ID", "test-project"),
secret: System.get_env("APPWRITE_TEST_SECRET", "test-secret"),
root_uri: System.get_env("APPWRITE_TEST_ENDPOINT", "https://cloud.appwrite.io/v1")Self-hosted Appwrite
Set root_uri to your own endpoint:
config :appwrite,
root_uri: "https://appwrite.mycompany.com/v1"