Deploy a web app with a Turso database and Drizzle ORM on Koyeb
Learn more about Koyeb
·
Explore the documentation
·
Discover our tutorials
Koyeb is a developer-friendly serverless platform to deploy apps globally. No-ops, servers, or infrastructure management.
This repository contains is designed to show how to deploy a web app build with a Turso database and Drizzle ORM to Koyeb. You can follow the associated tutorial to learn more about the components and how they fit together
Follow the steps below to deploy and run the Turso and Drizzle web app to your Koyeb account.
To use this repository, you need:
- A Koyeb account: to build and run the web app. If you don't already have an account, you can sign-up for free.
- A Turso account: To store the application data and persist state across deployments.
The fastest way to deploy the Turso and Drizzle web app is to click the Deploy to Koyeb button below.
Clicking on this button brings you to the Koyeb App creation page with most of the settings pre-configured to launch this application. You will need to replace the values for the following variables:
DATABASE_URL
: Set to the connection string for your Turso database.DATABASE_AUTH_TOKEN
: Set to the authentication token string generated for your Turso database.
To modify this application example, you will need to fork this repository. Checkout the fork and deploy instructions.
If you want to customize and enhance this application, you need to fork this repository.
If you used the Deploy to Koyeb button, you can simply link your service to your forked repository to be able to push changes. Alternatively, you can manually create the application as described below.
On the Koyeb Control Panel, on the Overview tab, click the Create Web Service button to begin.
- Select GitHub as the deployment method.
- Choose the repository containing your application code.
- In the Environment variables section, click the Add Variable button to fill in the environment variables outlined above.
- Choose a name for your App and Service, for example
example-turso-drizzle
, and click Deploy.
The repository will be cloned and the web application will be built and deployed to Koyeb. You can follow the build process as the repository is cloned, built, and deployed. Once the deployment is complete, it will be accessible using the Koyeb subdomain for your service.
If you have any questions, ideas or suggestions regarding this application sample, feel free to open an issue or fork this repository and open a pull request.