Building a PHP Command Line App with Docker
At The Graide Network, we needed to automate a bunch of reminder emails and text messages being sent to our users. Every hour, we wanted to go into the database and find any reminders that needed to be sent, then queue up jobs to send each of them.
Here’s what I go through in this tutorial:
- Setting up a Laravel PHP command-line application
- Writing a cron job to run our command every hour within a Docker container
- Adding an acceptance test to verify that our command-line job works
In the second part of this tutorial, I’ll cover deploying the application using Codeship and Docker.