Skip to content

General Transit Feed Specification (GTFS) API in Rails

Notifications You must be signed in to change notification settings

brodyFlannigan/gtfs-rails-api

 
 

Repository files navigation

General Transit Feed Specification (GTFS) Rails API

This Ruby on Rails application provides a JSON API representation of the data contained in a given GTFS feed from a local transit provider.

Deploy

Requirements

Production

  • Ruby 2.5+
  • Bundler
  • MySQL

Development

All of the requirements above are spec'd out in the Dockerfile and docker-compose.yml files.

Installation

  1. Clone the repository into a project directory
  2. Copy .env-dist to .env and update connection information
  3. Run docker-compose up -d to bring up the web server and database server
  4. Run docker exec -it gtfs-rails-api-web bash to access running instance
  5. Run bundle exec rake db:setup to create the database and run the migrations
  6. Run bundle exec rake import:all to process the data from the GTFS feed
  7. Browse to http://localhost:3000 to browse API endpoints

About

General Transit Feed Specification (GTFS) API in Rails

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.1%
  • Dockerfile 1.5%
  • Other 0.4%