Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Use jwilder/nginx-proxy
- because I hate mapping ports
- ```bash
- docker run -d --name proxy -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
- ```
- ## Use offical mariadb image
- with named volume for persistent data
- ```bash
- docker run -d --name drushtest_db -e MYSQL_DATABASE=drupal -e MYSQL_USER=drupal -e MYSQL_PASSWORD=weakpassword -e MYSQL_RANDOM_ROOT_PASSWORD=yes -v drushtest_db_data:/var/lib/mysql mariadb:5.5
- ```
- ## Use offical drupal 7 image
- with named volume for html because the drush/drush image needs to be able to see the drupal php code, and a separate named volume for sites because we want to be able to upgrade drupal by deleting html volume without losing our own data
- ```bash
- docker run -d --name drushtest_drupal --link drushtest_db:db -v drushtest_drupal_html:/var/www/html -v drushtest_drupal_sites:/var/www/html/sites -e VIRTUAL_HOST=drushtest.* drupal:7
- ```
- ## Using drush/drush to do a drush site-install
- ```bash
- docker run --rm -it --link drushtest_db:db --volumes-from drushtest_drupal drush/drush:7 -r /var/www/html -y -vv site-install standard --db-url=mysql://drupal:weakpassword@db/drupal --account-name=dev --account-pass=badpassword --account-mail=dev@example.com --site-mail=dev@example.com --site-name="drush drupal test" --sites-subdir=default
- ```
- ## Using drush/drush to list the drupal modules
- ```bash
- docker run --rm -it --link drushtest_db:db --volumes-from drushtest_drupal drush/drush:7 -r /var/www/html pm-list
- ```
- ## Drop in a makefile for drush
- ```bash
- docker cp drupal.make.yml drushtest_drupal:/var/www/html/sites/
- ```
- ## Do the make
- ```bash
- docker run --rm -it --link drushtest_db:db -w /var/www/html/sites --volumes-from drushtest_drupal drush/drush:7 make -y --no-core --working-copy --contrib-destination=all drupal.make.yml
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement