Public | Automated Build

Last pushed: a year ago
Short Description
Docker bedrock
Full Description


:ship: a docker image for wordpress sites built with bedrock


A year after releasing, I've come to the opinion that Docker is not best suited for this task. Containerizing WordPress seems a little heavy handed for something that can be solved using Ansible and Capstrano much easier, and is much more difficult to configure and debug. I will still be maintaining this repo for the time being, but my personal recommendation would be just to use a regular server instance and deploy using Capistrano or something similar.

What is Bedrock?

Bedrock is a modern WordPress stack that helps you get started with the best development tools and project structure.

Much of the philosophy behind Bedrock is inspired by the Twelve-Factor App methodology including the WordPress specific version.

Why use this image?

Rather than using Apache, we instead use nginx dispatching fastcgi requests to HHVM, with a fallback to php-fpm if we get a bad gateway. This should make your Bedrock install a little quicker than your average WordPress installation.

How to use this image

Start a bedrock server instance

docker run --name your-project-name --link your-mysql-container-name:mysql -p 80:80 -e DB_NAME=your-db-name -e WP_HOME=your-wordpress-site.local adamyeats/docker-nginx-hhvm-bedrock

... via docker-compose

Example docker-compose.yml for bedrock:

  image: adamyeats/docker-nginx-hhvm-bedrock
    - "80:80"
    - db:mysql
    - memcached:memcached # Optional
    - .:/var/www/html
    DB_NAME: my_wordpress_project

  image: mariadb

memcached: # Optional, recommeded for W3 Cache users
  image: memcached

Run docker-compose up, wait for it to initialize completely, and visit http://host-ip. Don't worry about any Can't connect to MySQL server on 'mysql messages in STDOUT if you're using Compose; sometimes the web process initializes before the DB process, and the script that creates your database if it doesn't exist complains that it can't find your DB. That'll fix itself in a few seconds.

Docker Pull Command