-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from aziontech/MarianaAguilera-patch-2
Update README.md - # Turso Starter Kit
- Loading branch information
Showing
1 changed file
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,71 @@ | ||
# Turso Starter Kit | ||
|
||
The **Turso Starter Kit** template is an automation designed to deploy a database directly on the edge while enabling the configuration of creating, retrieving, updating and deleting items in a Turso DB table called Posts. | ||
The **Turso Starter Kit** accelerates the integration of a Turso database, created using Turso's [LibSQL SDK](https://turso.tech/libsql), into an edge function. It also provides an interface to easily create, update, and delete items in your database. | ||
|
||
This repository is an example of the new GitHub repository created during the deployment. | ||
This repository is an example of the new GitHub repository created during the deployment. For a more detailed step-by-step to deploy this template through Azion's platform, check the [How to integrate a Turso database with Azion using a template](https://www.azion.com/en/documentation/products/guides/turso-starter-kit/) guide. | ||
|
||
This template uses LibSQL `0.5.3`. | ||
|
||
--- | ||
|
||
## Usage information | ||
|
||
To use this template, you must [sign in on Azion Console](https://console.azion.com/login). | ||
|
||
> If you haven't created an account, go to the [signup page](https://console.azion.com/signup) to complete the registration. | ||
To successfully deploy this template, you need to provide the information to configure your Azion application, as requested in the **Settings** tab on the template's page. | ||
|
||
For a more detailed step-by-step on using this template and requirements, check the [How to integrate a Turso database with Azion using a template](https://www.azion.com/en/documentation/products/guides/turso-starter-kit/) guide. | ||
|
||
### Requirements | ||
|
||
- Create a [Turso account](https://accounts.turso.tech/sign-up). | ||
- Install the [Turso CLI](https://docs.turso.tech/cli/introduction). | ||
- Create a [database](https://docs.turso.tech/quickstart) with a table called `posts`, and the fields `id` and `message`. | ||
- Generate your [GitHub personal token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic). | ||
- Enable [Edge Functions and Application Accelerator](https://www.azion.com/en/documentation/products/guides/billing-and-subscriptions/) in your Azion account. | ||
|
||
--- | ||
|
||
## Continuous deployment | ||
|
||
Once the template is deployed, you can edit and update your args and code, as well as implement a continuous deployment workflow. However, you'll need first to *declare secrets on your project's GitHub repository* to complete the second build with the changes. When the second build is completed, you'll be able to manage your project with a continuous deployment workflow and edit the args as desired. | ||
|
||
To do so, open your repository in GitHub. Then, go to **Settings** > **Secrets and variables** > **Action** to [add your variables](https://docs.github.com/en/actions/security-guides/encrypted-secrets), following these instructions: | ||
|
||
1. Add the Azion personal token to the *secrets*: | ||
- Read [how to generate an Azion personal token](https://www.azion.com/en/documentation/products/guides/personal-tokens/) in the documentation. | ||
|
||
```bash | ||
AZION_PERSONAL_TOKEN=<value> | ||
``` | ||
|
||
2. Add the environments for use in the action workflow in the **main.yml** file, included in the **.github/workflows** folder of your repository: | ||
|
||
```yml | ||
- name: edge-... | ||
id: azion_edge | ||
... | ||
with: | ||
.... | ||
azionPersonalToken: ${{ secrets.AZION_PERSONAL_TOKEN }} | ||
.... | ||
|
||
``` | ||
|
||
3. Open a pull request to merge the changes to the main branch and start the automatic deployment. | ||
|
||
Now your project is ready to work with a continuous deployment workflow, updating instantly any changes in the application or the repository. | ||
|
||
--- | ||
|
||
## Management | ||
|
||
Considering that this initial setup may not be optimal for your specific edge application, all settings can be customized any time you need by using [Azion Console)](https://console.azion.com/). | ||
|
||
To manage and edit your edge application’s settings, read the documentation about [managing edge applications](https://www.azion.com/en/documentation/products/edge-application/first-steps/) for more details. | ||
|
||
### Custom domain | ||
|
||
The edge application created during the deployment has an assigned Azion domain to make it accessible through the browser. The domain has the following format: `xxxxxxxxxx.map.azionedge.net`. However, you can add a custom domain for users to access your edge application through it. Go to the [Domains](https://www.azion.com/en/documentation/products/guides/configure-a-domain/) documentation to read more about it. |