Coder Social home page Coder Social logo

Edge deployment and SQLite about node-gtfs HOT 4 CLOSED

laem avatar laem commented on July 19, 2024
Edge deployment and SQLite

from node-gtfs.

Comments (4)

AvidDabbler avatar AvidDabbler commented on July 19, 2024 1

You could also run this in a Github action which would trigger a redeploy and store it in the repo. I have been playing around with storing the db on a remix server with Simple Transit Site. I am persisting the db in s3 using a cron job and pulling it down in the Dockerfile and then running the Gtfs update.

I know that there are other options like Litestream, but it does not work with the DigitalOcean platform for some reason.

https://github.com/ioTransit/simple-transit-site/tree/main

from node-gtfs.

brendannee avatar brendannee commented on July 19, 2024 1

@laem You are correct - I build the db locally and then check it into the git repo along with the code for the project and then deploy (via git) to Vercel. So it is all bundled together. Whenever there is an update to the GTFS, I make a new commit to the repo.

That might not work well with very large agencies GTFS or for GTFS that changes very frequently.

from node-gtfs.

brendannee avatar brendannee commented on July 19, 2024

I'd like to add support for more databases other than sqlite3, perhaps using Drizzle or Prisma.

I have had success deploying to Vercel by including sqlite generated from node-gtfs as part of the repo in a read-only fashion (following the baked-data pattern https://simonwillison.net/2021/Jul/28/baked-data/ )

from node-gtfs.

laem avatar laem commented on July 19, 2024

Thanks ! So if I understand well, you have a server (or your local computer) where you're building your db, and then on Vercel you're downloading (through git or S3) a prepared version of your DB to be consumed without any writes.

In other words, no importGTFS on the edge platform ?

from node-gtfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.