Services.yml
A simple file format for documenting the services a Rails app uses.
Rails apps often depend on a dozen or more third-party services. When you work on a lot of apps, it gets hard to remember which ones use what.
Services.yml is a short list that lives in the root of the app. It starts with the hosting provider, lists everything else alphabetically, and uses a single word for each type of service:
hosting: heroku
email:
transactional: postmark
mapping:
maps: mapbox
payments: stripe
storage:
amazon:
- cloudfront
- s3
ENV variables, the Gemfile, and the README each hold part of this picture, but none of them gives you the whole list at a glance. A SERVICES.yml file does, and most of my apps have one, including this site.
Once your apps use the format, you can query them right from the command line. For instance, I wrote a custom services bash command that does just that.
$ services monamour
..MONAMOUR SERVICES.......................................
hosting: vercel
mapping: mapbox
$ services
..SERVICES................................................
+-------------------------+--------------+---------------+
| Category | Provider | App |
+-------------------------+--------------+---------------+
| advertising | google | beekman |
+-------------------------+--------------+---------------+
| analytics | google | avalon |
+-------------------------+--------------+---------------+
| cache | solid_cache | avalon |
+-------------------------+--------------+---------------+
| database | postgres | avalon |
+-------------------------+--------------+---------------+
| email (spam) | oopspam | avalon |
| | akismet | beekman |
| | | graffletopia |
+-------------------------+--------------+---------------+