R
Railway•6mo ago
lasse

Libsql?

Is it possible to deploy libsql on railway?
22 Replies
Percy
Percy•6mo ago
Project ID: N/A
lasse
lasseOP•6mo ago
Thanks! What about the authToken? How do i get that?
Brody
Brody•6mo ago
theres no need for an auth token since you will be using it exclusively over the private network, thus once in production you should remove the http proxy
lasse
lasseOP•6mo ago
Alright thanks!
Web Dev Cody
Web Dev Cody•4mo ago
@Brody hey, if I used that libsql template, is there a way I can use tableplus to view the tables? like from my local? I see you said no need for an auth token, but I don't get how I could access the data without one also, I'm not sure what you mean by "in production remove the http proxy", how do I do that? oh wait, I see just delete the public hostname
Brody
Brody•4mo ago
there is no auth so you'd simply connect to the database from it's public hostname if you wanted to connect to it locally, but I said to remove the public domain, so it's a bit of a catch 22 and you're back with the original problem you had on twitter with sqlite
Web Dev Cody
Web Dev Cody•4mo ago
well it seems like there is a way to deploy this image with a token SQLD_AUTH_JWT_KEY but I'm failing to figure out how to properlly generate that key
Brody
Brody•4mo ago
what do the docs say it should be?
Web Dev Cody
Web Dev Cody•4mo ago
SQLD_AUTH_JWT_KEY_FILE Path to a file with a JWT decoding key used to authenticate clients in the Hrana and HTTP APIs. The key is either a PKCS#8-encoded Ed25519 public key in PEM, or just plain bytes of the Ed25519 public key in URL-safe base64. You can also pass the key directly in the env variable SQLD_AUTH_JWT_KEY. I've tried ssh-keygen -t ed25519 then I've tried pasting that key, I've tried base64 encoding it, tried various things I'm also wondering why it needs the public key... shouldn't the secure server use the private key?
Brody
Brody•4mo ago
why not try basic auth?
Web Dev Cody
Web Dev Cody•4mo ago
tableplus seems to want a key as an input I could try yeah basic seems to work fine with tableplus now trying to figure out how to set this up with drizzle
Brody
Brody•4mo ago
ideally that would be included with the template, but don't know how I'd do that in a user friendly way considering the template variable syntax can't run arbitrary commands
Web Dev Cody
Web Dev Cody•4mo ago
maybe just including a link to the libsql docs that outline this part might be useful
Brody
Brody•4mo ago
yeah that sounds like the ideal thing to do in this situation
Web Dev Cody
Web Dev Cody•4mo ago
GitHub
libsql/docs/DOCKER.md at main · tursodatabase/libsql
libSQL is a fork of SQLite that is both Open Source, and Open Contributions. - tursodatabase/libsql
Web Dev Cody
Web Dev Cody•4mo ago
but this is awesome, I think this fixes all my concerns I had with sqlite although I still don't see the strong argument to use it over postgres if we are still just wrapping it with an http service? I guess it uses less memory?
Brody
Brody•4mo ago
so now this is just like postgres in some way 🙂 pretty sure this would use a crazy amount less memory
Web Dev Cody
Web Dev Cody•4mo ago
now I need to look into this backup flag they have LIBSQL bottomless
lasse
lasseOP•3mo ago
How can i add a replica?
Brody
Brody•3mo ago
you can't add replicas to services with volumes
Want results from more Discord servers?
Add your server