Transit Project
This was a lot of fun to put together.
I never learned Docker in college. I knew of it, and knew what it was about at a super high level: running an application in its own isolated environment called a container, and that it was supposed to be way better than a virtual machine. I never needed to use it for any school projects, and certainly not for my job once I graduated, so I put off doing anything with it for a while.
But I knew that containerization is the general direction that the computing industry is heading, so I finally decided to learn it. I installed Docker Desktop, sat down with their documentation, ran through a couple of tutorials, and eventually tried to get my own application working. And thus, the transit project was born.
Ever since I can remember, I have been a huge fan of the New York City Subway. Growing up in the northeast, I visited NYC several times and riding the subway was always a major highlight of the trip for me (and only me–not for the rest of my family, let me assure you). So when I discovered that the MTA provides their GTFS feeds for free, I thought it would be the perfect subject for this educational project.
If you didn’t know: GTFS (General Transit Feed Specification) is a standardized format, developed by Google, for conveying schedule and other information about a public transportation system. There are many, many options that can be used in the implementation of a feed, and there is no strict format for the data itself other than the overall structure, so the implementation varies widely by transit agency.
This project is a PHP website backed by a MySQL database. The database contains the raw data from the MTA feeds, and the website queries the data and uses it to model parts of the NYC Subway and bus system. The entire thing is powered by Docker Compose; with each of the two services (the PHP web-based front end and the MySQL back end) in its own container.
The site displays the subway route symbols as well, for which I had to obtain a license from the MTA.
I’m never going back to VMs again (unless, of course, there is no other practical choice).