WordPress deployment workflow to Google Container Engine using Circle-CI, Docker hub and Kubernetes

We would like a github repository to include deployment configuration of a WordPress blog. We would like to run an instance of this deployment on a Google Container Engine / Kubernetes. In fact, we would like to run two instances, a pre-prod instance matching the master branch of the deployment configuration. We would like the operated deployment instances to automatically update when we commit to the configuration repository.

Continue reading

Using MongoDB for logging

Recently, we’ve tested using MongoDB for a lot of different purposes. This article gives an example of how to log to MongoDB from PHP.

First, a very basic logging class written in PHP:

To do logging from your code, you simply do So_log::debug(message, object);:

You may easily access your logs through the Mongo shell, however it might be convenient to write your own customized tool to tail the logs. Yoy may extend the tools to give more advanced filtering and presentation options.

Here is a very basic tool for tailing the log, written in javascript.

To run the log tailer, run mongo oauth log.js.

The result, will look like this: