0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
astro/.changeset/healthy-boxes-poke.md
Luiz Ferraz d6611e8bb0
Add support for LibSQL remote (#11385)
* Add support for remote LibSQL

* Add support for local memory DB

* Add some tests

* Add push support

* Fix switch cascading

* Update .changeset/healthy-boxes-poke.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/db/src/runtime/db-client.ts

[skip ci]

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* Use independent env vars for LibSQL and Studio backends

* Expand comment regarding missing table

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-08-28 12:15:33 +01:00

767 B

@astrojs/db
minor

Adds support for connecting Astro DB to any remote LibSQL server. This allows Astro DB to be used with self-hosting and air-gapped deployments.

To connect Astro DB to a remote LibSQL server instead of Studio, set the following environment variables:

  • ASTRO_DB_REMOTE_URL: the connection URL to your LibSQL server
  • ASTRO_DB_APP_TOKEN: the auth token to your LibSQL server

Details of the LibSQL connection can be configured using the connection URL. For example, memory:?syncUrl=libsql%3A%2F%2Fdb-server.example.com would create an in-memory embedded replica for the LibSQL DB on libsql://db-server.example.com.

For more details, please visit the Astro DB documentation