Skip to content

Offers 3 different flavors of docker containers that can be built upon to deploy Drupal and Tripal sites.

License

Notifications You must be signed in to change notification settings

statonlab/docker-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

master Build Status

Docker Containers for Tripal

This repository offers 3 flavors of docker containers:

  1. drupal7: Creates and installs a Drupal 7 site
  2. tripal3: Builds on top of the Drupal 7 container to install Tripal 3 and prepares both Chado and Drupal.
  3. tripal2: Builds on top of the Drupal 7 container to install Tripal 2 and Chado 1.3.

Installation

To install, you can simply pull the containers from the docker hub or add a FROM line in your Dockerfile.

# Use one of the following to pull the container
docker pull statonlab/drupal7
docker pull statonlab/tripal3
docker pull statonlab/tripal2

# Or in your Docker file
FROM statonlab/drupal7:latest
FROM statonlab/tripal3:latest
FROM statonlab/tripal2:latest

An image is available with the Tripal Devseed dataset pre-loaded! This was built using v0.1.5 of this repo and v0.1.1 of the Devseed project.

docker pull statonlab/tripal3_seeded

Usage

Site password

The login information for your site: Username: admin Password: secret

Ports

All containers expose the following ports:

  • HTTP port 80
  • PostgreSQL port 5432
Volumes

All containers install Drupal in /var/www/html. Therefore, mapping your custom modules should go in /var/www/html/sites/all/modules/[your module folder name]. These containers also offer a shortcut to the modules directly in /modules, so instead of mapping modules to the Drupal path, you can simply map to /modules/[module name].

Usage Examples

Run example:

# use -d to run in the background as shown below
docker run -itd -p 8080:80 -p 5432:5432 --name my-container -v .:/modules/my-module statonlab/tripal3
docker run -itd -p 8080:80 -p 5432:5432 --name my-container -v .:/modules/my-module statonlab/tripal2
docker run -itd -p 8080:80 -p 5432:5432 --name my-container -v .:/modules/my-module statonlab/drupal7

You can then visit localhost:8080 to view your site.

Access a running container's shell and executing commands:

# NOTE: my-container is specified in the run command using the --name option.
# Access the shell
docker exec -it my-container bash

# Run drush
docker exec -it my-container drush en my-module

Additional Information

The docker containers deploy a supervisor service that ensures apache and postgres get automatically restarted every time either fails. Thus, lowering the down time your site may experience.