From 04014446fc49c72523953c7fff1d2f539d544d29 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
Appwrite supports automatic deployments through Git integration.
In order for Appwrite to access your repos, you must configure a GitHub app to enable this integration.
+ The GitHub app requires the following permissions。
You'll have to configure the following environment variables. Repository permissions Subscribe to events After creating your app, you'll have to configure the following environment variables.
+
+
+
+
+
+
+
+ Permission
+ Access
+
+
+ Administration
+ Read and write
+
+
+ Checks
+ Read and write.
+
+
+ Contents
+ Read and write
+
+
+ Issues
+ Read and write
+
+
+ Pull requests
+ Read and write
+
+
+
+Webhooks
+ Read and write
+
+
+
+
+
+
+
+
+ Event
+
+
+ Meta
+
+
+ Issue comment
+
+
+ Issues
+
+
+ Pull request
+
+
+ Push
+
+
+
+Respository
+
From b14f78b12355c2a0b37e155fd434564522d93241 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
From 96eb0896d7790daa3e761d108d2e3a28477e593a Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
Event
+
+
-
Meta
+ Meta Issue comment Issues
-
- Issue comment
-
-
- Issues
-
-
- Pull request
-
-
- Push
-
-
Respository
+ Pull request Push Respository
- For example, in a todo app, a user can create a team for one of their todo lists and invite another user to the team to grant the other user access. + For example, in a todo app, a user can create a team for one of their todo lists and invite another user to the team to grant the other user access. The invited user can accept the invitation to gain access. If the user's ever removed from the team, they'll lose access again.
diff --git a/app/views/docs/functions-deploy.phtml b/app/views/docs/functions-deploy.phtml index 934166ed..d17948fa 100644 --- a/app/views/docs/functions-deploy.phtml +++ b/app/views/docs/functions-deploy.phtml @@ -71,7 +71,7 @@Before you can deploy with the Appwrite CLI, make sure you've installed and initialized the CLI.
+Before you can deploy with the Appwrite CLI, make sure you've installed and initialized the CLI.
To deploy with the Appwrite CLI, your function must be added to appwrite.json
that tells the CLI where each function is stored.
diff --git a/app/views/docs/functions-develop.phtml b/app/views/docs/functions-develop.phtml
index 39617c17..74272e38 100644
--- a/app/views/docs/functions-develop.phtml
+++ b/app/views/docs/functions-develop.phtml
@@ -2637,32 +2637,32 @@ public class Main {
req
and res
has been replaced by context
, which contains new logger methods.
- Learn about context.
+ Learn about context.
context.log()
and context.error()
functions.
You can no longer use native logging methods.
- Learn about logging.
+ Learn about logging.
req.variables
has been deprecated.
You can now access variables passed into each function as environment variables.
- Learn about environment variables.
+ Learn about environment variables.
req
object has been updated to use terminology consistent with typical HTTP concepts.
You'll now find familiar concepts like headers, body, HTTP methods, and others.
- Learn about request.
+ Learn about request.
return context.res.send("")
.
This prevents confusing errors when functions are terminated prematurely before a response is sent.
- Learn about response.
+ Learn about response.
context.req
object as headers.
From 24ab17a5163b2b9fa47d4bc7155c0765720e9e9d Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge" Appwrite supports automatic deployments through Git integration. In order for Appwrite to access your repos, you must configure a GitHub app to enable this integration. - The GitHub app requires the following permissions。 + The GitHub app requires the following configurations.
+
+ For automatic Git deployment to work, Appwrite needs to receive communication from GitHub, this means your Appwrite project must be accessible on the internet.
+ If you're running on localhost
, you need to run a proxy like ngrok.
+
Callback URLs
++ GitHub will use callback URLs to communicate with Appwrite. + Set these callback URLs under Identifying and authorizing users. +
+URLs | +
http://[HOSTNAME_OR_IP]/v1/vcs/github/callback | +
http://[HOSTNAME_OR_IP]/v1/account/sessions/oauth2/callback/github/console | +
Post installation
+Check the Redirect on update box under the Post installation section.
+Repository permissions
Checks | Read and write. | +||
Commit Statuses | +Read and write | +||
Contents | Read and write | @@ -52,6 +85,10 @@Issues | Read and write |
Metadata | +Read-only | +||
Pull requests | Read and write | @@ -63,6 +100,24 @@
Account permissions
+ +Permission | +Access | +
Email address | +Read-only | +
Subscribe to events
Meta | Issue comment | Issues | -|||
Pull request | Push | Respository | +Pull request | Push |
Learn more about environment variables
Appwrite supports automatic deployments through Git integration. - In order for Appwrite to access your repos, you must configure a GitHub app to enable this integration. + In order for Appwrite to access your repos, you must create a GitHub app to enable this integration. The GitHub app requires the following configurations.
@@ -31,7 +31,7 @@ If you're running onlocalhost
, you need to run a proxy like ngrok.
-Callback URLs
+GitHub will use callback URLs to communicate with Appwrite. Set these callback URLs under Identifying and authorizing users. @@ -44,19 +44,23 @@
http://[HOSTNAME_OR_IP]/v1/vcs/github/callback
http://[HOSTNAME_OR_IP]/v1/account/sessions/oauth2/callback/github/console
Post installation
-Check the Redirect on update box under the Post installation section.
- -Repository permissions
++ Check the Redirect on update box under the Post installation section. +
++ Configure these permissions under the Repository permission dropdown. +
Account permissions
- ++ Configure these permissions under the Account Permission dropdown. +
Subscribe to events
- ++ Select these under the Subscribe to events dropdown. +
After creating your app, you'll have to configure the following environment variables.
_APP_VCS_GITHUB_APP_NAME | -Name of your GitHub app. This value should be set to your GitHub application's URL. | +Name of your GitHub app. This is the display name you'll see on GitHub and it will be visible in your GitHub app's URL. |
_APP_VCS_GITHUB_PRIVATE_KEY | @@ -172,8 +180,6 @@
Learn more about environment variables
Appwrite Cloud has a default SMTP server to get you started.
This SMTP server sends generic emails and doesn't allow customizing SMTP templates.
From e332cef9480179c5e3a8fe6a11307945e8ff57bc Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge" You can find a full list of supported runtimes on the environment variables page. You can also configure the maximum timeout that can be set on individual Appwrite functions. The maximum configurable timeout can be increased by changing the You can also configure the maximum timeout that can be set on individual Appwrite functions. The maximum configurable timeout can be increased by changing the Appwrite's Storage Service can be configured to store files locally, or with self-hosted and cloud storage services. By default, Appwrite's Storage Service stores files on your server's local storage. If you expect large volumes of data or the need to have scalable data storage, you may choose to use a separate storage service. Appwrite supports AWS S3, Digital Ocean Spaces, Backblaze, Akamai Object Storage, and Wasabi as storage adaptors. Some of these services can be self-hosted, just like Appwrite. Appwrite supports AWS S3, Digital Ocean Spaces, Backblaze, Akamai Object Storage, and Wasabi as storage adapters. Some of these services can be self-hosted, just like Appwrite. You can select which storage adaptor to use by setting the You can select which storage adaptor to use by setting the The maximum size for individual file uploads is controlled by the After editing your Self-hosting Appwrite gives you more configurable options. You can customize Appwrite with your choice of S3 compatible storage adaptors, email and SMS providers, functions runtimes, and more. Self-hosting Appwrite gives you more configurable options. You can customize Appwrite with your choice of S3 compatible storage adapters, email and SMS providers, functions runtimes, and more. Learn about configuring Appwrite
- Labels are a good way to flag a user to grant them access to resources.
+ Labels are a good way to categorize a user to grant them access to resources.
For example, a
- GitHub will use callback URLs to communicate with Appwrite.
+ GitHub will use callback URLs to redirect users back to Appwrite.
Set these callback URLs under Identifying and authorizing users.
+ GitHub will notify Appwrite about events like new commits using webhooks.
+ Under Webhook, you need to check the Active checkbox.
+ You also need to set the Webhook URL as
+ If you're running Appwrite on
Configure these permissions under the Repository permission dropdown.
@@ -182,6 +195,7 @@
Learn more about environment variables
Not all function runtimes are enabled by default. Enable the runtimes that you need and disable unused runtimes to save disk space on your server.
From 3fc771866869bb3b23cb08b60cc3df054396cbd7 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
- Check the Redirect on update box under the Post installation section.
+ Check the Redirect on update box under the Post installation section.
Learn more about environment variables
+ If you're editing existing GitHub apps, there are additional steps.
+ Everytime you update your GitHub app's setting, GitHub will prompt you to review the changes.
+ You will receive an email and you'll find a prompt under Settings > Integrations > Applications > Installed GitHub Apps > find your GitHub app > Configure.
+ You need accept the change so they're applied to your app.
+
From 0a93ad68f035b388f1c9372cea02ef7ec94ac1c0 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
If you're editing existing GitHub apps, there are additional steps.
- Everytime you update your GitHub app's setting, GitHub will prompt you to review the changes.
+ Every time you update your GitHub app's permissions, GitHub will prompt you to review the changes.
You will receive an email and you'll find a prompt under Settings > Integrations > Applications > Installed GitHub Apps > find your GitHub app > Configure.
You need accept the change so they're applied to your app.
- If you're editing existing GitHub apps, there are additional steps.
+ There are additional steps if you're updating permissions in existing GitHub apps.
Every time you update your GitHub app's permissions, GitHub will prompt you to review the changes.
You will receive an email and you'll find a prompt under Settings > Integrations > Applications > Installed GitHub Apps > find your GitHub app > Configure.
You need accept the change so they're applied to your app.
From be0e83b6fa117cd589a9b81e9cc6f7cdef69c2de Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
For automatic Git deployment to work, Appwrite needs to receive communication from GitHub, this means your Appwrite project must be accessible on the internet.
- If you're running on
If you're running Appwrite on Appwrite supports AWS S3, Digital Ocean Spaces, Backblaze, Akamai Object Storage, and Wasabi as storage adapters. Some of these services can be self-hosted, just like Appwrite. You can select which storage adaptor to use by setting the You can select which storage adapter to use by setting the The maximum size for individual file uploads is controlled by the
- Appwrite's Databases Service allows you to create multiple databases. Each database can contain many collections and can be backed by a different database adaptor in future versions.
+ Appwrite's Databases Service allows you to create multiple databases. Each database can contain many collections and can be backed by a different database adapter in future versions.
_APP_FUNCTIONS_TIMEOUT
environment variable. This environment variable changes the configurable maximum but does not alter existing individual configurations._APP_FUNCTIONS_TIMEOUT
environment variable. This environment variable changes the configurable maximum but does not alter existing configurations of individual functions.Storage Adaptors
+Storage Adapters
_APP_STORAGE_DEVICE
environment variable. Valid values are local
, s3
, dospaces
, backblaze
, linode
and wasabi
. Each storage adaptor requires its own set of additional environment variables to configure._APP_STORAGE_DEVICE
environment variable. Valid values are local
, s3
, dospaces
, backblaze
, linode
, and wasabi
. Each storage adaptor requires its own set of additional environment variables to configure._APP_STORAGE_LIMIT
environment variable, which defaults to 30 MB. See Environment Variables for more information.Applying Changes
docker-compose.yml
or .env
files, you will need to recreate your Appwrite stack by running the following compose command in your terminal.Next Steps
-Labels
subscriber
label can be added to a user once they've purchased a subscription.
Callback URL
@@ -57,6 +57,19 @@
Check the Redirect on update box under the Post installation section.
+
+
Webhook
+https://[HOSTNAME_OR_IP]/v1/vcs/github/events
.
+localhost
, GitHub can't send requests to Appwrite through webhooks and automatic deployments won't work.
+ You'll need host Appwrite on a server or use a proxy like ngrok to make Appwrite accessible to GitHub.
+Repository Permissions
Configure Function Runtimes
-
From 3955c3f167347994bc4259863783c4cec4cd47d7 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge"
-
+ URLs
-
+
- URLs
+
-
-
- http://[HOSTNAME_OR_IP]/v1/vcs/github/callback
-
+
- http://[HOSTNAME_OR_IP]/v1/account/sessions/oauth2/callback/github/console
+
+
+ http://[HOSTNAME_OR_IP]/v1/vcs/github/callback
+
+ http://[HOSTNAME_OR_IP]/v1/account/sessions/oauth2/callback/github/console
Post Installation
-
@@ -123,15 +123,15 @@
-
+ Permission
- Access
-
+
- Permission
+ Access
+
-
- Administration
- Read and write
-
-
- Checks
- Read and write.
-
-
- Commit Statuses
- Read and write
-
-
- Contents
- Read and write
-
-
- Issues
- Read and write
-
-
- Metadata
- Read-only
-
-
- Pull requests
- Read and write
-
-
+ Webhooks
- Read and write
-
+
+ Administration
+ Read and write
+
+
+ Checks
+ Read and write.
+
+
+ Commit Statuses
+ Read and write
+
+
+ Contents
+ Read and write
+
+
+ Issues
+ Read and write
+
+
+ Metadata
+ Read-only
+
+
+ Pull requests
+ Read and write
+
+
Webhooks
+ Read and write
+
-
@@ -142,16 +142,18 @@
-
+ Permission
- Access
-
+
- Permission
+ Access
+
- Email address
- Read-only
+
+
Email address
+ Read-only
-
diff --git a/app/views/docs/functions-develop.phtml b/app/views/docs/functions-develop.phtml
index 74272e38..20c78e1d 100644
--- a/app/views/docs/functions-develop.phtml
+++ b/app/views/docs/functions-develop.phtml
@@ -2662,7 +2662,7 @@ public class Main {
-
+ Event
-
-
-
+
- Event
+
+
+
-
+ Pull request Push
-
+
Pull request
+ Push
+
+ return context.res.send("")
.
This prevents confusing errors when functions are terminated prematurely before a response is sent.
- Learn about response.
+ Learn about response.
context.req
object as headers.
From d848ac853f56e902b1d855a988da2f5c15fb5952 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge" Update Existing GitHub Apps
+Configure Function Runtimes
Update Existing GitHub Apps
Update Existing GitHub Apps
Configure Function Runtimes
From 7948cdfaa3d57b768422461cca734d00f31ec359 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge" localhost
, you need to run a proxy like ngrok.
+ If you're running on localhost
, you need to run a proxy like ngrok.
Callback URL
@@ -67,7 +67,7 @@
localhost
, GitHub can't send requests to Appwrite through webhooks and automatic deployments won't work.
- You'll need host Appwrite on a server or use a proxy like ngrok to make Appwrite accessible to GitHub.
+ You'll need host Appwrite on a server or use a proxy like ngrok to make Appwrite accessible to GitHub.
Repository Permissions
From 35c58f0291761bf94fab706472b18f89505a5799 Mon Sep 17 00:00:00 2001
From: "Vincent (Wen Yu) Ge" _APP_STORAGE_DEVICE
environment variable. Valid values are local
, s3
, dospaces
, backblaze
, linode
, and wasabi
. Each storage adaptor requires its own set of additional environment variables to configure._APP_STORAGE_DEVICE
environment variable. Valid values are local
, s3
, dospaces
, backblaze
, linode
, and wasabi
. Each storage adapter requires its own set of additional environment variables to configure._APP_STORAGE_LIMIT
environment variable, which defaults to 30 MB. See Environment Variables for more information.Create Your Databases