A project of the non-profit Open Transit Software Foundation!
The OneBusAway application suite's primary function is to share real-time public transit information with riders across a variety of interfaces:
Watch the YouTube video for more information.
Here are the high-level steps you'll need to take to launch the OneBusAway mobile apps in your area:
See the multi-region page for more details.
There are two options for setting up your own OneBusAway instance:
docker compose up builder
# Now, open another window or tab and continue running commands:
# acquaint yourself with the make options
bin/make --help
# build the project
bin/make
# now you have built all of the OBA artifacts, which can be found in the `/root/.m2/repository` directory.
# enter the docker container and look around
bin/shell
ls /root/.m2/repository # this runs inside the docker container
# exit the docker container
exit
# Build a data bundle, which will power the OBA server:
bin/build_bundle
# Finally, copy all of the built WAR resources into /usr/local/tomcat
bin/copy_and_relaunch
# wait a few seconds for everything to spin up...
Finally, verify that everything works as expected!
By default, the development server is configured to use static and real-time data from the Seattle area transit agency, King County Metro.
./docker_app_server/bundle
(i.e. run the command rm -rf ./docker_app_server/bundle/*
)./docker_app_server/config/onebusaway-transit-data-federation-webapp-data-sources.xml
as described in Realtime Data Changesdocker compose up builder
bin/make
- Build the project (probably unnecessary, but better safe than sorry!)bin/build_bundle
- Create a new data bundlebin/copy_and_relaunch
- Copies the latest JAR and WAR files, as well as the contents of ./docker_app_server/config
into $CATALINA_HOME
builder
service: Ctrl+C and then docker compose up builder
./docker-compose.yml
:
GTFS_URL
to your static GTFS URL: GTFS_URL=https://www.soundtransit.org/GTFS-KCM/google_transit.zip
TZ
) to match the time zone of the agency specified in your GTFS data: TZ=America/Los_Angeles
In the file ./docker_app_server/config/onebusaway-transit-data-federation-webapp-data-sources.xml
, change the following properties:
tripUpdatesUrl
vehiclePositionsUrl
alertsUrl
agencyId
Note: if the GTFS-RT feeds require a header-supplied API key, also modify the headersMap
property thusly:
<property name="headersMap">
<map>
<entry key="{API KEY PROPERTY NAME}" value="{API KEY PROPERTY VALUE}" />
</map>
</property>
for example:
<bean class="org.onebusaway.transit_data_federation.impl.realtime.gtfs_realtime.GtfsRealtimeSource">
<property
name="tripUpdatesUrl"
value="https://gtfsbridge.spokanetransit.com/realtime/TripUpdate/TripUpdates.pb"
/>
<property
name="vehiclePositionsUrl"
value="https://gtfsbridge.spokanetransit.com/realtime/vehicle/VehiclePositions.pb"
/>
<property
name="alertsUrl"
value="https://gtfsbridge.spokanetransit.com/realtime/Alert/Alerts.pb"
/>
<property name="refreshInterval" value="30" />
<property name="agencyId" value="STA" />
<property name="headersMap">
<map>
<entry key="X-API-KEY" value="12345" />
</map>
</property>
</bean>
http://localhost:8080/onebusaway-api-webapp/api/where/config.json?key=test
onebusaway-api-webapp/src/main/java/org/onebusaway/api/actions/api/where/ConfigAction.java
in the index()
method.Debug (Attach)
.OneBusAway is used in a number of places:
Check out the full list on the OneBusAway Deployments page. Check out the main project page at http://onebusaway.org.
mvn deploy -DskipTests
./target/central-publishing/central-bundle.zip
to Maven Central's publishing page.
Open questions and issues:
mvn deploy
command to upload to Maven Central automatically.There are lots of ways to get in touch with us.