This application is heavily based on previous work by altsalt.
The composition is made up of three separate containers:
-
Application - based on official Drupal:7-fpm image. Modified to load additional PHP extensions, install Drush, download CiviCRM, and run a post-build initialization script.
-
Database - linked from official MariaDB:latest image.
-
Web Server - based on official nginx:latest image. Modified to load CiviCRM specific configuration.
In theory, the database and web server containers could be swapped for any variants which CiviCRM supports.
$ git clone https://github.com/altsalt/civicrm-docker && cd civicrm-docker
Update the environment variable files located underneath /env with your preferences.
Update the email configuration file located at /app/ssmtp.conf with your preferences.
Update the docker-compose.yml file with the ports you plan on using (if non-standard).
When you are ready, installation is as easy as:
$ docker-compose build
$ docker-compose up
You will also probably want to run the secure installation script on the database container:
$ docker exec -it civicrmdocker_db_1 bash
$ mysql_secure_installation
Enjoy!
- altsalt for his work on the civicrm-docker project.
- Docker for providing official packages for Drupal, MariaDB, nginx, and all others that went to building these.
- djcf for their civicrm-docker project and related questions floating around the Internet.
- Josh Lockhart for their blog post which maps a three container Docker image.
- William Mortada for their explaination of the update procedure via Drush.
- the Drupal community for documentation about hardening an install.
- md5 for their gist demonstrating nginx+php-fpm.
- wsargent for the Docker Cheat Sheet.
- and the many giants who have come before us, this world would not be possible without you!