GithubHelp home page GithubHelp logo

docker-drupal7's Introduction

docker-drupal7

Container for running Drupal7 based sites

Features

Management scripts:

  • backup
  • restore
  • create-drupal-db
  • create-nginx-site

Usage

Starting a container

docker run -d --name mysql -e MYSQL_ROOT_PASSWORD=s3cret \
  solfisk/mariadb-percona:latest
docker run -d --name drupal7 --link mysql solfisk/drupal7

After this, you need to set up a database for your drupal site:

docker exec drupal7 create-drupal-db \
  s3cret my_drupal_db drupal_login drupal_password

Then download the latest drupal core:

docker exec drupal7 drush dl drupal-7.x \
  --destination=/var/www \
  --drupal-project-rename=drupal7 -y

Now set up your drupal site:

docker exec drupal7 /bin/sh -c 'cd /var/www/drupal7 && drush \
  site-install standard -y \
  --site-name=totallyawesome.com \
  --account-name=admin \
  --account-pass=admin_s3cret \
  --db-url=mysql://drupal_login:drupal_password@mysql:3306/my_drupal_db'

Then set up nginx to recognize totallyawesome.com:

docker exec drupal7 create-nginx-site totallyawesome.com totallyawesome.io

The first parameter is the main site name (mandatory). The rest specifies optional aliases.

Notes

The drupal core must be installed in /var/www/drupal7 - otherwise you'll break the utility scripts.

All state for this container is stored in /var/www/drupal7, so mounting a data container (or host path) here is a very safe way of retaining the state in the event that the container is lost.

Backup and restore

The backups provided by this container contains more than what Drupals backup and migrate contains, because they also contain the site specific nginx configuration, settings, drupal core and all installed modules.

To backup:

docker exec drupal7 backup > drupal7-backup.bin

To restore:

docker exec drupal7 restore < drupal7-backup.bin

Use this in conjunction with docker exec mysql backup and docker exec mysql restore with the Solfisk mariadb-percona image to retain complete backups of the site.

Credits

This image uses the nginx configuration for Drupal assembled by António P. P. Almeida.

The rest has been written by Michael Zedeler and Anatolii Romanov.

Bugs

If you find a bug, you can either:

  • Create an issue describing the symptoms (and if possible, identify the source of the bug and add it to the issue).
  • Fix the bug and open a pull request.

License

See the license.

docker-drupal7's People

Contributors

mzedeler avatar vodolaz095 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

vodolaz095

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.