Local Web Development with Docker

A minimal framework for local development of web sites, using Docker Compose.

  • Defines a local hosting environment using Docker Compose that can be started in a single command.
  • Bash scripts automate workflow:
    • A build script checks out and configures source code.
    • A pull script automates migrating data from production and staging environments.
    • An environment script configures the shell to interact with the hosting environment.

Features:

  • Aliases to commands running inside containers, e.g. mysql instead of docker-compose exec db mysql --user="$user" --password="$pass" "$db".
  • Xdebug -- PHP debugging, with a command to toggle on/off.
  • Webgrind -- visualize Xdebug profiles.
  • Mailhog -- capture outgoing mail.
  • traefik -- reverse proxy and ssl termination.

Similar projects:

Repository Structure

Base branches:

  • drupal-7, drupal-8 -- Host-agnostic Drupal.
  • pantheon-drupal-7, pantheon-drupal-8 -- Pantheon-hosted Drupal.
  • acquia-drupal-7, acquia-drupal-8 -- Acquia-hosted Drupal.
  • platformsh-drupal-7, platformsh-drupal-8 -- platform.sh

Pick a base branch, and create a branch for your project.

You will need to make minor modifications to most files to suit your project.

You can merge base branch changes into your project branch. You can submit PRs on base branches.